Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: downgrade the buf typescript version (#7724)
h3n4l2d3c47afe7ff
diff --git a/frontend/src/types/proto/google/api/client.ts b/frontend/src/types/proto/google/api/client.tsindex caf22438cf..e38085148f 100644--- a/frontend/src/types/proto/google/api/client.ts+++ b/frontend/src/types/proto/google/api/client.ts@@ -512,11 +512,11 @@ export const CommonLanguageSettings = {toJSON(message: CommonLanguageSettings): unknown {const obj: any = {};- if (message.referenceDocsUri !== "") {- obj.referenceDocsUri = message.referenceDocsUri;- }- if (message.destinations?.length) {+ message.referenceDocsUri !== undefined && (obj.referenceDocsUri = message.referenceDocsUri);+ if (message.destinations) {obj.destinations = message.destinations.map((e) => clientLibraryDestinationToJSON(e));+ } else {+ obj.destinations = [];}return obj;},@@ -524,6 +524,7 @@ export const CommonLanguageSettings = {create(base?: DeepPartial<CommonLanguageSettings>): CommonLanguageSettings {return CommonLanguageSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CommonLanguageSettings>): CommonLanguageSettings {const message = createBaseCommonLanguageSettings();message.referenceDocsUri = object.referenceDocsUri ?? "";@@ -697,45 +698,32 @@ export const ClientLibrarySettings = {toJSON(message: ClientLibrarySettings): unknown {const obj: any = {};- if (message.version !== "") {- obj.version = message.version;- }- if (message.launchStage !== 0) {- obj.launchStage = launchStageToJSON(message.launchStage);- }- if (message.restNumericEnums === true) {- obj.restNumericEnums = message.restNumericEnums;- }- if (message.javaSettings !== undefined) {- obj.javaSettings = JavaSettings.toJSON(message.javaSettings);- }- if (message.cppSettings !== undefined) {- obj.cppSettings = CppSettings.toJSON(message.cppSettings);- }- if (message.phpSettings !== undefined) {- obj.phpSettings = PhpSettings.toJSON(message.phpSettings);- }- if (message.pythonSettings !== undefined) {- obj.pythonSettings = PythonSettings.toJSON(message.pythonSettings);- }- if (message.nodeSettings !== undefined) {- obj.nodeSettings = NodeSettings.toJSON(message.nodeSettings);- }- if (message.dotnetSettings !== undefined) {- obj.dotnetSettings = DotnetSettings.toJSON(message.dotnetSettings);- }- if (message.rubySettings !== undefined) {- obj.rubySettings = RubySettings.toJSON(message.rubySettings);- }- if (message.goSettings !== undefined) {- obj.goSettings = GoSettings.toJSON(message.goSettings);- }+ message.version !== undefined && (obj.version = message.version);+ message.launchStage !== undefined && (obj.launchStage = launchStageToJSON(message.launchStage));+ message.restNumericEnums !== undefined && (obj.restNumericEnums = message.restNumericEnums);+ message.javaSettings !== undefined &&+ (obj.javaSettings = message.javaSettings ? JavaSettings.toJSON(message.javaSettings) : undefined);+ message.cppSettings !== undefined &&+ (obj.cppSettings = message.cppSettings ? CppSettings.toJSON(message.cppSettings) : undefined);+ message.phpSettings !== undefined &&+ (obj.phpSettings = message.phpSettings ? PhpSettings.toJSON(message.phpSettings) : undefined);+ message.pythonSettings !== undefined &&+ (obj.pythonSettings = message.pythonSettings ? PythonSettings.toJSON(message.pythonSettings) : undefined);+ message.nodeSettings !== undefined &&+ (obj.nodeSettings = message.nodeSettings ? NodeSettings.toJSON(message.nodeSettings) : undefined);+ message.dotnetSettings !== undefined &&+ (obj.dotnetSettings = message.dotnetSettings ? DotnetSettings.toJSON(message.dotnetSettings) : undefined);+ message.rubySettings !== undefined &&+ (obj.rubySettings = message.rubySettings ? RubySettings.toJSON(message.rubySettings) : undefined);+ message.goSettings !== undefined &&+ (obj.goSettings = message.goSettings ? GoSettings.toJSON(message.goSettings) : undefined);return obj;},create(base?: DeepPartial<ClientLibrarySettings>): ClientLibrarySettings {return ClientLibrarySettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ClientLibrarySettings>): ClientLibrarySettings {const message = createBaseClientLibrarySettings();message.version = object.version ?? "";@@ -930,42 +918,36 @@ export const Publishing = {toJSON(message: Publishing): unknown {const obj: any = {};- if (message.methodSettings?.length) {- obj.methodSettings = message.methodSettings.map((e) => MethodSettings.toJSON(e));- }- if (message.newIssueUri !== "") {- obj.newIssueUri = message.newIssueUri;- }- if (message.documentationUri !== "") {- obj.documentationUri = message.documentationUri;- }- if (message.apiShortName !== "") {- obj.apiShortName = message.apiShortName;- }- if (message.githubLabel !== "") {- obj.githubLabel = message.githubLabel;- }- if (message.codeownerGithubTeams?.length) {- obj.codeownerGithubTeams = message.codeownerGithubTeams;- }- if (message.docTagPrefix !== "") {- obj.docTagPrefix = message.docTagPrefix;- }- if (message.organization !== 0) {- obj.organization = clientLibraryOrganizationToJSON(message.organization);- }- if (message.librarySettings?.length) {- obj.librarySettings = message.librarySettings.map((e) => ClientLibrarySettings.toJSON(e));- }- if (message.protoReferenceDocumentationUri !== "") {- obj.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri;- }+ if (message.methodSettings) {+ obj.methodSettings = message.methodSettings.map((e) => e ? MethodSettings.toJSON(e) : undefined);+ } else {+ obj.methodSettings = [];+ }+ message.newIssueUri !== undefined && (obj.newIssueUri = message.newIssueUri);+ message.documentationUri !== undefined && (obj.documentationUri = message.documentationUri);+ message.apiShortName !== undefined && (obj.apiShortName = message.apiShortName);+ message.githubLabel !== undefined && (obj.githubLabel = message.githubLabel);+ if (message.codeownerGithubTeams) {+ obj.codeownerGithubTeams = message.codeownerGithubTeams.map((e) => e);+ } else {+ obj.codeownerGithubTeams = [];+ }+ message.docTagPrefix !== undefined && (obj.docTagPrefix = message.docTagPrefix);+ message.organization !== undefined && (obj.organization = clientLibraryOrganizationToJSON(message.organization));+ if (message.librarySettings) {+ obj.librarySettings = message.librarySettings.map((e) => e ? ClientLibrarySettings.toJSON(e) : undefined);+ } else {+ obj.librarySettings = [];+ }+ message.protoReferenceDocumentationUri !== undefined &&+ (obj.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri);return obj;},create(base?: DeepPartial<Publishing>): Publishing {return Publishing.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Publishing>): Publishing {const message = createBasePublishing();message.methodSettings = object.methodSettings?.map((e) => MethodSettings.fromPartial(e)) || [];@@ -1055,27 +1037,22 @@ export const JavaSettings = {toJSON(message: JavaSettings): unknown {const obj: any = {};- if (message.libraryPackage !== "") {- obj.libraryPackage = message.libraryPackage;- }+ message.libraryPackage !== undefined && (obj.libraryPackage = message.libraryPackage);+ obj.serviceClassNames = {};if (message.serviceClassNames) {- const entries = Object.entries(message.serviceClassNames);- if (entries.length > 0) {- obj.serviceClassNames = {};- entries.forEach(([k, v]) => {- obj.serviceClassNames[k] = v;- });- }- }- if (message.common !== undefined) {- obj.common = CommonLanguageSettings.toJSON(message.common);+ Object.entries(message.serviceClassNames).forEach(([k, v]) => {+ obj.serviceClassNames[k] = v;+ });}+ message.common !== undefined &&+ (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);return obj;},create(base?: DeepPartial<JavaSettings>): JavaSettings {return JavaSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<JavaSettings>): JavaSettings {const message = createBaseJavaSettings();message.libraryPackage = object.libraryPackage ?? "";@@ -1146,18 +1123,15 @@ export const JavaSettings_ServiceClassNamesEntry = {toJSON(message: JavaSettings_ServiceClassNamesEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<JavaSettings_ServiceClassNamesEntry>): JavaSettings_ServiceClassNamesEntry {return JavaSettings_ServiceClassNamesEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<JavaSettings_ServiceClassNamesEntry>): JavaSettings_ServiceClassNamesEntry {const message = createBaseJavaSettings_ServiceClassNamesEntry();message.key = object.key ?? "";@@ -1207,15 +1181,15 @@ export const CppSettings = {toJSON(message: CppSettings): unknown {const obj: any = {};- if (message.common !== undefined) {- obj.common = CommonLanguageSettings.toJSON(message.common);- }+ message.common !== undefined &&+ (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);return obj;},create(base?: DeepPartial<CppSettings>): CppSettings {return CppSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CppSettings>): CppSettings {const message = createBaseCppSettings();message.common = (object.common !== undefined && object.common !== null)@@ -1266,15 +1240,15 @@ export const PhpSettings = {toJSON(message: PhpSettings): unknown {const obj: any = {};- if (message.common !== undefined) {- obj.common = CommonLanguageSettings.toJSON(message.common);- }+ message.common !== undefined &&+ (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);return obj;},create(base?: DeepPartial<PhpSettings>): PhpSettings {return PhpSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PhpSettings>): PhpSettings {const message = createBasePhpSettings();message.common = (object.common !== undefined && object.common !== null)@@ -1325,15 +1299,15 @@ export const PythonSettings = {toJSON(message: PythonSettings): unknown {const obj: any = {};- if (message.common !== undefined) {- obj.common = CommonLanguageSettings.toJSON(message.common);- }+ message.common !== undefined &&+ (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);return obj;},create(base?: DeepPartial<PythonSettings>): PythonSettings {return PythonSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PythonSettings>): PythonSettings {const message = createBasePythonSettings();message.common = (object.common !== undefined && object.common !== null)@@ -1384,15 +1358,15 @@ export const NodeSettings = {toJSON(message: NodeSettings): unknown {const obj: any = {};- if (message.common !== undefined) {- obj.common = CommonLanguageSettings.toJSON(message.common);- }+ message.common !== undefined &&+ (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);return obj;},create(base?: DeepPartial<NodeSettings>): NodeSettings {return NodeSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<NodeSettings>): NodeSettings {const message = createBaseNodeSettings();message.common = (object.common !== undefined && object.common !== null)@@ -1529,35 +1503,34 @@ export const DotnetSettings = {toJSON(message: DotnetSettings): unknown {const obj: any = {};- if (message.common !== undefined) {- obj.common = CommonLanguageSettings.toJSON(message.common);- }+ message.common !== undefined &&+ (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);+ obj.renamedServices = {};if (message.renamedServices) {- const entries = Object.entries(message.renamedServices);- if (entries.length > 0) {- obj.renamedServices = {};- entries.forEach(([k, v]) => {- obj.renamedServices[k] = v;- });- }+ Object.entries(message.renamedServices).forEach(([k, v]) => {+ obj.renamedServices[k] = v;+ });}+ obj.renamedResources = {};if (message.renamedResources) {- const entries = Object.entries(message.renamedResources);- if (entries.length > 0) {- obj.renamedResources = {};- entries.forEach(([k, v]) => {- obj.renamedResources[k] = v;- });- }+ Object.entries(message.renamedResources).forEach(([k, v]) => {+ obj.renamedResources[k] = v;+ });}- if (message.ignoredResources?.length) {- obj.ignoredResources = message.ignoredResources;+ if (message.ignoredResources) {+ obj.ignoredResources = message.ignoredResources.map((e) => e);+ } else {+ obj.ignoredResources = [];}- if (message.forcedNamespaceAliases?.length) {- obj.forcedNamespaceAliases = message.forcedNamespaceAliases;+ if (message.forcedNamespaceAliases) {+ obj.forcedNamespaceAliases = message.forcedNamespaceAliases.map((e) => e);+ } else {+ obj.forcedNamespaceAliases = [];}- if (message.handwrittenSignatures?.length) {- obj.handwrittenSignatures = message.handwrittenSignatures;+ if (message.handwrittenSignatures) {+ obj.handwrittenSignatures = message.handwrittenSignatures.map((e) => e);+ } else {+ obj.handwrittenSignatures = [];}return obj;},@@ -1565,6 +1538,7 @@ export const DotnetSettings = {create(base?: DeepPartial<DotnetSettings>): DotnetSettings {return DotnetSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DotnetSettings>): DotnetSettings {const message = createBaseDotnetSettings();message.common = (object.common !== undefined && object.common !== null)@@ -1646,18 +1620,15 @@ export const DotnetSettings_RenamedServicesEntry = {toJSON(message: DotnetSettings_RenamedServicesEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<DotnetSettings_RenamedServicesEntry>): DotnetSettings_RenamedServicesEntry {return DotnetSettings_RenamedServicesEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DotnetSettings_RenamedServicesEntry>): DotnetSettings_RenamedServicesEntry {const message = createBaseDotnetSettings_RenamedServicesEntry();message.key = object.key ?? "";@@ -1717,18 +1688,15 @@ export const DotnetSettings_RenamedResourcesEntry = {toJSON(message: DotnetSettings_RenamedResourcesEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<DotnetSettings_RenamedResourcesEntry>): DotnetSettings_RenamedResourcesEntry {return DotnetSettings_RenamedResourcesEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DotnetSettings_RenamedResourcesEntry>): DotnetSettings_RenamedResourcesEntry {const message = createBaseDotnetSettings_RenamedResourcesEntry();message.key = object.key ?? "";@@ -1778,15 +1746,15 @@ export const RubySettings = {toJSON(message: RubySettings): unknown {const obj: any = {};- if (message.common !== undefined) {- obj.common = CommonLanguageSettings.toJSON(message.common);- }+ message.common !== undefined &&+ (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);return obj;},create(base?: DeepPartial<RubySettings>): RubySettings {return RubySettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RubySettings>): RubySettings {const message = createBaseRubySettings();message.common = (object.common !== undefined && object.common !== null)@@ -1837,15 +1805,15 @@ export const GoSettings = {toJSON(message: GoSettings): unknown {const obj: any = {};- if (message.common !== undefined) {- obj.common = CommonLanguageSettings.toJSON(message.common);- }+ message.common !== undefined &&+ (obj.common = message.common ? CommonLanguageSettings.toJSON(message.common) : undefined);return obj;},create(base?: DeepPartial<GoSettings>): GoSettings {return GoSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GoSettings>): GoSettings {const message = createBaseGoSettings();message.common = (object.common !== undefined && object.common !== null)@@ -1909,18 +1877,16 @@ export const MethodSettings = {toJSON(message: MethodSettings): unknown {const obj: any = {};- if (message.selector !== "") {- obj.selector = message.selector;- }- if (message.longRunning !== undefined) {- obj.longRunning = MethodSettings_LongRunning.toJSON(message.longRunning);- }+ message.selector !== undefined && (obj.selector = message.selector);+ message.longRunning !== undefined &&+ (obj.longRunning = message.longRunning ? MethodSettings_LongRunning.toJSON(message.longRunning) : undefined);return obj;},create(base?: DeepPartial<MethodSettings>): MethodSettings {return MethodSettings.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MethodSettings>): MethodSettings {const message = createBaseMethodSettings();message.selector = object.selector ?? "";@@ -2007,24 +1973,20 @@ export const MethodSettings_LongRunning = {toJSON(message: MethodSettings_LongRunning): unknown {const obj: any = {};- if (message.initialPollDelay !== undefined) {- obj.initialPollDelay = Duration.toJSON(message.initialPollDelay);- }- if (message.pollDelayMultiplier !== 0) {- obj.pollDelayMultiplier = message.pollDelayMultiplier;- }- if (message.maxPollDelay !== undefined) {- obj.maxPollDelay = Duration.toJSON(message.maxPollDelay);- }- if (message.totalPollTimeout !== undefined) {- obj.totalPollTimeout = Duration.toJSON(message.totalPollTimeout);- }+ message.initialPollDelay !== undefined &&+ (obj.initialPollDelay = message.initialPollDelay ? Duration.toJSON(message.initialPollDelay) : undefined);+ message.pollDelayMultiplier !== undefined && (obj.pollDelayMultiplier = message.pollDelayMultiplier);+ message.maxPollDelay !== undefined &&+ (obj.maxPollDelay = message.maxPollDelay ? Duration.toJSON(message.maxPollDelay) : undefined);+ message.totalPollTimeout !== undefined &&+ (obj.totalPollTimeout = message.totalPollTimeout ? Duration.toJSON(message.totalPollTimeout) : undefined);return obj;},create(base?: DeepPartial<MethodSettings_LongRunning>): MethodSettings_LongRunning {return MethodSettings_LongRunning.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MethodSettings_LongRunning>): MethodSettings_LongRunning {const message = createBaseMethodSettings_LongRunning();message.initialPollDelay = (object.initialPollDelay !== undefined && object.initialPollDelay !== null)diff --git a/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts b/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.tsindex aeea8d48b5..9d02bb8e58 100644--- a/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts+++ b/frontend/src/types/proto/google/api/expr/v1alpha1/syntax.ts@@ -1,9 +1,9 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";import { Duration } from "../../../protobuf/duration";import { NullValue, nullValueFromJSON, nullValueToJSON } from "../../../protobuf/struct";import { Timestamp } from "../../../protobuf/timestamp";-import Long = require("long");export const protobufPackage = "google.api.expr.v1alpha1";@@ -443,18 +443,16 @@ export const ParsedExpr = {toJSON(message: ParsedExpr): unknown {const obj: any = {};- if (message.expr !== undefined) {- obj.expr = Expr.toJSON(message.expr);- }- if (message.sourceInfo !== undefined) {- obj.sourceInfo = SourceInfo.toJSON(message.sourceInfo);- }+ message.expr !== undefined && (obj.expr = message.expr ? Expr.toJSON(message.expr) : undefined);+ message.sourceInfo !== undefined &&+ (obj.sourceInfo = message.sourceInfo ? SourceInfo.toJSON(message.sourceInfo) : undefined);return obj;},create(base?: DeepPartial<ParsedExpr>): ParsedExpr {return ParsedExpr.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ParsedExpr>): ParsedExpr {const message = createBaseParsedExpr();message.expr = (object.expr !== undefined && object.expr !== null) ? Expr.fromPartial(object.expr) : undefined;@@ -596,36 +594,29 @@ export const Expr = {toJSON(message: Expr): unknown {const obj: any = {};- if (message.id !== 0) {- obj.id = Math.round(message.id);- }- if (message.constExpr !== undefined) {- obj.constExpr = Constant.toJSON(message.constExpr);- }- if (message.identExpr !== undefined) {- obj.identExpr = Expr_Ident.toJSON(message.identExpr);- }- if (message.selectExpr !== undefined) {- obj.selectExpr = Expr_Select.toJSON(message.selectExpr);- }- if (message.callExpr !== undefined) {- obj.callExpr = Expr_Call.toJSON(message.callExpr);- }- if (message.listExpr !== undefined) {- obj.listExpr = Expr_CreateList.toJSON(message.listExpr);- }- if (message.structExpr !== undefined) {- obj.structExpr = Expr_CreateStruct.toJSON(message.structExpr);- }- if (message.comprehensionExpr !== undefined) {- obj.comprehensionExpr = Expr_Comprehension.toJSON(message.comprehensionExpr);- }+ message.id !== undefined && (obj.id = Math.round(message.id));+ message.constExpr !== undefined &&+ (obj.constExpr = message.constExpr ? Constant.toJSON(message.constExpr) : undefined);+ message.identExpr !== undefined &&+ (obj.identExpr = message.identExpr ? Expr_Ident.toJSON(message.identExpr) : undefined);+ message.selectExpr !== undefined &&+ (obj.selectExpr = message.selectExpr ? Expr_Select.toJSON(message.selectExpr) : undefined);+ message.callExpr !== undefined &&+ (obj.callExpr = message.callExpr ? Expr_Call.toJSON(message.callExpr) : undefined);+ message.listExpr !== undefined &&+ (obj.listExpr = message.listExpr ? Expr_CreateList.toJSON(message.listExpr) : undefined);+ message.structExpr !== undefined &&+ (obj.structExpr = message.structExpr ? Expr_CreateStruct.toJSON(message.structExpr) : undefined);+ message.comprehensionExpr !== undefined && (obj.comprehensionExpr = message.comprehensionExpr+ ? Expr_Comprehension.toJSON(message.comprehensionExpr)+ : undefined);return obj;},create(base?: DeepPartial<Expr>): Expr {return Expr.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr>): Expr {const message = createBaseExpr();message.id = object.id ?? 0;@@ -695,15 +686,14 @@ export const Expr_Ident = {toJSON(message: Expr_Ident): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<Expr_Ident>): Expr_Ident {return Expr_Ident.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr_Ident>): Expr_Ident {const message = createBaseExpr_Ident();message.name = object.name ?? "";@@ -776,21 +766,16 @@ export const Expr_Select = {toJSON(message: Expr_Select): unknown {const obj: any = {};- if (message.operand !== undefined) {- obj.operand = Expr.toJSON(message.operand);- }- if (message.field !== "") {- obj.field = message.field;- }- if (message.testOnly === true) {- obj.testOnly = message.testOnly;- }+ message.operand !== undefined && (obj.operand = message.operand ? Expr.toJSON(message.operand) : undefined);+ message.field !== undefined && (obj.field = message.field);+ message.testOnly !== undefined && (obj.testOnly = message.testOnly);return obj;},create(base?: DeepPartial<Expr_Select>): Expr_Select {return Expr_Select.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr_Select>): Expr_Select {const message = createBaseExpr_Select();message.operand = (object.operand !== undefined && object.operand !== null)@@ -867,14 +852,12 @@ export const Expr_Call = {toJSON(message: Expr_Call): unknown {const obj: any = {};- if (message.target !== undefined) {- obj.target = Expr.toJSON(message.target);- }- if (message.function !== "") {- obj.function = message.function;- }- if (message.args?.length) {- obj.args = message.args.map((e) => Expr.toJSON(e));+ message.target !== undefined && (obj.target = message.target ? Expr.toJSON(message.target) : undefined);+ message.function !== undefined && (obj.function = message.function);+ if (message.args) {+ obj.args = message.args.map((e) => e ? Expr.toJSON(e) : undefined);+ } else {+ obj.args = [];}return obj;},@@ -882,6 +865,7 @@ export const Expr_Call = {create(base?: DeepPartial<Expr_Call>): Expr_Call {return Expr_Call.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr_Call>): Expr_Call {const message = createBaseExpr_Call();message.target = (object.target !== undefined && object.target !== null)@@ -959,11 +943,15 @@ export const Expr_CreateList = {toJSON(message: Expr_CreateList): unknown {const obj: any = {};- if (message.elements?.length) {- obj.elements = message.elements.map((e) => Expr.toJSON(e));+ if (message.elements) {+ obj.elements = message.elements.map((e) => e ? Expr.toJSON(e) : undefined);+ } else {+ obj.elements = [];}- if (message.optionalIndices?.length) {+ if (message.optionalIndices) {obj.optionalIndices = message.optionalIndices.map((e) => Math.round(e));+ } else {+ obj.optionalIndices = [];}return obj;},@@ -971,6 +959,7 @@ export const Expr_CreateList = {create(base?: DeepPartial<Expr_CreateList>): Expr_CreateList {return Expr_CreateList.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr_CreateList>): Expr_CreateList {const message = createBaseExpr_CreateList();message.elements = object.elements?.map((e) => Expr.fromPartial(e)) || [];@@ -1035,11 +1024,11 @@ export const Expr_CreateStruct = {toJSON(message: Expr_CreateStruct): unknown {const obj: any = {};- if (message.messageName !== "") {- obj.messageName = message.messageName;- }- if (message.entries?.length) {- obj.entries = message.entries.map((e) => Expr_CreateStruct_Entry.toJSON(e));+ message.messageName !== undefined && (obj.messageName = message.messageName);+ if (message.entries) {+ obj.entries = message.entries.map((e) => e ? Expr_CreateStruct_Entry.toJSON(e) : undefined);+ } else {+ obj.entries = [];}return obj;},@@ -1047,6 +1036,7 @@ export const Expr_CreateStruct = {create(base?: DeepPartial<Expr_CreateStruct>): Expr_CreateStruct {return Expr_CreateStruct.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr_CreateStruct>): Expr_CreateStruct {const message = createBaseExpr_CreateStruct();message.messageName = object.messageName ?? "";@@ -1142,27 +1132,18 @@ export const Expr_CreateStruct_Entry = {toJSON(message: Expr_CreateStruct_Entry): unknown {const obj: any = {};- if (message.id !== 0) {- obj.id = Math.round(message.id);- }- if (message.fieldKey !== undefined) {- obj.fieldKey = message.fieldKey;- }- if (message.mapKey !== undefined) {- obj.mapKey = Expr.toJSON(message.mapKey);- }- if (message.value !== undefined) {- obj.value = Expr.toJSON(message.value);- }- if (message.optionalEntry === true) {- obj.optionalEntry = message.optionalEntry;- }+ message.id !== undefined && (obj.id = Math.round(message.id));+ message.fieldKey !== undefined && (obj.fieldKey = message.fieldKey);+ message.mapKey !== undefined && (obj.mapKey = message.mapKey ? Expr.toJSON(message.mapKey) : undefined);+ message.value !== undefined && (obj.value = message.value ? Expr.toJSON(message.value) : undefined);+ message.optionalEntry !== undefined && (obj.optionalEntry = message.optionalEntry);return obj;},create(base?: DeepPartial<Expr_CreateStruct_Entry>): Expr_CreateStruct_Entry {return Expr_CreateStruct_Entry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr_CreateStruct_Entry>): Expr_CreateStruct_Entry {const message = createBaseExpr_CreateStruct_Entry();message.id = object.id ?? 0;@@ -1293,33 +1274,21 @@ export const Expr_Comprehension = {toJSON(message: Expr_Comprehension): unknown {const obj: any = {};- if (message.iterVar !== "") {- obj.iterVar = message.iterVar;- }- if (message.iterRange !== undefined) {- obj.iterRange = Expr.toJSON(message.iterRange);- }- if (message.accuVar !== "") {- obj.accuVar = message.accuVar;- }- if (message.accuInit !== undefined) {- obj.accuInit = Expr.toJSON(message.accuInit);- }- if (message.loopCondition !== undefined) {- obj.loopCondition = Expr.toJSON(message.loopCondition);- }- if (message.loopStep !== undefined) {- obj.loopStep = Expr.toJSON(message.loopStep);- }- if (message.result !== undefined) {- obj.result = Expr.toJSON(message.result);- }+ message.iterVar !== undefined && (obj.iterVar = message.iterVar);+ message.iterRange !== undefined && (obj.iterRange = message.iterRange ? Expr.toJSON(message.iterRange) : undefined);+ message.accuVar !== undefined && (obj.accuVar = message.accuVar);+ message.accuInit !== undefined && (obj.accuInit = message.accuInit ? Expr.toJSON(message.accuInit) : undefined);+ message.loopCondition !== undefined &&+ (obj.loopCondition = message.loopCondition ? Expr.toJSON(message.loopCondition) : undefined);+ message.loopStep !== undefined && (obj.loopStep = message.loopStep ? Expr.toJSON(message.loopStep) : undefined);+ message.result !== undefined && (obj.result = message.result ? Expr.toJSON(message.result) : undefined);return obj;},create(base?: DeepPartial<Expr_Comprehension>): Expr_Comprehension {return Expr_Comprehension.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr_Comprehension>): Expr_Comprehension {const message = createBaseExpr_Comprehension();message.iterVar = object.iterVar ?? "";@@ -1484,39 +1453,25 @@ export const Constant = {toJSON(message: Constant): unknown {const obj: any = {};- if (message.nullValue !== undefined) {- obj.nullValue = nullValueToJSON(message.nullValue);- }- if (message.boolValue !== undefined) {- obj.boolValue = message.boolValue;- }- if (message.int64Value !== undefined) {- obj.int64Value = Math.round(message.int64Value);- }- if (message.uint64Value !== undefined) {- obj.uint64Value = Math.round(message.uint64Value);- }- if (message.doubleValue !== undefined) {- obj.doubleValue = message.doubleValue;- }- if (message.stringValue !== undefined) {- obj.stringValue = message.stringValue;- }- if (message.bytesValue !== undefined) {- obj.bytesValue = base64FromBytes(message.bytesValue);- }- if (message.durationValue !== undefined) {- obj.durationValue = Duration.toJSON(message.durationValue);- }- if (message.timestampValue !== undefined) {- obj.timestampValue = message.timestampValue.toISOString();- }+ message.nullValue !== undefined &&+ (obj.nullValue = message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined);+ message.boolValue !== undefined && (obj.boolValue = message.boolValue);+ message.int64Value !== undefined && (obj.int64Value = Math.round(message.int64Value));+ message.uint64Value !== undefined && (obj.uint64Value = Math.round(message.uint64Value));+ message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue);+ message.stringValue !== undefined && (obj.stringValue = message.stringValue);+ message.bytesValue !== undefined &&+ (obj.bytesValue = message.bytesValue !== undefined ? base64FromBytes(message.bytesValue) : undefined);+ message.durationValue !== undefined &&+ (obj.durationValue = message.durationValue ? Duration.toJSON(message.durationValue) : undefined);+ message.timestampValue !== undefined && (obj.timestampValue = message.timestampValue.toISOString());return obj;},create(base?: DeepPartial<Constant>): Constant {return Constant.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Constant>): Constant {const message = createBaseConstant();message.nullValue = object.nullValue ?? undefined;@@ -1649,32 +1604,24 @@ export const SourceInfo = {toJSON(message: SourceInfo): unknown {const obj: any = {};- if (message.syntaxVersion !== "") {- obj.syntaxVersion = message.syntaxVersion;- }- if (message.location !== "") {- obj.location = message.location;- }- if (message.lineOffsets?.length) {+ message.syntaxVersion !== undefined && (obj.syntaxVersion = message.syntaxVersion);+ message.location !== undefined && (obj.location = message.location);+ if (message.lineOffsets) {obj.lineOffsets = message.lineOffsets.map((e) => Math.round(e));+ } else {+ obj.lineOffsets = [];}+ obj.positions = {};if (message.positions) {- const entries = Object.entries(message.positions);- if (entries.length > 0) {- obj.positions = {};- entries.forEach(([k, v]) => {- obj.positions[k] = Math.round(v);- });- }+ Object.entries(message.positions).forEach(([k, v]) => {+ obj.positions[k] = Math.round(v);+ });}+ obj.macroCalls = {};if (message.macroCalls) {- const entries = Object.entries(message.macroCalls);- if (entries.length > 0) {- obj.macroCalls = {};- entries.forEach(([k, v]) => {- obj.macroCalls[k] = Expr.toJSON(v);- });- }+ Object.entries(message.macroCalls).forEach(([k, v]) => {+ obj.macroCalls[k] = Expr.toJSON(v);+ });}return obj;},@@ -1682,6 +1629,7 @@ export const SourceInfo = {create(base?: DeepPartial<SourceInfo>): SourceInfo {return SourceInfo.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SourceInfo>): SourceInfo {const message = createBaseSourceInfo();message.syntaxVersion = object.syntaxVersion ?? "";@@ -1760,18 +1708,15 @@ export const SourceInfo_PositionsEntry = {toJSON(message: SourceInfo_PositionsEntry): unknown {const obj: any = {};- if (message.key !== 0) {- obj.key = Math.round(message.key);- }- if (message.value !== 0) {- obj.value = Math.round(message.value);- }+ message.key !== undefined && (obj.key = Math.round(message.key));+ message.value !== undefined && (obj.value = Math.round(message.value));return obj;},create(base?: DeepPartial<SourceInfo_PositionsEntry>): SourceInfo_PositionsEntry {return SourceInfo_PositionsEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SourceInfo_PositionsEntry>): SourceInfo_PositionsEntry {const message = createBaseSourceInfo_PositionsEntry();message.key = object.key ?? 0;@@ -1834,18 +1779,15 @@ export const SourceInfo_MacroCallsEntry = {toJSON(message: SourceInfo_MacroCallsEntry): unknown {const obj: any = {};- if (message.key !== 0) {- obj.key = Math.round(message.key);- }- if (message.value !== undefined) {- obj.value = Expr.toJSON(message.value);- }+ message.key !== undefined && (obj.key = Math.round(message.key));+ message.value !== undefined && (obj.value = message.value ? Expr.toJSON(message.value) : undefined);return obj;},create(base?: DeepPartial<SourceInfo_MacroCallsEntry>): SourceInfo_MacroCallsEntry {return SourceInfo_MacroCallsEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SourceInfo_MacroCallsEntry>): SourceInfo_MacroCallsEntry {const message = createBaseSourceInfo_MacroCallsEntry();message.key = object.key ?? 0;@@ -1930,24 +1872,17 @@ export const SourcePosition = {toJSON(message: SourcePosition): unknown {const obj: any = {};- if (message.location !== "") {- obj.location = message.location;- }- if (message.offset !== 0) {- obj.offset = Math.round(message.offset);- }- if (message.line !== 0) {- obj.line = Math.round(message.line);- }- if (message.column !== 0) {- obj.column = Math.round(message.column);- }+ message.location !== undefined && (obj.location = message.location);+ message.offset !== undefined && (obj.offset = Math.round(message.offset));+ message.line !== undefined && (obj.line = Math.round(message.line));+ message.column !== undefined && (obj.column = Math.round(message.column));return obj;},create(base?: DeepPartial<SourcePosition>): SourcePosition {return SourcePosition.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SourcePosition>): SourcePosition {const message = createBaseSourcePosition();message.location = object.location ?? "";@@ -2038,6 +1973,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/google/api/http.ts b/frontend/src/types/proto/google/api/http.tsindex ca7d167d07..ac0479a972 100644--- a/frontend/src/types/proto/google/api/http.ts+++ b/frontend/src/types/proto/google/api/http.ts@@ -429,18 +429,20 @@ export const Http = {toJSON(message: Http): unknown {const obj: any = {};- if (message.rules?.length) {- obj.rules = message.rules.map((e) => HttpRule.toJSON(e));- }- if (message.fullyDecodeReservedExpansion === true) {- obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;+ if (message.rules) {+ obj.rules = message.rules.map((e) => e ? HttpRule.toJSON(e) : undefined);+ } else {+ obj.rules = [];}+ message.fullyDecodeReservedExpansion !== undefined &&+ (obj.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion);return obj;},create(base?: DeepPartial<Http>): Http {return Http.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Http>): Http {const message = createBaseHttp();message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || [];@@ -604,35 +606,20 @@ export const HttpRule = {toJSON(message: HttpRule): unknown {const obj: any = {};- if (message.selector !== "") {- obj.selector = message.selector;- }- if (message.get !== undefined) {- obj.get = message.get;- }- if (message.put !== undefined) {- obj.put = message.put;- }- if (message.post !== undefined) {- obj.post = message.post;- }- if (message.delete !== undefined) {- obj.delete = message.delete;- }- if (message.patch !== undefined) {- obj.patch = message.patch;- }- if (message.custom !== undefined) {- obj.custom = CustomHttpPattern.toJSON(message.custom);- }- if (message.body !== "") {- obj.body = message.body;- }- if (message.responseBody !== "") {- obj.responseBody = message.responseBody;- }- if (message.additionalBindings?.length) {- obj.additionalBindings = message.additionalBindings.map((e) => HttpRule.toJSON(e));+ message.selector !== undefined && (obj.selector = message.selector);+ message.get !== undefined && (obj.get = message.get);+ message.put !== undefined && (obj.put = message.put);+ message.post !== undefined && (obj.post = message.post);+ message.delete !== undefined && (obj.delete = message.delete);+ message.patch !== undefined && (obj.patch = message.patch);+ message.custom !== undefined &&+ (obj.custom = message.custom ? CustomHttpPattern.toJSON(message.custom) : undefined);+ message.body !== undefined && (obj.body = message.body);+ message.responseBody !== undefined && (obj.responseBody = message.responseBody);+ if (message.additionalBindings) {+ obj.additionalBindings = message.additionalBindings.map((e) => e ? HttpRule.toJSON(e) : undefined);+ } else {+ obj.additionalBindings = [];}return obj;},@@ -640,6 +627,7 @@ export const HttpRule = {create(base?: DeepPartial<HttpRule>): HttpRule {return HttpRule.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<HttpRule>): HttpRule {const message = createBaseHttpRule();message.selector = object.selector ?? "";@@ -709,18 +697,15 @@ export const CustomHttpPattern = {toJSON(message: CustomHttpPattern): unknown {const obj: any = {};- if (message.kind !== "") {- obj.kind = message.kind;- }- if (message.path !== "") {- obj.path = message.path;- }+ message.kind !== undefined && (obj.kind = message.kind);+ message.path !== undefined && (obj.path = message.path);return obj;},create(base?: DeepPartial<CustomHttpPattern>): CustomHttpPattern {return CustomHttpPattern.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CustomHttpPattern>): CustomHttpPattern {const message = createBaseCustomHttpPattern();message.kind = object.kind ?? "";diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex 28a704a6b9..5fa56442ad 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -1,6 +1,6 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";-import Long = require("long");export const protobufPackage = "google.protobuf";@@ -1391,8 +1391,10 @@ export const FileDescriptorSet = {toJSON(message: FileDescriptorSet): unknown {const obj: any = {};- if (message.file?.length) {- obj.file = message.file.map((e) => FileDescriptorProto.toJSON(e));+ if (message.file) {+ obj.file = message.file.map((e) => e ? FileDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.file = [];}return obj;},@@ -1400,6 +1402,7 @@ export const FileDescriptorSet = {create(base?: DeepPartial<FileDescriptorSet>): FileDescriptorSet {return FileDescriptorSet.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FileDescriptorSet>): FileDescriptorSet {const message = createBaseFileDescriptorSet();message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || [];@@ -1626,51 +1629,55 @@ export const FileDescriptorProto = {toJSON(message: FileDescriptorProto): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.package !== "") {- obj.package = message.package;- }- if (message.dependency?.length) {- obj.dependency = message.dependency;- }- if (message.publicDependency?.length) {+ message.name !== undefined && (obj.name = message.name);+ message.package !== undefined && (obj.package = message.package);+ if (message.dependency) {+ obj.dependency = message.dependency.map((e) => e);+ } else {+ obj.dependency = [];+ }+ if (message.publicDependency) {obj.publicDependency = message.publicDependency.map((e) => Math.round(e));+ } else {+ obj.publicDependency = [];}- if (message.weakDependency?.length) {+ if (message.weakDependency) {obj.weakDependency = message.weakDependency.map((e) => Math.round(e));- }- if (message.messageType?.length) {- obj.messageType = message.messageType.map((e) => DescriptorProto.toJSON(e));- }- if (message.enumType?.length) {- obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e));- }- if (message.service?.length) {- obj.service = message.service.map((e) => ServiceDescriptorProto.toJSON(e));- }- if (message.extension?.length) {- obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e));- }- if (message.options !== undefined) {- obj.options = FileOptions.toJSON(message.options);- }- if (message.sourceCodeInfo !== undefined) {- obj.sourceCodeInfo = SourceCodeInfo.toJSON(message.sourceCodeInfo);- }- if (message.syntax !== "") {- obj.syntax = message.syntax;- }- if (message.edition !== "") {- obj.edition = message.edition;- }+ } else {+ obj.weakDependency = [];+ }+ if (message.messageType) {+ obj.messageType = message.messageType.map((e) => e ? DescriptorProto.toJSON(e) : undefined);+ } else {+ obj.messageType = [];+ }+ if (message.enumType) {+ obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.enumType = [];+ }+ if (message.service) {+ obj.service = message.service.map((e) => e ? ServiceDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.service = [];+ }+ if (message.extension) {+ obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.extension = [];+ }+ message.options !== undefined && (obj.options = message.options ? FileOptions.toJSON(message.options) : undefined);+ message.sourceCodeInfo !== undefined &&+ (obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) : undefined);+ message.syntax !== undefined && (obj.syntax = message.syntax);+ message.edition !== undefined && (obj.edition = message.edition);return obj;},create(base?: DeepPartial<FileDescriptorProto>): FileDescriptorProto {return FileDescriptorProto.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FileDescriptorProto>): FileDescriptorProto {const message = createBaseFileDescriptorProto();message.name = object.name ?? "";@@ -1857,35 +1864,48 @@ export const DescriptorProto = {toJSON(message: DescriptorProto): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.field?.length) {- obj.field = message.field.map((e) => FieldDescriptorProto.toJSON(e));- }- if (message.extension?.length) {- obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e));- }- if (message.nestedType?.length) {- obj.nestedType = message.nestedType.map((e) => DescriptorProto.toJSON(e));- }- if (message.enumType?.length) {- obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e));- }- if (message.extensionRange?.length) {- obj.extensionRange = message.extensionRange.map((e) => DescriptorProto_ExtensionRange.toJSON(e));- }- if (message.oneofDecl?.length) {- obj.oneofDecl = message.oneofDecl.map((e) => OneofDescriptorProto.toJSON(e));- }- if (message.options !== undefined) {- obj.options = MessageOptions.toJSON(message.options);- }- if (message.reservedRange?.length) {- obj.reservedRange = message.reservedRange.map((e) => DescriptorProto_ReservedRange.toJSON(e));- }- if (message.reservedName?.length) {- obj.reservedName = message.reservedName;+ message.name !== undefined && (obj.name = message.name);+ if (message.field) {+ obj.field = message.field.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.field = [];+ }+ if (message.extension) {+ obj.extension = message.extension.map((e) => e ? FieldDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.extension = [];+ }+ if (message.nestedType) {+ obj.nestedType = message.nestedType.map((e) => e ? DescriptorProto.toJSON(e) : undefined);+ } else {+ obj.nestedType = [];+ }+ if (message.enumType) {+ obj.enumType = message.enumType.map((e) => e ? EnumDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.enumType = [];+ }+ if (message.extensionRange) {+ obj.extensionRange = message.extensionRange.map((e) => e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined);+ } else {+ obj.extensionRange = [];+ }+ if (message.oneofDecl) {+ obj.oneofDecl = message.oneofDecl.map((e) => e ? OneofDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.oneofDecl = [];+ }+ message.options !== undefined &&+ (obj.options = message.options ? MessageOptions.toJSON(message.options) : undefined);+ if (message.reservedRange) {+ obj.reservedRange = message.reservedRange.map((e) => e ? DescriptorProto_ReservedRange.toJSON(e) : undefined);+ } else {+ obj.reservedRange = [];+ }+ if (message.reservedName) {+ obj.reservedName = message.reservedName.map((e) => e);+ } else {+ obj.reservedName = [];}return obj;},@@ -1893,6 +1913,7 @@ export const DescriptorProto = {create(base?: DeepPartial<DescriptorProto>): DescriptorProto {return DescriptorProto.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DescriptorProto>): DescriptorProto {const message = createBaseDescriptorProto();message.name = object.name ?? "";@@ -1976,21 +1997,17 @@ export const DescriptorProto_ExtensionRange = {toJSON(message: DescriptorProto_ExtensionRange): unknown {const obj: any = {};- if (message.start !== 0) {- obj.start = Math.round(message.start);- }- if (message.end !== 0) {- obj.end = Math.round(message.end);- }- if (message.options !== undefined) {- obj.options = ExtensionRangeOptions.toJSON(message.options);- }+ message.start !== undefined && (obj.start = Math.round(message.start));+ message.end !== undefined && (obj.end = Math.round(message.end));+ message.options !== undefined &&+ (obj.options = message.options ? ExtensionRangeOptions.toJSON(message.options) : undefined);return obj;},create(base?: DeepPartial<DescriptorProto_ExtensionRange>): DescriptorProto_ExtensionRange {return DescriptorProto_ExtensionRange.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DescriptorProto_ExtensionRange>): DescriptorProto_ExtensionRange {const message = createBaseDescriptorProto_ExtensionRange();message.start = object.start ?? 0;@@ -2053,18 +2070,15 @@ export const DescriptorProto_ReservedRange = {toJSON(message: DescriptorProto_ReservedRange): unknown {const obj: any = {};- if (message.start !== 0) {- obj.start = Math.round(message.start);- }- if (message.end !== 0) {- obj.end = Math.round(message.end);- }+ message.start !== undefined && (obj.start = Math.round(message.start));+ message.end !== undefined && (obj.end = Math.round(message.end));return obj;},create(base?: DeepPartial<DescriptorProto_ReservedRange>): DescriptorProto_ReservedRange {return DescriptorProto_ReservedRange.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DescriptorProto_ReservedRange>): DescriptorProto_ReservedRange {const message = createBaseDescriptorProto_ReservedRange();message.start = object.start ?? 0;@@ -2118,8 +2132,10 @@ export const ExtensionRangeOptions = {toJSON(message: ExtensionRangeOptions): unknown {const obj: any = {};- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -2127,6 +2143,7 @@ export const ExtensionRangeOptions = {create(base?: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions {return ExtensionRangeOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions {const message = createBaseExtensionRangeOptions();message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];@@ -2299,45 +2316,24 @@ export const FieldDescriptorProto = {toJSON(message: FieldDescriptorProto): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.number !== 0) {- obj.number = Math.round(message.number);- }- if (message.label !== 1) {- obj.label = fieldDescriptorProto_LabelToJSON(message.label);- }- if (message.type !== 1) {- obj.type = fieldDescriptorProto_TypeToJSON(message.type);- }- if (message.typeName !== "") {- obj.typeName = message.typeName;- }- if (message.extendee !== "") {- obj.extendee = message.extendee;- }- if (message.defaultValue !== "") {- obj.defaultValue = message.defaultValue;- }- if (message.oneofIndex !== 0) {- obj.oneofIndex = Math.round(message.oneofIndex);- }- if (message.jsonName !== "") {- obj.jsonName = message.jsonName;- }- if (message.options !== undefined) {- obj.options = FieldOptions.toJSON(message.options);- }- if (message.proto3Optional === true) {- obj.proto3Optional = message.proto3Optional;- }+ message.name !== undefined && (obj.name = message.name);+ message.number !== undefined && (obj.number = Math.round(message.number));+ message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label));+ message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type));+ message.typeName !== undefined && (obj.typeName = message.typeName);+ message.extendee !== undefined && (obj.extendee = message.extendee);+ message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);+ message.oneofIndex !== undefined && (obj.oneofIndex = Math.round(message.oneofIndex));+ message.jsonName !== undefined && (obj.jsonName = message.jsonName);+ message.options !== undefined && (obj.options = message.options ? FieldOptions.toJSON(message.options) : undefined);+ message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional);return obj;},create(base?: DeepPartial<FieldDescriptorProto>): FieldDescriptorProto {return FieldDescriptorProto.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FieldDescriptorProto>): FieldDescriptorProto {const message = createBaseFieldDescriptorProto();message.name = object.name ?? "";@@ -2411,18 +2407,15 @@ export const OneofDescriptorProto = {toJSON(message: OneofDescriptorProto): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.options !== undefined) {- obj.options = OneofOptions.toJSON(message.options);- }+ message.name !== undefined && (obj.name = message.name);+ message.options !== undefined && (obj.options = message.options ? OneofOptions.toJSON(message.options) : undefined);return obj;},create(base?: DeepPartial<OneofDescriptorProto>): OneofDescriptorProto {return OneofDescriptorProto.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OneofDescriptorProto>): OneofDescriptorProto {const message = createBaseOneofDescriptorProto();message.name = object.name ?? "";@@ -2522,20 +2515,24 @@ export const EnumDescriptorProto = {toJSON(message: EnumDescriptorProto): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.value?.length) {- obj.value = message.value.map((e) => EnumValueDescriptorProto.toJSON(e));- }- if (message.options !== undefined) {- obj.options = EnumOptions.toJSON(message.options);- }- if (message.reservedRange?.length) {- obj.reservedRange = message.reservedRange.map((e) => EnumDescriptorProto_EnumReservedRange.toJSON(e));- }- if (message.reservedName?.length) {- obj.reservedName = message.reservedName;+ message.name !== undefined && (obj.name = message.name);+ if (message.value) {+ obj.value = message.value.map((e) => e ? EnumValueDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.value = [];+ }+ message.options !== undefined && (obj.options = message.options ? EnumOptions.toJSON(message.options) : undefined);+ if (message.reservedRange) {+ obj.reservedRange = message.reservedRange.map((e) =>+ e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined+ );+ } else {+ obj.reservedRange = [];+ }+ if (message.reservedName) {+ obj.reservedName = message.reservedName.map((e) => e);+ } else {+ obj.reservedName = [];}return obj;},@@ -2543,6 +2540,7 @@ export const EnumDescriptorProto = {create(base?: DeepPartial<EnumDescriptorProto>): EnumDescriptorProto {return EnumDescriptorProto.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<EnumDescriptorProto>): EnumDescriptorProto {const message = createBaseEnumDescriptorProto();message.name = object.name ?? "";@@ -2608,18 +2606,15 @@ export const EnumDescriptorProto_EnumReservedRange = {toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown {const obj: any = {};- if (message.start !== 0) {- obj.start = Math.round(message.start);- }- if (message.end !== 0) {- obj.end = Math.round(message.end);- }+ message.start !== undefined && (obj.start = Math.round(message.start));+ message.end !== undefined && (obj.end = Math.round(message.end));return obj;},create(base?: DeepPartial<EnumDescriptorProto_EnumReservedRange>): EnumDescriptorProto_EnumReservedRange {return EnumDescriptorProto_EnumReservedRange.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<EnumDescriptorProto_EnumReservedRange>): EnumDescriptorProto_EnumReservedRange {const message = createBaseEnumDescriptorProto_EnumReservedRange();message.start = object.start ?? 0;@@ -2693,21 +2688,17 @@ export const EnumValueDescriptorProto = {toJSON(message: EnumValueDescriptorProto): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.number !== 0) {- obj.number = Math.round(message.number);- }- if (message.options !== undefined) {- obj.options = EnumValueOptions.toJSON(message.options);- }+ message.name !== undefined && (obj.name = message.name);+ message.number !== undefined && (obj.number = Math.round(message.number));+ message.options !== undefined &&+ (obj.options = message.options ? EnumValueOptions.toJSON(message.options) : undefined);return obj;},create(base?: DeepPartial<EnumValueDescriptorProto>): EnumValueDescriptorProto {return EnumValueDescriptorProto.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<EnumValueDescriptorProto>): EnumValueDescriptorProto {const message = createBaseEnumValueDescriptorProto();message.name = object.name ?? "";@@ -2784,21 +2775,21 @@ export const ServiceDescriptorProto = {toJSON(message: ServiceDescriptorProto): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.method?.length) {- obj.method = message.method.map((e) => MethodDescriptorProto.toJSON(e));- }- if (message.options !== undefined) {- obj.options = ServiceOptions.toJSON(message.options);- }+ message.name !== undefined && (obj.name = message.name);+ if (message.method) {+ obj.method = message.method.map((e) => e ? MethodDescriptorProto.toJSON(e) : undefined);+ } else {+ obj.method = [];+ }+ message.options !== undefined &&+ (obj.options = message.options ? ServiceOptions.toJSON(message.options) : undefined);return obj;},create(base?: DeepPartial<ServiceDescriptorProto>): ServiceDescriptorProto {return ServiceDescriptorProto.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ServiceDescriptorProto>): ServiceDescriptorProto {const message = createBaseServiceDescriptorProto();message.name = object.name ?? "";@@ -2915,30 +2906,20 @@ export const MethodDescriptorProto = {toJSON(message: MethodDescriptorProto): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.inputType !== "") {- obj.inputType = message.inputType;- }- if (message.outputType !== "") {- obj.outputType = message.outputType;- }- if (message.options !== undefined) {- obj.options = MethodOptions.toJSON(message.options);- }- if (message.clientStreaming === true) {- obj.clientStreaming = message.clientStreaming;- }- if (message.serverStreaming === true) {- obj.serverStreaming = message.serverStreaming;- }+ message.name !== undefined && (obj.name = message.name);+ message.inputType !== undefined && (obj.inputType = message.inputType);+ message.outputType !== undefined && (obj.outputType = message.outputType);+ message.options !== undefined &&+ (obj.options = message.options ? MethodOptions.toJSON(message.options) : undefined);+ message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming);+ message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming);return obj;},create(base?: DeepPartial<MethodDescriptorProto>): MethodDescriptorProto {return MethodDescriptorProto.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MethodDescriptorProto>): MethodDescriptorProto {const message = createBaseMethodDescriptorProto();message.name = object.name ?? "";@@ -3242,68 +3223,31 @@ export const FileOptions = {toJSON(message: FileOptions): unknown {const obj: any = {};- if (message.javaPackage !== "") {- obj.javaPackage = message.javaPackage;- }- if (message.javaOuterClassname !== "") {- obj.javaOuterClassname = message.javaOuterClassname;- }- if (message.javaMultipleFiles === true) {- obj.javaMultipleFiles = message.javaMultipleFiles;- }- if (message.javaGenerateEqualsAndHash === true) {- obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash;- }- if (message.javaStringCheckUtf8 === true) {- obj.javaStringCheckUtf8 = message.javaStringCheckUtf8;- }- if (message.optimizeFor !== 1) {- obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor);- }- if (message.goPackage !== "") {- obj.goPackage = message.goPackage;- }- if (message.ccGenericServices === true) {- obj.ccGenericServices = message.ccGenericServices;- }- if (message.javaGenericServices === true) {- obj.javaGenericServices = message.javaGenericServices;- }- if (message.pyGenericServices === true) {- obj.pyGenericServices = message.pyGenericServices;- }- if (message.phpGenericServices === true) {- obj.phpGenericServices = message.phpGenericServices;- }- if (message.deprecated === true) {- obj.deprecated = message.deprecated;- }- if (message.ccEnableArenas === true) {- obj.ccEnableArenas = message.ccEnableArenas;- }- if (message.objcClassPrefix !== "") {- obj.objcClassPrefix = message.objcClassPrefix;- }- if (message.csharpNamespace !== "") {- obj.csharpNamespace = message.csharpNamespace;- }- if (message.swiftPrefix !== "") {- obj.swiftPrefix = message.swiftPrefix;- }- if (message.phpClassPrefix !== "") {- obj.phpClassPrefix = message.phpClassPrefix;- }- if (message.phpNamespace !== "") {- obj.phpNamespace = message.phpNamespace;- }- if (message.phpMetadataNamespace !== "") {- obj.phpMetadataNamespace = message.phpMetadataNamespace;- }- if (message.rubyPackage !== "") {- obj.rubyPackage = message.rubyPackage;- }- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage);+ message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname);+ message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles);+ message.javaGenerateEqualsAndHash !== undefined &&+ (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash);+ message.javaStringCheckUtf8 !== undefined && (obj.javaStringCheckUtf8 = message.javaStringCheckUtf8);+ message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor));+ message.goPackage !== undefined && (obj.goPackage = message.goPackage);+ message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices);+ message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices);+ message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices);+ message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices);+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);+ message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas);+ message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix);+ message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace);+ message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix);+ message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix);+ message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace);+ message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace);+ message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage);+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -3311,6 +3255,7 @@ export const FileOptions = {create(base?: DeepPartial<FileOptions>): FileOptions {return FileOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FileOptions>): FileOptions {const message = createBaseFileOptions();message.javaPackage = object.javaPackage ?? "";@@ -3449,23 +3394,17 @@ export const MessageOptions = {toJSON(message: MessageOptions): unknown {const obj: any = {};- if (message.messageSetWireFormat === true) {- obj.messageSetWireFormat = message.messageSetWireFormat;- }- if (message.noStandardDescriptorAccessor === true) {- obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor;- }- if (message.deprecated === true) {- obj.deprecated = message.deprecated;- }- if (message.mapEntry === true) {- obj.mapEntry = message.mapEntry;- }- if (message.deprecatedLegacyJsonFieldConflicts === true) {- obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;- }- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ message.messageSetWireFormat !== undefined && (obj.messageSetWireFormat = message.messageSetWireFormat);+ message.noStandardDescriptorAccessor !== undefined &&+ (obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor);+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);+ message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry);+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -3473,6 +3412,7 @@ export const MessageOptions = {create(base?: DeepPartial<MessageOptions>): MessageOptions {return MessageOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MessageOptions>): MessageOptions {const message = createBaseMessageOptions();message.messageSetWireFormat = object.messageSetWireFormat ?? false;@@ -3652,38 +3592,20 @@ export const FieldOptions = {toJSON(message: FieldOptions): unknown {const obj: any = {};- if (message.ctype !== 0) {- obj.ctype = fieldOptions_CTypeToJSON(message.ctype);- }- if (message.packed === true) {- obj.packed = message.packed;- }- if (message.jstype !== 0) {- obj.jstype = fieldOptions_JSTypeToJSON(message.jstype);- }- if (message.lazy === true) {- obj.lazy = message.lazy;- }- if (message.unverifiedLazy === true) {- obj.unverifiedLazy = message.unverifiedLazy;- }- if (message.deprecated === true) {- obj.deprecated = message.deprecated;- }- if (message.weak === true) {- obj.weak = message.weak;- }- if (message.debugRedact === true) {- obj.debugRedact = message.debugRedact;- }- if (message.retention !== 0) {- obj.retention = fieldOptions_OptionRetentionToJSON(message.retention);- }- if (message.target !== 0) {- obj.target = fieldOptions_OptionTargetTypeToJSON(message.target);- }- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype));+ message.packed !== undefined && (obj.packed = message.packed);+ message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype));+ message.lazy !== undefined && (obj.lazy = message.lazy);+ message.unverifiedLazy !== undefined && (obj.unverifiedLazy = message.unverifiedLazy);+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);+ message.weak !== undefined && (obj.weak = message.weak);+ message.debugRedact !== undefined && (obj.debugRedact = message.debugRedact);+ message.retention !== undefined && (obj.retention = fieldOptions_OptionRetentionToJSON(message.retention));+ message.target !== undefined && (obj.target = fieldOptions_OptionTargetTypeToJSON(message.target));+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -3691,6 +3613,7 @@ export const FieldOptions = {create(base?: DeepPartial<FieldOptions>): FieldOptions {return FieldOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FieldOptions>): FieldOptions {const message = createBaseFieldOptions();message.ctype = object.ctype ?? 0;@@ -3753,8 +3676,10 @@ export const OneofOptions = {toJSON(message: OneofOptions): unknown {const obj: any = {};- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -3762,6 +3687,7 @@ export const OneofOptions = {create(base?: DeepPartial<OneofOptions>): OneofOptions {return OneofOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OneofOptions>): OneofOptions {const message = createBaseOneofOptions();message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];@@ -3849,17 +3775,14 @@ export const EnumOptions = {toJSON(message: EnumOptions): unknown {const obj: any = {};- if (message.allowAlias === true) {- obj.allowAlias = message.allowAlias;- }- if (message.deprecated === true) {- obj.deprecated = message.deprecated;- }- if (message.deprecatedLegacyJsonFieldConflicts === true) {- obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;- }- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias);+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);+ message.deprecatedLegacyJsonFieldConflicts !== undefined &&+ (obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts);+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -3867,6 +3790,7 @@ export const EnumOptions = {create(base?: DeepPartial<EnumOptions>): EnumOptions {return EnumOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<EnumOptions>): EnumOptions {const message = createBaseEnumOptions();message.allowAlias = object.allowAlias ?? false;@@ -3933,11 +3857,11 @@ export const EnumValueOptions = {toJSON(message: EnumValueOptions): unknown {const obj: any = {};- if (message.deprecated === true) {- obj.deprecated = message.deprecated;- }- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -3945,6 +3869,7 @@ export const EnumValueOptions = {create(base?: DeepPartial<EnumValueOptions>): EnumValueOptions {return EnumValueOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<EnumValueOptions>): EnumValueOptions {const message = createBaseEnumValueOptions();message.deprecated = object.deprecated ?? false;@@ -4009,11 +3934,11 @@ export const ServiceOptions = {toJSON(message: ServiceOptions): unknown {const obj: any = {};- if (message.deprecated === true) {- obj.deprecated = message.deprecated;- }- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -4021,6 +3946,7 @@ export const ServiceOptions = {create(base?: DeepPartial<ServiceOptions>): ServiceOptions {return ServiceOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ServiceOptions>): ServiceOptions {const message = createBaseServiceOptions();message.deprecated = object.deprecated ?? false;@@ -4098,14 +4024,13 @@ export const MethodOptions = {toJSON(message: MethodOptions): unknown {const obj: any = {};- if (message.deprecated === true) {- obj.deprecated = message.deprecated;- }- if (message.idempotencyLevel !== 0) {- obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel);- }- if (message.uninterpretedOption?.length) {- obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));+ message.deprecated !== undefined && (obj.deprecated = message.deprecated);+ message.idempotencyLevel !== undefined &&+ (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel));+ if (message.uninterpretedOption) {+ obj.uninterpretedOption = message.uninterpretedOption.map((e) => e ? UninterpretedOption.toJSON(e) : undefined);+ } else {+ obj.uninterpretedOption = [];}return obj;},@@ -4113,6 +4038,7 @@ export const MethodOptions = {create(base?: DeepPartial<MethodOptions>): MethodOptions {return MethodOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MethodOptions>): MethodOptions {const message = createBaseMethodOptions();message.deprecated = object.deprecated ?? false;@@ -4239,33 +4165,25 @@ export const UninterpretedOption = {toJSON(message: UninterpretedOption): unknown {const obj: any = {};- if (message.name?.length) {- obj.name = message.name.map((e) => UninterpretedOption_NamePart.toJSON(e));- }- if (message.identifierValue !== "") {- obj.identifierValue = message.identifierValue;- }- if (message.positiveIntValue !== 0) {- obj.positiveIntValue = Math.round(message.positiveIntValue);- }- if (message.negativeIntValue !== 0) {- obj.negativeIntValue = Math.round(message.negativeIntValue);- }- if (message.doubleValue !== 0) {- obj.doubleValue = message.doubleValue;- }- if (message.stringValue.length !== 0) {- obj.stringValue = base64FromBytes(message.stringValue);- }- if (message.aggregateValue !== "") {- obj.aggregateValue = message.aggregateValue;- }+ if (message.name) {+ obj.name = message.name.map((e) => e ? UninterpretedOption_NamePart.toJSON(e) : undefined);+ } else {+ obj.name = [];+ }+ message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue);+ message.positiveIntValue !== undefined && (obj.positiveIntValue = Math.round(message.positiveIntValue));+ message.negativeIntValue !== undefined && (obj.negativeIntValue = Math.round(message.negativeIntValue));+ message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue);+ message.stringValue !== undefined &&+ (obj.stringValue = base64FromBytes(message.stringValue !== undefined ? message.stringValue : new Uint8Array(0)));+ message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue);return obj;},create(base?: DeepPartial<UninterpretedOption>): UninterpretedOption {return UninterpretedOption.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UninterpretedOption>): UninterpretedOption {const message = createBaseUninterpretedOption();message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || [];@@ -4333,18 +4251,15 @@ export const UninterpretedOption_NamePart = {toJSON(message: UninterpretedOption_NamePart): unknown {const obj: any = {};- if (message.namePart !== "") {- obj.namePart = message.namePart;- }- if (message.isExtension === true) {- obj.isExtension = message.isExtension;- }+ message.namePart !== undefined && (obj.namePart = message.namePart);+ message.isExtension !== undefined && (obj.isExtension = message.isExtension);return obj;},create(base?: DeepPartial<UninterpretedOption_NamePart>): UninterpretedOption_NamePart {return UninterpretedOption_NamePart.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UninterpretedOption_NamePart>): UninterpretedOption_NamePart {const message = createBaseUninterpretedOption_NamePart();message.namePart = object.namePart ?? "";@@ -4398,8 +4313,10 @@ export const SourceCodeInfo = {toJSON(message: SourceCodeInfo): unknown {const obj: any = {};- if (message.location?.length) {- obj.location = message.location.map((e) => SourceCodeInfo_Location.toJSON(e));+ if (message.location) {+ obj.location = message.location.map((e) => e ? SourceCodeInfo_Location.toJSON(e) : undefined);+ } else {+ obj.location = [];}return obj;},@@ -4407,6 +4324,7 @@ export const SourceCodeInfo = {create(base?: DeepPartial<SourceCodeInfo>): SourceCodeInfo {return SourceCodeInfo.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SourceCodeInfo>): SourceCodeInfo {const message = createBaseSourceCodeInfo();message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || [];@@ -4527,20 +4445,22 @@ export const SourceCodeInfo_Location = {toJSON(message: SourceCodeInfo_Location): unknown {const obj: any = {};- if (message.path?.length) {+ if (message.path) {obj.path = message.path.map((e) => Math.round(e));+ } else {+ obj.path = [];}- if (message.span?.length) {+ if (message.span) {obj.span = message.span.map((e) => Math.round(e));+ } else {+ obj.span = [];}- if (message.leadingComments !== "") {- obj.leadingComments = message.leadingComments;- }- if (message.trailingComments !== "") {- obj.trailingComments = message.trailingComments;- }- if (message.leadingDetachedComments?.length) {- obj.leadingDetachedComments = message.leadingDetachedComments;+ message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments);+ message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments);+ if (message.leadingDetachedComments) {+ obj.leadingDetachedComments = message.leadingDetachedComments.map((e) => e);+ } else {+ obj.leadingDetachedComments = [];}return obj;},@@ -4548,6 +4468,7 @@ export const SourceCodeInfo_Location = {create(base?: DeepPartial<SourceCodeInfo_Location>): SourceCodeInfo_Location {return SourceCodeInfo_Location.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SourceCodeInfo_Location>): SourceCodeInfo_Location {const message = createBaseSourceCodeInfo_Location();message.path = object.path?.map((e) => e) || [];@@ -4604,8 +4525,10 @@ export const GeneratedCodeInfo = {toJSON(message: GeneratedCodeInfo): unknown {const obj: any = {};- if (message.annotation?.length) {- obj.annotation = message.annotation.map((e) => GeneratedCodeInfo_Annotation.toJSON(e));+ if (message.annotation) {+ obj.annotation = message.annotation.map((e) => e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined);+ } else {+ obj.annotation = [];}return obj;},@@ -4613,6 +4536,7 @@ export const GeneratedCodeInfo = {create(base?: DeepPartial<GeneratedCodeInfo>): GeneratedCodeInfo {return GeneratedCodeInfo.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GeneratedCodeInfo>): GeneratedCodeInfo {const message = createBaseGeneratedCodeInfo();message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || [];@@ -4719,27 +4643,22 @@ export const GeneratedCodeInfo_Annotation = {toJSON(message: GeneratedCodeInfo_Annotation): unknown {const obj: any = {};- if (message.path?.length) {+ if (message.path) {obj.path = message.path.map((e) => Math.round(e));+ } else {+ obj.path = [];}- if (message.sourceFile !== "") {- obj.sourceFile = message.sourceFile;- }- if (message.begin !== 0) {- obj.begin = Math.round(message.begin);- }- if (message.end !== 0) {- obj.end = Math.round(message.end);- }- if (message.semantic !== 0) {- obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic);- }+ message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile);+ message.begin !== undefined && (obj.begin = Math.round(message.begin));+ message.end !== undefined && (obj.end = Math.round(message.end));+ message.semantic !== undefined && (obj.semantic = generatedCodeInfo_Annotation_SemanticToJSON(message.semantic));return obj;},create(base?: DeepPartial<GeneratedCodeInfo_Annotation>): GeneratedCodeInfo_Annotation {return GeneratedCodeInfo_Annotation.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GeneratedCodeInfo_Annotation>): GeneratedCodeInfo_Annotation {const message = createBaseGeneratedCodeInfo_Annotation();message.path = object.path?.map((e) => e) || [];@@ -4809,6 +4728,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/google/protobuf/duration.ts b/frontend/src/types/proto/google/protobuf/duration.tsindex 74aaf597dc..f7854f6b36 100644--- a/frontend/src/types/proto/google/protobuf/duration.ts+++ b/frontend/src/types/proto/google/protobuf/duration.ts@@ -1,6 +1,6 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";-import Long = require("long");export const protobufPackage = "google.protobuf";@@ -136,18 +136,15 @@ export const Duration = {toJSON(message: Duration): unknown {const obj: any = {};- if (message.seconds !== 0) {- obj.seconds = Math.round(message.seconds);- }- if (message.nanos !== 0) {- obj.nanos = Math.round(message.nanos);- }+ message.seconds !== undefined && (obj.seconds = Math.round(message.seconds));+ message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));return obj;},create(base?: DeepPartial<Duration>): Duration {return Duration.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Duration>): Duration {const message = createBaseDuration();message.seconds = object.seconds ?? 0;@@ -189,6 +186,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/google/protobuf/empty.ts b/frontend/src/types/proto/google/protobuf/empty.tsindex e0281e48b1..e69a5509e2 100644--- a/frontend/src/types/proto/google/protobuf/empty.ts+++ b/frontend/src/types/proto/google/protobuf/empty.ts@@ -52,6 +52,7 @@ export const Empty = {create(base?: DeepPartial<Empty>): Empty {return Empty.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<Empty>): Empty {const message = createBaseEmpty();return message;diff --git a/frontend/src/types/proto/google/protobuf/field_mask.ts b/frontend/src/types/proto/google/protobuf/field_mask.tsindex ce686e871d..d4bb0c27df 100644--- a/frontend/src/types/proto/google/protobuf/field_mask.ts+++ b/frontend/src/types/proto/google/protobuf/field_mask.ts@@ -260,6 +260,7 @@ export const FieldMask = {create(base?: DeepPartial<FieldMask>): FieldMask {return FieldMask.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FieldMask>): FieldMask {const message = createBaseFieldMask();message.paths = object.paths?.map((e) => e) || [];diff --git a/frontend/src/types/proto/google/protobuf/struct.ts b/frontend/src/types/proto/google/protobuf/struct.tsindex 89ba0cdf8c..3425fd7e3f 100644--- a/frontend/src/types/proto/google/protobuf/struct.ts+++ b/frontend/src/types/proto/google/protobuf/struct.ts@@ -153,14 +153,11 @@ export const Struct = {toJSON(message: Struct): unknown {const obj: any = {};+ obj.fields = {};if (message.fields) {- const entries = Object.entries(message.fields);- if (entries.length > 0) {- obj.fields = {};- entries.forEach(([k, v]) => {- obj.fields[k] = v;- });- }+ Object.entries(message.fields).forEach(([k, v]) => {+ obj.fields[k] = v;+ });}return obj;},@@ -168,6 +165,7 @@ export const Struct = {create(base?: DeepPartial<Struct>): Struct {return Struct.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Struct>): Struct {const message = createBaseStruct();message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: any | undefined }>(@@ -254,18 +252,15 @@ export const Struct_FieldsEntry = {toJSON(message: Struct_FieldsEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== undefined) {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<Struct_FieldsEntry>): Struct_FieldsEntry {return Struct_FieldsEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Struct_FieldsEntry>): Struct_FieldsEntry {const message = createBaseStruct_FieldsEntry();message.key = object.key ?? "";@@ -379,30 +374,20 @@ export const Value = {toJSON(message: Value): unknown {const obj: any = {};- if (message.nullValue !== undefined) {- obj.nullValue = nullValueToJSON(message.nullValue);- }- if (message.numberValue !== undefined) {- obj.numberValue = message.numberValue;- }- if (message.stringValue !== undefined) {- obj.stringValue = message.stringValue;- }- if (message.boolValue !== undefined) {- obj.boolValue = message.boolValue;- }- if (message.structValue !== undefined) {- obj.structValue = message.structValue;- }- if (message.listValue !== undefined) {- obj.listValue = message.listValue;- }+ message.nullValue !== undefined &&+ (obj.nullValue = message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined);+ message.numberValue !== undefined && (obj.numberValue = message.numberValue);+ message.stringValue !== undefined && (obj.stringValue = message.stringValue);+ message.boolValue !== undefined && (obj.boolValue = message.boolValue);+ message.structValue !== undefined && (obj.structValue = message.structValue);+ message.listValue !== undefined && (obj.listValue = message.listValue);return obj;},create(base?: DeepPartial<Value>): Value {return Value.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Value>): Value {const message = createBaseValue();message.nullValue = object.nullValue ?? undefined;@@ -493,8 +478,10 @@ export const ListValue = {toJSON(message: ListValue): unknown {const obj: any = {};- if (message.values?.length) {- obj.values = message.values;+ if (message.values) {+ obj.values = message.values.map((e) => e);+ } else {+ obj.values = [];}return obj;},@@ -502,6 +489,7 @@ export const ListValue = {create(base?: DeepPartial<ListValue>): ListValue {return ListValue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListValue>): ListValue {const message = createBaseListValue();message.values = object.values?.map((e) => e) || [];diff --git a/frontend/src/types/proto/google/protobuf/timestamp.ts b/frontend/src/types/proto/google/protobuf/timestamp.tsindex bb9e014d2f..4dea0b96ec 100644--- a/frontend/src/types/proto/google/protobuf/timestamp.ts+++ b/frontend/src/types/proto/google/protobuf/timestamp.ts@@ -1,6 +1,6 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";-import Long = require("long");export const protobufPackage = "google.protobuf";@@ -165,18 +165,15 @@ export const Timestamp = {toJSON(message: Timestamp): unknown {const obj: any = {};- if (message.seconds !== 0) {- obj.seconds = Math.round(message.seconds);- }- if (message.nanos !== 0) {- obj.nanos = Math.round(message.nanos);- }+ message.seconds !== undefined && (obj.seconds = Math.round(message.seconds));+ message.nanos !== undefined && (obj.nanos = Math.round(message.nanos));return obj;},create(base?: DeepPartial<Timestamp>): Timestamp {return Timestamp.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Timestamp>): Timestamp {const message = createBaseTimestamp();message.seconds = object.seconds ?? 0;@@ -218,6 +215,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/google/protobuf/wrappers.ts b/frontend/src/types/proto/google/protobuf/wrappers.tsindex 4cffaaa4e1..c1ea99fa46 100644--- a/frontend/src/types/proto/google/protobuf/wrappers.ts+++ b/frontend/src/types/proto/google/protobuf/wrappers.ts@@ -1,6 +1,6 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";-import Long = require("long");export const protobufPackage = "google.protobuf";@@ -135,15 +135,14 @@ export const DoubleValue = {toJSON(message: DoubleValue): unknown {const obj: any = {};- if (message.value !== 0) {- obj.value = message.value;- }+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<DoubleValue>): DoubleValue {return DoubleValue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DoubleValue>): DoubleValue {const message = createBaseDoubleValue();message.value = object.value ?? 0;@@ -192,15 +191,14 @@ export const FloatValue = {toJSON(message: FloatValue): unknown {const obj: any = {};- if (message.value !== 0) {- obj.value = message.value;- }+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<FloatValue>): FloatValue {return FloatValue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FloatValue>): FloatValue {const message = createBaseFloatValue();message.value = object.value ?? 0;@@ -249,15 +247,14 @@ export const Int64Value = {toJSON(message: Int64Value): unknown {const obj: any = {};- if (message.value !== 0) {- obj.value = Math.round(message.value);- }+ message.value !== undefined && (obj.value = Math.round(message.value));return obj;},create(base?: DeepPartial<Int64Value>): Int64Value {return Int64Value.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Int64Value>): Int64Value {const message = createBaseInt64Value();message.value = object.value ?? 0;@@ -306,15 +303,14 @@ export const UInt64Value = {toJSON(message: UInt64Value): unknown {const obj: any = {};- if (message.value !== 0) {- obj.value = Math.round(message.value);- }+ message.value !== undefined && (obj.value = Math.round(message.value));return obj;},create(base?: DeepPartial<UInt64Value>): UInt64Value {return UInt64Value.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UInt64Value>): UInt64Value {const message = createBaseUInt64Value();message.value = object.value ?? 0;@@ -363,15 +359,14 @@ export const Int32Value = {toJSON(message: Int32Value): unknown {const obj: any = {};- if (message.value !== 0) {- obj.value = Math.round(message.value);- }+ message.value !== undefined && (obj.value = Math.round(message.value));return obj;},create(base?: DeepPartial<Int32Value>): Int32Value {return Int32Value.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Int32Value>): Int32Value {const message = createBaseInt32Value();message.value = object.value ?? 0;@@ -420,15 +415,14 @@ export const UInt32Value = {toJSON(message: UInt32Value): unknown {const obj: any = {};- if (message.value !== 0) {- obj.value = Math.round(message.value);- }+ message.value !== undefined && (obj.value = Math.round(message.value));return obj;},create(base?: DeepPartial<UInt32Value>): UInt32Value {return UInt32Value.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UInt32Value>): UInt32Value {const message = createBaseUInt32Value();message.value = object.value ?? 0;@@ -477,15 +471,14 @@ export const BoolValue = {toJSON(message: BoolValue): unknown {const obj: any = {};- if (message.value === true) {- obj.value = message.value;- }+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<BoolValue>): BoolValue {return BoolValue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BoolValue>): BoolValue {const message = createBaseBoolValue();message.value = object.value ?? false;@@ -534,15 +527,14 @@ export const StringValue = {toJSON(message: StringValue): unknown {const obj: any = {};- if (message.value !== "") {- obj.value = message.value;- }+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<StringValue>): StringValue {return StringValue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<StringValue>): StringValue {const message = createBaseStringValue();message.value = object.value ?? "";@@ -591,15 +583,15 @@ export const BytesValue = {toJSON(message: BytesValue): unknown {const obj: any = {};- if (message.value.length !== 0) {- obj.value = base64FromBytes(message.value);- }+ message.value !== undefined &&+ (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array(0)));return obj;},create(base?: DeepPartial<BytesValue>): BytesValue {return BytesValue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BytesValue>): BytesValue {const message = createBaseBytesValue();message.value = object.value ?? new Uint8Array(0);@@ -665,6 +657,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/google/type/expr.ts b/frontend/src/types/proto/google/type/expr.tsindex 031f52f277..bb597d8bd3 100644--- a/frontend/src/types/proto/google/type/expr.ts+++ b/frontend/src/types/proto/google/type/expr.ts@@ -136,24 +136,17 @@ export const Expr = {toJSON(message: Expr): unknown {const obj: any = {};- if (message.expression !== "") {- obj.expression = message.expression;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.location !== "") {- obj.location = message.location;- }+ message.expression !== undefined && (obj.expression = message.expression);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ message.location !== undefined && (obj.location = message.location);return obj;},create(base?: DeepPartial<Expr>): Expr {return Expr.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Expr>): Expr {const message = createBaseExpr();message.expression = object.expression ?? "";diff --git a/frontend/src/types/proto/store/activity.ts b/frontend/src/types/proto/store/activity.tsindex 5b69b9c7a1..485209b351 100644--- a/frontend/src/types/proto/store/activity.ts+++ b/frontend/src/types/proto/store/activity.ts@@ -1,7 +1,7 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";import { ApprovalStep } from "./approval";-import Long = require("long");export const protobufPackage = "bytebase.store";@@ -224,15 +224,14 @@ export const ActivityIssueCreatePayload = {toJSON(message: ActivityIssueCreatePayload): unknown {const obj: any = {};- if (message.issueName !== "") {- obj.issueName = message.issueName;- }+ message.issueName !== undefined && (obj.issueName = message.issueName);return obj;},create(base?: DeepPartial<ActivityIssueCreatePayload>): ActivityIssueCreatePayload {return ActivityIssueCreatePayload.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ActivityIssueCreatePayload>): ActivityIssueCreatePayload {const message = createBaseActivityIssueCreatePayload();message.issueName = object.issueName ?? "";@@ -329,26 +328,23 @@ export const ActivityIssueCommentCreatePayload = {toJSON(message: ActivityIssueCommentCreatePayload): unknown {const obj: any = {};- if (message.externalApprovalEvent !== undefined) {- obj.externalApprovalEvent = ActivityIssueCommentCreatePayload_ExternalApprovalEvent.toJSON(- message.externalApprovalEvent,- );- }- if (message.taskRollbackBy !== undefined) {- obj.taskRollbackBy = ActivityIssueCommentCreatePayload_TaskRollbackBy.toJSON(message.taskRollbackBy);- }- if (message.approvalEvent !== undefined) {- obj.approvalEvent = ActivityIssueCommentCreatePayload_ApprovalEvent.toJSON(message.approvalEvent);- }- if (message.issueName !== "") {- obj.issueName = message.issueName;- }+ message.externalApprovalEvent !== undefined && (obj.externalApprovalEvent = message.externalApprovalEvent+ ? ActivityIssueCommentCreatePayload_ExternalApprovalEvent.toJSON(message.externalApprovalEvent)+ : undefined);+ message.taskRollbackBy !== undefined && (obj.taskRollbackBy = message.taskRollbackBy+ ? ActivityIssueCommentCreatePayload_TaskRollbackBy.toJSON(message.taskRollbackBy)+ : undefined);+ message.approvalEvent !== undefined && (obj.approvalEvent = message.approvalEvent+ ? ActivityIssueCommentCreatePayload_ApprovalEvent.toJSON(message.approvalEvent)+ : undefined);+ message.issueName !== undefined && (obj.issueName = message.issueName);return obj;},create(base?: DeepPartial<ActivityIssueCommentCreatePayload>): ActivityIssueCommentCreatePayload {return ActivityIssueCommentCreatePayload.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ActivityIssueCommentCreatePayload>): ActivityIssueCommentCreatePayload {const message = createBaseActivityIssueCommentCreatePayload();message.externalApprovalEvent =@@ -445,18 +441,10 @@ export const ActivityIssueCommentCreatePayload_TaskRollbackBy = {toJSON(message: ActivityIssueCommentCreatePayload_TaskRollbackBy): unknown {const obj: any = {};- if (message.issueId !== 0) {- obj.issueId = Math.round(message.issueId);- }- if (message.taskId !== 0) {- obj.taskId = Math.round(message.taskId);- }- if (message.rollbackByIssueId !== 0) {- obj.rollbackByIssueId = Math.round(message.rollbackByIssueId);- }- if (message.rollbackByTaskId !== 0) {- obj.rollbackByTaskId = Math.round(message.rollbackByTaskId);- }+ message.issueId !== undefined && (obj.issueId = Math.round(message.issueId));+ message.taskId !== undefined && (obj.taskId = Math.round(message.taskId));+ message.rollbackByIssueId !== undefined && (obj.rollbackByIssueId = Math.round(message.rollbackByIssueId));+ message.rollbackByTaskId !== undefined && (obj.rollbackByTaskId = Math.round(message.rollbackByTaskId));return obj;},@@ -465,6 +453,7 @@ export const ActivityIssueCommentCreatePayload_TaskRollbackBy = {): ActivityIssueCommentCreatePayload_TaskRollbackBy {return ActivityIssueCommentCreatePayload_TaskRollbackBy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ActivityIssueCommentCreatePayload_TaskRollbackBy>,): ActivityIssueCommentCreatePayload_TaskRollbackBy {@@ -547,15 +536,11 @@ export const ActivityIssueCommentCreatePayload_ExternalApprovalEvent = {toJSON(message: ActivityIssueCommentCreatePayload_ExternalApprovalEvent): unknown {const obj: any = {};- if (message.type !== 0) {- obj.type = activityIssueCommentCreatePayload_ExternalApprovalEvent_TypeToJSON(message.type);- }- if (message.action !== 0) {- obj.action = activityIssueCommentCreatePayload_ExternalApprovalEvent_ActionToJSON(message.action);- }- if (message.stageName !== "") {- obj.stageName = message.stageName;- }+ message.type !== undefined &&+ (obj.type = activityIssueCommentCreatePayload_ExternalApprovalEvent_TypeToJSON(message.type));+ message.action !== undefined &&+ (obj.action = activityIssueCommentCreatePayload_ExternalApprovalEvent_ActionToJSON(message.action));+ message.stageName !== undefined && (obj.stageName = message.stageName);return obj;},@@ -564,6 +549,7 @@ export const ActivityIssueCommentCreatePayload_ExternalApprovalEvent = {): ActivityIssueCommentCreatePayload_ExternalApprovalEvent {return ActivityIssueCommentCreatePayload_ExternalApprovalEvent.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ActivityIssueCommentCreatePayload_ExternalApprovalEvent>,): ActivityIssueCommentCreatePayload_ExternalApprovalEvent {@@ -621,9 +607,8 @@ export const ActivityIssueCommentCreatePayload_ApprovalEvent = {toJSON(message: ActivityIssueCommentCreatePayload_ApprovalEvent): unknown {const obj: any = {};- if (message.status !== 0) {- obj.status = activityIssueCommentCreatePayload_ApprovalEvent_StatusToJSON(message.status);- }+ message.status !== undefined &&+ (obj.status = activityIssueCommentCreatePayload_ApprovalEvent_StatusToJSON(message.status));return obj;},@@ -632,6 +617,7 @@ export const ActivityIssueCommentCreatePayload_ApprovalEvent = {): ActivityIssueCommentCreatePayload_ApprovalEvent {return ActivityIssueCommentCreatePayload_ApprovalEvent.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ActivityIssueCommentCreatePayload_ApprovalEvent>,): ActivityIssueCommentCreatePayload_ApprovalEvent {@@ -682,15 +668,15 @@ export const ActivityIssueApprovalNotifyPayload = {toJSON(message: ActivityIssueApprovalNotifyPayload): unknown {const obj: any = {};- if (message.approvalStep !== undefined) {- obj.approvalStep = ApprovalStep.toJSON(message.approvalStep);- }+ message.approvalStep !== undefined &&+ (obj.approvalStep = message.approvalStep ? ApprovalStep.toJSON(message.approvalStep) : undefined);return obj;},create(base?: DeepPartial<ActivityIssueApprovalNotifyPayload>): ActivityIssueApprovalNotifyPayload {return ActivityIssueApprovalNotifyPayload.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ActivityIssueApprovalNotifyPayload>): ActivityIssueApprovalNotifyPayload {const message = createBaseActivityIssueApprovalNotifyPayload();message.approvalStep = (object.approvalStep !== undefined && object.approvalStep !== null)@@ -733,6 +719,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/store/approval.ts b/frontend/src/types/proto/store/approval.tsindex f12a3838e2..9ea5a69f72 100644--- a/frontend/src/types/proto/store/approval.ts+++ b/frontend/src/types/proto/store/approval.ts@@ -317,24 +317,25 @@ export const IssuePayloadApproval = {toJSON(message: IssuePayloadApproval): unknown {const obj: any = {};- if (message.approvalTemplates?.length) {- obj.approvalTemplates = message.approvalTemplates.map((e) => ApprovalTemplate.toJSON(e));- }- if (message.approvers?.length) {- obj.approvers = message.approvers.map((e) => IssuePayloadApproval_Approver.toJSON(e));- }- if (message.approvalFindingDone === true) {- obj.approvalFindingDone = message.approvalFindingDone;- }- if (message.approvalFindingError !== "") {- obj.approvalFindingError = message.approvalFindingError;- }+ if (message.approvalTemplates) {+ obj.approvalTemplates = message.approvalTemplates.map((e) => e ? ApprovalTemplate.toJSON(e) : undefined);+ } else {+ obj.approvalTemplates = [];+ }+ if (message.approvers) {+ obj.approvers = message.approvers.map((e) => e ? IssuePayloadApproval_Approver.toJSON(e) : undefined);+ } else {+ obj.approvers = [];+ }+ message.approvalFindingDone !== undefined && (obj.approvalFindingDone = message.approvalFindingDone);+ message.approvalFindingError !== undefined && (obj.approvalFindingError = message.approvalFindingError);return obj;},create(base?: DeepPartial<IssuePayloadApproval>): IssuePayloadApproval {return IssuePayloadApproval.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IssuePayloadApproval>): IssuePayloadApproval {const message = createBaseIssuePayloadApproval();message.approvalTemplates = object.approvalTemplates?.map((e) => ApprovalTemplate.fromPartial(e)) || [];@@ -399,18 +400,15 @@ export const IssuePayloadApproval_Approver = {toJSON(message: IssuePayloadApproval_Approver): unknown {const obj: any = {};- if (message.status !== 0) {- obj.status = issuePayloadApproval_Approver_StatusToJSON(message.status);- }- if (message.principalId !== 0) {- obj.principalId = Math.round(message.principalId);- }+ message.status !== undefined && (obj.status = issuePayloadApproval_Approver_StatusToJSON(message.status));+ message.principalId !== undefined && (obj.principalId = Math.round(message.principalId));return obj;},create(base?: DeepPartial<IssuePayloadApproval_Approver>): IssuePayloadApproval_Approver {return IssuePayloadApproval_Approver.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IssuePayloadApproval_Approver>): IssuePayloadApproval_Approver {const message = createBaseIssuePayloadApproval_Approver();message.status = object.status ?? 0;@@ -495,24 +493,17 @@ export const ApprovalTemplate = {toJSON(message: ApprovalTemplate): unknown {const obj: any = {};- if (message.flow !== undefined) {- obj.flow = ApprovalFlow.toJSON(message.flow);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.creatorId !== 0) {- obj.creatorId = Math.round(message.creatorId);- }+ message.flow !== undefined && (obj.flow = message.flow ? ApprovalFlow.toJSON(message.flow) : undefined);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ message.creatorId !== undefined && (obj.creatorId = Math.round(message.creatorId));return obj;},create(base?: DeepPartial<ApprovalTemplate>): ApprovalTemplate {return ApprovalTemplate.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApprovalTemplate>): ApprovalTemplate {const message = createBaseApprovalTemplate();message.flow = (object.flow !== undefined && object.flow !== null)@@ -566,8 +557,10 @@ export const ApprovalFlow = {toJSON(message: ApprovalFlow): unknown {const obj: any = {};- if (message.steps?.length) {- obj.steps = message.steps.map((e) => ApprovalStep.toJSON(e));+ if (message.steps) {+ obj.steps = message.steps.map((e) => e ? ApprovalStep.toJSON(e) : undefined);+ } else {+ obj.steps = [];}return obj;},@@ -575,6 +568,7 @@ export const ApprovalFlow = {create(base?: DeepPartial<ApprovalFlow>): ApprovalFlow {return ApprovalFlow.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApprovalFlow>): ApprovalFlow {const message = createBaseApprovalFlow();message.steps = object.steps?.map((e) => ApprovalStep.fromPartial(e)) || [];@@ -636,11 +630,11 @@ export const ApprovalStep = {toJSON(message: ApprovalStep): unknown {const obj: any = {};- if (message.type !== 0) {- obj.type = approvalStep_TypeToJSON(message.type);- }- if (message.nodes?.length) {- obj.nodes = message.nodes.map((e) => ApprovalNode.toJSON(e));+ message.type !== undefined && (obj.type = approvalStep_TypeToJSON(message.type));+ if (message.nodes) {+ obj.nodes = message.nodes.map((e) => e ? ApprovalNode.toJSON(e) : undefined);+ } else {+ obj.nodes = [];}return obj;},@@ -648,6 +642,7 @@ export const ApprovalStep = {create(base?: DeepPartial<ApprovalStep>): ApprovalStep {return ApprovalStep.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApprovalStep>): ApprovalStep {const message = createBaseApprovalStep();message.type = object.type ?? 0;@@ -732,24 +727,20 @@ export const ApprovalNode = {toJSON(message: ApprovalNode): unknown {const obj: any = {};- if (message.type !== 0) {- obj.type = approvalNode_TypeToJSON(message.type);- }- if (message.groupValue !== undefined) {- obj.groupValue = approvalNode_GroupValueToJSON(message.groupValue);- }- if (message.role !== undefined) {- obj.role = message.role;- }- if (message.externalNodeId !== undefined) {- obj.externalNodeId = message.externalNodeId;- }+ message.type !== undefined && (obj.type = approvalNode_TypeToJSON(message.type));+ message.groupValue !== undefined &&+ (obj.groupValue = message.groupValue !== undefined+ ? approvalNode_GroupValueToJSON(message.groupValue)+ : undefined);+ message.role !== undefined && (obj.role = message.role);+ message.externalNodeId !== undefined && (obj.externalNodeId = message.externalNodeId);return obj;},create(base?: DeepPartial<ApprovalNode>): ApprovalNode {return ApprovalNode.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApprovalNode>): ApprovalNode {const message = createBaseApprovalNode();message.type = object.type ?? 0;diff --git a/frontend/src/types/proto/store/common.ts b/frontend/src/types/proto/store/common.tsindex a7e19709fb..cbbea87075 100644--- a/frontend/src/types/proto/store/common.ts+++ b/frontend/src/types/proto/store/common.ts@@ -225,18 +225,15 @@ export const PageToken = {toJSON(message: PageToken): unknown {const obj: any = {};- if (message.limit !== 0) {- obj.limit = Math.round(message.limit);- }- if (message.offset !== 0) {- obj.offset = Math.round(message.offset);- }+ message.limit !== undefined && (obj.limit = Math.round(message.limit));+ message.offset !== undefined && (obj.offset = Math.round(message.offset));return obj;},create(base?: DeepPartial<PageToken>): PageToken {return PageToken.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PageToken>): PageToken {const message = createBasePageToken();message.limit = object.limit ?? 0;diff --git a/frontend/src/types/proto/store/data_source.ts b/frontend/src/types/proto/store/data_source.tsindex 214b880244..0fce9e72b6 100644--- a/frontend/src/types/proto/store/data_source.ts+++ b/frontend/src/types/proto/store/data_source.ts@@ -167,39 +167,22 @@ export const DataSourceOptions = {toJSON(message: DataSourceOptions): unknown {const obj: any = {};- if (message.srv === true) {- obj.srv = message.srv;- }- if (message.authenticationDatabase !== "") {- obj.authenticationDatabase = message.authenticationDatabase;- }- if (message.sid !== "") {- obj.sid = message.sid;- }- if (message.serviceName !== "") {- obj.serviceName = message.serviceName;- }- if (message.sshHost !== "") {- obj.sshHost = message.sshHost;- }- if (message.sshPort !== "") {- obj.sshPort = message.sshPort;- }- if (message.sshUser !== "") {- obj.sshUser = message.sshUser;- }- if (message.sshObfuscatedPassword !== "") {- obj.sshObfuscatedPassword = message.sshObfuscatedPassword;- }- if (message.sshObfuscatedPrivateKey !== "") {- obj.sshObfuscatedPrivateKey = message.sshObfuscatedPrivateKey;- }+ message.srv !== undefined && (obj.srv = message.srv);+ message.authenticationDatabase !== undefined && (obj.authenticationDatabase = message.authenticationDatabase);+ message.sid !== undefined && (obj.sid = message.sid);+ message.serviceName !== undefined && (obj.serviceName = message.serviceName);+ message.sshHost !== undefined && (obj.sshHost = message.sshHost);+ message.sshPort !== undefined && (obj.sshPort = message.sshPort);+ message.sshUser !== undefined && (obj.sshUser = message.sshUser);+ message.sshObfuscatedPassword !== undefined && (obj.sshObfuscatedPassword = message.sshObfuscatedPassword);+ message.sshObfuscatedPrivateKey !== undefined && (obj.sshObfuscatedPrivateKey = message.sshObfuscatedPrivateKey);return obj;},create(base?: DeepPartial<DataSourceOptions>): DataSourceOptions {return DataSourceOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataSourceOptions>): DataSourceOptions {const message = createBaseDataSourceOptions();message.srv = object.srv ?? false;diff --git a/frontend/src/types/proto/store/database.ts b/frontend/src/types/proto/store/database.tsindex a0df273e45..1085f5344f 100644--- a/frontend/src/types/proto/store/database.ts+++ b/frontend/src/types/proto/store/database.ts@@ -1,7 +1,7 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";import { StringValue } from "../google/protobuf/wrappers";-import Long = require("long");export const protobufPackage = "bytebase.store";@@ -443,14 +443,11 @@ export const DatabaseMetadata = {toJSON(message: DatabaseMetadata): unknown {const obj: any = {};+ obj.labels = {};if (message.labels) {- const entries = Object.entries(message.labels);- if (entries.length > 0) {- obj.labels = {};- entries.forEach(([k, v]) => {- obj.labels[k] = v;- });- }+ Object.entries(message.labels).forEach(([k, v]) => {+ obj.labels[k] = v;+ });}return obj;},@@ -458,6 +455,7 @@ export const DatabaseMetadata = {create(base?: DeepPartial<DatabaseMetadata>): DatabaseMetadata {return DatabaseMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DatabaseMetadata>): DatabaseMetadata {const message = createBaseDatabaseMetadata();message.labels = Object.entries(object.labels ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {@@ -521,18 +519,15 @@ export const DatabaseMetadata_LabelsEntry = {toJSON(message: DatabaseMetadata_LabelsEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<DatabaseMetadata_LabelsEntry>): DatabaseMetadata_LabelsEntry {return DatabaseMetadata_LabelsEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DatabaseMetadata_LabelsEntry>): DatabaseMetadata_LabelsEntry {const message = createBaseDatabaseMetadata_LabelsEntry();message.key = object.key ?? "";@@ -652,33 +647,28 @@ export const DatabaseSchemaMetadata = {toJSON(message: DatabaseSchemaMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schemas?.length) {- obj.schemas = message.schemas.map((e) => SchemaMetadata.toJSON(e));- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.extensions?.length) {- obj.extensions = message.extensions.map((e) => ExtensionMetadata.toJSON(e));- }- if (message.datashare === true) {- obj.datashare = message.datashare;- }- if (message.serviceName !== "") {- obj.serviceName = message.serviceName;- }+ message.name !== undefined && (obj.name = message.name);+ if (message.schemas) {+ obj.schemas = message.schemas.map((e) => e ? SchemaMetadata.toJSON(e) : undefined);+ } else {+ obj.schemas = [];+ }+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ if (message.extensions) {+ obj.extensions = message.extensions.map((e) => e ? ExtensionMetadata.toJSON(e) : undefined);+ } else {+ obj.extensions = [];+ }+ message.datashare !== undefined && (obj.datashare = message.datashare);+ message.serviceName !== undefined && (obj.serviceName = message.serviceName);return obj;},create(base?: DeepPartial<DatabaseSchemaMetadata>): DatabaseSchemaMetadata {return DatabaseSchemaMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DatabaseSchemaMetadata>): DatabaseSchemaMetadata {const message = createBaseDatabaseSchemaMetadata();message.name = object.name ?? "";@@ -790,23 +780,31 @@ export const SchemaMetadata = {toJSON(message: SchemaMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.tables?.length) {- obj.tables = message.tables.map((e) => TableMetadata.toJSON(e));- }- if (message.views?.length) {- obj.views = message.views.map((e) => ViewMetadata.toJSON(e));- }- if (message.functions?.length) {- obj.functions = message.functions.map((e) => FunctionMetadata.toJSON(e));- }- if (message.streams?.length) {- obj.streams = message.streams.map((e) => StreamMetadata.toJSON(e));- }- if (message.tasks?.length) {- obj.tasks = message.tasks.map((e) => TaskMetadata.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.tables) {+ obj.tables = message.tables.map((e) => e ? TableMetadata.toJSON(e) : undefined);+ } else {+ obj.tables = [];+ }+ if (message.views) {+ obj.views = message.views.map((e) => e ? ViewMetadata.toJSON(e) : undefined);+ } else {+ obj.views = [];+ }+ if (message.functions) {+ obj.functions = message.functions.map((e) => e ? FunctionMetadata.toJSON(e) : undefined);+ } else {+ obj.functions = [];+ }+ if (message.streams) {+ obj.streams = message.streams.map((e) => e ? StreamMetadata.toJSON(e) : undefined);+ } else {+ obj.streams = [];+ }+ if (message.tasks) {+ obj.tasks = message.tasks.map((e) => e ? TaskMetadata.toJSON(e) : undefined);+ } else {+ obj.tasks = [];}return obj;},@@ -814,6 +812,7 @@ export const SchemaMetadata = {create(base?: DeepPartial<SchemaMetadata>): SchemaMetadata {return SchemaMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaMetadata>): SchemaMetadata {const message = createBaseSchemaMetadata();message.name = object.name ?? "";@@ -979,42 +978,27 @@ export const TaskMetadata = {toJSON(message: TaskMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.id !== "") {- obj.id = message.id;- }- if (message.owner !== "") {- obj.owner = message.owner;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.warehouse !== "") {- obj.warehouse = message.warehouse;- }- if (message.schedule !== "") {- obj.schedule = message.schedule;- }- if (message.predecessors?.length) {- obj.predecessors = message.predecessors;- }- if (message.state !== 0) {- obj.state = taskMetadata_StateToJSON(message.state);- }- if (message.condition !== "") {- obj.condition = message.condition;- }- if (message.definition !== "") {- obj.definition = message.definition;- }+ message.name !== undefined && (obj.name = message.name);+ message.id !== undefined && (obj.id = message.id);+ message.owner !== undefined && (obj.owner = message.owner);+ message.comment !== undefined && (obj.comment = message.comment);+ message.warehouse !== undefined && (obj.warehouse = message.warehouse);+ message.schedule !== undefined && (obj.schedule = message.schedule);+ if (message.predecessors) {+ obj.predecessors = message.predecessors.map((e) => e);+ } else {+ obj.predecessors = [];+ }+ message.state !== undefined && (obj.state = taskMetadata_StateToJSON(message.state));+ message.condition !== undefined && (obj.condition = message.condition);+ message.definition !== undefined && (obj.definition = message.definition);return obj;},create(base?: DeepPartial<TaskMetadata>): TaskMetadata {return TaskMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TaskMetadata>): TaskMetadata {const message = createBaseTaskMetadata();message.name = object.name ?? "";@@ -1151,36 +1135,21 @@ export const StreamMetadata = {toJSON(message: StreamMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.tableName !== "") {- obj.tableName = message.tableName;- }- if (message.owner !== "") {- obj.owner = message.owner;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.type !== 0) {- obj.type = streamMetadata_TypeToJSON(message.type);- }- if (message.stale === true) {- obj.stale = message.stale;- }- if (message.mode !== 0) {- obj.mode = streamMetadata_ModeToJSON(message.mode);- }- if (message.definition !== "") {- obj.definition = message.definition;- }+ message.name !== undefined && (obj.name = message.name);+ message.tableName !== undefined && (obj.tableName = message.tableName);+ message.owner !== undefined && (obj.owner = message.owner);+ message.comment !== undefined && (obj.comment = message.comment);+ message.type !== undefined && (obj.type = streamMetadata_TypeToJSON(message.type));+ message.stale !== undefined && (obj.stale = message.stale);+ message.mode !== undefined && (obj.mode = streamMetadata_ModeToJSON(message.mode));+ message.definition !== undefined && (obj.definition = message.definition);return obj;},create(base?: DeepPartial<StreamMetadata>): StreamMetadata {return StreamMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<StreamMetadata>): StreamMetadata {const message = createBaseStreamMetadata();message.name = object.name ?? "";@@ -1398,47 +1367,31 @@ export const TableMetadata = {toJSON(message: TableMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.columns?.length) {- obj.columns = message.columns.map((e) => ColumnMetadata.toJSON(e));- }- if (message.indexes?.length) {- obj.indexes = message.indexes.map((e) => IndexMetadata.toJSON(e));- }- if (message.engine !== "") {- obj.engine = message.engine;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.rowCount !== 0) {- obj.rowCount = Math.round(message.rowCount);- }- if (message.dataSize !== 0) {- obj.dataSize = Math.round(message.dataSize);- }- if (message.indexSize !== 0) {- obj.indexSize = Math.round(message.indexSize);- }- if (message.dataFree !== 0) {- obj.dataFree = Math.round(message.dataFree);- }- if (message.createOptions !== "") {- obj.createOptions = message.createOptions;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.classification !== "") {- obj.classification = message.classification;- }- if (message.userComment !== "") {- obj.userComment = message.userComment;- }- if (message.foreignKeys?.length) {- obj.foreignKeys = message.foreignKeys.map((e) => ForeignKeyMetadata.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.columns) {+ obj.columns = message.columns.map((e) => e ? ColumnMetadata.toJSON(e) : undefined);+ } else {+ obj.columns = [];+ }+ if (message.indexes) {+ obj.indexes = message.indexes.map((e) => e ? IndexMetadata.toJSON(e) : undefined);+ } else {+ obj.indexes = [];+ }+ message.engine !== undefined && (obj.engine = message.engine);+ message.collation !== undefined && (obj.collation = message.collation);+ message.rowCount !== undefined && (obj.rowCount = Math.round(message.rowCount));+ message.dataSize !== undefined && (obj.dataSize = Math.round(message.dataSize));+ message.indexSize !== undefined && (obj.indexSize = Math.round(message.indexSize));+ message.dataFree !== undefined && (obj.dataFree = Math.round(message.dataFree));+ message.createOptions !== undefined && (obj.createOptions = message.createOptions);+ message.comment !== undefined && (obj.comment = message.comment);+ message.classification !== undefined && (obj.classification = message.classification);+ message.userComment !== undefined && (obj.userComment = message.userComment);+ if (message.foreignKeys) {+ obj.foreignKeys = message.foreignKeys.map((e) => e ? ForeignKeyMetadata.toJSON(e) : undefined);+ } else {+ obj.foreignKeys = [];}return obj;},@@ -1446,6 +1399,7 @@ export const TableMetadata = {create(base?: DeepPartial<TableMetadata>): TableMetadata {return TableMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TableMetadata>): TableMetadata {const message = createBaseTableMetadata();message.name = object.name ?? "";@@ -1619,42 +1573,23 @@ export const ColumnMetadata = {toJSON(message: ColumnMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.position !== 0) {- obj.position = Math.round(message.position);- }- if (message.default !== undefined) {- obj.default = message.default;- }- if (message.nullable === true) {- obj.nullable = message.nullable;- }- if (message.type !== "") {- obj.type = message.type;- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.classification !== "") {- obj.classification = message.classification;- }- if (message.userComment !== "") {- obj.userComment = message.userComment;- }+ message.name !== undefined && (obj.name = message.name);+ message.position !== undefined && (obj.position = Math.round(message.position));+ message.default !== undefined && (obj.default = message.default);+ message.nullable !== undefined && (obj.nullable = message.nullable);+ message.type !== undefined && (obj.type = message.type);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.comment !== undefined && (obj.comment = message.comment);+ message.classification !== undefined && (obj.classification = message.classification);+ message.userComment !== undefined && (obj.userComment = message.userComment);return obj;},create(base?: DeepPartial<ColumnMetadata>): ColumnMetadata {return ColumnMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ColumnMetadata>): ColumnMetadata {const message = createBaseColumnMetadata();message.name = object.name ?? "";@@ -1749,17 +1684,13 @@ export const ViewMetadata = {toJSON(message: ViewMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.definition !== "") {- obj.definition = message.definition;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.dependentColumns?.length) {- obj.dependentColumns = message.dependentColumns.map((e) => DependentColumn.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.definition !== undefined && (obj.definition = message.definition);+ message.comment !== undefined && (obj.comment = message.comment);+ if (message.dependentColumns) {+ obj.dependentColumns = message.dependentColumns.map((e) => e ? DependentColumn.toJSON(e) : undefined);+ } else {+ obj.dependentColumns = [];}return obj;},@@ -1767,6 +1698,7 @@ export const ViewMetadata = {create(base?: DeepPartial<ViewMetadata>): ViewMetadata {return ViewMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ViewMetadata>): ViewMetadata {const message = createBaseViewMetadata();message.name = object.name ?? "";@@ -1842,21 +1774,16 @@ export const DependentColumn = {toJSON(message: DependentColumn): unknown {const obj: any = {};- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.table !== "") {- obj.table = message.table;- }- if (message.column !== "") {- obj.column = message.column;- }+ message.schema !== undefined && (obj.schema = message.schema);+ message.table !== undefined && (obj.table = message.table);+ message.column !== undefined && (obj.column = message.column);return obj;},create(base?: DeepPartial<DependentColumn>): DependentColumn {return DependentColumn.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DependentColumn>): DependentColumn {const message = createBaseDependentColumn();message.schema = object.schema ?? "";@@ -1920,18 +1847,15 @@ export const FunctionMetadata = {toJSON(message: FunctionMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.definition !== "") {- obj.definition = message.definition;- }+ message.name !== undefined && (obj.name = message.name);+ message.definition !== undefined && (obj.definition = message.definition);return obj;},create(base?: DeepPartial<FunctionMetadata>): FunctionMetadata {return FunctionMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FunctionMetadata>): FunctionMetadata {const message = createBaseFunctionMetadata();message.name = object.name ?? "";@@ -2049,33 +1973,24 @@ export const IndexMetadata = {toJSON(message: IndexMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.expressions?.length) {- obj.expressions = message.expressions;- }- if (message.type !== "") {- obj.type = message.type;- }- if (message.unique === true) {- obj.unique = message.unique;- }- if (message.primary === true) {- obj.primary = message.primary;- }- if (message.visible === true) {- obj.visible = message.visible;- }- if (message.comment !== "") {- obj.comment = message.comment;- }+ message.name !== undefined && (obj.name = message.name);+ if (message.expressions) {+ obj.expressions = message.expressions.map((e) => e);+ } else {+ obj.expressions = [];+ }+ message.type !== undefined && (obj.type = message.type);+ message.unique !== undefined && (obj.unique = message.unique);+ message.primary !== undefined && (obj.primary = message.primary);+ message.visible !== undefined && (obj.visible = message.visible);+ message.comment !== undefined && (obj.comment = message.comment);return obj;},create(base?: DeepPartial<IndexMetadata>): IndexMetadata {return IndexMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IndexMetadata>): IndexMetadata {const message = createBaseIndexMetadata();message.name = object.name ?? "";@@ -2165,24 +2080,17 @@ export const ExtensionMetadata = {toJSON(message: ExtensionMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.version !== "") {- obj.version = message.version;- }- if (message.description !== "") {- obj.description = message.description;- }+ message.name !== undefined && (obj.name = message.name);+ message.schema !== undefined && (obj.schema = message.schema);+ message.version !== undefined && (obj.version = message.version);+ message.description !== undefined && (obj.description = message.description);return obj;},create(base?: DeepPartial<ExtensionMetadata>): ExtensionMetadata {return ExtensionMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExtensionMetadata>): ExtensionMetadata {const message = createBaseExtensionMetadata();message.name = object.name ?? "";@@ -2324,36 +2232,29 @@ export const ForeignKeyMetadata = {toJSON(message: ForeignKeyMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.columns?.length) {- obj.columns = message.columns;- }- if (message.referencedSchema !== "") {- obj.referencedSchema = message.referencedSchema;- }- if (message.referencedTable !== "") {- obj.referencedTable = message.referencedTable;- }- if (message.referencedColumns?.length) {- obj.referencedColumns = message.referencedColumns;- }- if (message.onDelete !== "") {- obj.onDelete = message.onDelete;- }- if (message.onUpdate !== "") {- obj.onUpdate = message.onUpdate;- }- if (message.matchType !== "") {- obj.matchType = message.matchType;- }+ message.name !== undefined && (obj.name = message.name);+ if (message.columns) {+ obj.columns = message.columns.map((e) => e);+ } else {+ obj.columns = [];+ }+ message.referencedSchema !== undefined && (obj.referencedSchema = message.referencedSchema);+ message.referencedTable !== undefined && (obj.referencedTable = message.referencedTable);+ if (message.referencedColumns) {+ obj.referencedColumns = message.referencedColumns.map((e) => e);+ } else {+ obj.referencedColumns = [];+ }+ message.onDelete !== undefined && (obj.onDelete = message.onDelete);+ message.onUpdate !== undefined && (obj.onUpdate = message.onUpdate);+ message.matchType !== undefined && (obj.matchType = message.matchType);return obj;},create(base?: DeepPartial<ForeignKeyMetadata>): ForeignKeyMetadata {return ForeignKeyMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ForeignKeyMetadata>): ForeignKeyMetadata {const message = createBaseForeignKeyMetadata();message.name = object.name ?? "";@@ -2422,18 +2323,15 @@ export const InstanceRoleMetadata = {toJSON(message: InstanceRoleMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.grant !== "") {- obj.grant = message.grant;- }+ message.name !== undefined && (obj.name = message.name);+ message.grant !== undefined && (obj.grant = message.grant);return obj;},create(base?: DeepPartial<InstanceRoleMetadata>): InstanceRoleMetadata {return InstanceRoleMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<InstanceRoleMetadata>): InstanceRoleMetadata {const message = createBaseInstanceRoleMetadata();message.name = object.name ?? "";@@ -2483,8 +2381,10 @@ export const Secrets = {toJSON(message: Secrets): unknown {const obj: any = {};- if (message.items?.length) {- obj.items = message.items.map((e) => SecretItem.toJSON(e));+ if (message.items) {+ obj.items = message.items.map((e) => e ? SecretItem.toJSON(e) : undefined);+ } else {+ obj.items = [];}return obj;},@@ -2492,6 +2392,7 @@ export const Secrets = {create(base?: DeepPartial<Secrets>): Secrets {return Secrets.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Secrets>): Secrets {const message = createBaseSecrets();message.items = object.items?.map((e) => SecretItem.fromPartial(e)) || [];@@ -2564,21 +2465,16 @@ export const SecretItem = {toJSON(message: SecretItem): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.value !== "") {- obj.value = message.value;- }- if (message.description !== "") {- obj.description = message.description;- }+ message.name !== undefined && (obj.name = message.name);+ message.value !== undefined && (obj.value = message.value);+ message.description !== undefined && (obj.description = message.description);return obj;},create(base?: DeepPartial<SecretItem>): SecretItem {return SecretItem.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SecretItem>): SecretItem {const message = createBaseSecretItem();message.name = object.name ?? "";@@ -2621,6 +2517,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/store/idp.ts b/frontend/src/types/proto/store/idp.tsindex 6e59c7604f..f3fb775e64 100644--- a/frontend/src/types/proto/store/idp.ts+++ b/frontend/src/types/proto/store/idp.ts@@ -260,21 +260,19 @@ export const IdentityProviderConfig = {toJSON(message: IdentityProviderConfig): unknown {const obj: any = {};- if (message.oauth2Config !== undefined) {- obj.oauth2Config = OAuth2IdentityProviderConfig.toJSON(message.oauth2Config);- }- if (message.oidcConfig !== undefined) {- obj.oidcConfig = OIDCIdentityProviderConfig.toJSON(message.oidcConfig);- }- if (message.ldapConfig !== undefined) {- obj.ldapConfig = LDAPIdentityProviderConfig.toJSON(message.ldapConfig);- }+ message.oauth2Config !== undefined &&+ (obj.oauth2Config = message.oauth2Config ? OAuth2IdentityProviderConfig.toJSON(message.oauth2Config) : undefined);+ message.oidcConfig !== undefined &&+ (obj.oidcConfig = message.oidcConfig ? OIDCIdentityProviderConfig.toJSON(message.oidcConfig) : undefined);+ message.ldapConfig !== undefined &&+ (obj.ldapConfig = message.ldapConfig ? LDAPIdentityProviderConfig.toJSON(message.ldapConfig) : undefined);return obj;},create(base?: DeepPartial<IdentityProviderConfig>): IdentityProviderConfig {return IdentityProviderConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IdentityProviderConfig>): IdentityProviderConfig {const message = createBaseIdentityProviderConfig();message.oauth2Config = (object.oauth2Config !== undefined && object.oauth2Config !== null)@@ -431,39 +429,27 @@ export const OAuth2IdentityProviderConfig = {toJSON(message: OAuth2IdentityProviderConfig): unknown {const obj: any = {};- if (message.authUrl !== "") {- obj.authUrl = message.authUrl;- }- if (message.tokenUrl !== "") {- obj.tokenUrl = message.tokenUrl;- }- if (message.userInfoUrl !== "") {- obj.userInfoUrl = message.userInfoUrl;- }- if (message.clientId !== "") {- obj.clientId = message.clientId;- }- if (message.clientSecret !== "") {- obj.clientSecret = message.clientSecret;- }- if (message.scopes?.length) {- obj.scopes = message.scopes;- }- if (message.fieldMapping !== undefined) {- obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);- }- if (message.skipTlsVerify === true) {- obj.skipTlsVerify = message.skipTlsVerify;- }- if (message.authStyle !== 0) {- obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);- }+ message.authUrl !== undefined && (obj.authUrl = message.authUrl);+ message.tokenUrl !== undefined && (obj.tokenUrl = message.tokenUrl);+ message.userInfoUrl !== undefined && (obj.userInfoUrl = message.userInfoUrl);+ message.clientId !== undefined && (obj.clientId = message.clientId);+ message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);+ if (message.scopes) {+ obj.scopes = message.scopes.map((e) => e);+ } else {+ obj.scopes = [];+ }+ message.fieldMapping !== undefined &&+ (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);+ message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);+ message.authStyle !== undefined && (obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle));return obj;},create(base?: DeepPartial<OAuth2IdentityProviderConfig>): OAuth2IdentityProviderConfig {return OAuth2IdentityProviderConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OAuth2IdentityProviderConfig>): OAuth2IdentityProviderConfig {const message = createBaseOAuth2IdentityProviderConfig();message.authUrl = object.authUrl ?? "";@@ -579,30 +565,20 @@ export const OIDCIdentityProviderConfig = {toJSON(message: OIDCIdentityProviderConfig): unknown {const obj: any = {};- if (message.issuer !== "") {- obj.issuer = message.issuer;- }- if (message.clientId !== "") {- obj.clientId = message.clientId;- }- if (message.clientSecret !== "") {- obj.clientSecret = message.clientSecret;- }- if (message.fieldMapping !== undefined) {- obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);- }- if (message.skipTlsVerify === true) {- obj.skipTlsVerify = message.skipTlsVerify;- }- if (message.authStyle !== 0) {- obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);- }+ message.issuer !== undefined && (obj.issuer = message.issuer);+ message.clientId !== undefined && (obj.clientId = message.clientId);+ message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);+ message.fieldMapping !== undefined &&+ (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);+ message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);+ message.authStyle !== undefined && (obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle));return obj;},create(base?: DeepPartial<OIDCIdentityProviderConfig>): OIDCIdentityProviderConfig {return OIDCIdentityProviderConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OIDCIdentityProviderConfig>): OIDCIdentityProviderConfig {const message = createBaseOIDCIdentityProviderConfig();message.issuer = object.issuer ?? "";@@ -758,39 +734,23 @@ export const LDAPIdentityProviderConfig = {toJSON(message: LDAPIdentityProviderConfig): unknown {const obj: any = {};- if (message.host !== "") {- obj.host = message.host;- }- if (message.port !== 0) {- obj.port = Math.round(message.port);- }- if (message.skipTlsVerify === true) {- obj.skipTlsVerify = message.skipTlsVerify;- }- if (message.bindDn !== "") {- obj.bindDn = message.bindDn;- }- if (message.bindPassword !== "") {- obj.bindPassword = message.bindPassword;- }- if (message.baseDn !== "") {- obj.baseDn = message.baseDn;- }- if (message.userFilter !== "") {- obj.userFilter = message.userFilter;- }- if (message.securityProtocol !== "") {- obj.securityProtocol = message.securityProtocol;- }- if (message.fieldMapping !== undefined) {- obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);- }+ message.host !== undefined && (obj.host = message.host);+ message.port !== undefined && (obj.port = Math.round(message.port));+ message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);+ message.bindDn !== undefined && (obj.bindDn = message.bindDn);+ message.bindPassword !== undefined && (obj.bindPassword = message.bindPassword);+ message.baseDn !== undefined && (obj.baseDn = message.baseDn);+ message.userFilter !== undefined && (obj.userFilter = message.userFilter);+ message.securityProtocol !== undefined && (obj.securityProtocol = message.securityProtocol);+ message.fieldMapping !== undefined &&+ (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);return obj;},create(base?: DeepPartial<LDAPIdentityProviderConfig>): LDAPIdentityProviderConfig {return LDAPIdentityProviderConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<LDAPIdentityProviderConfig>): LDAPIdentityProviderConfig {const message = createBaseLDAPIdentityProviderConfig();message.host = object.host ?? "";@@ -884,24 +844,17 @@ export const FieldMapping = {toJSON(message: FieldMapping): unknown {const obj: any = {};- if (message.identifier !== "") {- obj.identifier = message.identifier;- }- if (message.displayName !== "") {- obj.displayName = message.displayName;- }- if (message.email !== "") {- obj.email = message.email;- }- if (message.phone !== "") {- obj.phone = message.phone;- }+ message.identifier !== undefined && (obj.identifier = message.identifier);+ message.displayName !== undefined && (obj.displayName = message.displayName);+ message.email !== undefined && (obj.email = message.email);+ message.phone !== undefined && (obj.phone = message.phone);return obj;},create(base?: DeepPartial<FieldMapping>): FieldMapping {return FieldMapping.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FieldMapping>): FieldMapping {const message = createBaseFieldMapping();message.identifier = object.identifier ?? "";@@ -988,24 +941,17 @@ export const IdentityProviderUserInfo = {toJSON(message: IdentityProviderUserInfo): unknown {const obj: any = {};- if (message.identifier !== "") {- obj.identifier = message.identifier;- }- if (message.displayName !== "") {- obj.displayName = message.displayName;- }- if (message.email !== "") {- obj.email = message.email;- }- if (message.phone !== "") {- obj.phone = message.phone;- }+ message.identifier !== undefined && (obj.identifier = message.identifier);+ message.displayName !== undefined && (obj.displayName = message.displayName);+ message.email !== undefined && (obj.email = message.email);+ message.phone !== undefined && (obj.phone = message.phone);return obj;},create(base?: DeepPartial<IdentityProviderUserInfo>): IdentityProviderUserInfo {return IdentityProviderUserInfo.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IdentityProviderUserInfo>): IdentityProviderUserInfo {const message = createBaseIdentityProviderUserInfo();message.identifier = object.identifier ?? "";diff --git a/frontend/src/types/proto/store/instance.ts b/frontend/src/types/proto/store/instance.tsindex fe5986c1d9..53460293cc 100644--- a/frontend/src/types/proto/store/instance.ts+++ b/frontend/src/types/proto/store/instance.ts@@ -62,15 +62,14 @@ export const InstanceOptions = {toJSON(message: InstanceOptions): unknown {const obj: any = {};- if (message.schemaTenantMode === true) {- obj.schemaTenantMode = message.schemaTenantMode;- }+ message.schemaTenantMode !== undefined && (obj.schemaTenantMode = message.schemaTenantMode);return obj;},create(base?: DeepPartial<InstanceOptions>): InstanceOptions {return InstanceOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<InstanceOptions>): InstanceOptions {const message = createBaseInstanceOptions();message.schemaTenantMode = object.schemaTenantMode ?? false;@@ -121,15 +120,15 @@ export const InstanceMetadata = {toJSON(message: InstanceMetadata): unknown {const obj: any = {};- if (message.mysqlLowerCaseTableNames !== 0) {- obj.mysqlLowerCaseTableNames = Math.round(message.mysqlLowerCaseTableNames);- }+ message.mysqlLowerCaseTableNames !== undefined &&+ (obj.mysqlLowerCaseTableNames = Math.round(message.mysqlLowerCaseTableNames));return obj;},create(base?: DeepPartial<InstanceMetadata>): InstanceMetadata {return InstanceMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<InstanceMetadata>): InstanceMetadata {const message = createBaseInstanceMetadata();message.mysqlLowerCaseTableNames = object.mysqlLowerCaseTableNames ?? 0;diff --git a/frontend/src/types/proto/store/instance_change_history.ts b/frontend/src/types/proto/store/instance_change_history.tsindex 3760fd19bf..f881e87225 100644--- a/frontend/src/types/proto/store/instance_change_history.ts+++ b/frontend/src/types/proto/store/instance_change_history.ts@@ -81,18 +81,17 @@ export const InstanceChangeHistoryPayload = {toJSON(message: InstanceChangeHistoryPayload): unknown {const obj: any = {};- if (message.pushEvent !== undefined) {- obj.pushEvent = PushEvent.toJSON(message.pushEvent);- }- if (message.changedResources !== undefined) {- obj.changedResources = ChangedResources.toJSON(message.changedResources);- }+ message.pushEvent !== undefined &&+ (obj.pushEvent = message.pushEvent ? PushEvent.toJSON(message.pushEvent) : undefined);+ message.changedResources !== undefined &&+ (obj.changedResources = message.changedResources ? ChangedResources.toJSON(message.changedResources) : undefined);return obj;},create(base?: DeepPartial<InstanceChangeHistoryPayload>): InstanceChangeHistoryPayload {return InstanceChangeHistoryPayload.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<InstanceChangeHistoryPayload>): InstanceChangeHistoryPayload {const message = createBaseInstanceChangeHistoryPayload();message.pushEvent = (object.pushEvent !== undefined && object.pushEvent !== null)@@ -150,8 +149,10 @@ export const ChangedResources = {toJSON(message: ChangedResources): unknown {const obj: any = {};- if (message.databases?.length) {- obj.databases = message.databases.map((e) => ChangedResourceDatabase.toJSON(e));+ if (message.databases) {+ obj.databases = message.databases.map((e) => e ? ChangedResourceDatabase.toJSON(e) : undefined);+ } else {+ obj.databases = [];}return obj;},@@ -159,6 +160,7 @@ export const ChangedResources = {create(base?: DeepPartial<ChangedResources>): ChangedResources {return ChangedResources.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangedResources>): ChangedResources {const message = createBaseChangedResources();message.databases = object.databases?.map((e) => ChangedResourceDatabase.fromPartial(e)) || [];@@ -220,11 +222,11 @@ export const ChangedResourceDatabase = {toJSON(message: ChangedResourceDatabase): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schemas?.length) {- obj.schemas = message.schemas.map((e) => ChangedResourceSchema.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.schemas) {+ obj.schemas = message.schemas.map((e) => e ? ChangedResourceSchema.toJSON(e) : undefined);+ } else {+ obj.schemas = [];}return obj;},@@ -232,6 +234,7 @@ export const ChangedResourceDatabase = {create(base?: DeepPartial<ChangedResourceDatabase>): ChangedResourceDatabase {return ChangedResourceDatabase.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangedResourceDatabase>): ChangedResourceDatabase {const message = createBaseChangedResourceDatabase();message.name = object.name ?? "";@@ -294,11 +297,11 @@ export const ChangedResourceSchema = {toJSON(message: ChangedResourceSchema): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.tables?.length) {- obj.tables = message.tables.map((e) => ChangedResourceTable.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.tables) {+ obj.tables = message.tables.map((e) => e ? ChangedResourceTable.toJSON(e) : undefined);+ } else {+ obj.tables = [];}return obj;},@@ -306,6 +309,7 @@ export const ChangedResourceSchema = {create(base?: DeepPartial<ChangedResourceSchema>): ChangedResourceSchema {return ChangedResourceSchema.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangedResourceSchema>): ChangedResourceSchema {const message = createBaseChangedResourceSchema();message.name = object.name ?? "";@@ -355,15 +359,14 @@ export const ChangedResourceTable = {toJSON(message: ChangedResourceTable): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<ChangedResourceTable>): ChangedResourceTable {return ChangedResourceTable.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangedResourceTable>): ChangedResourceTable {const message = createBaseChangedResourceTable();message.name = object.name ?? "";diff --git a/frontend/src/types/proto/store/issue.ts b/frontend/src/types/proto/store/issue.tsindex ce47001a8b..ee8ef1bb3c 100644--- a/frontend/src/types/proto/store/issue.ts+++ b/frontend/src/types/proto/store/issue.ts@@ -91,21 +91,18 @@ export const IssuePayload = {toJSON(message: IssuePayload): unknown {const obj: any = {};- if (message.approval !== undefined) {- obj.approval = IssuePayloadApproval.toJSON(message.approval);- }- if (message.grantRequest !== undefined) {- obj.grantRequest = GrantRequest.toJSON(message.grantRequest);- }- if (message.grouping !== undefined) {- obj.grouping = Grouping.toJSON(message.grouping);- }+ message.approval !== undefined &&+ (obj.approval = message.approval ? IssuePayloadApproval.toJSON(message.approval) : undefined);+ message.grantRequest !== undefined &&+ (obj.grantRequest = message.grantRequest ? GrantRequest.toJSON(message.grantRequest) : undefined);+ message.grouping !== undefined && (obj.grouping = message.grouping ? Grouping.toJSON(message.grouping) : undefined);return obj;},create(base?: DeepPartial<IssuePayload>): IssuePayload {return IssuePayload.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IssuePayload>): IssuePayload {const message = createBaseIssuePayload();message.approval = (object.approval !== undefined && object.approval !== null)@@ -162,15 +159,14 @@ export const Grouping = {toJSON(message: Grouping): unknown {const obj: any = {};- if (message.databaseGroupName !== "") {- obj.databaseGroupName = message.databaseGroupName;- }+ message.databaseGroupName !== undefined && (obj.databaseGroupName = message.databaseGroupName);return obj;},create(base?: DeepPartial<Grouping>): Grouping {return Grouping.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Grouping>): Grouping {const message = createBaseGrouping();message.databaseGroupName = object.databaseGroupName ?? "";@@ -254,24 +250,18 @@ export const GrantRequest = {toJSON(message: GrantRequest): unknown {const obj: any = {};- if (message.role !== "") {- obj.role = message.role;- }- if (message.user !== "") {- obj.user = message.user;- }- if (message.condition !== undefined) {- obj.condition = Expr.toJSON(message.condition);- }- if (message.expiration !== undefined) {- obj.expiration = Duration.toJSON(message.expiration);- }+ message.role !== undefined && (obj.role = message.role);+ message.user !== undefined && (obj.user = message.user);+ message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);+ message.expiration !== undefined &&+ (obj.expiration = message.expiration ? Duration.toJSON(message.expiration) : undefined);return obj;},create(base?: DeepPartial<GrantRequest>): GrantRequest {return GrantRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GrantRequest>): GrantRequest {const message = createBaseGrantRequest();message.role = object.role ?? "";diff --git a/frontend/src/types/proto/store/plan.ts b/frontend/src/types/proto/store/plan.tsindex 46c5f49797..dd8b968c4e 100644--- a/frontend/src/types/proto/store/plan.ts+++ b/frontend/src/types/proto/store/plan.ts@@ -227,8 +227,10 @@ export const PlanConfig = {toJSON(message: PlanConfig): unknown {const obj: any = {};- if (message.steps?.length) {- obj.steps = message.steps.map((e) => PlanConfig_Step.toJSON(e));+ if (message.steps) {+ obj.steps = message.steps.map((e) => e ? PlanConfig_Step.toJSON(e) : undefined);+ } else {+ obj.steps = [];}return obj;},@@ -236,6 +238,7 @@ export const PlanConfig = {create(base?: DeepPartial<PlanConfig>): PlanConfig {return PlanConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanConfig>): PlanConfig {const message = createBasePlanConfig();message.steps = object.steps?.map((e) => PlanConfig_Step.fromPartial(e)) || [];@@ -284,8 +287,10 @@ export const PlanConfig_Step = {toJSON(message: PlanConfig_Step): unknown {const obj: any = {};- if (message.specs?.length) {- obj.specs = message.specs.map((e) => PlanConfig_Spec.toJSON(e));+ if (message.specs) {+ obj.specs = message.specs.map((e) => e ? PlanConfig_Spec.toJSON(e) : undefined);+ } else {+ obj.specs = [];}return obj;},@@ -293,6 +298,7 @@ export const PlanConfig_Step = {create(base?: DeepPartial<PlanConfig_Step>): PlanConfig_Step {return PlanConfig_Step.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanConfig_Step>): PlanConfig_Step {const message = createBasePlanConfig_Step();message.specs = object.specs?.map((e) => PlanConfig_Spec.fromPartial(e)) || [];@@ -401,27 +407,24 @@ export const PlanConfig_Spec = {toJSON(message: PlanConfig_Spec): unknown {const obj: any = {};- if (message.earliestAllowedTime !== undefined) {- obj.earliestAllowedTime = message.earliestAllowedTime.toISOString();- }- if (message.id !== "") {- obj.id = message.id;- }- if (message.createDatabaseConfig !== undefined) {- obj.createDatabaseConfig = PlanConfig_CreateDatabaseConfig.toJSON(message.createDatabaseConfig);- }- if (message.changeDatabaseConfig !== undefined) {- obj.changeDatabaseConfig = PlanConfig_ChangeDatabaseConfig.toJSON(message.changeDatabaseConfig);- }- if (message.restoreDatabaseConfig !== undefined) {- obj.restoreDatabaseConfig = PlanConfig_RestoreDatabaseConfig.toJSON(message.restoreDatabaseConfig);- }+ message.earliestAllowedTime !== undefined && (obj.earliestAllowedTime = message.earliestAllowedTime.toISOString());+ message.id !== undefined && (obj.id = message.id);+ message.createDatabaseConfig !== undefined && (obj.createDatabaseConfig = message.createDatabaseConfig+ ? PlanConfig_CreateDatabaseConfig.toJSON(message.createDatabaseConfig)+ : undefined);+ message.changeDatabaseConfig !== undefined && (obj.changeDatabaseConfig = message.changeDatabaseConfig+ ? PlanConfig_ChangeDatabaseConfig.toJSON(message.changeDatabaseConfig)+ : undefined);+ message.restoreDatabaseConfig !== undefined && (obj.restoreDatabaseConfig = message.restoreDatabaseConfig+ ? PlanConfig_RestoreDatabaseConfig.toJSON(message.restoreDatabaseConfig)+ : undefined);return obj;},create(base?: DeepPartial<PlanConfig_Spec>): PlanConfig_Spec {return PlanConfig_Spec.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanConfig_Spec>): PlanConfig_Spec {const message = createBasePlanConfig_Spec();message.earliestAllowedTime = object.earliestAllowedTime ?? undefined;@@ -589,38 +592,19 @@ export const PlanConfig_CreateDatabaseConfig = {toJSON(message: PlanConfig_CreateDatabaseConfig): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }- if (message.database !== "") {- obj.database = message.database;- }- if (message.table !== "") {- obj.table = message.table;- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.cluster !== "") {- obj.cluster = message.cluster;- }- if (message.owner !== "") {- obj.owner = message.owner;- }- if (message.backup !== "") {- obj.backup = message.backup;- }+ message.target !== undefined && (obj.target = message.target);+ message.database !== undefined && (obj.database = message.database);+ message.table !== undefined && (obj.table = message.table);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.cluster !== undefined && (obj.cluster = message.cluster);+ message.owner !== undefined && (obj.owner = message.owner);+ message.backup !== undefined && (obj.backup = message.backup);+ obj.labels = {};if (message.labels) {- const entries = Object.entries(message.labels);- if (entries.length > 0) {- obj.labels = {};- entries.forEach(([k, v]) => {- obj.labels[k] = v;- });- }+ Object.entries(message.labels).forEach(([k, v]) => {+ obj.labels[k] = v;+ });}return obj;},@@ -628,6 +612,7 @@ export const PlanConfig_CreateDatabaseConfig = {create(base?: DeepPartial<PlanConfig_CreateDatabaseConfig>): PlanConfig_CreateDatabaseConfig {return PlanConfig_CreateDatabaseConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanConfig_CreateDatabaseConfig>): PlanConfig_CreateDatabaseConfig {const message = createBasePlanConfig_CreateDatabaseConfig();message.target = object.target ?? "";@@ -699,18 +684,15 @@ export const PlanConfig_CreateDatabaseConfig_LabelsEntry = {toJSON(message: PlanConfig_CreateDatabaseConfig_LabelsEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<PlanConfig_CreateDatabaseConfig_LabelsEntry>): PlanConfig_CreateDatabaseConfig_LabelsEntry {return PlanConfig_CreateDatabaseConfig_LabelsEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanConfig_CreateDatabaseConfig_LabelsEntry>,): PlanConfig_CreateDatabaseConfig_LabelsEntry {@@ -821,30 +803,21 @@ export const PlanConfig_ChangeDatabaseConfig = {toJSON(message: PlanConfig_ChangeDatabaseConfig): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }- if (message.sheet !== "") {- obj.sheet = message.sheet;- }- if (message.type !== 0) {- obj.type = planConfig_ChangeDatabaseConfig_TypeToJSON(message.type);- }- if (message.schemaVersion !== "") {- obj.schemaVersion = message.schemaVersion;- }- if (message.rollbackEnabled === true) {- obj.rollbackEnabled = message.rollbackEnabled;- }- if (message.rollbackDetail !== undefined) {- obj.rollbackDetail = PlanConfig_ChangeDatabaseConfig_RollbackDetail.toJSON(message.rollbackDetail);- }+ message.target !== undefined && (obj.target = message.target);+ message.sheet !== undefined && (obj.sheet = message.sheet);+ message.type !== undefined && (obj.type = planConfig_ChangeDatabaseConfig_TypeToJSON(message.type));+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);+ message.rollbackEnabled !== undefined && (obj.rollbackEnabled = message.rollbackEnabled);+ message.rollbackDetail !== undefined && (obj.rollbackDetail = message.rollbackDetail+ ? PlanConfig_ChangeDatabaseConfig_RollbackDetail.toJSON(message.rollbackDetail)+ : undefined);return obj;},create(base?: DeepPartial<PlanConfig_ChangeDatabaseConfig>): PlanConfig_ChangeDatabaseConfig {return PlanConfig_ChangeDatabaseConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanConfig_ChangeDatabaseConfig>): PlanConfig_ChangeDatabaseConfig {const message = createBasePlanConfig_ChangeDatabaseConfig();message.target = object.target ?? "";@@ -916,12 +889,8 @@ export const PlanConfig_ChangeDatabaseConfig_RollbackDetail = {toJSON(message: PlanConfig_ChangeDatabaseConfig_RollbackDetail): unknown {const obj: any = {};- if (message.rollbackFromTask !== "") {- obj.rollbackFromTask = message.rollbackFromTask;- }- if (message.rollbackFromIssue !== "") {- obj.rollbackFromIssue = message.rollbackFromIssue;- }+ message.rollbackFromTask !== undefined && (obj.rollbackFromTask = message.rollbackFromTask);+ message.rollbackFromIssue !== undefined && (obj.rollbackFromIssue = message.rollbackFromIssue);return obj;},@@ -930,6 +899,7 @@ export const PlanConfig_ChangeDatabaseConfig_RollbackDetail = {): PlanConfig_ChangeDatabaseConfig_RollbackDetail {return PlanConfig_ChangeDatabaseConfig_RollbackDetail.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanConfig_ChangeDatabaseConfig_RollbackDetail>,): PlanConfig_ChangeDatabaseConfig_RollbackDetail {@@ -1018,24 +988,19 @@ export const PlanConfig_RestoreDatabaseConfig = {toJSON(message: PlanConfig_RestoreDatabaseConfig): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }- if (message.createDatabaseConfig !== undefined) {- obj.createDatabaseConfig = PlanConfig_CreateDatabaseConfig.toJSON(message.createDatabaseConfig);- }- if (message.backup !== undefined) {- obj.backup = message.backup;- }- if (message.pointInTime !== undefined) {- obj.pointInTime = message.pointInTime.toISOString();- }+ message.target !== undefined && (obj.target = message.target);+ message.createDatabaseConfig !== undefined && (obj.createDatabaseConfig = message.createDatabaseConfig+ ? PlanConfig_CreateDatabaseConfig.toJSON(message.createDatabaseConfig)+ : undefined);+ message.backup !== undefined && (obj.backup = message.backup);+ message.pointInTime !== undefined && (obj.pointInTime = message.pointInTime.toISOString());return obj;},create(base?: DeepPartial<PlanConfig_RestoreDatabaseConfig>): PlanConfig_RestoreDatabaseConfig {return PlanConfig_RestoreDatabaseConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanConfig_RestoreDatabaseConfig>): PlanConfig_RestoreDatabaseConfig {const message = createBasePlanConfig_RestoreDatabaseConfig();message.target = object.target ?? "";diff --git a/frontend/src/types/proto/store/plan_check_run.ts b/frontend/src/types/proto/store/plan_check_run.tsindex a224bf05bf..98822171cc 100644--- a/frontend/src/types/proto/store/plan_check_run.ts+++ b/frontend/src/types/proto/store/plan_check_run.ts@@ -1,7 +1,7 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";import { ChangedResources } from "./instance_change_history";-import Long = require("long");export const protobufPackage = "bytebase.store";@@ -223,24 +223,22 @@ export const PlanCheckRunConfig = {toJSON(message: PlanCheckRunConfig): unknown {const obj: any = {};- if (message.sheetUid !== 0) {- obj.sheetUid = Math.round(message.sheetUid);- }- if (message.changeDatabaseType !== 0) {- obj.changeDatabaseType = planCheckRunConfig_ChangeDatabaseTypeToJSON(message.changeDatabaseType);- }- if (message.databaseTarget !== undefined) {- obj.databaseTarget = PlanCheckRunConfig_DatabaseTarget.toJSON(message.databaseTarget);- }- if (message.databaseGroupTarget !== undefined) {- obj.databaseGroupTarget = PlanCheckRunConfig_DatabaseGroupTarget.toJSON(message.databaseGroupTarget);- }+ message.sheetUid !== undefined && (obj.sheetUid = Math.round(message.sheetUid));+ message.changeDatabaseType !== undefined &&+ (obj.changeDatabaseType = planCheckRunConfig_ChangeDatabaseTypeToJSON(message.changeDatabaseType));+ message.databaseTarget !== undefined && (obj.databaseTarget = message.databaseTarget+ ? PlanCheckRunConfig_DatabaseTarget.toJSON(message.databaseTarget)+ : undefined);+ message.databaseGroupTarget !== undefined && (obj.databaseGroupTarget = message.databaseGroupTarget+ ? PlanCheckRunConfig_DatabaseGroupTarget.toJSON(message.databaseGroupTarget)+ : undefined);return obj;},create(base?: DeepPartial<PlanCheckRunConfig>): PlanCheckRunConfig {return PlanCheckRunConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRunConfig>): PlanCheckRunConfig {const message = createBasePlanCheckRunConfig();message.sheetUid = object.sheetUid ?? 0;@@ -309,18 +307,15 @@ export const PlanCheckRunConfig_DatabaseTarget = {toJSON(message: PlanCheckRunConfig_DatabaseTarget): unknown {const obj: any = {};- if (message.instanceUid !== 0) {- obj.instanceUid = Math.round(message.instanceUid);- }- if (message.databaseName !== "") {- obj.databaseName = message.databaseName;- }+ message.instanceUid !== undefined && (obj.instanceUid = Math.round(message.instanceUid));+ message.databaseName !== undefined && (obj.databaseName = message.databaseName);return obj;},create(base?: DeepPartial<PlanCheckRunConfig_DatabaseTarget>): PlanCheckRunConfig_DatabaseTarget {return PlanCheckRunConfig_DatabaseTarget.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRunConfig_DatabaseTarget>): PlanCheckRunConfig_DatabaseTarget {const message = createBasePlanCheckRunConfig_DatabaseTarget();message.instanceUid = object.instanceUid ?? 0;@@ -370,15 +365,14 @@ export const PlanCheckRunConfig_DatabaseGroupTarget = {toJSON(message: PlanCheckRunConfig_DatabaseGroupTarget): unknown {const obj: any = {};- if (message.databaseGroupUid !== 0) {- obj.databaseGroupUid = Math.round(message.databaseGroupUid);- }+ message.databaseGroupUid !== undefined && (obj.databaseGroupUid = Math.round(message.databaseGroupUid));return obj;},create(base?: DeepPartial<PlanCheckRunConfig_DatabaseGroupTarget>): PlanCheckRunConfig_DatabaseGroupTarget {return PlanCheckRunConfig_DatabaseGroupTarget.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRunConfig_DatabaseGroupTarget>): PlanCheckRunConfig_DatabaseGroupTarget {const message = createBasePlanCheckRunConfig_DatabaseGroupTarget();message.databaseGroupUid = object.databaseGroupUid ?? 0;@@ -442,18 +436,19 @@ export const PlanCheckRunResult = {toJSON(message: PlanCheckRunResult): unknown {const obj: any = {};- if (message.results?.length) {- obj.results = message.results.map((e) => PlanCheckRunResult_Result.toJSON(e));- }- if (message.error !== "") {- obj.error = message.error;+ if (message.results) {+ obj.results = message.results.map((e) => e ? PlanCheckRunResult_Result.toJSON(e) : undefined);+ } else {+ obj.results = [];}+ message.error !== undefined && (obj.error = message.error);return obj;},create(base?: DeepPartial<PlanCheckRunResult>): PlanCheckRunResult {return PlanCheckRunResult.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRunResult>): PlanCheckRunResult {const message = createBasePlanCheckRunResult();message.results = object.results?.map((e) => PlanCheckRunResult_Result.fromPartial(e)) || [];@@ -564,30 +559,23 @@ export const PlanCheckRunResult_Result = {toJSON(message: PlanCheckRunResult_Result): unknown {const obj: any = {};- if (message.status !== 0) {- obj.status = planCheckRunResult_Result_StatusToJSON(message.status);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.content !== "") {- obj.content = message.content;- }- if (message.code !== 0) {- obj.code = Math.round(message.code);- }- if (message.sqlSummaryReport !== undefined) {- obj.sqlSummaryReport = PlanCheckRunResult_Result_SqlSummaryReport.toJSON(message.sqlSummaryReport);- }- if (message.sqlReviewReport !== undefined) {- obj.sqlReviewReport = PlanCheckRunResult_Result_SqlReviewReport.toJSON(message.sqlReviewReport);- }+ message.status !== undefined && (obj.status = planCheckRunResult_Result_StatusToJSON(message.status));+ message.title !== undefined && (obj.title = message.title);+ message.content !== undefined && (obj.content = message.content);+ message.code !== undefined && (obj.code = Math.round(message.code));+ message.sqlSummaryReport !== undefined && (obj.sqlSummaryReport = message.sqlSummaryReport+ ? PlanCheckRunResult_Result_SqlSummaryReport.toJSON(message.sqlSummaryReport)+ : undefined);+ message.sqlReviewReport !== undefined && (obj.sqlReviewReport = message.sqlReviewReport+ ? PlanCheckRunResult_Result_SqlReviewReport.toJSON(message.sqlReviewReport)+ : undefined);return obj;},create(base?: DeepPartial<PlanCheckRunResult_Result>): PlanCheckRunResult_Result {return PlanCheckRunResult_Result.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRunResult_Result>): PlanCheckRunResult_Result {const message = createBasePlanCheckRunResult_Result();message.status = object.status ?? 0;@@ -680,24 +668,22 @@ export const PlanCheckRunResult_Result_SqlSummaryReport = {toJSON(message: PlanCheckRunResult_Result_SqlSummaryReport): unknown {const obj: any = {};- if (message.code !== 0) {- obj.code = Math.round(message.code);- }- if (message.statementTypes?.length) {- obj.statementTypes = message.statementTypes;- }- if (message.affectedRows !== 0) {- obj.affectedRows = Math.round(message.affectedRows);- }- if (message.changedResources !== undefined) {- obj.changedResources = ChangedResources.toJSON(message.changedResources);- }+ message.code !== undefined && (obj.code = Math.round(message.code));+ if (message.statementTypes) {+ obj.statementTypes = message.statementTypes.map((e) => e);+ } else {+ obj.statementTypes = [];+ }+ message.affectedRows !== undefined && (obj.affectedRows = Math.round(message.affectedRows));+ message.changedResources !== undefined &&+ (obj.changedResources = message.changedResources ? ChangedResources.toJSON(message.changedResources) : undefined);return obj;},create(base?: DeepPartial<PlanCheckRunResult_Result_SqlSummaryReport>): PlanCheckRunResult_Result_SqlSummaryReport {return PlanCheckRunResult_Result_SqlSummaryReport.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRunResult_Result_SqlSummaryReport>,): PlanCheckRunResult_Result_SqlSummaryReport {@@ -788,24 +774,17 @@ export const PlanCheckRunResult_Result_SqlReviewReport = {toJSON(message: PlanCheckRunResult_Result_SqlReviewReport): unknown {const obj: any = {};- if (message.line !== 0) {- obj.line = Math.round(message.line);- }- if (message.column !== 0) {- obj.column = Math.round(message.column);- }- if (message.detail !== "") {- obj.detail = message.detail;- }- if (message.code !== 0) {- obj.code = Math.round(message.code);- }+ message.line !== undefined && (obj.line = Math.round(message.line));+ message.column !== undefined && (obj.column = Math.round(message.column));+ message.detail !== undefined && (obj.detail = message.detail);+ message.code !== undefined && (obj.code = Math.round(message.code));return obj;},create(base?: DeepPartial<PlanCheckRunResult_Result_SqlReviewReport>): PlanCheckRunResult_Result_SqlReviewReport {return PlanCheckRunResult_Result_SqlReviewReport.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRunResult_Result_SqlReviewReport>,): PlanCheckRunResult_Result_SqlReviewReport {@@ -851,6 +830,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/store/policy.ts b/frontend/src/types/proto/store/policy.tsindex 9478664a41..ddf565f826 100644--- a/frontend/src/types/proto/store/policy.ts+++ b/frontend/src/types/proto/store/policy.ts@@ -86,8 +86,10 @@ export const IamPolicy = {toJSON(message: IamPolicy): unknown {const obj: any = {};- if (message.bindings?.length) {- obj.bindings = message.bindings.map((e) => Binding.toJSON(e));+ if (message.bindings) {+ obj.bindings = message.bindings.map((e) => e ? Binding.toJSON(e) : undefined);+ } else {+ obj.bindings = [];}return obj;},@@ -95,6 +97,7 @@ export const IamPolicy = {create(base?: DeepPartial<IamPolicy>): IamPolicy {return IamPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IamPolicy>): IamPolicy {const message = createBaseIamPolicy();message.bindings = object.bindings?.map((e) => Binding.fromPartial(e)) || [];@@ -167,21 +170,20 @@ export const Binding = {toJSON(message: Binding): unknown {const obj: any = {};- if (message.role !== "") {- obj.role = message.role;- }- if (message.members?.length) {- obj.members = message.members;- }- if (message.condition !== undefined) {- obj.condition = Expr.toJSON(message.condition);+ message.role !== undefined && (obj.role = message.role);+ if (message.members) {+ obj.members = message.members.map((e) => e);+ } else {+ obj.members = [];}+ message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);return obj;},create(base?: DeepPartial<Binding>): Binding {return Binding.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Binding>): Binding {const message = createBaseBinding();message.role = object.role ?? "";@@ -234,8 +236,10 @@ export const MaskingPolicy = {toJSON(message: MaskingPolicy): unknown {const obj: any = {};- if (message.maskData?.length) {- obj.maskData = message.maskData.map((e) => MaskData.toJSON(e));+ if (message.maskData) {+ obj.maskData = message.maskData.map((e) => e ? MaskData.toJSON(e) : undefined);+ } else {+ obj.maskData = [];}return obj;},@@ -243,6 +247,7 @@ export const MaskingPolicy = {create(base?: DeepPartial<MaskingPolicy>): MaskingPolicy {return MaskingPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MaskingPolicy>): MaskingPolicy {const message = createBaseMaskingPolicy();message.maskData = object.maskData?.map((e) => MaskData.fromPartial(e)) || [];@@ -337,27 +342,18 @@ export const MaskData = {toJSON(message: MaskData): unknown {const obj: any = {};- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.table !== "") {- obj.table = message.table;- }- if (message.column !== "") {- obj.column = message.column;- }- if (message.semanticCategoryId !== "") {- obj.semanticCategoryId = message.semanticCategoryId;- }- if (message.maskingLevel !== 0) {- obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);- }+ message.schema !== undefined && (obj.schema = message.schema);+ message.table !== undefined && (obj.table = message.table);+ message.column !== undefined && (obj.column = message.column);+ message.semanticCategoryId !== undefined && (obj.semanticCategoryId = message.semanticCategoryId);+ message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));return obj;},create(base?: DeepPartial<MaskData>): MaskData {return MaskData.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MaskData>): MaskData {const message = createBaseMaskData();message.schema = object.schema ?? "";diff --git a/frontend/src/types/proto/store/setting.ts b/frontend/src/types/proto/store/setting.tsindex 8f3a08cb95..b7c0efd281 100644--- a/frontend/src/types/proto/store/setting.ts+++ b/frontend/src/types/proto/store/setting.ts@@ -360,30 +360,25 @@ export const WorkspaceProfileSetting = {toJSON(message: WorkspaceProfileSetting): unknown {const obj: any = {};- if (message.externalUrl !== "") {- obj.externalUrl = message.externalUrl;- }- if (message.disallowSignup === true) {- obj.disallowSignup = message.disallowSignup;- }- if (message.require2fa === true) {- obj.require2fa = message.require2fa;- }- if (message.outboundIpList?.length) {- obj.outboundIpList = message.outboundIpList;- }- if (message.gitopsWebhookUrl !== "") {- obj.gitopsWebhookUrl = message.gitopsWebhookUrl;- }- if (message.refreshTokenDuration !== undefined) {- obj.refreshTokenDuration = Duration.toJSON(message.refreshTokenDuration);- }+ message.externalUrl !== undefined && (obj.externalUrl = message.externalUrl);+ message.disallowSignup !== undefined && (obj.disallowSignup = message.disallowSignup);+ message.require2fa !== undefined && (obj.require2fa = message.require2fa);+ if (message.outboundIpList) {+ obj.outboundIpList = message.outboundIpList.map((e) => e);+ } else {+ obj.outboundIpList = [];+ }+ message.gitopsWebhookUrl !== undefined && (obj.gitopsWebhookUrl = message.gitopsWebhookUrl);+ message.refreshTokenDuration !== undefined && (obj.refreshTokenDuration = message.refreshTokenDuration+ ? Duration.toJSON(message.refreshTokenDuration)+ : undefined);return obj;},create(base?: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {return WorkspaceProfileSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {const message = createBaseWorkspaceProfileSetting();message.externalUrl = object.externalUrl ?? "";@@ -449,18 +444,15 @@ export const AgentPluginSetting = {toJSON(message: AgentPluginSetting): unknown {const obj: any = {};- if (message.url !== "") {- obj.url = message.url;- }- if (message.token !== "") {- obj.token = message.token;- }+ message.url !== undefined && (obj.url = message.url);+ message.token !== undefined && (obj.token = message.token);return obj;},create(base?: DeepPartial<AgentPluginSetting>): AgentPluginSetting {return AgentPluginSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AgentPluginSetting>): AgentPluginSetting {const message = createBaseAgentPluginSetting();message.url = object.url ?? "";@@ -514,8 +506,10 @@ export const WorkspaceApprovalSetting = {toJSON(message: WorkspaceApprovalSetting): unknown {const obj: any = {};- if (message.rules?.length) {- obj.rules = message.rules.map((e) => WorkspaceApprovalSetting_Rule.toJSON(e));+ if (message.rules) {+ obj.rules = message.rules.map((e) => e ? WorkspaceApprovalSetting_Rule.toJSON(e) : undefined);+ } else {+ obj.rules = [];}return obj;},@@ -523,6 +517,7 @@ export const WorkspaceApprovalSetting = {create(base?: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {return WorkspaceApprovalSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {const message = createBaseWorkspaceApprovalSetting();message.rules = object.rules?.map((e) => WorkspaceApprovalSetting_Rule.fromPartial(e)) || [];@@ -595,21 +590,18 @@ export const WorkspaceApprovalSetting_Rule = {toJSON(message: WorkspaceApprovalSetting_Rule): unknown {const obj: any = {};- if (message.expression !== undefined) {- obj.expression = ParsedExpr.toJSON(message.expression);- }- if (message.template !== undefined) {- obj.template = ApprovalTemplate.toJSON(message.template);- }- if (message.condition !== undefined) {- obj.condition = Expr.toJSON(message.condition);- }+ message.expression !== undefined &&+ (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);+ message.template !== undefined &&+ (obj.template = message.template ? ApprovalTemplate.toJSON(message.template) : undefined);+ message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);return obj;},create(base?: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {return WorkspaceApprovalSetting_Rule.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {const message = createBaseWorkspaceApprovalSetting_Rule();message.expression = (object.expression !== undefined && object.expression !== null)@@ -668,8 +660,10 @@ export const ExternalApprovalSetting = {toJSON(message: ExternalApprovalSetting): unknown {const obj: any = {};- if (message.nodes?.length) {- obj.nodes = message.nodes.map((e) => ExternalApprovalSetting_Node.toJSON(e));+ if (message.nodes) {+ obj.nodes = message.nodes.map((e) => e ? ExternalApprovalSetting_Node.toJSON(e) : undefined);+ } else {+ obj.nodes = [];}return obj;},@@ -677,6 +671,7 @@ export const ExternalApprovalSetting = {create(base?: DeepPartial<ExternalApprovalSetting>): ExternalApprovalSetting {return ExternalApprovalSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExternalApprovalSetting>): ExternalApprovalSetting {const message = createBaseExternalApprovalSetting();message.nodes = object.nodes?.map((e) => ExternalApprovalSetting_Node.fromPartial(e)) || [];@@ -749,21 +744,16 @@ export const ExternalApprovalSetting_Node = {toJSON(message: ExternalApprovalSetting_Node): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.endpoint !== "") {- obj.endpoint = message.endpoint;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.endpoint !== undefined && (obj.endpoint = message.endpoint);return obj;},create(base?: DeepPartial<ExternalApprovalSetting_Node>): ExternalApprovalSetting_Node {return ExternalApprovalSetting_Node.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExternalApprovalSetting_Node>): ExternalApprovalSetting_Node {const message = createBaseExternalApprovalSetting_Node();message.id = object.id ?? "";@@ -928,42 +918,24 @@ export const SMTPMailDeliverySetting = {toJSON(message: SMTPMailDeliverySetting): unknown {const obj: any = {};- if (message.server !== "") {- obj.server = message.server;- }- if (message.port !== 0) {- obj.port = Math.round(message.port);- }- if (message.encryption !== 0) {- obj.encryption = sMTPMailDeliverySetting_EncryptionToJSON(message.encryption);- }- if (message.ca !== "") {- obj.ca = message.ca;- }- if (message.key !== "") {- obj.key = message.key;- }- if (message.cert !== "") {- obj.cert = message.cert;- }- if (message.authentication !== 0) {- obj.authentication = sMTPMailDeliverySetting_AuthenticationToJSON(message.authentication);- }- if (message.username !== "") {- obj.username = message.username;- }- if (message.password !== "") {- obj.password = message.password;- }- if (message.from !== "") {- obj.from = message.from;- }+ message.server !== undefined && (obj.server = message.server);+ message.port !== undefined && (obj.port = Math.round(message.port));+ message.encryption !== undefined && (obj.encryption = sMTPMailDeliverySetting_EncryptionToJSON(message.encryption));+ message.ca !== undefined && (obj.ca = message.ca);+ message.key !== undefined && (obj.key = message.key);+ message.cert !== undefined && (obj.cert = message.cert);+ message.authentication !== undefined &&+ (obj.authentication = sMTPMailDeliverySetting_AuthenticationToJSON(message.authentication));+ message.username !== undefined && (obj.username = message.username);+ message.password !== undefined && (obj.password = message.password);+ message.from !== undefined && (obj.from = message.from);return obj;},create(base?: DeepPartial<SMTPMailDeliverySetting>): SMTPMailDeliverySetting {return SMTPMailDeliverySetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SMTPMailDeliverySetting>): SMTPMailDeliverySetting {const message = createBaseSMTPMailDeliverySetting();message.server = object.server ?? "";@@ -1038,11 +1010,17 @@ export const SchemaTemplateSetting = {toJSON(message: SchemaTemplateSetting): unknown {const obj: any = {};- if (message.fieldTemplates?.length) {- obj.fieldTemplates = message.fieldTemplates.map((e) => SchemaTemplateSetting_FieldTemplate.toJSON(e));- }- if (message.columnTypes?.length) {- obj.columnTypes = message.columnTypes.map((e) => SchemaTemplateSetting_ColumnType.toJSON(e));+ if (message.fieldTemplates) {+ obj.fieldTemplates = message.fieldTemplates.map((e) =>+ e ? SchemaTemplateSetting_FieldTemplate.toJSON(e) : undefined+ );+ } else {+ obj.fieldTemplates = [];+ }+ if (message.columnTypes) {+ obj.columnTypes = message.columnTypes.map((e) => e ? SchemaTemplateSetting_ColumnType.toJSON(e) : undefined);+ } else {+ obj.columnTypes = [];}return obj;},@@ -1050,6 +1028,7 @@ export const SchemaTemplateSetting = {create(base?: DeepPartial<SchemaTemplateSetting>): SchemaTemplateSetting {return SchemaTemplateSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaTemplateSetting>): SchemaTemplateSetting {const message = createBaseSchemaTemplateSetting();message.fieldTemplates = object.fieldTemplates?.map((e) => SchemaTemplateSetting_FieldTemplate.fromPartial(e)) ||@@ -1135,24 +1114,17 @@ export const SchemaTemplateSetting_FieldTemplate = {toJSON(message: SchemaTemplateSetting_FieldTemplate): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.category !== "") {- obj.category = message.category;- }- if (message.column !== undefined) {- obj.column = ColumnMetadata.toJSON(message.column);- }+ message.id !== undefined && (obj.id = message.id);+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.category !== undefined && (obj.category = message.category);+ message.column !== undefined && (obj.column = message.column ? ColumnMetadata.toJSON(message.column) : undefined);return obj;},create(base?: DeepPartial<SchemaTemplateSetting_FieldTemplate>): SchemaTemplateSetting_FieldTemplate {return SchemaTemplateSetting_FieldTemplate.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaTemplateSetting_FieldTemplate>): SchemaTemplateSetting_FieldTemplate {const message = createBaseSchemaTemplateSetting_FieldTemplate();message.id = object.id ?? "";@@ -1230,14 +1202,12 @@ export const SchemaTemplateSetting_ColumnType = {toJSON(message: SchemaTemplateSetting_ColumnType): unknown {const obj: any = {};- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.enabled === true) {- obj.enabled = message.enabled;- }- if (message.types?.length) {- obj.types = message.types;+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.enabled !== undefined && (obj.enabled = message.enabled);+ if (message.types) {+ obj.types = message.types.map((e) => e);+ } else {+ obj.types = [];}return obj;},@@ -1245,6 +1215,7 @@ export const SchemaTemplateSetting_ColumnType = {create(base?: DeepPartial<SchemaTemplateSetting_ColumnType>): SchemaTemplateSetting_ColumnType {return SchemaTemplateSetting_ColumnType.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaTemplateSetting_ColumnType>): SchemaTemplateSetting_ColumnType {const message = createBaseSchemaTemplateSetting_ColumnType();message.engine = object.engine ?? 0;@@ -1299,8 +1270,12 @@ export const DataClassificationSetting = {toJSON(message: DataClassificationSetting): unknown {const obj: any = {};- if (message.configs?.length) {- obj.configs = message.configs.map((e) => DataClassificationSetting_DataClassificationConfig.toJSON(e));+ if (message.configs) {+ obj.configs = message.configs.map((e) =>+ e ? DataClassificationSetting_DataClassificationConfig.toJSON(e) : undefined+ );+ } else {+ obj.configs = [];}return obj;},@@ -1308,6 +1283,7 @@ export const DataClassificationSetting = {create(base?: DeepPartial<DataClassificationSetting>): DataClassificationSetting {return DataClassificationSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting>): DataClassificationSetting {const message = createBaseDataClassificationSetting();message.configs = object.configs?.map((e) => DataClassificationSetting_DataClassificationConfig.fromPartial(e)) ||@@ -1413,23 +1389,20 @@ export const DataClassificationSetting_DataClassificationConfig = {toJSON(message: DataClassificationSetting_DataClassificationConfig): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.levels?.length) {- obj.levels = message.levels.map((e) => DataClassificationSetting_DataClassificationConfig_Level.toJSON(e));- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ if (message.levels) {+ obj.levels = message.levels.map((e) =>+ e ? DataClassificationSetting_DataClassificationConfig_Level.toJSON(e) : undefined+ );+ } else {+ obj.levels = [];+ }+ obj.classification = {};if (message.classification) {- const entries = Object.entries(message.classification);- if (entries.length > 0) {- obj.classification = {};- entries.forEach(([k, v]) => {- obj.classification[k] = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(v);- });- }+ Object.entries(message.classification).forEach(([k, v]) => {+ obj.classification[k] = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(v);+ });}return obj;},@@ -1439,6 +1412,7 @@ export const DataClassificationSetting_DataClassificationConfig = {): DataClassificationSetting_DataClassificationConfig {return DataClassificationSetting_DataClassificationConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting_DataClassificationConfig>,): DataClassificationSetting_DataClassificationConfig {@@ -1538,18 +1512,10 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {toJSON(message: DataClassificationSetting_DataClassificationConfig_Level): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.sensitive === true) {- obj.sensitive = message.sensitive;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ message.sensitive !== undefined && (obj.sensitive = message.sensitive);return obj;},@@ -1558,6 +1524,7 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {): DataClassificationSetting_DataClassificationConfig_Level {return DataClassificationSetting_DataClassificationConfig_Level.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting_DataClassificationConfig_Level>,): DataClassificationSetting_DataClassificationConfig_Level {@@ -1652,18 +1619,10 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificatitoJSON(message: DataClassificationSetting_DataClassificationConfig_DataClassification): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.levelId !== undefined) {- obj.levelId = message.levelId;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ message.levelId !== undefined && (obj.levelId = message.levelId);return obj;},@@ -1672,6 +1631,7 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati): DataClassificationSetting_DataClassificationConfig_DataClassification {return DataClassificationSetting_DataClassificationConfig_DataClassification.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting_DataClassificationConfig_DataClassification>,): DataClassificationSetting_DataClassificationConfig_DataClassification {@@ -1752,12 +1712,10 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEntoJSON(message: DataClassificationSetting_DataClassificationConfig_ClassificationEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== undefined) {- obj.value = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(message.value);- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value+ ? DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(message.value)+ : undefined);return obj;},@@ -1766,6 +1724,7 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {return DataClassificationSetting_DataClassificationConfig_ClassificationEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting_DataClassificationConfig_ClassificationEntry>,): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {@@ -1823,8 +1782,12 @@ export const SemanticCategorySetting = {toJSON(message: SemanticCategorySetting): unknown {const obj: any = {};- if (message.categories?.length) {- obj.categories = message.categories.map((e) => SemanticCategorySetting_SemanticCategory.toJSON(e));+ if (message.categories) {+ obj.categories = message.categories.map((e) =>+ e ? SemanticCategorySetting_SemanticCategory.toJSON(e) : undefined+ );+ } else {+ obj.categories = [];}return obj;},@@ -1832,6 +1795,7 @@ export const SemanticCategorySetting = {create(base?: DeepPartial<SemanticCategorySetting>): SemanticCategorySetting {return SemanticCategorySetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SemanticCategorySetting>): SemanticCategorySetting {const message = createBaseSemanticCategorySetting();message.categories = object.categories?.map((e) => SemanticCategorySetting_SemanticCategory.fromPartial(e)) || [];@@ -1904,21 +1868,16 @@ export const SemanticCategorySetting_SemanticCategory = {toJSON(message: SemanticCategorySetting_SemanticCategory): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);return obj;},create(base?: DeepPartial<SemanticCategorySetting_SemanticCategory>): SemanticCategorySetting_SemanticCategory {return SemanticCategorySetting_SemanticCategory.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SemanticCategorySetting_SemanticCategory>): SemanticCategorySetting_SemanticCategory {const message = createBaseSemanticCategorySetting_SemanticCategory();message.id = object.id ?? "";diff --git a/frontend/src/types/proto/store/sheet.ts b/frontend/src/types/proto/store/sheet.tsindex 8c518c2f6b..b51b6361b8 100644--- a/frontend/src/types/proto/store/sheet.ts+++ b/frontend/src/types/proto/store/sheet.ts@@ -1,7 +1,7 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";import { Engine, engineFromJSON, engineToJSON } from "./common";-import Long = require("long");export const protobufPackage = "bytebase.store";@@ -193,24 +193,23 @@ export const SheetPayload = {toJSON(message: SheetPayload): unknown {const obj: any = {};- if (message.type !== 0) {- obj.type = sheetPayload_TypeToJSON(message.type);- }- if (message.vcsPayload !== undefined) {- obj.vcsPayload = SheetPayload_VCSPayload.toJSON(message.vcsPayload);- }- if (message.usedByIssues?.length) {- obj.usedByIssues = message.usedByIssues.map((e) => SheetPayload_UsedByIssue.toJSON(e));- }- if (message.schemaDesign !== undefined) {- obj.schemaDesign = SheetPayload_SchemaDesign.toJSON(message.schemaDesign);- }+ message.type !== undefined && (obj.type = sheetPayload_TypeToJSON(message.type));+ message.vcsPayload !== undefined &&+ (obj.vcsPayload = message.vcsPayload ? SheetPayload_VCSPayload.toJSON(message.vcsPayload) : undefined);+ if (message.usedByIssues) {+ obj.usedByIssues = message.usedByIssues.map((e) => e ? SheetPayload_UsedByIssue.toJSON(e) : undefined);+ } else {+ obj.usedByIssues = [];+ }+ message.schemaDesign !== undefined &&+ (obj.schemaDesign = message.schemaDesign ? SheetPayload_SchemaDesign.toJSON(message.schemaDesign) : undefined);return obj;},create(base?: DeepPartial<SheetPayload>): SheetPayload {return SheetPayload.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SheetPayload>): SheetPayload {const message = createBaseSheetPayload();message.type = object.type ?? 0;@@ -323,30 +322,19 @@ export const SheetPayload_VCSPayload = {toJSON(message: SheetPayload_VCSPayload): unknown {const obj: any = {};- if (message.fileName !== "") {- obj.fileName = message.fileName;- }- if (message.filePath !== "") {- obj.filePath = message.filePath;- }- if (message.size !== 0) {- obj.size = Math.round(message.size);- }- if (message.author !== "") {- obj.author = message.author;- }- if (message.lastCommitId !== "") {- obj.lastCommitId = message.lastCommitId;- }- if (message.lastSyncTs !== 0) {- obj.lastSyncTs = Math.round(message.lastSyncTs);- }+ message.fileName !== undefined && (obj.fileName = message.fileName);+ message.filePath !== undefined && (obj.filePath = message.filePath);+ message.size !== undefined && (obj.size = Math.round(message.size));+ message.author !== undefined && (obj.author = message.author);+ message.lastCommitId !== undefined && (obj.lastCommitId = message.lastCommitId);+ message.lastSyncTs !== undefined && (obj.lastSyncTs = Math.round(message.lastSyncTs));return obj;},create(base?: DeepPartial<SheetPayload_VCSPayload>): SheetPayload_VCSPayload {return SheetPayload_VCSPayload.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SheetPayload_VCSPayload>): SheetPayload_VCSPayload {const message = createBaseSheetPayload_VCSPayload();message.fileName = object.fileName ?? "";@@ -413,18 +401,15 @@ export const SheetPayload_UsedByIssue = {toJSON(message: SheetPayload_UsedByIssue): unknown {const obj: any = {};- if (message.issueId !== 0) {- obj.issueId = Math.round(message.issueId);- }- if (message.issueTitle !== "") {- obj.issueTitle = message.issueTitle;- }+ message.issueId !== undefined && (obj.issueId = Math.round(message.issueId));+ message.issueTitle !== undefined && (obj.issueTitle = message.issueTitle);return obj;},create(base?: DeepPartial<SheetPayload_UsedByIssue>): SheetPayload_UsedByIssue {return SheetPayload_UsedByIssue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SheetPayload_UsedByIssue>): SheetPayload_UsedByIssue {const message = createBaseSheetPayload_UsedByIssue();message.issueId = object.issueId ?? 0;@@ -509,24 +494,17 @@ export const SheetPayload_SchemaDesign = {toJSON(message: SheetPayload_SchemaDesign): unknown {const obj: any = {};- if (message.type !== 0) {- obj.type = sheetPayload_SchemaDesign_TypeToJSON(message.type);- }- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.baselineSheetId !== "") {- obj.baselineSheetId = message.baselineSheetId;- }- if (message.baselineSchemaDesignId !== "") {- obj.baselineSchemaDesignId = message.baselineSchemaDesignId;- }+ message.type !== undefined && (obj.type = sheetPayload_SchemaDesign_TypeToJSON(message.type));+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.baselineSheetId !== undefined && (obj.baselineSheetId = message.baselineSheetId);+ message.baselineSchemaDesignId !== undefined && (obj.baselineSchemaDesignId = message.baselineSchemaDesignId);return obj;},create(base?: DeepPartial<SheetPayload_SchemaDesign>): SheetPayload_SchemaDesign {return SheetPayload_SchemaDesign.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SheetPayload_SchemaDesign>): SheetPayload_SchemaDesign {const message = createBaseSheetPayload_SchemaDesign();message.type = object.type ?? 0;@@ -570,6 +548,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/store/slow_query.ts b/frontend/src/types/proto/store/slow_query.tsindex 652a986bfe..1d3942c937 100644--- a/frontend/src/types/proto/store/slow_query.ts+++ b/frontend/src/types/proto/store/slow_query.ts@@ -1,8 +1,8 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";import { Duration } from "../google/protobuf/duration";import { Timestamp } from "../google/protobuf/timestamp";-import Long = require("long");export const protobufPackage = "bytebase.store";@@ -107,8 +107,10 @@ export const SlowQueryStatistics = {toJSON(message: SlowQueryStatistics): unknown {const obj: any = {};- if (message.items?.length) {- obj.items = message.items.map((e) => SlowQueryStatisticsItem.toJSON(e));+ if (message.items) {+ obj.items = message.items.map((e) => e ? SlowQueryStatisticsItem.toJSON(e) : undefined);+ } else {+ obj.items = [];}return obj;},@@ -116,6 +118,7 @@ export const SlowQueryStatistics = {create(base?: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {return SlowQueryStatistics.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {const message = createBaseSlowQueryStatistics();message.items = object.items?.map((e) => SlowQueryStatisticsItem.fromPartial(e)) || [];@@ -276,35 +279,21 @@ export const SlowQueryStatisticsItem = {toJSON(message: SlowQueryStatisticsItem): unknown {const obj: any = {};- if (message.sqlFingerprint !== "") {- obj.sqlFingerprint = message.sqlFingerprint;- }- if (message.count !== 0) {- obj.count = Math.round(message.count);- }- if (message.latestLogTime !== undefined) {- obj.latestLogTime = message.latestLogTime.toISOString();- }- if (message.totalQueryTime !== undefined) {- obj.totalQueryTime = Duration.toJSON(message.totalQueryTime);- }- if (message.maximumQueryTime !== undefined) {- obj.maximumQueryTime = Duration.toJSON(message.maximumQueryTime);- }- if (message.totalRowsSent !== 0) {- obj.totalRowsSent = Math.round(message.totalRowsSent);- }- if (message.maximumRowsSent !== 0) {- obj.maximumRowsSent = Math.round(message.maximumRowsSent);- }- if (message.totalRowsExamined !== 0) {- obj.totalRowsExamined = Math.round(message.totalRowsExamined);- }- if (message.maximumRowsExamined !== 0) {- obj.maximumRowsExamined = Math.round(message.maximumRowsExamined);- }- if (message.samples?.length) {- obj.samples = message.samples.map((e) => SlowQueryDetails.toJSON(e));+ message.sqlFingerprint !== undefined && (obj.sqlFingerprint = message.sqlFingerprint);+ message.count !== undefined && (obj.count = Math.round(message.count));+ message.latestLogTime !== undefined && (obj.latestLogTime = message.latestLogTime.toISOString());+ message.totalQueryTime !== undefined &&+ (obj.totalQueryTime = message.totalQueryTime ? Duration.toJSON(message.totalQueryTime) : undefined);+ message.maximumQueryTime !== undefined &&+ (obj.maximumQueryTime = message.maximumQueryTime ? Duration.toJSON(message.maximumQueryTime) : undefined);+ message.totalRowsSent !== undefined && (obj.totalRowsSent = Math.round(message.totalRowsSent));+ message.maximumRowsSent !== undefined && (obj.maximumRowsSent = Math.round(message.maximumRowsSent));+ message.totalRowsExamined !== undefined && (obj.totalRowsExamined = Math.round(message.totalRowsExamined));+ message.maximumRowsExamined !== undefined && (obj.maximumRowsExamined = Math.round(message.maximumRowsExamined));+ if (message.samples) {+ obj.samples = message.samples.map((e) => e ? SlowQueryDetails.toJSON(e) : undefined);+ } else {+ obj.samples = [];}return obj;},@@ -312,6 +301,7 @@ export const SlowQueryStatisticsItem = {create(base?: DeepPartial<SlowQueryStatisticsItem>): SlowQueryStatisticsItem {return SlowQueryStatisticsItem.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SlowQueryStatisticsItem>): SlowQueryStatisticsItem {const message = createBaseSlowQueryStatisticsItem();message.sqlFingerprint = object.sqlFingerprint ?? "";@@ -430,30 +420,20 @@ export const SlowQueryDetails = {toJSON(message: SlowQueryDetails): unknown {const obj: any = {};- if (message.startTime !== undefined) {- obj.startTime = message.startTime.toISOString();- }- if (message.queryTime !== undefined) {- obj.queryTime = Duration.toJSON(message.queryTime);- }- if (message.lockTime !== undefined) {- obj.lockTime = Duration.toJSON(message.lockTime);- }- if (message.rowsSent !== 0) {- obj.rowsSent = Math.round(message.rowsSent);- }- if (message.rowsExamined !== 0) {- obj.rowsExamined = Math.round(message.rowsExamined);- }- if (message.sqlText !== "") {- obj.sqlText = message.sqlText;- }+ message.startTime !== undefined && (obj.startTime = message.startTime.toISOString());+ message.queryTime !== undefined &&+ (obj.queryTime = message.queryTime ? Duration.toJSON(message.queryTime) : undefined);+ message.lockTime !== undefined && (obj.lockTime = message.lockTime ? Duration.toJSON(message.lockTime) : undefined);+ message.rowsSent !== undefined && (obj.rowsSent = Math.round(message.rowsSent));+ message.rowsExamined !== undefined && (obj.rowsExamined = Math.round(message.rowsExamined));+ message.sqlText !== undefined && (obj.sqlText = message.sqlText);return obj;},create(base?: DeepPartial<SlowQueryDetails>): SlowQueryDetails {return SlowQueryDetails.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SlowQueryDetails>): SlowQueryDetails {const message = createBaseSlowQueryDetails();message.startTime = object.startTime ?? undefined;@@ -525,6 +505,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/store/task_run.ts b/frontend/src/types/proto/store/task_run.tsindex 1e99114c8a..a84f8206f9 100644--- a/frontend/src/types/proto/store/task_run.ts+++ b/frontend/src/types/proto/store/task_run.ts@@ -75,21 +75,16 @@ export const TaskRunResult = {toJSON(message: TaskRunResult): unknown {const obj: any = {};- if (message.detail !== "") {- obj.detail = message.detail;- }- if (message.changeHistory !== "") {- obj.changeHistory = message.changeHistory;- }- if (message.version !== "") {- obj.version = message.version;- }+ message.detail !== undefined && (obj.detail = message.detail);+ message.changeHistory !== undefined && (obj.changeHistory = message.changeHistory);+ message.version !== undefined && (obj.version = message.version);return obj;},create(base?: DeepPartial<TaskRunResult>): TaskRunResult {return TaskRunResult.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TaskRunResult>): TaskRunResult {const message = createBaseTaskRunResult();message.detail = object.detail ?? "";diff --git a/frontend/src/types/proto/store/user.ts b/frontend/src/types/proto/store/user.tsindex bdb9539359..7a639bbcb4 100644--- a/frontend/src/types/proto/store/user.ts+++ b/frontend/src/types/proto/store/user.ts@@ -93,17 +93,17 @@ export const MFAConfig = {toJSON(message: MFAConfig): unknown {const obj: any = {};- if (message.otpSecret !== "") {- obj.otpSecret = message.otpSecret;- }- if (message.tempOtpSecret !== "") {- obj.tempOtpSecret = message.tempOtpSecret;+ message.otpSecret !== undefined && (obj.otpSecret = message.otpSecret);+ message.tempOtpSecret !== undefined && (obj.tempOtpSecret = message.tempOtpSecret);+ if (message.recoveryCodes) {+ obj.recoveryCodes = message.recoveryCodes.map((e) => e);+ } else {+ obj.recoveryCodes = [];}- if (message.recoveryCodes?.length) {- obj.recoveryCodes = message.recoveryCodes;- }- if (message.tempRecoveryCodes?.length) {- obj.tempRecoveryCodes = message.tempRecoveryCodes;+ if (message.tempRecoveryCodes) {+ obj.tempRecoveryCodes = message.tempRecoveryCodes.map((e) => e);+ } else {+ obj.tempRecoveryCodes = [];}return obj;},@@ -111,6 +111,7 @@ export const MFAConfig = {create(base?: DeepPartial<MFAConfig>): MFAConfig {return MFAConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MFAConfig>): MFAConfig {const message = createBaseMFAConfig();message.otpSecret = object.otpSecret ?? "";diff --git a/frontend/src/types/proto/store/vcs.ts b/frontend/src/types/proto/store/vcs.tsindex 36cc9d0412..fcb21b72c9 100644--- a/frontend/src/types/proto/store/vcs.ts+++ b/frontend/src/types/proto/store/vcs.ts@@ -1,6 +1,6 @@/* eslint-disable */+import * as Long from "long";import * as _m0 from "protobufjs/minimal";-import Long = require("long");export const protobufPackage = "bytebase.store";@@ -251,45 +251,29 @@ export const PushEvent = {toJSON(message: PushEvent): unknown {const obj: any = {};- if (message.vcsType !== 0) {- obj.vcsType = vcsTypeToJSON(message.vcsType);- }- if (message.baseDir !== "") {- obj.baseDir = message.baseDir;- }- if (message.ref !== "") {- obj.ref = message.ref;- }- if (message.before !== "") {- obj.before = message.before;- }- if (message.after !== "") {- obj.after = message.after;- }- if (message.repositoryId !== "") {- obj.repositoryId = message.repositoryId;- }- if (message.repositoryUrl !== "") {- obj.repositoryUrl = message.repositoryUrl;- }- if (message.repositoryFullPath !== "") {- obj.repositoryFullPath = message.repositoryFullPath;- }- if (message.authorName !== "") {- obj.authorName = message.authorName;- }- if (message.commits?.length) {- obj.commits = message.commits.map((e) => Commit.toJSON(e));- }- if (message.fileCommit !== undefined) {- obj.fileCommit = FileCommit.toJSON(message.fileCommit);- }+ message.vcsType !== undefined && (obj.vcsType = vcsTypeToJSON(message.vcsType));+ message.baseDir !== undefined && (obj.baseDir = message.baseDir);+ message.ref !== undefined && (obj.ref = message.ref);+ message.before !== undefined && (obj.before = message.before);+ message.after !== undefined && (obj.after = message.after);+ message.repositoryId !== undefined && (obj.repositoryId = message.repositoryId);+ message.repositoryUrl !== undefined && (obj.repositoryUrl = message.repositoryUrl);+ message.repositoryFullPath !== undefined && (obj.repositoryFullPath = message.repositoryFullPath);+ message.authorName !== undefined && (obj.authorName = message.authorName);+ if (message.commits) {+ obj.commits = message.commits.map((e) => e ? Commit.toJSON(e) : undefined);+ } else {+ obj.commits = [];+ }+ message.fileCommit !== undefined &&+ (obj.fileCommit = message.fileCommit ? FileCommit.toJSON(message.fileCommit) : undefined);return obj;},create(base?: DeepPartial<PushEvent>): PushEvent {return PushEvent.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PushEvent>): PushEvent {const message = createBasePushEvent();message.vcsType = object.vcsType ?? 0;@@ -450,32 +434,22 @@ export const Commit = {toJSON(message: Commit): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.message !== "") {- obj.message = message.message;- }- if (message.createdTs !== 0) {- obj.createdTs = Math.round(message.createdTs);- }- if (message.url !== "") {- obj.url = message.url;- }- if (message.authorName !== "") {- obj.authorName = message.authorName;- }- if (message.authorEmail !== "") {- obj.authorEmail = message.authorEmail;- }- if (message.addedList?.length) {- obj.addedList = message.addedList;- }- if (message.modifiedList?.length) {- obj.modifiedList = message.modifiedList;+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.message !== undefined && (obj.message = message.message);+ message.createdTs !== undefined && (obj.createdTs = Math.round(message.createdTs));+ message.url !== undefined && (obj.url = message.url);+ message.authorName !== undefined && (obj.authorName = message.authorName);+ message.authorEmail !== undefined && (obj.authorEmail = message.authorEmail);+ if (message.addedList) {+ obj.addedList = message.addedList.map((e) => e);+ } else {+ obj.addedList = [];+ }+ if (message.modifiedList) {+ obj.modifiedList = message.modifiedList.map((e) => e);+ } else {+ obj.modifiedList = [];}return obj;},@@ -483,6 +457,7 @@ export const Commit = {create(base?: DeepPartial<Commit>): Commit {return Commit.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Commit>): Commit {const message = createBaseCommit();message.id = object.id ?? "";@@ -618,36 +593,21 @@ export const FileCommit = {toJSON(message: FileCommit): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.message !== "") {- obj.message = message.message;- }- if (message.createdTs !== 0) {- obj.createdTs = Math.round(message.createdTs);- }- if (message.url !== "") {- obj.url = message.url;- }- if (message.authorName !== "") {- obj.authorName = message.authorName;- }- if (message.authorEmail !== "") {- obj.authorEmail = message.authorEmail;- }- if (message.added !== "") {- obj.added = message.added;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.message !== undefined && (obj.message = message.message);+ message.createdTs !== undefined && (obj.createdTs = Math.round(message.createdTs));+ message.url !== undefined && (obj.url = message.url);+ message.authorName !== undefined && (obj.authorName = message.authorName);+ message.authorEmail !== undefined && (obj.authorEmail = message.authorEmail);+ message.added !== undefined && (obj.added = message.added);return obj;},create(base?: DeepPartial<FileCommit>): FileCommit {return FileCommit.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FileCommit>): FileCommit {const message = createBaseFileCommit();message.id = object.id ?? "";@@ -695,6 +655,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/v1/actuator_service.ts b/frontend/src/types/proto/v1/actuator_service.tsindex e7d6836d25..c8d62b9629 100644--- a/frontend/src/types/proto/v1/actuator_service.ts+++ b/frontend/src/types/proto/v1/actuator_service.ts@@ -140,6 +140,7 @@ export const GetActuatorInfoRequest = {create(base?: DeepPartial<GetActuatorInfoRequest>): GetActuatorInfoRequest {return GetActuatorInfoRequest.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<GetActuatorInfoRequest>): GetActuatorInfoRequest {const message = createBaseGetActuatorInfoRequest();return message;@@ -200,18 +201,16 @@ export const UpdateActuatorInfoRequest = {toJSON(message: UpdateActuatorInfoRequest): unknown {const obj: any = {};- if (message.actuator !== undefined) {- obj.actuator = ActuatorInfo.toJSON(message.actuator);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.actuator !== undefined &&+ (obj.actuator = message.actuator ? ActuatorInfo.toJSON(message.actuator) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateActuatorInfoRequest>): UpdateActuatorInfoRequest {return UpdateActuatorInfoRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateActuatorInfoRequest>): UpdateActuatorInfoRequest {const message = createBaseUpdateActuatorInfoRequest();message.actuator = (object.actuator !== undefined && object.actuator !== null)@@ -276,18 +275,15 @@ export const ListDebugLogRequest = {toJSON(message: ListDebugLogRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListDebugLogRequest>): ListDebugLogRequest {return ListDebugLogRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListDebugLogRequest>): ListDebugLogRequest {const message = createBaseListDebugLogRequest();message.pageSize = object.pageSize ?? 0;@@ -350,18 +346,19 @@ export const ListDebugLogResponse = {toJSON(message: ListDebugLogResponse): unknown {const obj: any = {};- if (message.logs?.length) {- obj.logs = message.logs.map((e) => DebugLog.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.logs) {+ obj.logs = message.logs.map((e) => e ? DebugLog.toJSON(e) : undefined);+ } else {+ obj.logs = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListDebugLogResponse>): ListDebugLogResponse {return ListDebugLogResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListDebugLogResponse>): ListDebugLogResponse {const message = createBaseListDebugLogResponse();message.logs = object.logs?.map((e) => DebugLog.fromPartial(e)) || [];@@ -457,27 +454,18 @@ export const DebugLog = {toJSON(message: DebugLog): unknown {const obj: any = {};- if (message.recordTime !== undefined) {- obj.recordTime = message.recordTime.toISOString();- }- if (message.requestPath !== "") {- obj.requestPath = message.requestPath;- }- if (message.role !== "") {- obj.role = message.role;- }- if (message.error !== "") {- obj.error = message.error;- }- if (message.stackTrace !== "") {- obj.stackTrace = message.stackTrace;- }+ message.recordTime !== undefined && (obj.recordTime = message.recordTime.toISOString());+ message.requestPath !== undefined && (obj.requestPath = message.requestPath);+ message.role !== undefined && (obj.role = message.role);+ message.error !== undefined && (obj.error = message.error);+ message.stackTrace !== undefined && (obj.stackTrace = message.stackTrace);return obj;},create(base?: DeepPartial<DebugLog>): DebugLog {return DebugLog.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DebugLog>): DebugLog {const message = createBaseDebugLog();message.recordTime = object.recordTime ?? undefined;@@ -526,6 +514,7 @@ export const DeleteCacheRequest = {create(base?: DeepPartial<DeleteCacheRequest>): DeleteCacheRequest {return DeleteCacheRequest.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<DeleteCacheRequest>): DeleteCacheRequest {const message = createBaseDeleteCacheRequest();return message;@@ -759,60 +748,30 @@ export const ActuatorInfo = {toJSON(message: ActuatorInfo): unknown {const obj: any = {};- if (message.version !== "") {- obj.version = message.version;- }- if (message.gitCommit !== "") {- obj.gitCommit = message.gitCommit;- }- if (message.readonly === true) {- obj.readonly = message.readonly;- }- if (message.saas === true) {- obj.saas = message.saas;- }- if (message.demoName !== "") {- obj.demoName = message.demoName;- }- if (message.host !== "") {- obj.host = message.host;- }- if (message.port !== "") {- obj.port = message.port;- }- if (message.externalUrl !== "") {- obj.externalUrl = message.externalUrl;- }- if (message.needAdminSetup === true) {- obj.needAdminSetup = message.needAdminSetup;- }- if (message.disallowSignup === true) {- obj.disallowSignup = message.disallowSignup;- }- if (message.lastActiveTime !== undefined) {- obj.lastActiveTime = message.lastActiveTime.toISOString();- }- if (message.require2fa === true) {- obj.require2fa = message.require2fa;- }- if (message.workspaceId !== "") {- obj.workspaceId = message.workspaceId;- }- if (message.gitopsWebhookUrl !== "") {- obj.gitopsWebhookUrl = message.gitopsWebhookUrl;- }- if (message.debug === true) {- obj.debug = message.debug;- }- if (message.developmentUseV2Scheduler === true) {- obj.developmentUseV2Scheduler = message.developmentUseV2Scheduler;- }+ message.version !== undefined && (obj.version = message.version);+ message.gitCommit !== undefined && (obj.gitCommit = message.gitCommit);+ message.readonly !== undefined && (obj.readonly = message.readonly);+ message.saas !== undefined && (obj.saas = message.saas);+ message.demoName !== undefined && (obj.demoName = message.demoName);+ message.host !== undefined && (obj.host = message.host);+ message.port !== undefined && (obj.port = message.port);+ message.externalUrl !== undefined && (obj.externalUrl = message.externalUrl);+ message.needAdminSetup !== undefined && (obj.needAdminSetup = message.needAdminSetup);+ message.disallowSignup !== undefined && (obj.disallowSignup = message.disallowSignup);+ message.lastActiveTime !== undefined && (obj.lastActiveTime = message.lastActiveTime.toISOString());+ message.require2fa !== undefined && (obj.require2fa = message.require2fa);+ message.workspaceId !== undefined && (obj.workspaceId = message.workspaceId);+ message.gitopsWebhookUrl !== undefined && (obj.gitopsWebhookUrl = message.gitopsWebhookUrl);+ message.debug !== undefined && (obj.debug = message.debug);+ message.developmentUseV2Scheduler !== undefined &&+ (obj.developmentUseV2Scheduler = message.developmentUseV2Scheduler);return obj;},create(base?: DeepPartial<ActuatorInfo>): ActuatorInfo {return ActuatorInfo.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ActuatorInfo>): ActuatorInfo {const message = createBaseActuatorInfo();message.version = object.version ?? "";diff --git a/frontend/src/types/proto/v1/anomaly_service.ts b/frontend/src/types/proto/v1/anomaly_service.tsindex c1a4eaf3ce..efdcaddbb3 100644--- a/frontend/src/types/proto/v1/anomaly_service.ts+++ b/frontend/src/types/proto/v1/anomaly_service.ts@@ -313,21 +313,16 @@ export const SearchAnomaliesRequest = {toJSON(message: SearchAnomaliesRequest): unknown {const obj: any = {};- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.filter !== undefined && (obj.filter = message.filter);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<SearchAnomaliesRequest>): SearchAnomaliesRequest {return SearchAnomaliesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchAnomaliesRequest>): SearchAnomaliesRequest {const message = createBaseSearchAnomaliesRequest();message.filter = object.filter ?? "";@@ -391,18 +386,19 @@ export const SearchAnomaliesResponse = {toJSON(message: SearchAnomaliesResponse): unknown {const obj: any = {};- if (message.anomalies?.length) {- obj.anomalies = message.anomalies.map((e) => Anomaly.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.anomalies) {+ obj.anomalies = message.anomalies.map((e) => e ? Anomaly.toJSON(e) : undefined);+ } else {+ obj.anomalies = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<SearchAnomaliesResponse>): SearchAnomaliesResponse {return SearchAnomaliesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchAnomaliesResponse>): SearchAnomaliesResponse {const message = createBaseSearchAnomaliesResponse();message.anomalies = object.anomalies?.map((e) => Anomaly.fromPartial(e)) || [];@@ -581,44 +577,36 @@ export const Anomaly = {toJSON(message: Anomaly): unknown {const obj: any = {};- if (message.resource !== "") {- obj.resource = message.resource;- }- if (message.type !== 0) {- obj.type = anomaly_AnomalyTypeToJSON(message.type);- }- if (message.severity !== 0) {- obj.severity = anomaly_AnomalySeverityToJSON(message.severity);- }- if (message.instanceConnectionDetail !== undefined) {- obj.instanceConnectionDetail = Anomaly_InstanceConnectionDetail.toJSON(message.instanceConnectionDetail);- }- if (message.databaseConnectionDetail !== undefined) {- obj.databaseConnectionDetail = Anomaly_DatabaseConnectionDetail.toJSON(message.databaseConnectionDetail);- }- if (message.databaseBackupPolicyViolationDetail !== undefined) {- obj.databaseBackupPolicyViolationDetail = Anomaly_DatabaseBackupPolicyViolationDetail.toJSON(- message.databaseBackupPolicyViolationDetail,- );- }- if (message.databaseBackupMissingDetail !== undefined) {- obj.databaseBackupMissingDetail = Anomaly_DatabaseBackupMissingDetail.toJSON(message.databaseBackupMissingDetail);- }- if (message.databaseSchemaDriftDetail !== undefined) {- obj.databaseSchemaDriftDetail = Anomaly_DatabaseSchemaDriftDetail.toJSON(message.databaseSchemaDriftDetail);- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }+ message.resource !== undefined && (obj.resource = message.resource);+ message.type !== undefined && (obj.type = anomaly_AnomalyTypeToJSON(message.type));+ message.severity !== undefined && (obj.severity = anomaly_AnomalySeverityToJSON(message.severity));+ message.instanceConnectionDetail !== undefined && (obj.instanceConnectionDetail = message.instanceConnectionDetail+ ? Anomaly_InstanceConnectionDetail.toJSON(message.instanceConnectionDetail)+ : undefined);+ message.databaseConnectionDetail !== undefined && (obj.databaseConnectionDetail = message.databaseConnectionDetail+ ? Anomaly_DatabaseConnectionDetail.toJSON(message.databaseConnectionDetail)+ : undefined);+ message.databaseBackupPolicyViolationDetail !== undefined &&+ (obj.databaseBackupPolicyViolationDetail = message.databaseBackupPolicyViolationDetail+ ? Anomaly_DatabaseBackupPolicyViolationDetail.toJSON(message.databaseBackupPolicyViolationDetail)+ : undefined);+ message.databaseBackupMissingDetail !== undefined &&+ (obj.databaseBackupMissingDetail = message.databaseBackupMissingDetail+ ? Anomaly_DatabaseBackupMissingDetail.toJSON(message.databaseBackupMissingDetail)+ : undefined);+ message.databaseSchemaDriftDetail !== undefined &&+ (obj.databaseSchemaDriftDetail = message.databaseSchemaDriftDetail+ ? Anomaly_DatabaseSchemaDriftDetail.toJSON(message.databaseSchemaDriftDetail)+ : undefined);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());return obj;},create(base?: DeepPartial<Anomaly>): Anomaly {return Anomaly.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Anomaly>): Anomaly {const message = createBaseAnomaly();message.resource = object.resource ?? "";@@ -691,15 +679,14 @@ export const Anomaly_InstanceConnectionDetail = {toJSON(message: Anomaly_InstanceConnectionDetail): unknown {const obj: any = {};- if (message.detail !== "") {- obj.detail = message.detail;- }+ message.detail !== undefined && (obj.detail = message.detail);return obj;},create(base?: DeepPartial<Anomaly_InstanceConnectionDetail>): Anomaly_InstanceConnectionDetail {return Anomaly_InstanceConnectionDetail.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Anomaly_InstanceConnectionDetail>): Anomaly_InstanceConnectionDetail {const message = createBaseAnomaly_InstanceConnectionDetail();message.detail = object.detail ?? "";@@ -748,15 +735,14 @@ export const Anomaly_DatabaseConnectionDetail = {toJSON(message: Anomaly_DatabaseConnectionDetail): unknown {const obj: any = {};- if (message.detail !== "") {- obj.detail = message.detail;- }+ message.detail !== undefined && (obj.detail = message.detail);return obj;},create(base?: DeepPartial<Anomaly_DatabaseConnectionDetail>): Anomaly_DatabaseConnectionDetail {return Anomaly_DatabaseConnectionDetail.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Anomaly_DatabaseConnectionDetail>): Anomaly_DatabaseConnectionDetail {const message = createBaseAnomaly_DatabaseConnectionDetail();message.detail = object.detail ?? "";@@ -829,21 +815,17 @@ export const Anomaly_DatabaseBackupPolicyViolationDetail = {toJSON(message: Anomaly_DatabaseBackupPolicyViolationDetail): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.expectedSchedule !== 0) {- obj.expectedSchedule = backupPlanScheduleToJSON(message.expectedSchedule);- }- if (message.actualSchedule !== 0) {- obj.actualSchedule = backupPlanScheduleToJSON(message.actualSchedule);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.expectedSchedule !== undefined &&+ (obj.expectedSchedule = backupPlanScheduleToJSON(message.expectedSchedule));+ message.actualSchedule !== undefined && (obj.actualSchedule = backupPlanScheduleToJSON(message.actualSchedule));return obj;},create(base?: DeepPartial<Anomaly_DatabaseBackupPolicyViolationDetail>): Anomaly_DatabaseBackupPolicyViolationDetail {return Anomaly_DatabaseBackupPolicyViolationDetail.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Anomaly_DatabaseBackupPolicyViolationDetail>,): Anomaly_DatabaseBackupPolicyViolationDetail {@@ -909,18 +891,16 @@ export const Anomaly_DatabaseBackupMissingDetail = {toJSON(message: Anomaly_DatabaseBackupMissingDetail): unknown {const obj: any = {};- if (message.expectedSchedule !== 0) {- obj.expectedSchedule = backupPlanScheduleToJSON(message.expectedSchedule);- }- if (message.latestBackupTime !== undefined) {- obj.latestBackupTime = message.latestBackupTime.toISOString();- }+ message.expectedSchedule !== undefined &&+ (obj.expectedSchedule = backupPlanScheduleToJSON(message.expectedSchedule));+ message.latestBackupTime !== undefined && (obj.latestBackupTime = message.latestBackupTime.toISOString());return obj;},create(base?: DeepPartial<Anomaly_DatabaseBackupMissingDetail>): Anomaly_DatabaseBackupMissingDetail {return Anomaly_DatabaseBackupMissingDetail.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Anomaly_DatabaseBackupMissingDetail>): Anomaly_DatabaseBackupMissingDetail {const message = createBaseAnomaly_DatabaseBackupMissingDetail();message.expectedSchedule = object.expectedSchedule ?? 0;@@ -994,21 +974,16 @@ export const Anomaly_DatabaseSchemaDriftDetail = {toJSON(message: Anomaly_DatabaseSchemaDriftDetail): unknown {const obj: any = {};- if (message.recordVersion !== "") {- obj.recordVersion = message.recordVersion;- }- if (message.expectedSchema !== "") {- obj.expectedSchema = message.expectedSchema;- }- if (message.actualSchema !== "") {- obj.actualSchema = message.actualSchema;- }+ message.recordVersion !== undefined && (obj.recordVersion = message.recordVersion);+ message.expectedSchema !== undefined && (obj.expectedSchema = message.expectedSchema);+ message.actualSchema !== undefined && (obj.actualSchema = message.actualSchema);return obj;},create(base?: DeepPartial<Anomaly_DatabaseSchemaDriftDetail>): Anomaly_DatabaseSchemaDriftDetail {return Anomaly_DatabaseSchemaDriftDetail.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Anomaly_DatabaseSchemaDriftDetail>): Anomaly_DatabaseSchemaDriftDetail {const message = createBaseAnomaly_DatabaseSchemaDriftDetail();message.recordVersion = object.recordVersion ?? "";diff --git a/frontend/src/types/proto/v1/auth_service.ts b/frontend/src/types/proto/v1/auth_service.tsindex e7be817b27..89d7600899 100644--- a/frontend/src/types/proto/v1/auth_service.ts+++ b/frontend/src/types/proto/v1/auth_service.ts@@ -297,15 +297,14 @@ export const GetUserRequest = {toJSON(message: GetUserRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetUserRequest>): GetUserRequest {return GetUserRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetUserRequest>): GetUserRequest {const message = createBaseGetUserRequest();message.name = object.name ?? "";@@ -378,21 +377,16 @@ export const ListUsersRequest = {toJSON(message: ListUsersRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.showDeleted === true) {- obj.showDeleted = message.showDeleted;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);return obj;},create(base?: DeepPartial<ListUsersRequest>): ListUsersRequest {return ListUsersRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListUsersRequest>): ListUsersRequest {const message = createBaseListUsersRequest();message.pageSize = object.pageSize ?? 0;@@ -456,18 +450,19 @@ export const ListUsersResponse = {toJSON(message: ListUsersResponse): unknown {const obj: any = {};- if (message.users?.length) {- obj.users = message.users.map((e) => User.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.users) {+ obj.users = message.users.map((e) => e ? User.toJSON(e) : undefined);+ } else {+ obj.users = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListUsersResponse>): ListUsersResponse {return ListUsersResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListUsersResponse>): ListUsersResponse {const message = createBaseListUsersResponse();message.users = object.users?.map((e) => User.fromPartial(e)) || [];@@ -517,15 +512,14 @@ export const CreateUserRequest = {toJSON(message: CreateUserRequest): unknown {const obj: any = {};- if (message.user !== undefined) {- obj.user = User.toJSON(message.user);- }+ message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);return obj;},create(base?: DeepPartial<CreateUserRequest>): CreateUserRequest {return CreateUserRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateUserRequest>): CreateUserRequest {const message = createBaseCreateUserRequest();message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;@@ -626,27 +620,18 @@ export const UpdateUserRequest = {toJSON(message: UpdateUserRequest): unknown {const obj: any = {};- if (message.user !== undefined) {- obj.user = User.toJSON(message.user);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }- if (message.otpCode !== undefined) {- obj.otpCode = message.otpCode;- }- if (message.regenerateTempMfaSecret === true) {- obj.regenerateTempMfaSecret = message.regenerateTempMfaSecret;- }- if (message.regenerateRecoveryCodes === true) {- obj.regenerateRecoveryCodes = message.regenerateRecoveryCodes;- }+ message.user !== undefined && (obj.user = message.user ? User.toJSON(message.user) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));+ message.otpCode !== undefined && (obj.otpCode = message.otpCode);+ message.regenerateTempMfaSecret !== undefined && (obj.regenerateTempMfaSecret = message.regenerateTempMfaSecret);+ message.regenerateRecoveryCodes !== undefined && (obj.regenerateRecoveryCodes = message.regenerateRecoveryCodes);return obj;},create(base?: DeepPartial<UpdateUserRequest>): UpdateUserRequest {return UpdateUserRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateUserRequest>): UpdateUserRequest {const message = createBaseUpdateUserRequest();message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;@@ -699,15 +684,14 @@ export const DeleteUserRequest = {toJSON(message: DeleteUserRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteUserRequest>): DeleteUserRequest {return DeleteUserRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteUserRequest>): DeleteUserRequest {const message = createBaseDeleteUserRequest();message.name = object.name ?? "";@@ -756,15 +740,14 @@ export const UndeleteUserRequest = {toJSON(message: UndeleteUserRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<UndeleteUserRequest>): UndeleteUserRequest {return UndeleteUserRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UndeleteUserRequest>): UndeleteUserRequest {const message = createBaseUndeleteUserRequest();message.name = object.name ?? "";@@ -901,36 +884,22 @@ export const LoginRequest = {toJSON(message: LoginRequest): unknown {const obj: any = {};- if (message.email !== "") {- obj.email = message.email;- }- if (message.password !== "") {- obj.password = message.password;- }- if (message.web === true) {- obj.web = message.web;- }- if (message.idpName !== "") {- obj.idpName = message.idpName;- }- if (message.idpContext !== undefined) {- obj.idpContext = IdentityProviderContext.toJSON(message.idpContext);- }- if (message.otpCode !== undefined) {- obj.otpCode = message.otpCode;- }- if (message.recoveryCode !== undefined) {- obj.recoveryCode = message.recoveryCode;- }- if (message.mfaTempToken !== undefined) {- obj.mfaTempToken = message.mfaTempToken;- }+ message.email !== undefined && (obj.email = message.email);+ message.password !== undefined && (obj.password = message.password);+ message.web !== undefined && (obj.web = message.web);+ message.idpName !== undefined && (obj.idpName = message.idpName);+ message.idpContext !== undefined &&+ (obj.idpContext = message.idpContext ? IdentityProviderContext.toJSON(message.idpContext) : undefined);+ message.otpCode !== undefined && (obj.otpCode = message.otpCode);+ message.recoveryCode !== undefined && (obj.recoveryCode = message.recoveryCode);+ message.mfaTempToken !== undefined && (obj.mfaTempToken = message.mfaTempToken);return obj;},create(base?: DeepPartial<LoginRequest>): LoginRequest {return LoginRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<LoginRequest>): LoginRequest {const message = createBaseLoginRequest();message.email = object.email ?? "";@@ -1003,18 +972,18 @@ export const IdentityProviderContext = {toJSON(message: IdentityProviderContext): unknown {const obj: any = {};- if (message.oauth2Context !== undefined) {- obj.oauth2Context = OAuth2IdentityProviderContext.toJSON(message.oauth2Context);- }- if (message.oidcContext !== undefined) {- obj.oidcContext = OIDCIdentityProviderContext.toJSON(message.oidcContext);- }+ message.oauth2Context !== undefined && (obj.oauth2Context = message.oauth2Context+ ? OAuth2IdentityProviderContext.toJSON(message.oauth2Context)+ : undefined);+ message.oidcContext !== undefined &&+ (obj.oidcContext = message.oidcContext ? OIDCIdentityProviderContext.toJSON(message.oidcContext) : undefined);return obj;},create(base?: DeepPartial<IdentityProviderContext>): IdentityProviderContext {return IdentityProviderContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IdentityProviderContext>): IdentityProviderContext {const message = createBaseIdentityProviderContext();message.oauth2Context = (object.oauth2Context !== undefined && object.oauth2Context !== null)@@ -1068,15 +1037,14 @@ export const OAuth2IdentityProviderContext = {toJSON(message: OAuth2IdentityProviderContext): unknown {const obj: any = {};- if (message.code !== "") {- obj.code = message.code;- }+ message.code !== undefined && (obj.code = message.code);return obj;},create(base?: DeepPartial<OAuth2IdentityProviderContext>): OAuth2IdentityProviderContext {return OAuth2IdentityProviderContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OAuth2IdentityProviderContext>): OAuth2IdentityProviderContext {const message = createBaseOAuth2IdentityProviderContext();message.code = object.code ?? "";@@ -1121,6 +1089,7 @@ export const OIDCIdentityProviderContext = {create(base?: DeepPartial<OIDCIdentityProviderContext>): OIDCIdentityProviderContext {return OIDCIdentityProviderContext.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<OIDCIdentityProviderContext>): OIDCIdentityProviderContext {const message = createBaseOIDCIdentityProviderContext();return message;@@ -1181,18 +1150,15 @@ export const LoginResponse = {toJSON(message: LoginResponse): unknown {const obj: any = {};- if (message.token !== "") {- obj.token = message.token;- }- if (message.mfaTempToken !== undefined) {- obj.mfaTempToken = message.mfaTempToken;- }+ message.token !== undefined && (obj.token = message.token);+ message.mfaTempToken !== undefined && (obj.mfaTempToken = message.mfaTempToken);return obj;},create(base?: DeepPartial<LoginResponse>): LoginResponse {return LoginResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<LoginResponse>): LoginResponse {const message = createBaseLoginResponse();message.token = object.token ?? "";@@ -1238,6 +1204,7 @@ export const LogoutRequest = {create(base?: DeepPartial<LogoutRequest>): LogoutRequest {return LogoutRequest.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<LogoutRequest>): LogoutRequest {const message = createBaseLogoutRequest();return message;@@ -1421,48 +1388,29 @@ export const User = {toJSON(message: User): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.state !== 0) {- obj.state = stateToJSON(message.state);- }- if (message.email !== "") {- obj.email = message.email;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.userType !== 0) {- obj.userType = userTypeToJSON(message.userType);- }- if (message.userRole !== 0) {- obj.userRole = userRoleToJSON(message.userRole);- }- if (message.password !== "") {- obj.password = message.password;- }- if (message.serviceKey !== "") {- obj.serviceKey = message.serviceKey;- }- if (message.mfaEnabled === true) {- obj.mfaEnabled = message.mfaEnabled;- }- if (message.mfaSecret !== "") {- obj.mfaSecret = message.mfaSecret;- }- if (message.recoveryCodes?.length) {- obj.recoveryCodes = message.recoveryCodes;- }- if (message.phone !== "") {- obj.phone = message.phone;- }+ message.name !== undefined && (obj.name = message.name);+ message.state !== undefined && (obj.state = stateToJSON(message.state));+ message.email !== undefined && (obj.email = message.email);+ message.title !== undefined && (obj.title = message.title);+ message.userType !== undefined && (obj.userType = userTypeToJSON(message.userType));+ message.userRole !== undefined && (obj.userRole = userRoleToJSON(message.userRole));+ message.password !== undefined && (obj.password = message.password);+ message.serviceKey !== undefined && (obj.serviceKey = message.serviceKey);+ message.mfaEnabled !== undefined && (obj.mfaEnabled = message.mfaEnabled);+ message.mfaSecret !== undefined && (obj.mfaSecret = message.mfaSecret);+ if (message.recoveryCodes) {+ obj.recoveryCodes = message.recoveryCodes.map((e) => e);+ } else {+ obj.recoveryCodes = [];+ }+ message.phone !== undefined && (obj.phone = message.phone);return obj;},create(base?: DeepPartial<User>): User {return User.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<User>): User {const message = createBaseUser();message.name = object.name ?? "";diff --git a/frontend/src/types/proto/v1/bookmark_service.ts b/frontend/src/types/proto/v1/bookmark_service.tsindex bc3e508fd7..6a785ea209 100644--- a/frontend/src/types/proto/v1/bookmark_service.ts+++ b/frontend/src/types/proto/v1/bookmark_service.ts@@ -104,15 +104,14 @@ export const CreateBookmarkRequest = {toJSON(message: CreateBookmarkRequest): unknown {const obj: any = {};- if (message.bookmark !== undefined) {- obj.bookmark = Bookmark.toJSON(message.bookmark);- }+ message.bookmark !== undefined && (obj.bookmark = message.bookmark ? Bookmark.toJSON(message.bookmark) : undefined);return obj;},create(base?: DeepPartial<CreateBookmarkRequest>): CreateBookmarkRequest {return CreateBookmarkRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateBookmarkRequest>): CreateBookmarkRequest {const message = createBaseCreateBookmarkRequest();message.bookmark = (object.bookmark !== undefined && object.bookmark !== null)@@ -163,15 +162,14 @@ export const DeleteBookmarkRequest = {toJSON(message: DeleteBookmarkRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteBookmarkRequest>): DeleteBookmarkRequest {return DeleteBookmarkRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteBookmarkRequest>): DeleteBookmarkRequest {const message = createBaseDeleteBookmarkRequest();message.name = object.name ?? "";@@ -233,18 +231,15 @@ export const ListBookmarksRequest = {toJSON(message: ListBookmarksRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListBookmarksRequest>): ListBookmarksRequest {return ListBookmarksRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListBookmarksRequest>): ListBookmarksRequest {const message = createBaseListBookmarksRequest();message.pageSize = object.pageSize ?? 0;@@ -307,18 +302,19 @@ export const ListBookmarksResponse = {toJSON(message: ListBookmarksResponse): unknown {const obj: any = {};- if (message.bookmarks?.length) {- obj.bookmarks = message.bookmarks.map((e) => Bookmark.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.bookmarks) {+ obj.bookmarks = message.bookmarks.map((e) => e ? Bookmark.toJSON(e) : undefined);+ } else {+ obj.bookmarks = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListBookmarksResponse>): ListBookmarksResponse {return ListBookmarksResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListBookmarksResponse>): ListBookmarksResponse {const message = createBaseListBookmarksResponse();message.bookmarks = object.bookmarks?.map((e) => Bookmark.fromPartial(e)) || [];@@ -392,21 +388,16 @@ export const Bookmark = {toJSON(message: Bookmark): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.link !== "") {- obj.link = message.link;- }+ message.name !== undefined && (obj.name = message.name);+ message.title !== undefined && (obj.title = message.title);+ message.link !== undefined && (obj.link = message.link);return obj;},create(base?: DeepPartial<Bookmark>): Bookmark {return Bookmark.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Bookmark>): Bookmark {const message = createBaseBookmark();message.name = object.name ?? "";diff --git a/frontend/src/types/proto/v1/cel_service.ts b/frontend/src/types/proto/v1/cel_service.tsindex 86f898d628..8b8d546fff 100644--- a/frontend/src/types/proto/v1/cel_service.ts+++ b/frontend/src/types/proto/v1/cel_service.ts@@ -62,15 +62,14 @@ export const ParseRequest = {toJSON(message: ParseRequest): unknown {const obj: any = {};- if (message.expression !== "") {- obj.expression = message.expression;- }+ message.expression !== undefined && (obj.expression = message.expression);return obj;},create(base?: DeepPartial<ParseRequest>): ParseRequest {return ParseRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ParseRequest>): ParseRequest {const message = createBaseParseRequest();message.expression = object.expression ?? "";@@ -119,15 +118,15 @@ export const ParseResponse = {toJSON(message: ParseResponse): unknown {const obj: any = {};- if (message.expression !== undefined) {- obj.expression = ParsedExpr.toJSON(message.expression);- }+ message.expression !== undefined &&+ (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);return obj;},create(base?: DeepPartial<ParseResponse>): ParseResponse {return ParseResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ParseResponse>): ParseResponse {const message = createBaseParseResponse();message.expression = (object.expression !== undefined && object.expression !== null)@@ -178,15 +177,15 @@ export const DeparseRequest = {toJSON(message: DeparseRequest): unknown {const obj: any = {};- if (message.expression !== undefined) {- obj.expression = ParsedExpr.toJSON(message.expression);- }+ message.expression !== undefined &&+ (obj.expression = message.expression ? ParsedExpr.toJSON(message.expression) : undefined);return obj;},create(base?: DeepPartial<DeparseRequest>): DeparseRequest {return DeparseRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeparseRequest>): DeparseRequest {const message = createBaseDeparseRequest();message.expression = (object.expression !== undefined && object.expression !== null)@@ -237,15 +236,14 @@ export const DeparseResponse = {toJSON(message: DeparseResponse): unknown {const obj: any = {};- if (message.expression !== "") {- obj.expression = message.expression;- }+ message.expression !== undefined && (obj.expression = message.expression);return obj;},create(base?: DeepPartial<DeparseResponse>): DeparseResponse {return DeparseResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeparseResponse>): DeparseResponse {const message = createBaseDeparseResponse();message.expression = object.expression ?? "";diff --git a/frontend/src/types/proto/v1/database_edit.ts b/frontend/src/types/proto/v1/database_edit.tsindex 0ce904ec12..c67e70f87d 100644--- a/frontend/src/types/proto/v1/database_edit.ts+++ b/frontend/src/types/proto/v1/database_edit.ts@@ -284,26 +284,40 @@ export const DatabaseEdit = {toJSON(message: DatabaseEdit): unknown {const obj: any = {};- if (message.createSchemaContexts?.length) {- obj.createSchemaContexts = message.createSchemaContexts.map((e) => CreateSchemaContext.toJSON(e));- }- if (message.renameSchemaContexts?.length) {- obj.renameSchemaContexts = message.renameSchemaContexts.map((e) => RenameSchemaContext.toJSON(e));- }- if (message.dropSchemaContexts?.length) {- obj.dropSchemaContexts = message.dropSchemaContexts.map((e) => DropSchemaContext.toJSON(e));- }- if (message.createTableContexts?.length) {- obj.createTableContexts = message.createTableContexts.map((e) => CreateTableContext.toJSON(e));- }- if (message.alterTableContexts?.length) {- obj.alterTableContexts = message.alterTableContexts.map((e) => AlterTableContext.toJSON(e));- }- if (message.renameTableContexts?.length) {- obj.renameTableContexts = message.renameTableContexts.map((e) => RenameTableContext.toJSON(e));- }- if (message.dropTableContexts?.length) {- obj.dropTableContexts = message.dropTableContexts.map((e) => DropTableContext.toJSON(e));+ if (message.createSchemaContexts) {+ obj.createSchemaContexts = message.createSchemaContexts.map((e) => e ? CreateSchemaContext.toJSON(e) : undefined);+ } else {+ obj.createSchemaContexts = [];+ }+ if (message.renameSchemaContexts) {+ obj.renameSchemaContexts = message.renameSchemaContexts.map((e) => e ? RenameSchemaContext.toJSON(e) : undefined);+ } else {+ obj.renameSchemaContexts = [];+ }+ if (message.dropSchemaContexts) {+ obj.dropSchemaContexts = message.dropSchemaContexts.map((e) => e ? DropSchemaContext.toJSON(e) : undefined);+ } else {+ obj.dropSchemaContexts = [];+ }+ if (message.createTableContexts) {+ obj.createTableContexts = message.createTableContexts.map((e) => e ? CreateTableContext.toJSON(e) : undefined);+ } else {+ obj.createTableContexts = [];+ }+ if (message.alterTableContexts) {+ obj.alterTableContexts = message.alterTableContexts.map((e) => e ? AlterTableContext.toJSON(e) : undefined);+ } else {+ obj.alterTableContexts = [];+ }+ if (message.renameTableContexts) {+ obj.renameTableContexts = message.renameTableContexts.map((e) => e ? RenameTableContext.toJSON(e) : undefined);+ } else {+ obj.renameTableContexts = [];+ }+ if (message.dropTableContexts) {+ obj.dropTableContexts = message.dropTableContexts.map((e) => e ? DropTableContext.toJSON(e) : undefined);+ } else {+ obj.dropTableContexts = [];}return obj;},@@ -311,6 +325,7 @@ export const DatabaseEdit = {create(base?: DeepPartial<DatabaseEdit>): DatabaseEdit {return DatabaseEdit.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DatabaseEdit>): DatabaseEdit {const message = createBaseDatabaseEdit();message.createSchemaContexts = object.createSchemaContexts?.map((e) => CreateSchemaContext.fromPartial(e)) || [];@@ -365,15 +380,14 @@ export const CreateSchemaContext = {toJSON(message: CreateSchemaContext): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<CreateSchemaContext>): CreateSchemaContext {return CreateSchemaContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateSchemaContext>): CreateSchemaContext {const message = createBaseCreateSchemaContext();message.name = object.name ?? "";@@ -435,18 +449,15 @@ export const RenameSchemaContext = {toJSON(message: RenameSchemaContext): unknown {const obj: any = {};- if (message.oldName !== "") {- obj.oldName = message.oldName;- }- if (message.newName !== "") {- obj.newName = message.newName;- }+ message.oldName !== undefined && (obj.oldName = message.oldName);+ message.newName !== undefined && (obj.newName = message.newName);return obj;},create(base?: DeepPartial<RenameSchemaContext>): RenameSchemaContext {return RenameSchemaContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RenameSchemaContext>): RenameSchemaContext {const message = createBaseRenameSchemaContext();message.oldName = object.oldName ?? "";@@ -496,15 +507,14 @@ export const DropSchemaContext = {toJSON(message: DropSchemaContext): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DropSchemaContext>): DropSchemaContext {return DropSchemaContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DropSchemaContext>): DropSchemaContext {const message = createBaseDropSchemaContext();message.name = object.name ?? "";@@ -669,35 +679,29 @@ export const CreateTableContext = {toJSON(message: CreateTableContext): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.type !== "") {- obj.type = message.type;- }- if (message.engine !== "") {- obj.engine = message.engine;- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.addColumnContexts?.length) {- obj.addColumnContexts = message.addColumnContexts.map((e) => AddColumnContext.toJSON(e));- }- if (message.primaryKeys?.length) {- obj.primaryKeys = message.primaryKeys;- }- if (message.addForeignKeyContexts?.length) {- obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) => AddForeignKeyContext.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.schema !== undefined && (obj.schema = message.schema);+ message.type !== undefined && (obj.type = message.type);+ message.engine !== undefined && (obj.engine = message.engine);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.comment !== undefined && (obj.comment = message.comment);+ if (message.addColumnContexts) {+ obj.addColumnContexts = message.addColumnContexts.map((e) => e ? AddColumnContext.toJSON(e) : undefined);+ } else {+ obj.addColumnContexts = [];+ }+ if (message.primaryKeys) {+ obj.primaryKeys = message.primaryKeys.map((e) => e);+ } else {+ obj.primaryKeys = [];+ }+ if (message.addForeignKeyContexts) {+ obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) =>+ e ? AddForeignKeyContext.toJSON(e) : undefined+ );+ } else {+ obj.addForeignKeyContexts = [];}return obj;},@@ -705,6 +709,7 @@ export const CreateTableContext = {create(base?: DeepPartial<CreateTableContext>): CreateTableContext {return CreateTableContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateTableContext>): CreateTableContext {const message = createBaseCreateTableContext();message.name = object.name ?? "";@@ -870,32 +875,44 @@ export const AlterTableContext = {toJSON(message: AlterTableContext): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.addColumnContexts?.length) {- obj.addColumnContexts = message.addColumnContexts.map((e) => AddColumnContext.toJSON(e));- }- if (message.alterColumnContexts?.length) {- obj.alterColumnContexts = message.alterColumnContexts.map((e) => AlterColumnContext.toJSON(e));- }- if (message.dropColumnContexts?.length) {- obj.dropColumnContexts = message.dropColumnContexts.map((e) => DropColumnContext.toJSON(e));- }- if (message.dropPrimaryKeys?.length) {- obj.dropPrimaryKeys = message.dropPrimaryKeys;- }- if (message.primaryKeys?.length) {- obj.primaryKeys = message.primaryKeys;- }- if (message.dropForeignKeys?.length) {- obj.dropForeignKeys = message.dropForeignKeys;- }- if (message.addForeignKeyContexts?.length) {- obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) => AddForeignKeyContext.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.schema !== undefined && (obj.schema = message.schema);+ if (message.addColumnContexts) {+ obj.addColumnContexts = message.addColumnContexts.map((e) => e ? AddColumnContext.toJSON(e) : undefined);+ } else {+ obj.addColumnContexts = [];+ }+ if (message.alterColumnContexts) {+ obj.alterColumnContexts = message.alterColumnContexts.map((e) => e ? AlterColumnContext.toJSON(e) : undefined);+ } else {+ obj.alterColumnContexts = [];+ }+ if (message.dropColumnContexts) {+ obj.dropColumnContexts = message.dropColumnContexts.map((e) => e ? DropColumnContext.toJSON(e) : undefined);+ } else {+ obj.dropColumnContexts = [];+ }+ if (message.dropPrimaryKeys) {+ obj.dropPrimaryKeys = message.dropPrimaryKeys.map((e) => e);+ } else {+ obj.dropPrimaryKeys = [];+ }+ if (message.primaryKeys) {+ obj.primaryKeys = message.primaryKeys.map((e) => e);+ } else {+ obj.primaryKeys = [];+ }+ if (message.dropForeignKeys) {+ obj.dropForeignKeys = message.dropForeignKeys.map((e) => e);+ } else {+ obj.dropForeignKeys = [];+ }+ if (message.addForeignKeyContexts) {+ obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) =>+ e ? AddForeignKeyContext.toJSON(e) : undefined+ );+ } else {+ obj.addForeignKeyContexts = [];}return obj;},@@ -903,6 +920,7 @@ export const AlterTableContext = {create(base?: DeepPartial<AlterTableContext>): AlterTableContext {return AlterTableContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AlterTableContext>): AlterTableContext {const message = createBaseAlterTableContext();message.name = object.name ?? "";@@ -983,21 +1001,16 @@ export const RenameTableContext = {toJSON(message: RenameTableContext): unknown {const obj: any = {};- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.oldName !== "") {- obj.oldName = message.oldName;- }- if (message.newName !== "") {- obj.newName = message.newName;- }+ message.schema !== undefined && (obj.schema = message.schema);+ message.oldName !== undefined && (obj.oldName = message.oldName);+ message.newName !== undefined && (obj.newName = message.newName);return obj;},create(base?: DeepPartial<RenameTableContext>): RenameTableContext {return RenameTableContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RenameTableContext>): RenameTableContext {const message = createBaseRenameTableContext();message.schema = object.schema ?? "";@@ -1061,18 +1074,15 @@ export const DropTableContext = {toJSON(message: DropTableContext): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schema !== "") {- obj.schema = message.schema;- }+ message.name !== undefined && (obj.name = message.name);+ message.schema !== undefined && (obj.schema = message.schema);return obj;},create(base?: DeepPartial<DropTableContext>): DropTableContext {return DropTableContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DropTableContext>): DropTableContext {const message = createBaseDropTableContext();message.name = object.name ?? "";@@ -1210,36 +1220,21 @@ export const AddColumnContext = {toJSON(message: AddColumnContext): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.type !== "") {- obj.type = message.type;- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.nullable === true) {- obj.nullable = message.nullable;- }- if (message.defaultValue !== "") {- obj.defaultValue = message.defaultValue;- }- if (message.hasDefaultValue === true) {- obj.hasDefaultValue = message.hasDefaultValue;- }+ message.name !== undefined && (obj.name = message.name);+ message.type !== undefined && (obj.type = message.type);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.comment !== undefined && (obj.comment = message.comment);+ message.nullable !== undefined && (obj.nullable = message.nullable);+ message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);+ message.hasDefaultValue !== undefined && (obj.hasDefaultValue = message.hasDefaultValue);return obj;},create(base?: DeepPartial<AddColumnContext>): AddColumnContext {return AddColumnContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AddColumnContext>): AddColumnContext {const message = createBaseAddColumnContext();message.name = object.name ?? "";@@ -1395,39 +1390,22 @@ export const AlterColumnContext = {toJSON(message: AlterColumnContext): unknown {const obj: any = {};- if (message.oldName !== "") {- obj.oldName = message.oldName;- }- if (message.newName !== "") {- obj.newName = message.newName;- }- if (message.type !== "") {- obj.type = message.type;- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.nullable === true) {- obj.nullable = message.nullable;- }- if (message.defaultValue !== "") {- obj.defaultValue = message.defaultValue;- }- if (message.isDefaultValueChanged === true) {- obj.isDefaultValueChanged = message.isDefaultValueChanged;- }+ message.oldName !== undefined && (obj.oldName = message.oldName);+ message.newName !== undefined && (obj.newName = message.newName);+ message.type !== undefined && (obj.type = message.type);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.comment !== undefined && (obj.comment = message.comment);+ message.nullable !== undefined && (obj.nullable = message.nullable);+ message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);+ message.isDefaultValueChanged !== undefined && (obj.isDefaultValueChanged = message.isDefaultValueChanged);return obj;},create(base?: DeepPartial<AlterColumnContext>): AlterColumnContext {return AlterColumnContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AlterColumnContext>): AlterColumnContext {const message = createBaseAlterColumnContext();message.oldName = object.oldName ?? "";@@ -1484,15 +1462,14 @@ export const DropColumnContext = {toJSON(message: DropColumnContext): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DropColumnContext>): DropColumnContext {return DropColumnContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DropColumnContext>): DropColumnContext {const message = createBaseDropColumnContext();message.name = object.name ?? "";@@ -1576,24 +1553,17 @@ export const AddForeignKeyContext = {toJSON(message: AddForeignKeyContext): unknown {const obj: any = {};- if (message.column !== "") {- obj.column = message.column;- }- if (message.referencedSchema !== "") {- obj.referencedSchema = message.referencedSchema;- }- if (message.referencedTable !== "") {- obj.referencedTable = message.referencedTable;- }- if (message.referencedColumn !== "") {- obj.referencedColumn = message.referencedColumn;- }+ message.column !== undefined && (obj.column = message.column);+ message.referencedSchema !== undefined && (obj.referencedSchema = message.referencedSchema);+ message.referencedTable !== undefined && (obj.referencedTable = message.referencedTable);+ message.referencedColumn !== undefined && (obj.referencedColumn = message.referencedColumn);return obj;},create(base?: DeepPartial<AddForeignKeyContext>): AddForeignKeyContext {return AddForeignKeyContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AddForeignKeyContext>): AddForeignKeyContext {const message = createBaseAddForeignKeyContext();message.column = object.column ?? "";diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.tsindex fdcc6a58ee..b5c2c6e249 100644--- a/frontend/src/types/proto/v1/database_service.ts+++ b/frontend/src/types/proto/v1/database_service.ts@@ -1,4 +1,5 @@/* eslint-disable */+import * as Long from "long";import type { CallContext, CallOptions } from "nice-grpc-common";import * as _m0 from "protobufjs/minimal";import { Duration } from "../google/protobuf/duration";@@ -8,7 +9,6 @@ import { Timestamp } from "../google/protobuf/timestamp";import { StringValue } from "../google/protobuf/wrappers";import { State, stateFromJSON, stateToJSON } from "./common";import { PushEvent } from "./vcs";-import Long = require("long");export const protobufPackage = "bytebase.v1";@@ -1322,15 +1322,14 @@ export const GetDatabaseRequest = {toJSON(message: GetDatabaseRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetDatabaseRequest>): GetDatabaseRequest {return GetDatabaseRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetDatabaseRequest>): GetDatabaseRequest {const message = createBaseGetDatabaseRequest();message.name = object.name ?? "";@@ -1414,24 +1413,17 @@ export const ListDatabasesRequest = {toJSON(message: ListDatabasesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.filter !== "") {- obj.filter = message.filter;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.filter !== undefined && (obj.filter = message.filter);return obj;},create(base?: DeepPartial<ListDatabasesRequest>): ListDatabasesRequest {return ListDatabasesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListDatabasesRequest>): ListDatabasesRequest {const message = createBaseListDatabasesRequest();message.parent = object.parent ?? "";@@ -1496,18 +1488,19 @@ export const ListDatabasesResponse = {toJSON(message: ListDatabasesResponse): unknown {const obj: any = {};- if (message.databases?.length) {- obj.databases = message.databases.map((e) => Database.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.databases) {+ obj.databases = message.databases.map((e) => e ? Database.toJSON(e) : undefined);+ } else {+ obj.databases = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListDatabasesResponse>): ListDatabasesResponse {return ListDatabasesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListDatabasesResponse>): ListDatabasesResponse {const message = createBaseListDatabasesResponse();message.databases = object.databases?.map((e) => Database.fromPartial(e)) || [];@@ -1592,24 +1585,17 @@ export const SearchDatabasesRequest = {toJSON(message: SearchDatabasesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.filter !== "") {- obj.filter = message.filter;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.filter !== undefined && (obj.filter = message.filter);return obj;},create(base?: DeepPartial<SearchDatabasesRequest>): SearchDatabasesRequest {return SearchDatabasesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchDatabasesRequest>): SearchDatabasesRequest {const message = createBaseSearchDatabasesRequest();message.parent = object.parent ?? "";@@ -1674,18 +1660,19 @@ export const SearchDatabasesResponse = {toJSON(message: SearchDatabasesResponse): unknown {const obj: any = {};- if (message.databases?.length) {- obj.databases = message.databases.map((e) => Database.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.databases) {+ obj.databases = message.databases.map((e) => e ? Database.toJSON(e) : undefined);+ } else {+ obj.databases = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<SearchDatabasesResponse>): SearchDatabasesResponse {return SearchDatabasesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchDatabasesResponse>): SearchDatabasesResponse {const message = createBaseSearchDatabasesResponse();message.databases = object.databases?.map((e) => Database.fromPartial(e)) || [];@@ -1748,18 +1735,15 @@ export const UpdateDatabaseRequest = {toJSON(message: UpdateDatabaseRequest): unknown {const obj: any = {};- if (message.database !== undefined) {- obj.database = Database.toJSON(message.database);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.database !== undefined && (obj.database = message.database ? Database.toJSON(message.database) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateDatabaseRequest>): UpdateDatabaseRequest {return UpdateDatabaseRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateDatabaseRequest>): UpdateDatabaseRequest {const message = createBaseUpdateDatabaseRequest();message.database = (object.database !== undefined && object.database !== null)@@ -1826,11 +1810,11 @@ export const BatchUpdateDatabasesRequest = {toJSON(message: BatchUpdateDatabasesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.requests?.length) {- obj.requests = message.requests.map((e) => UpdateDatabaseRequest.toJSON(e));+ message.parent !== undefined && (obj.parent = message.parent);+ if (message.requests) {+ obj.requests = message.requests.map((e) => e ? UpdateDatabaseRequest.toJSON(e) : undefined);+ } else {+ obj.requests = [];}return obj;},@@ -1838,6 +1822,7 @@ export const BatchUpdateDatabasesRequest = {create(base?: DeepPartial<BatchUpdateDatabasesRequest>): BatchUpdateDatabasesRequest {return BatchUpdateDatabasesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchUpdateDatabasesRequest>): BatchUpdateDatabasesRequest {const message = createBaseBatchUpdateDatabasesRequest();message.parent = object.parent ?? "";@@ -1889,8 +1874,10 @@ export const BatchUpdateDatabasesResponse = {toJSON(message: BatchUpdateDatabasesResponse): unknown {const obj: any = {};- if (message.databases?.length) {- obj.databases = message.databases.map((e) => Database.toJSON(e));+ if (message.databases) {+ obj.databases = message.databases.map((e) => e ? Database.toJSON(e) : undefined);+ } else {+ obj.databases = [];}return obj;},@@ -1898,6 +1885,7 @@ export const BatchUpdateDatabasesResponse = {create(base?: DeepPartial<BatchUpdateDatabasesResponse>): BatchUpdateDatabasesResponse {return BatchUpdateDatabasesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchUpdateDatabasesResponse>): BatchUpdateDatabasesResponse {const message = createBaseBatchUpdateDatabasesResponse();message.databases = object.databases?.map((e) => Database.fromPartial(e)) || [];@@ -1946,15 +1934,14 @@ export const SyncDatabaseRequest = {toJSON(message: SyncDatabaseRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<SyncDatabaseRequest>): SyncDatabaseRequest {return SyncDatabaseRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SyncDatabaseRequest>): SyncDatabaseRequest {const message = createBaseSyncDatabaseRequest();message.name = object.name ?? "";@@ -1999,6 +1986,7 @@ export const SyncDatabaseResponse = {create(base?: DeepPartial<SyncDatabaseResponse>): SyncDatabaseResponse {return SyncDatabaseResponse.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<SyncDatabaseResponse>): SyncDatabaseResponse {const message = createBaseSyncDatabaseResponse();return message;@@ -2046,15 +2034,14 @@ export const GetDatabaseMetadataRequest = {toJSON(message: GetDatabaseMetadataRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetDatabaseMetadataRequest>): GetDatabaseMetadataRequest {return GetDatabaseMetadataRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetDatabaseMetadataRequest>): GetDatabaseMetadataRequest {const message = createBaseGetDatabaseMetadataRequest();message.name = object.name ?? "";@@ -2116,18 +2103,15 @@ export const GetDatabaseSchemaRequest = {toJSON(message: GetDatabaseSchemaRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.sdlFormat === true) {- obj.sdlFormat = message.sdlFormat;- }+ message.name !== undefined && (obj.name = message.name);+ message.sdlFormat !== undefined && (obj.sdlFormat = message.sdlFormat);return obj;},create(base?: DeepPartial<GetDatabaseSchemaRequest>): GetDatabaseSchemaRequest {return GetDatabaseSchemaRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetDatabaseSchemaRequest>): GetDatabaseSchemaRequest {const message = createBaseGetDatabaseSchemaRequest();message.name = object.name ?? "";@@ -2177,15 +2161,14 @@ export const GetBackupSettingRequest = {toJSON(message: GetBackupSettingRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetBackupSettingRequest>): GetBackupSettingRequest {return GetBackupSettingRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetBackupSettingRequest>): GetBackupSettingRequest {const message = createBaseGetBackupSettingRequest();message.name = object.name ?? "";@@ -2234,15 +2217,15 @@ export const UpdateBackupSettingRequest = {toJSON(message: UpdateBackupSettingRequest): unknown {const obj: any = {};- if (message.setting !== undefined) {- obj.setting = BackupSetting.toJSON(message.setting);- }+ message.setting !== undefined &&+ (obj.setting = message.setting ? BackupSetting.toJSON(message.setting) : undefined);return obj;},create(base?: DeepPartial<UpdateBackupSettingRequest>): UpdateBackupSettingRequest {return UpdateBackupSettingRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateBackupSettingRequest>): UpdateBackupSettingRequest {const message = createBaseUpdateBackupSettingRequest();message.setting = (object.setting !== undefined && object.setting !== null)@@ -2306,18 +2289,15 @@ export const CreateBackupRequest = {toJSON(message: CreateBackupRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.backup !== undefined) {- obj.backup = Backup.toJSON(message.backup);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.backup !== undefined && (obj.backup = message.backup ? Backup.toJSON(message.backup) : undefined);return obj;},create(base?: DeepPartial<CreateBackupRequest>): CreateBackupRequest {return CreateBackupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateBackupRequest>): CreateBackupRequest {const message = createBaseCreateBackupRequest();message.parent = object.parent ?? "";@@ -2393,21 +2373,16 @@ export const ListBackupsRequest = {toJSON(message: ListBackupsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListBackupsRequest>): ListBackupsRequest {return ListBackupsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListBackupsRequest>): ListBackupsRequest {const message = createBaseListBackupsRequest();message.parent = object.parent ?? "";@@ -2471,18 +2446,19 @@ export const ListBackupsResponse = {toJSON(message: ListBackupsResponse): unknown {const obj: any = {};- if (message.backups?.length) {- obj.backups = message.backups.map((e) => Backup.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.backups) {+ obj.backups = message.backups.map((e) => e ? Backup.toJSON(e) : undefined);+ } else {+ obj.backups = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListBackupsResponse>): ListBackupsResponse {return ListBackupsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListBackupsResponse>): ListBackupsResponse {const message = createBaseListBackupsResponse();message.backups = object.backups?.map((e) => Backup.fromPartial(e)) || [];@@ -2640,38 +2616,19 @@ export const Database = {toJSON(message: Database): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.syncState !== 0) {- obj.syncState = stateToJSON(message.syncState);- }- if (message.successfulSyncTime !== undefined) {- obj.successfulSyncTime = message.successfulSyncTime.toISOString();- }- if (message.project !== "") {- obj.project = message.project;- }- if (message.schemaVersion !== "") {- obj.schemaVersion = message.schemaVersion;- }- if (message.environment !== "") {- obj.environment = message.environment;- }- if (message.effectiveEnvironment !== "") {- obj.effectiveEnvironment = message.effectiveEnvironment;- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.syncState !== undefined && (obj.syncState = stateToJSON(message.syncState));+ message.successfulSyncTime !== undefined && (obj.successfulSyncTime = message.successfulSyncTime.toISOString());+ message.project !== undefined && (obj.project = message.project);+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);+ message.environment !== undefined && (obj.environment = message.environment);+ message.effectiveEnvironment !== undefined && (obj.effectiveEnvironment = message.effectiveEnvironment);+ obj.labels = {};if (message.labels) {- const entries = Object.entries(message.labels);- if (entries.length > 0) {- obj.labels = {};- entries.forEach(([k, v]) => {- obj.labels[k] = v;- });- }+ Object.entries(message.labels).forEach(([k, v]) => {+ obj.labels[k] = v;+ });}return obj;},@@ -2679,6 +2636,7 @@ export const Database = {create(base?: DeepPartial<Database>): Database {return Database.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Database>): Database {const message = createBaseDatabase();message.name = object.name ?? "";@@ -2750,18 +2708,15 @@ export const Database_LabelsEntry = {toJSON(message: Database_LabelsEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<Database_LabelsEntry>): Database_LabelsEntry {return Database_LabelsEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Database_LabelsEntry>): Database_LabelsEntry {const message = createBaseDatabase_LabelsEntry();message.key = object.key ?? "";@@ -2859,20 +2814,18 @@ export const DatabaseMetadata = {toJSON(message: DatabaseMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schemas?.length) {- obj.schemas = message.schemas.map((e) => SchemaMetadata.toJSON(e));- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.extensions?.length) {- obj.extensions = message.extensions.map((e) => ExtensionMetadata.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.schemas) {+ obj.schemas = message.schemas.map((e) => e ? SchemaMetadata.toJSON(e) : undefined);+ } else {+ obj.schemas = [];+ }+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ if (message.extensions) {+ obj.extensions = message.extensions.map((e) => e ? ExtensionMetadata.toJSON(e) : undefined);+ } else {+ obj.extensions = [];}return obj;},@@ -2880,6 +2833,7 @@ export const DatabaseMetadata = {create(base?: DeepPartial<DatabaseMetadata>): DatabaseMetadata {return DatabaseMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DatabaseMetadata>): DatabaseMetadata {const message = createBaseDatabaseMetadata();message.name = object.name ?? "";@@ -2989,23 +2943,31 @@ export const SchemaMetadata = {toJSON(message: SchemaMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.tables?.length) {- obj.tables = message.tables.map((e) => TableMetadata.toJSON(e));- }- if (message.views?.length) {- obj.views = message.views.map((e) => ViewMetadata.toJSON(e));- }- if (message.functions?.length) {- obj.functions = message.functions.map((e) => FunctionMetadata.toJSON(e));- }- if (message.streams?.length) {- obj.streams = message.streams.map((e) => StreamMetadata.toJSON(e));- }- if (message.tasks?.length) {- obj.tasks = message.tasks.map((e) => TaskMetadata.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.tables) {+ obj.tables = message.tables.map((e) => e ? TableMetadata.toJSON(e) : undefined);+ } else {+ obj.tables = [];+ }+ if (message.views) {+ obj.views = message.views.map((e) => e ? ViewMetadata.toJSON(e) : undefined);+ } else {+ obj.views = [];+ }+ if (message.functions) {+ obj.functions = message.functions.map((e) => e ? FunctionMetadata.toJSON(e) : undefined);+ } else {+ obj.functions = [];+ }+ if (message.streams) {+ obj.streams = message.streams.map((e) => e ? StreamMetadata.toJSON(e) : undefined);+ } else {+ obj.streams = [];+ }+ if (message.tasks) {+ obj.tasks = message.tasks.map((e) => e ? TaskMetadata.toJSON(e) : undefined);+ } else {+ obj.tasks = [];}return obj;},@@ -3013,6 +2975,7 @@ export const SchemaMetadata = {create(base?: DeepPartial<SchemaMetadata>): SchemaMetadata {return SchemaMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaMetadata>): SchemaMetadata {const message = createBaseSchemaMetadata();message.name = object.name ?? "";@@ -3228,47 +3191,31 @@ export const TableMetadata = {toJSON(message: TableMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.columns?.length) {- obj.columns = message.columns.map((e) => ColumnMetadata.toJSON(e));- }- if (message.indexes?.length) {- obj.indexes = message.indexes.map((e) => IndexMetadata.toJSON(e));- }- if (message.engine !== "") {- obj.engine = message.engine;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.rowCount !== 0) {- obj.rowCount = Math.round(message.rowCount);- }- if (message.dataSize !== 0) {- obj.dataSize = Math.round(message.dataSize);- }- if (message.indexSize !== 0) {- obj.indexSize = Math.round(message.indexSize);- }- if (message.dataFree !== 0) {- obj.dataFree = Math.round(message.dataFree);- }- if (message.createOptions !== "") {- obj.createOptions = message.createOptions;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.classification !== "") {- obj.classification = message.classification;- }- if (message.userComment !== "") {- obj.userComment = message.userComment;- }- if (message.foreignKeys?.length) {- obj.foreignKeys = message.foreignKeys.map((e) => ForeignKeyMetadata.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.columns) {+ obj.columns = message.columns.map((e) => e ? ColumnMetadata.toJSON(e) : undefined);+ } else {+ obj.columns = [];+ }+ if (message.indexes) {+ obj.indexes = message.indexes.map((e) => e ? IndexMetadata.toJSON(e) : undefined);+ } else {+ obj.indexes = [];+ }+ message.engine !== undefined && (obj.engine = message.engine);+ message.collation !== undefined && (obj.collation = message.collation);+ message.rowCount !== undefined && (obj.rowCount = Math.round(message.rowCount));+ message.dataSize !== undefined && (obj.dataSize = Math.round(message.dataSize));+ message.indexSize !== undefined && (obj.indexSize = Math.round(message.indexSize));+ message.dataFree !== undefined && (obj.dataFree = Math.round(message.dataFree));+ message.createOptions !== undefined && (obj.createOptions = message.createOptions);+ message.comment !== undefined && (obj.comment = message.comment);+ message.classification !== undefined && (obj.classification = message.classification);+ message.userComment !== undefined && (obj.userComment = message.userComment);+ if (message.foreignKeys) {+ obj.foreignKeys = message.foreignKeys.map((e) => e ? ForeignKeyMetadata.toJSON(e) : undefined);+ } else {+ obj.foreignKeys = [];}return obj;},@@ -3276,6 +3223,7 @@ export const TableMetadata = {create(base?: DeepPartial<TableMetadata>): TableMetadata {return TableMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TableMetadata>): TableMetadata {const message = createBaseTableMetadata();message.name = object.name ?? "";@@ -3449,42 +3397,23 @@ export const ColumnMetadata = {toJSON(message: ColumnMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.position !== 0) {- obj.position = Math.round(message.position);- }- if (message.default !== undefined) {- obj.default = message.default;- }- if (message.nullable === true) {- obj.nullable = message.nullable;- }- if (message.type !== "") {- obj.type = message.type;- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.classification !== "") {- obj.classification = message.classification;- }- if (message.userComment !== "") {- obj.userComment = message.userComment;- }+ message.name !== undefined && (obj.name = message.name);+ message.position !== undefined && (obj.position = Math.round(message.position));+ message.default !== undefined && (obj.default = message.default);+ message.nullable !== undefined && (obj.nullable = message.nullable);+ message.type !== undefined && (obj.type = message.type);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.comment !== undefined && (obj.comment = message.comment);+ message.classification !== undefined && (obj.classification = message.classification);+ message.userComment !== undefined && (obj.userComment = message.userComment);return obj;},create(base?: DeepPartial<ColumnMetadata>): ColumnMetadata {return ColumnMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ColumnMetadata>): ColumnMetadata {const message = createBaseColumnMetadata();message.name = object.name ?? "";@@ -3579,17 +3508,13 @@ export const ViewMetadata = {toJSON(message: ViewMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.definition !== "") {- obj.definition = message.definition;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.dependentColumns?.length) {- obj.dependentColumns = message.dependentColumns.map((e) => DependentColumn.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.definition !== undefined && (obj.definition = message.definition);+ message.comment !== undefined && (obj.comment = message.comment);+ if (message.dependentColumns) {+ obj.dependentColumns = message.dependentColumns.map((e) => e ? DependentColumn.toJSON(e) : undefined);+ } else {+ obj.dependentColumns = [];}return obj;},@@ -3597,6 +3522,7 @@ export const ViewMetadata = {create(base?: DeepPartial<ViewMetadata>): ViewMetadata {return ViewMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ViewMetadata>): ViewMetadata {const message = createBaseViewMetadata();message.name = object.name ?? "";@@ -3672,21 +3598,16 @@ export const DependentColumn = {toJSON(message: DependentColumn): unknown {const obj: any = {};- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.table !== "") {- obj.table = message.table;- }- if (message.column !== "") {- obj.column = message.column;- }+ message.schema !== undefined && (obj.schema = message.schema);+ message.table !== undefined && (obj.table = message.table);+ message.column !== undefined && (obj.column = message.column);return obj;},create(base?: DeepPartial<DependentColumn>): DependentColumn {return DependentColumn.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DependentColumn>): DependentColumn {const message = createBaseDependentColumn();message.schema = object.schema ?? "";@@ -3750,18 +3671,15 @@ export const FunctionMetadata = {toJSON(message: FunctionMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.definition !== "") {- obj.definition = message.definition;- }+ message.name !== undefined && (obj.name = message.name);+ message.definition !== undefined && (obj.definition = message.definition);return obj;},create(base?: DeepPartial<FunctionMetadata>): FunctionMetadata {return FunctionMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FunctionMetadata>): FunctionMetadata {const message = createBaseFunctionMetadata();message.name = object.name ?? "";@@ -3923,42 +3841,27 @@ export const TaskMetadata = {toJSON(message: TaskMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.id !== "") {- obj.id = message.id;- }- if (message.owner !== "") {- obj.owner = message.owner;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.warehouse !== "") {- obj.warehouse = message.warehouse;- }- if (message.schedule !== "") {- obj.schedule = message.schedule;- }- if (message.predecessors?.length) {- obj.predecessors = message.predecessors;- }- if (message.state !== 0) {- obj.state = taskMetadata_StateToJSON(message.state);- }- if (message.condition !== "") {- obj.condition = message.condition;- }- if (message.definition !== "") {- obj.definition = message.definition;- }+ message.name !== undefined && (obj.name = message.name);+ message.id !== undefined && (obj.id = message.id);+ message.owner !== undefined && (obj.owner = message.owner);+ message.comment !== undefined && (obj.comment = message.comment);+ message.warehouse !== undefined && (obj.warehouse = message.warehouse);+ message.schedule !== undefined && (obj.schedule = message.schedule);+ if (message.predecessors) {+ obj.predecessors = message.predecessors.map((e) => e);+ } else {+ obj.predecessors = [];+ }+ message.state !== undefined && (obj.state = taskMetadata_StateToJSON(message.state));+ message.condition !== undefined && (obj.condition = message.condition);+ message.definition !== undefined && (obj.definition = message.definition);return obj;},create(base?: DeepPartial<TaskMetadata>): TaskMetadata {return TaskMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TaskMetadata>): TaskMetadata {const message = createBaseTaskMetadata();message.name = object.name ?? "";@@ -4095,36 +3998,21 @@ export const StreamMetadata = {toJSON(message: StreamMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.tableName !== "") {- obj.tableName = message.tableName;- }- if (message.owner !== "") {- obj.owner = message.owner;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.type !== 0) {- obj.type = streamMetadata_TypeToJSON(message.type);- }- if (message.stale === true) {- obj.stale = message.stale;- }- if (message.mode !== 0) {- obj.mode = streamMetadata_ModeToJSON(message.mode);- }- if (message.definition !== "") {- obj.definition = message.definition;- }+ message.name !== undefined && (obj.name = message.name);+ message.tableName !== undefined && (obj.tableName = message.tableName);+ message.owner !== undefined && (obj.owner = message.owner);+ message.comment !== undefined && (obj.comment = message.comment);+ message.type !== undefined && (obj.type = streamMetadata_TypeToJSON(message.type));+ message.stale !== undefined && (obj.stale = message.stale);+ message.mode !== undefined && (obj.mode = streamMetadata_ModeToJSON(message.mode));+ message.definition !== undefined && (obj.definition = message.definition);return obj;},create(base?: DeepPartial<StreamMetadata>): StreamMetadata {return StreamMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<StreamMetadata>): StreamMetadata {const message = createBaseStreamMetadata();message.name = object.name ?? "";@@ -4248,33 +4136,24 @@ export const IndexMetadata = {toJSON(message: IndexMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.expressions?.length) {- obj.expressions = message.expressions;- }- if (message.type !== "") {- obj.type = message.type;- }- if (message.unique === true) {- obj.unique = message.unique;- }- if (message.primary === true) {- obj.primary = message.primary;- }- if (message.visible === true) {- obj.visible = message.visible;- }- if (message.comment !== "") {- obj.comment = message.comment;- }+ message.name !== undefined && (obj.name = message.name);+ if (message.expressions) {+ obj.expressions = message.expressions.map((e) => e);+ } else {+ obj.expressions = [];+ }+ message.type !== undefined && (obj.type = message.type);+ message.unique !== undefined && (obj.unique = message.unique);+ message.primary !== undefined && (obj.primary = message.primary);+ message.visible !== undefined && (obj.visible = message.visible);+ message.comment !== undefined && (obj.comment = message.comment);return obj;},create(base?: DeepPartial<IndexMetadata>): IndexMetadata {return IndexMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IndexMetadata>): IndexMetadata {const message = createBaseIndexMetadata();message.name = object.name ?? "";@@ -4364,24 +4243,17 @@ export const ExtensionMetadata = {toJSON(message: ExtensionMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.version !== "") {- obj.version = message.version;- }- if (message.description !== "") {- obj.description = message.description;- }+ message.name !== undefined && (obj.name = message.name);+ message.schema !== undefined && (obj.schema = message.schema);+ message.version !== undefined && (obj.version = message.version);+ message.description !== undefined && (obj.description = message.description);return obj;},create(base?: DeepPartial<ExtensionMetadata>): ExtensionMetadata {return ExtensionMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExtensionMetadata>): ExtensionMetadata {const message = createBaseExtensionMetadata();message.name = object.name ?? "";@@ -4523,36 +4395,29 @@ export const ForeignKeyMetadata = {toJSON(message: ForeignKeyMetadata): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.columns?.length) {- obj.columns = message.columns;- }- if (message.referencedSchema !== "") {- obj.referencedSchema = message.referencedSchema;- }- if (message.referencedTable !== "") {- obj.referencedTable = message.referencedTable;- }- if (message.referencedColumns?.length) {- obj.referencedColumns = message.referencedColumns;- }- if (message.onDelete !== "") {- obj.onDelete = message.onDelete;- }- if (message.onUpdate !== "") {- obj.onUpdate = message.onUpdate;- }- if (message.matchType !== "") {- obj.matchType = message.matchType;- }+ message.name !== undefined && (obj.name = message.name);+ if (message.columns) {+ obj.columns = message.columns.map((e) => e);+ } else {+ obj.columns = [];+ }+ message.referencedSchema !== undefined && (obj.referencedSchema = message.referencedSchema);+ message.referencedTable !== undefined && (obj.referencedTable = message.referencedTable);+ if (message.referencedColumns) {+ obj.referencedColumns = message.referencedColumns.map((e) => e);+ } else {+ obj.referencedColumns = [];+ }+ message.onDelete !== undefined && (obj.onDelete = message.onDelete);+ message.onUpdate !== undefined && (obj.onUpdate = message.onUpdate);+ message.matchType !== undefined && (obj.matchType = message.matchType);return obj;},create(base?: DeepPartial<ForeignKeyMetadata>): ForeignKeyMetadata {return ForeignKeyMetadata.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ForeignKeyMetadata>): ForeignKeyMetadata {const message = createBaseForeignKeyMetadata();message.name = object.name ?? "";@@ -4608,15 +4473,14 @@ export const DatabaseSchema = {toJSON(message: DatabaseSchema): unknown {const obj: any = {};- if (message.schema !== "") {- obj.schema = message.schema;- }+ message.schema !== undefined && (obj.schema = message.schema);return obj;},create(base?: DeepPartial<DatabaseSchema>): DatabaseSchema {return DatabaseSchema.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DatabaseSchema>): DatabaseSchema {const message = createBaseDatabaseSchema();message.schema = object.schema ?? "";@@ -4702,24 +4566,19 @@ export const BackupSetting = {toJSON(message: BackupSetting): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.backupRetainDuration !== undefined) {- obj.backupRetainDuration = Duration.toJSON(message.backupRetainDuration);- }- if (message.cronSchedule !== "") {- obj.cronSchedule = message.cronSchedule;- }- if (message.hookUrl !== "") {- obj.hookUrl = message.hookUrl;- }+ message.name !== undefined && (obj.name = message.name);+ message.backupRetainDuration !== undefined && (obj.backupRetainDuration = message.backupRetainDuration+ ? Duration.toJSON(message.backupRetainDuration)+ : undefined);+ message.cronSchedule !== undefined && (obj.cronSchedule = message.cronSchedule);+ message.hookUrl !== undefined && (obj.hookUrl = message.hookUrl);return obj;},create(base?: DeepPartial<BackupSetting>): BackupSetting {return BackupSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BackupSetting>): BackupSetting {const message = createBaseBackupSetting();message.name = object.name ?? "";@@ -4841,33 +4700,20 @@ export const Backup = {toJSON(message: Backup): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }- if (message.state !== 0) {- obj.state = backup_BackupStateToJSON(message.state);- }- if (message.backupType !== 0) {- obj.backupType = backup_BackupTypeToJSON(message.backupType);- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.uid !== "") {- obj.uid = message.uid;- }+ message.name !== undefined && (obj.name = message.name);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());+ message.state !== undefined && (obj.state = backup_BackupStateToJSON(message.state));+ message.backupType !== undefined && (obj.backupType = backup_BackupTypeToJSON(message.backupType));+ message.comment !== undefined && (obj.comment = message.comment);+ message.uid !== undefined && (obj.uid = message.uid);return obj;},create(base?: DeepPartial<Backup>): Backup {return Backup.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Backup>): Backup {const message = createBaseBackup();message.name = object.name ?? "";@@ -4946,21 +4792,16 @@ export const ListSlowQueriesRequest = {toJSON(message: ListSlowQueriesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.orderBy !== "") {- obj.orderBy = message.orderBy;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.filter !== undefined && (obj.filter = message.filter);+ message.orderBy !== undefined && (obj.orderBy = message.orderBy);return obj;},create(base?: DeepPartial<ListSlowQueriesRequest>): ListSlowQueriesRequest {return ListSlowQueriesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSlowQueriesRequest>): ListSlowQueriesRequest {const message = createBaseListSlowQueriesRequest();message.parent = object.parent ?? "";@@ -5015,8 +4856,10 @@ export const ListSlowQueriesResponse = {toJSON(message: ListSlowQueriesResponse): unknown {const obj: any = {};- if (message.slowQueryLogs?.length) {- obj.slowQueryLogs = message.slowQueryLogs.map((e) => SlowQueryLog.toJSON(e));+ if (message.slowQueryLogs) {+ obj.slowQueryLogs = message.slowQueryLogs.map((e) => e ? SlowQueryLog.toJSON(e) : undefined);+ } else {+ obj.slowQueryLogs = [];}return obj;},@@ -5024,6 +4867,7 @@ export const ListSlowQueriesResponse = {create(base?: DeepPartial<ListSlowQueriesResponse>): ListSlowQueriesResponse {return ListSlowQueriesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSlowQueriesResponse>): ListSlowQueriesResponse {const message = createBaseListSlowQueriesResponse();message.slowQueryLogs = object.slowQueryLogs?.map((e) => SlowQueryLog.fromPartial(e)) || [];@@ -5096,21 +4940,17 @@ export const SlowQueryLog = {toJSON(message: SlowQueryLog): unknown {const obj: any = {};- if (message.resource !== "") {- obj.resource = message.resource;- }- if (message.project !== "") {- obj.project = message.project;- }- if (message.statistics !== undefined) {- obj.statistics = SlowQueryStatistics.toJSON(message.statistics);- }+ message.resource !== undefined && (obj.resource = message.resource);+ message.project !== undefined && (obj.project = message.project);+ message.statistics !== undefined &&+ (obj.statistics = message.statistics ? SlowQueryStatistics.toJSON(message.statistics) : undefined);return obj;},create(base?: DeepPartial<SlowQueryLog>): SlowQueryLog {return SlowQueryLog.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SlowQueryLog>): SlowQueryLog {const message = createBaseSlowQueryLog();message.resource = object.resource ?? "";@@ -5299,41 +5139,23 @@ export const SlowQueryStatistics = {toJSON(message: SlowQueryStatistics): unknown {const obj: any = {};- if (message.sqlFingerprint !== "") {- obj.sqlFingerprint = message.sqlFingerprint;- }- if (message.count !== 0) {- obj.count = Math.round(message.count);- }- if (message.latestLogTime !== undefined) {- obj.latestLogTime = message.latestLogTime.toISOString();- }- if (message.averageQueryTime !== undefined) {- obj.averageQueryTime = Duration.toJSON(message.averageQueryTime);- }- if (message.maximumQueryTime !== undefined) {- obj.maximumQueryTime = Duration.toJSON(message.maximumQueryTime);- }- if (message.averageRowsSent !== 0) {- obj.averageRowsSent = Math.round(message.averageRowsSent);- }- if (message.maximumRowsSent !== 0) {- obj.maximumRowsSent = Math.round(message.maximumRowsSent);- }- if (message.averageRowsExamined !== 0) {- obj.averageRowsExamined = Math.round(message.averageRowsExamined);- }- if (message.maximumRowsExamined !== 0) {- obj.maximumRowsExamined = Math.round(message.maximumRowsExamined);- }- if (message.queryTimePercent !== 0) {- obj.queryTimePercent = message.queryTimePercent;- }- if (message.countPercent !== 0) {- obj.countPercent = message.countPercent;- }- if (message.samples?.length) {- obj.samples = message.samples.map((e) => SlowQueryDetails.toJSON(e));+ message.sqlFingerprint !== undefined && (obj.sqlFingerprint = message.sqlFingerprint);+ message.count !== undefined && (obj.count = Math.round(message.count));+ message.latestLogTime !== undefined && (obj.latestLogTime = message.latestLogTime.toISOString());+ message.averageQueryTime !== undefined &&+ (obj.averageQueryTime = message.averageQueryTime ? Duration.toJSON(message.averageQueryTime) : undefined);+ message.maximumQueryTime !== undefined &&+ (obj.maximumQueryTime = message.maximumQueryTime ? Duration.toJSON(message.maximumQueryTime) : undefined);+ message.averageRowsSent !== undefined && (obj.averageRowsSent = Math.round(message.averageRowsSent));+ message.maximumRowsSent !== undefined && (obj.maximumRowsSent = Math.round(message.maximumRowsSent));+ message.averageRowsExamined !== undefined && (obj.averageRowsExamined = Math.round(message.averageRowsExamined));+ message.maximumRowsExamined !== undefined && (obj.maximumRowsExamined = Math.round(message.maximumRowsExamined));+ message.queryTimePercent !== undefined && (obj.queryTimePercent = message.queryTimePercent);+ message.countPercent !== undefined && (obj.countPercent = message.countPercent);+ if (message.samples) {+ obj.samples = message.samples.map((e) => e ? SlowQueryDetails.toJSON(e) : undefined);+ } else {+ obj.samples = [];}return obj;},@@ -5341,6 +5163,7 @@ export const SlowQueryStatistics = {create(base?: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {return SlowQueryStatistics.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SlowQueryStatistics>): SlowQueryStatistics {const message = createBaseSlowQueryStatistics();message.sqlFingerprint = object.sqlFingerprint ?? "";@@ -5461,30 +5284,20 @@ export const SlowQueryDetails = {toJSON(message: SlowQueryDetails): unknown {const obj: any = {};- if (message.startTime !== undefined) {- obj.startTime = message.startTime.toISOString();- }- if (message.queryTime !== undefined) {- obj.queryTime = Duration.toJSON(message.queryTime);- }- if (message.lockTime !== undefined) {- obj.lockTime = Duration.toJSON(message.lockTime);- }- if (message.rowsSent !== 0) {- obj.rowsSent = Math.round(message.rowsSent);- }- if (message.rowsExamined !== 0) {- obj.rowsExamined = Math.round(message.rowsExamined);- }- if (message.sqlText !== "") {- obj.sqlText = message.sqlText;- }+ message.startTime !== undefined && (obj.startTime = message.startTime.toISOString());+ message.queryTime !== undefined &&+ (obj.queryTime = message.queryTime ? Duration.toJSON(message.queryTime) : undefined);+ message.lockTime !== undefined && (obj.lockTime = message.lockTime ? Duration.toJSON(message.lockTime) : undefined);+ message.rowsSent !== undefined && (obj.rowsSent = Math.round(message.rowsSent));+ message.rowsExamined !== undefined && (obj.rowsExamined = Math.round(message.rowsExamined));+ message.sqlText !== undefined && (obj.sqlText = message.sqlText);return obj;},create(base?: DeepPartial<SlowQueryDetails>): SlowQueryDetails {return SlowQueryDetails.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SlowQueryDetails>): SlowQueryDetails {const message = createBaseSlowQueryDetails();message.startTime = object.startTime ?? undefined;@@ -5566,21 +5379,16 @@ export const ListSecretsRequest = {toJSON(message: ListSecretsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListSecretsRequest>): ListSecretsRequest {return ListSecretsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSecretsRequest>): ListSecretsRequest {const message = createBaseListSecretsRequest();message.parent = object.parent ?? "";@@ -5644,18 +5452,19 @@ export const ListSecretsResponse = {toJSON(message: ListSecretsResponse): unknown {const obj: any = {};- if (message.secrets?.length) {- obj.secrets = message.secrets.map((e) => Secret.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.secrets) {+ obj.secrets = message.secrets.map((e) => e ? Secret.toJSON(e) : undefined);+ } else {+ obj.secrets = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListSecretsResponse>): ListSecretsResponse {return ListSecretsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSecretsResponse>): ListSecretsResponse {const message = createBaseListSecretsResponse();message.secrets = object.secrets?.map((e) => Secret.fromPartial(e)) || [];@@ -5729,21 +5538,16 @@ export const UpdateSecretRequest = {toJSON(message: UpdateSecretRequest): unknown {const obj: any = {};- if (message.secret !== undefined) {- obj.secret = Secret.toJSON(message.secret);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }- if (message.allowMissing === true) {- obj.allowMissing = message.allowMissing;- }+ message.secret !== undefined && (obj.secret = message.secret ? Secret.toJSON(message.secret) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));+ message.allowMissing !== undefined && (obj.allowMissing = message.allowMissing);return obj;},create(base?: DeepPartial<UpdateSecretRequest>): UpdateSecretRequest {return UpdateSecretRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateSecretRequest>): UpdateSecretRequest {const message = createBaseUpdateSecretRequest();message.secret = (object.secret !== undefined && object.secret !== null)@@ -5796,15 +5600,14 @@ export const DeleteSecretRequest = {toJSON(message: DeleteSecretRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteSecretRequest>): DeleteSecretRequest {return DeleteSecretRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteSecretRequest>): DeleteSecretRequest {const message = createBaseDeleteSecretRequest();message.name = object.name ?? "";@@ -5899,27 +5702,18 @@ export const Secret = {toJSON(message: Secret): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.createdTime !== undefined) {- obj.createdTime = message.createdTime.toISOString();- }- if (message.updatedTime !== undefined) {- obj.updatedTime = message.updatedTime.toISOString();- }- if (message.value !== "") {- obj.value = message.value;- }- if (message.description !== "") {- obj.description = message.description;- }+ message.name !== undefined && (obj.name = message.name);+ message.createdTime !== undefined && (obj.createdTime = message.createdTime.toISOString());+ message.updatedTime !== undefined && (obj.updatedTime = message.updatedTime.toISOString());+ message.value !== undefined && (obj.value = message.value);+ message.description !== undefined && (obj.description = message.description);return obj;},create(base?: DeepPartial<Secret>): Secret {return Secret.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Secret>): Secret {const message = createBaseSecret();message.name = object.name ?? "";@@ -5985,18 +5779,15 @@ export const AdviseIndexRequest = {toJSON(message: AdviseIndexRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.statement !== "") {- obj.statement = message.statement;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.statement !== undefined && (obj.statement = message.statement);return obj;},create(base?: DeepPartial<AdviseIndexRequest>): AdviseIndexRequest {return AdviseIndexRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AdviseIndexRequest>): AdviseIndexRequest {const message = createBaseAdviseIndexRequest();message.parent = object.parent ?? "";@@ -6070,21 +5861,16 @@ export const AdviseIndexResponse = {toJSON(message: AdviseIndexResponse): unknown {const obj: any = {};- if (message.currentIndex !== "") {- obj.currentIndex = message.currentIndex;- }- if (message.suggestion !== "") {- obj.suggestion = message.suggestion;- }- if (message.createIndexStatement !== "") {- obj.createIndexStatement = message.createIndexStatement;- }+ message.currentIndex !== undefined && (obj.currentIndex = message.currentIndex);+ message.suggestion !== undefined && (obj.suggestion = message.suggestion);+ message.createIndexStatement !== undefined && (obj.createIndexStatement = message.createIndexStatement);return obj;},create(base?: DeepPartial<AdviseIndexResponse>): AdviseIndexResponse {return AdviseIndexResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AdviseIndexResponse>): AdviseIndexResponse {const message = createBaseAdviseIndexResponse();message.currentIndex = object.currentIndex ?? "";@@ -6355,69 +6141,35 @@ export const ChangeHistory = {toJSON(message: ChangeHistory): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.creator !== "") {- obj.creator = message.creator;- }- if (message.updater !== "") {- obj.updater = message.updater;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }- if (message.releaseVersion !== "") {- obj.releaseVersion = message.releaseVersion;- }- if (message.source !== 0) {- obj.source = changeHistory_SourceToJSON(message.source);- }- if (message.type !== 0) {- obj.type = changeHistory_TypeToJSON(message.type);- }- if (message.status !== 0) {- obj.status = changeHistory_StatusToJSON(message.status);- }- if (message.version !== "") {- obj.version = message.version;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.statement !== "") {- obj.statement = message.statement;- }- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.prevSchema !== "") {- obj.prevSchema = message.prevSchema;- }- if (message.executionDuration !== undefined) {- obj.executionDuration = Duration.toJSON(message.executionDuration);- }- if (message.issue !== "") {- obj.issue = message.issue;- }- if (message.pushEvent !== undefined) {- obj.pushEvent = PushEvent.toJSON(message.pushEvent);- }- if (message.changedResources !== undefined) {- obj.changedResources = ChangedResources.toJSON(message.changedResources);- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.creator !== undefined && (obj.creator = message.creator);+ message.updater !== undefined && (obj.updater = message.updater);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());+ message.releaseVersion !== undefined && (obj.releaseVersion = message.releaseVersion);+ message.source !== undefined && (obj.source = changeHistory_SourceToJSON(message.source));+ message.type !== undefined && (obj.type = changeHistory_TypeToJSON(message.type));+ message.status !== undefined && (obj.status = changeHistory_StatusToJSON(message.status));+ message.version !== undefined && (obj.version = message.version);+ message.description !== undefined && (obj.description = message.description);+ message.statement !== undefined && (obj.statement = message.statement);+ message.schema !== undefined && (obj.schema = message.schema);+ message.prevSchema !== undefined && (obj.prevSchema = message.prevSchema);+ message.executionDuration !== undefined &&+ (obj.executionDuration = message.executionDuration ? Duration.toJSON(message.executionDuration) : undefined);+ message.issue !== undefined && (obj.issue = message.issue);+ message.pushEvent !== undefined &&+ (obj.pushEvent = message.pushEvent ? PushEvent.toJSON(message.pushEvent) : undefined);+ message.changedResources !== undefined &&+ (obj.changedResources = message.changedResources ? ChangedResources.toJSON(message.changedResources) : undefined);return obj;},create(base?: DeepPartial<ChangeHistory>): ChangeHistory {return ChangeHistory.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangeHistory>): ChangeHistory {const message = createBaseChangeHistory();message.name = object.name ?? "";@@ -6494,8 +6246,10 @@ export const ChangedResources = {toJSON(message: ChangedResources): unknown {const obj: any = {};- if (message.databases?.length) {- obj.databases = message.databases.map((e) => ChangedResourceDatabase.toJSON(e));+ if (message.databases) {+ obj.databases = message.databases.map((e) => e ? ChangedResourceDatabase.toJSON(e) : undefined);+ } else {+ obj.databases = [];}return obj;},@@ -6503,6 +6257,7 @@ export const ChangedResources = {create(base?: DeepPartial<ChangedResources>): ChangedResources {return ChangedResources.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangedResources>): ChangedResources {const message = createBaseChangedResources();message.databases = object.databases?.map((e) => ChangedResourceDatabase.fromPartial(e)) || [];@@ -6564,11 +6319,11 @@ export const ChangedResourceDatabase = {toJSON(message: ChangedResourceDatabase): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.schemas?.length) {- obj.schemas = message.schemas.map((e) => ChangedResourceSchema.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.schemas) {+ obj.schemas = message.schemas.map((e) => e ? ChangedResourceSchema.toJSON(e) : undefined);+ } else {+ obj.schemas = [];}return obj;},@@ -6576,6 +6331,7 @@ export const ChangedResourceDatabase = {create(base?: DeepPartial<ChangedResourceDatabase>): ChangedResourceDatabase {return ChangedResourceDatabase.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangedResourceDatabase>): ChangedResourceDatabase {const message = createBaseChangedResourceDatabase();message.name = object.name ?? "";@@ -6638,11 +6394,11 @@ export const ChangedResourceSchema = {toJSON(message: ChangedResourceSchema): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.tables?.length) {- obj.tables = message.tables.map((e) => ChangedResourceTable.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.tables) {+ obj.tables = message.tables.map((e) => e ? ChangedResourceTable.toJSON(e) : undefined);+ } else {+ obj.tables = [];}return obj;},@@ -6650,6 +6406,7 @@ export const ChangedResourceSchema = {create(base?: DeepPartial<ChangedResourceSchema>): ChangedResourceSchema {return ChangedResourceSchema.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangedResourceSchema>): ChangedResourceSchema {const message = createBaseChangedResourceSchema();message.name = object.name ?? "";@@ -6699,15 +6456,14 @@ export const ChangedResourceTable = {toJSON(message: ChangedResourceTable): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<ChangedResourceTable>): ChangedResourceTable {return ChangedResourceTable.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ChangedResourceTable>): ChangedResourceTable {const message = createBaseChangedResourceTable();message.name = object.name ?? "";@@ -6802,27 +6558,18 @@ export const ListChangeHistoriesRequest = {toJSON(message: ListChangeHistoriesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.view !== 0) {- obj.view = changeHistoryViewToJSON(message.view);- }- if (message.filter !== "") {- obj.filter = message.filter;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.view !== undefined && (obj.view = changeHistoryViewToJSON(message.view));+ message.filter !== undefined && (obj.filter = message.filter);return obj;},create(base?: DeepPartial<ListChangeHistoriesRequest>): ListChangeHistoriesRequest {return ListChangeHistoriesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListChangeHistoriesRequest>): ListChangeHistoriesRequest {const message = createBaseListChangeHistoriesRequest();message.parent = object.parent ?? "";@@ -6890,18 +6637,19 @@ export const ListChangeHistoriesResponse = {toJSON(message: ListChangeHistoriesResponse): unknown {const obj: any = {};- if (message.changeHistories?.length) {- obj.changeHistories = message.changeHistories.map((e) => ChangeHistory.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.changeHistories) {+ obj.changeHistories = message.changeHistories.map((e) => e ? ChangeHistory.toJSON(e) : undefined);+ } else {+ obj.changeHistories = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListChangeHistoriesResponse>): ListChangeHistoriesResponse {return ListChangeHistoriesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListChangeHistoriesResponse>): ListChangeHistoriesResponse {const message = createBaseListChangeHistoriesResponse();message.changeHistories = object.changeHistories?.map((e) => ChangeHistory.fromPartial(e)) || [];@@ -6975,21 +6723,16 @@ export const GetChangeHistoryRequest = {toJSON(message: GetChangeHistoryRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.view !== 0) {- obj.view = changeHistoryViewToJSON(message.view);- }- if (message.sdlFormat === true) {- obj.sdlFormat = message.sdlFormat;- }+ message.name !== undefined && (obj.name = message.name);+ message.view !== undefined && (obj.view = changeHistoryViewToJSON(message.view));+ message.sdlFormat !== undefined && (obj.sdlFormat = message.sdlFormat);return obj;},create(base?: DeepPartial<GetChangeHistoryRequest>): GetChangeHistoryRequest {return GetChangeHistoryRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetChangeHistoryRequest>): GetChangeHistoryRequest {const message = createBaseGetChangeHistoryRequest();message.name = object.name ?? "";@@ -8465,6 +8208,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/v1/environment_service.ts b/frontend/src/types/proto/v1/environment_service.tsindex d7191e4f54..39fb0df27f 100644--- a/frontend/src/types/proto/v1/environment_service.ts+++ b/frontend/src/types/proto/v1/environment_service.ts@@ -198,15 +198,14 @@ export const GetEnvironmentRequest = {toJSON(message: GetEnvironmentRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetEnvironmentRequest>): GetEnvironmentRequest {return GetEnvironmentRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetEnvironmentRequest>): GetEnvironmentRequest {const message = createBaseGetEnvironmentRequest();message.name = object.name ?? "";@@ -279,21 +278,16 @@ export const ListEnvironmentsRequest = {toJSON(message: ListEnvironmentsRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.showDeleted === true) {- obj.showDeleted = message.showDeleted;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);return obj;},create(base?: DeepPartial<ListEnvironmentsRequest>): ListEnvironmentsRequest {return ListEnvironmentsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListEnvironmentsRequest>): ListEnvironmentsRequest {const message = createBaseListEnvironmentsRequest();message.pageSize = object.pageSize ?? 0;@@ -359,18 +353,19 @@ export const ListEnvironmentsResponse = {toJSON(message: ListEnvironmentsResponse): unknown {const obj: any = {};- if (message.environments?.length) {- obj.environments = message.environments.map((e) => Environment.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.environments) {+ obj.environments = message.environments.map((e) => e ? Environment.toJSON(e) : undefined);+ } else {+ obj.environments = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListEnvironmentsResponse>): ListEnvironmentsResponse {return ListEnvironmentsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListEnvironmentsResponse>): ListEnvironmentsResponse {const message = createBaseListEnvironmentsResponse();message.environments = object.environments?.map((e) => Environment.fromPartial(e)) || [];@@ -433,18 +428,16 @@ export const CreateEnvironmentRequest = {toJSON(message: CreateEnvironmentRequest): unknown {const obj: any = {};- if (message.environment !== undefined) {- obj.environment = Environment.toJSON(message.environment);- }- if (message.environmentId !== "") {- obj.environmentId = message.environmentId;- }+ message.environment !== undefined &&+ (obj.environment = message.environment ? Environment.toJSON(message.environment) : undefined);+ message.environmentId !== undefined && (obj.environmentId = message.environmentId);return obj;},create(base?: DeepPartial<CreateEnvironmentRequest>): CreateEnvironmentRequest {return CreateEnvironmentRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateEnvironmentRequest>): CreateEnvironmentRequest {const message = createBaseCreateEnvironmentRequest();message.environment = (object.environment !== undefined && object.environment !== null)@@ -509,18 +502,16 @@ export const UpdateEnvironmentRequest = {toJSON(message: UpdateEnvironmentRequest): unknown {const obj: any = {};- if (message.environment !== undefined) {- obj.environment = Environment.toJSON(message.environment);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.environment !== undefined &&+ (obj.environment = message.environment ? Environment.toJSON(message.environment) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateEnvironmentRequest>): UpdateEnvironmentRequest {return UpdateEnvironmentRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateEnvironmentRequest>): UpdateEnvironmentRequest {const message = createBaseUpdateEnvironmentRequest();message.environment = (object.environment !== undefined && object.environment !== null)@@ -572,15 +563,14 @@ export const DeleteEnvironmentRequest = {toJSON(message: DeleteEnvironmentRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteEnvironmentRequest>): DeleteEnvironmentRequest {return DeleteEnvironmentRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteEnvironmentRequest>): DeleteEnvironmentRequest {const message = createBaseDeleteEnvironmentRequest();message.name = object.name ?? "";@@ -629,15 +619,14 @@ export const UndeleteEnvironmentRequest = {toJSON(message: UndeleteEnvironmentRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<UndeleteEnvironmentRequest>): UndeleteEnvironmentRequest {return UndeleteEnvironmentRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UndeleteEnvironmentRequest>): UndeleteEnvironmentRequest {const message = createBaseUndeleteEnvironmentRequest();message.name = object.name ?? "";@@ -743,30 +732,19 @@ export const Environment = {toJSON(message: Environment): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.state !== 0) {- obj.state = stateToJSON(message.state);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.order !== 0) {- obj.order = Math.round(message.order);- }- if (message.tier !== 0) {- obj.tier = environmentTierToJSON(message.tier);- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.state !== undefined && (obj.state = stateToJSON(message.state));+ message.title !== undefined && (obj.title = message.title);+ message.order !== undefined && (obj.order = Math.round(message.order));+ message.tier !== undefined && (obj.tier = environmentTierToJSON(message.tier));return obj;},create(base?: DeepPartial<Environment>): Environment {return Environment.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Environment>): Environment {const message = createBaseEnvironment();message.name = object.name ?? "";@@ -820,15 +798,15 @@ export const UpdateEnvironmentBackupSettingRequest = {toJSON(message: UpdateEnvironmentBackupSettingRequest): unknown {const obj: any = {};- if (message.setting !== undefined) {- obj.setting = EnvironmentBackupSetting.toJSON(message.setting);- }+ message.setting !== undefined &&+ (obj.setting = message.setting ? EnvironmentBackupSetting.toJSON(message.setting) : undefined);return obj;},create(base?: DeepPartial<UpdateEnvironmentBackupSettingRequest>): UpdateEnvironmentBackupSettingRequest {return UpdateEnvironmentBackupSettingRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateEnvironmentBackupSettingRequest>): UpdateEnvironmentBackupSettingRequest {const message = createBaseUpdateEnvironmentBackupSettingRequest();message.setting = (object.setting !== undefined && object.setting !== null)@@ -892,18 +870,15 @@ export const EnvironmentBackupSetting = {toJSON(message: EnvironmentBackupSetting): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.enabled === true) {- obj.enabled = message.enabled;- }+ message.name !== undefined && (obj.name = message.name);+ message.enabled !== undefined && (obj.enabled = message.enabled);return obj;},create(base?: DeepPartial<EnvironmentBackupSetting>): EnvironmentBackupSetting {return EnvironmentBackupSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<EnvironmentBackupSetting>): EnvironmentBackupSetting {const message = createBaseEnvironmentBackupSetting();message.name = object.name ?? "";diff --git a/frontend/src/types/proto/v1/externalvs_service.ts b/frontend/src/types/proto/v1/externalvs_service.tsindex 148e20f946..3ee8b32b69 100644--- a/frontend/src/types/proto/v1/externalvs_service.ts+++ b/frontend/src/types/proto/v1/externalvs_service.ts@@ -290,15 +290,16 @@ export const CreateExternalVersionControlRequest = {toJSON(message: CreateExternalVersionControlRequest): unknown {const obj: any = {};- if (message.externalVersionControl !== undefined) {- obj.externalVersionControl = ExternalVersionControl.toJSON(message.externalVersionControl);- }+ message.externalVersionControl !== undefined && (obj.externalVersionControl = message.externalVersionControl+ ? ExternalVersionControl.toJSON(message.externalVersionControl)+ : undefined);return obj;},create(base?: DeepPartial<CreateExternalVersionControlRequest>): CreateExternalVersionControlRequest {return CreateExternalVersionControlRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateExternalVersionControlRequest>): CreateExternalVersionControlRequest {const message = createBaseCreateExternalVersionControlRequest();message.externalVersionControl =@@ -350,15 +351,14 @@ export const GetExternalVersionControlRequest = {toJSON(message: GetExternalVersionControlRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetExternalVersionControlRequest>): GetExternalVersionControlRequest {return GetExternalVersionControlRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetExternalVersionControlRequest>): GetExternalVersionControlRequest {const message = createBaseGetExternalVersionControlRequest();message.name = object.name ?? "";@@ -420,18 +420,15 @@ export const ListExternalVersionControlsRequest = {toJSON(message: ListExternalVersionControlsRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListExternalVersionControlsRequest>): ListExternalVersionControlsRequest {return ListExternalVersionControlsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListExternalVersionControlsRequest>): ListExternalVersionControlsRequest {const message = createBaseListExternalVersionControlsRequest();message.pageSize = object.pageSize ?? 0;@@ -496,18 +493,21 @@ export const ListExternalVersionControlsResponse = {toJSON(message: ListExternalVersionControlsResponse): unknown {const obj: any = {};- if (message.externalVersionControls?.length) {- obj.externalVersionControls = message.externalVersionControls.map((e) => ExternalVersionControl.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;- }+ if (message.externalVersionControls) {+ obj.externalVersionControls = message.externalVersionControls.map((e) =>+ e ? ExternalVersionControl.toJSON(e) : undefined+ );+ } else {+ obj.externalVersionControls = [];+ }+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListExternalVersionControlsResponse>): ListExternalVersionControlsResponse {return ListExternalVersionControlsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListExternalVersionControlsResponse>): ListExternalVersionControlsResponse {const message = createBaseListExternalVersionControlsResponse();message.externalVersionControls =@@ -573,18 +573,17 @@ export const UpdateExternalVersionControlRequest = {toJSON(message: UpdateExternalVersionControlRequest): unknown {const obj: any = {};- if (message.externalVersionControl !== undefined) {- obj.externalVersionControl = ExternalVersionControl.toJSON(message.externalVersionControl);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.externalVersionControl !== undefined && (obj.externalVersionControl = message.externalVersionControl+ ? ExternalVersionControl.toJSON(message.externalVersionControl)+ : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateExternalVersionControlRequest>): UpdateExternalVersionControlRequest {return UpdateExternalVersionControlRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateExternalVersionControlRequest>): UpdateExternalVersionControlRequest {const message = createBaseUpdateExternalVersionControlRequest();message.externalVersionControl =@@ -637,15 +636,14 @@ export const DeleteExternalVersionControlRequest = {toJSON(message: DeleteExternalVersionControlRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteExternalVersionControlRequest>): DeleteExternalVersionControlRequest {return DeleteExternalVersionControlRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteExternalVersionControlRequest>): DeleteExternalVersionControlRequest {const message = createBaseDeleteExternalVersionControlRequest();message.name = object.name ?? "";@@ -718,21 +716,16 @@ export const SearchExternalVersionControlProjectsRequest = {toJSON(message: SearchExternalVersionControlProjectsRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.accessToken !== "") {- obj.accessToken = message.accessToken;- }- if (message.refreshToken !== "") {- obj.refreshToken = message.refreshToken;- }+ message.name !== undefined && (obj.name = message.name);+ message.accessToken !== undefined && (obj.accessToken = message.accessToken);+ message.refreshToken !== undefined && (obj.refreshToken = message.refreshToken);return obj;},create(base?: DeepPartial<SearchExternalVersionControlProjectsRequest>): SearchExternalVersionControlProjectsRequest {return SearchExternalVersionControlProjectsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchExternalVersionControlProjectsRequest>,): SearchExternalVersionControlProjectsRequest {@@ -789,8 +782,12 @@ export const SearchExternalVersionControlProjectsResponse = {toJSON(message: SearchExternalVersionControlProjectsResponse): unknown {const obj: any = {};- if (message.projects?.length) {- obj.projects = message.projects.map((e) => SearchExternalVersionControlProjectsResponse_Project.toJSON(e));+ if (message.projects) {+ obj.projects = message.projects.map((e) =>+ e ? SearchExternalVersionControlProjectsResponse_Project.toJSON(e) : undefined+ );+ } else {+ obj.projects = [];}return obj;},@@ -800,6 +797,7 @@ export const SearchExternalVersionControlProjectsResponse = {): SearchExternalVersionControlProjectsResponse {return SearchExternalVersionControlProjectsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchExternalVersionControlProjectsResponse>,): SearchExternalVersionControlProjectsResponse {@@ -889,18 +887,10 @@ export const SearchExternalVersionControlProjectsResponse_Project = {toJSON(message: SearchExternalVersionControlProjectsResponse_Project): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.fullpath !== "") {- obj.fullpath = message.fullpath;- }- if (message.webUrl !== "") {- obj.webUrl = message.webUrl;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.fullpath !== undefined && (obj.fullpath = message.fullpath);+ message.webUrl !== undefined && (obj.webUrl = message.webUrl);return obj;},@@ -909,6 +899,7 @@ export const SearchExternalVersionControlProjectsResponse_Project = {): SearchExternalVersionControlProjectsResponse_Project {return SearchExternalVersionControlProjectsResponse_Project.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchExternalVersionControlProjectsResponse_Project>,): SearchExternalVersionControlProjectsResponse_Project {@@ -962,15 +953,14 @@ export const ListProjectGitOpsInfoRequest = {toJSON(message: ListProjectGitOpsInfoRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<ListProjectGitOpsInfoRequest>): ListProjectGitOpsInfoRequest {return ListProjectGitOpsInfoRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListProjectGitOpsInfoRequest>): ListProjectGitOpsInfoRequest {const message = createBaseListProjectGitOpsInfoRequest();message.name = object.name ?? "";@@ -1023,8 +1013,10 @@ export const ListProjectGitOpsInfoResponse = {toJSON(message: ListProjectGitOpsInfoResponse): unknown {const obj: any = {};- if (message.projectGitopsInfo?.length) {- obj.projectGitopsInfo = message.projectGitopsInfo.map((e) => ProjectGitOpsInfo.toJSON(e));+ if (message.projectGitopsInfo) {+ obj.projectGitopsInfo = message.projectGitopsInfo.map((e) => e ? ProjectGitOpsInfo.toJSON(e) : undefined);+ } else {+ obj.projectGitopsInfo = [];}return obj;},@@ -1032,6 +1024,7 @@ export const ListProjectGitOpsInfoResponse = {create(base?: DeepPartial<ListProjectGitOpsInfoResponse>): ListProjectGitOpsInfoResponse {return ListProjectGitOpsInfoResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListProjectGitOpsInfoResponse>): ListProjectGitOpsInfoResponse {const message = createBaseListProjectGitOpsInfoResponse();message.projectGitopsInfo = object.projectGitopsInfo?.map((e) => ProjectGitOpsInfo.fromPartial(e)) || [];@@ -1148,33 +1141,20 @@ export const ExternalVersionControl = {toJSON(message: ExternalVersionControl): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.type !== 0) {- obj.type = externalVersionControl_TypeToJSON(message.type);- }- if (message.url !== "") {- obj.url = message.url;- }- if (message.apiUrl !== "") {- obj.apiUrl = message.apiUrl;- }- if (message.applicationId !== "") {- obj.applicationId = message.applicationId;- }- if (message.secret !== "") {- obj.secret = message.secret;- }+ message.name !== undefined && (obj.name = message.name);+ message.title !== undefined && (obj.title = message.title);+ message.type !== undefined && (obj.type = externalVersionControl_TypeToJSON(message.type));+ message.url !== undefined && (obj.url = message.url);+ message.apiUrl !== undefined && (obj.apiUrl = message.apiUrl);+ message.applicationId !== undefined && (obj.applicationId = message.applicationId);+ message.secret !== undefined && (obj.secret = message.secret);return obj;},create(base?: DeepPartial<ExternalVersionControl>): ExternalVersionControl {return ExternalVersionControl.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExternalVersionControl>): ExternalVersionControl {const message = createBaseExternalVersionControl();message.name = object.name ?? "";@@ -1413,60 +1393,29 @@ export const ProjectGitOpsInfo = {toJSON(message: ProjectGitOpsInfo): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.vcsUid !== "") {- obj.vcsUid = message.vcsUid;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.fullPath !== "") {- obj.fullPath = message.fullPath;- }- if (message.webUrl !== "") {- obj.webUrl = message.webUrl;- }- if (message.branchFilter !== "") {- obj.branchFilter = message.branchFilter;- }- if (message.baseDirectory !== "") {- obj.baseDirectory = message.baseDirectory;- }- if (message.filePathTemplate !== "") {- obj.filePathTemplate = message.filePathTemplate;- }- if (message.schemaPathTemplate !== "") {- obj.schemaPathTemplate = message.schemaPathTemplate;- }- if (message.sheetPathTemplate !== "") {- obj.sheetPathTemplate = message.sheetPathTemplate;- }- if (message.externalId !== "") {- obj.externalId = message.externalId;- }- if (message.enableSqlReviewCi === true) {- obj.enableSqlReviewCi = message.enableSqlReviewCi;- }- if (message.webhookEndpointId !== "") {- obj.webhookEndpointId = message.webhookEndpointId;- }- if (message.accessToken !== "") {- obj.accessToken = message.accessToken;- }- if (message.expiresTime !== undefined) {- obj.expiresTime = message.expiresTime.toISOString();- }- if (message.refreshToken !== "") {- obj.refreshToken = message.refreshToken;- }+ message.name !== undefined && (obj.name = message.name);+ message.vcsUid !== undefined && (obj.vcsUid = message.vcsUid);+ message.title !== undefined && (obj.title = message.title);+ message.fullPath !== undefined && (obj.fullPath = message.fullPath);+ message.webUrl !== undefined && (obj.webUrl = message.webUrl);+ message.branchFilter !== undefined && (obj.branchFilter = message.branchFilter);+ message.baseDirectory !== undefined && (obj.baseDirectory = message.baseDirectory);+ message.filePathTemplate !== undefined && (obj.filePathTemplate = message.filePathTemplate);+ message.schemaPathTemplate !== undefined && (obj.schemaPathTemplate = message.schemaPathTemplate);+ message.sheetPathTemplate !== undefined && (obj.sheetPathTemplate = message.sheetPathTemplate);+ message.externalId !== undefined && (obj.externalId = message.externalId);+ message.enableSqlReviewCi !== undefined && (obj.enableSqlReviewCi = message.enableSqlReviewCi);+ message.webhookEndpointId !== undefined && (obj.webhookEndpointId = message.webhookEndpointId);+ message.accessToken !== undefined && (obj.accessToken = message.accessToken);+ message.expiresTime !== undefined && (obj.expiresTime = message.expiresTime.toISOString());+ message.refreshToken !== undefined && (obj.refreshToken = message.refreshToken);return obj;},create(base?: DeepPartial<ProjectGitOpsInfo>): ProjectGitOpsInfo {return ProjectGitOpsInfo.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ProjectGitOpsInfo>): ProjectGitOpsInfo {const message = createBaseProjectGitOpsInfo();message.name = object.name ?? "";@@ -1530,15 +1479,15 @@ export const ExchangeTokenRequest = {toJSON(message: ExchangeTokenRequest): unknown {const obj: any = {};- if (message.exchangeToken !== undefined) {- obj.exchangeToken = ExchangeToken.toJSON(message.exchangeToken);- }+ message.exchangeToken !== undefined &&+ (obj.exchangeToken = message.exchangeToken ? ExchangeToken.toJSON(message.exchangeToken) : undefined);return obj;},create(base?: DeepPartial<ExchangeTokenRequest>): ExchangeTokenRequest {return ExchangeTokenRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExchangeTokenRequest>): ExchangeTokenRequest {const message = createBaseExchangeTokenRequest();message.exchangeToken = (object.exchangeToken !== undefined && object.exchangeToken !== null)@@ -1646,30 +1595,19 @@ export const ExchangeToken = {toJSON(message: ExchangeToken): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.code !== "") {- obj.code = message.code;- }- if (message.type !== 0) {- obj.type = externalVersionControl_TypeToJSON(message.type);- }- if (message.instanceUrl !== "") {- obj.instanceUrl = message.instanceUrl;- }- if (message.clientId !== "") {- obj.clientId = message.clientId;- }- if (message.clientSecret !== "") {- obj.clientSecret = message.clientSecret;- }+ message.name !== undefined && (obj.name = message.name);+ message.code !== undefined && (obj.code = message.code);+ message.type !== undefined && (obj.type = externalVersionControl_TypeToJSON(message.type));+ message.instanceUrl !== undefined && (obj.instanceUrl = message.instanceUrl);+ message.clientId !== undefined && (obj.clientId = message.clientId);+ message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);return obj;},create(base?: DeepPartial<ExchangeToken>): ExchangeToken {return ExchangeToken.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExchangeToken>): ExchangeToken {const message = createBaseExchangeToken();message.name = object.name ?? "";@@ -1747,21 +1685,16 @@ export const OAuthToken = {toJSON(message: OAuthToken): unknown {const obj: any = {};- if (message.accessToken !== "") {- obj.accessToken = message.accessToken;- }- if (message.refreshToken !== "") {- obj.refreshToken = message.refreshToken;- }- if (message.expiresTime !== undefined) {- obj.expiresTime = message.expiresTime.toISOString();- }+ message.accessToken !== undefined && (obj.accessToken = message.accessToken);+ message.refreshToken !== undefined && (obj.refreshToken = message.refreshToken);+ message.expiresTime !== undefined && (obj.expiresTime = message.expiresTime.toISOString());return obj;},create(base?: DeepPartial<OAuthToken>): OAuthToken {return OAuthToken.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OAuthToken>): OAuthToken {const message = createBaseOAuthToken();message.accessToken = object.accessToken ?? "";diff --git a/frontend/src/types/proto/v1/iam_policy.ts b/frontend/src/types/proto/v1/iam_policy.tsindex b69824cd9d..4c1c0895b5 100644--- a/frontend/src/types/proto/v1/iam_policy.ts+++ b/frontend/src/types/proto/v1/iam_policy.ts@@ -74,8 +74,10 @@ export const IamPolicy = {toJSON(message: IamPolicy): unknown {const obj: any = {};- if (message.bindings?.length) {- obj.bindings = message.bindings.map((e) => Binding.toJSON(e));+ if (message.bindings) {+ obj.bindings = message.bindings.map((e) => e ? Binding.toJSON(e) : undefined);+ } else {+ obj.bindings = [];}return obj;},@@ -83,6 +85,7 @@ export const IamPolicy = {create(base?: DeepPartial<IamPolicy>): IamPolicy {return IamPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IamPolicy>): IamPolicy {const message = createBaseIamPolicy();message.bindings = object.bindings?.map((e) => Binding.fromPartial(e)) || [];@@ -166,24 +169,22 @@ export const Binding = {toJSON(message: Binding): unknown {const obj: any = {};- if (message.role !== "") {- obj.role = message.role;- }- if (message.members?.length) {- obj.members = message.members;- }- if (message.condition !== undefined) {- obj.condition = Expr.toJSON(message.condition);- }- if (message.parsedExpr !== undefined) {- obj.parsedExpr = ParsedExpr.toJSON(message.parsedExpr);+ message.role !== undefined && (obj.role = message.role);+ if (message.members) {+ obj.members = message.members.map((e) => e);+ } else {+ obj.members = [];}+ message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);+ message.parsedExpr !== undefined &&+ (obj.parsedExpr = message.parsedExpr ? ParsedExpr.toJSON(message.parsedExpr) : undefined);return obj;},create(base?: DeepPartial<Binding>): Binding {return Binding.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Binding>): Binding {const message = createBaseBinding();message.role = object.role ?? "";diff --git a/frontend/src/types/proto/v1/idp_service.ts b/frontend/src/types/proto/v1/idp_service.tsindex 170222f51e..6de3936442 100644--- a/frontend/src/types/proto/v1/idp_service.ts+++ b/frontend/src/types/proto/v1/idp_service.ts@@ -338,15 +338,14 @@ export const GetIdentityProviderRequest = {toJSON(message: GetIdentityProviderRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetIdentityProviderRequest>): GetIdentityProviderRequest {return GetIdentityProviderRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetIdentityProviderRequest>): GetIdentityProviderRequest {const message = createBaseGetIdentityProviderRequest();message.name = object.name ?? "";@@ -419,21 +418,16 @@ export const ListIdentityProvidersRequest = {toJSON(message: ListIdentityProvidersRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.showDeleted === true) {- obj.showDeleted = message.showDeleted;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);return obj;},create(base?: DeepPartial<ListIdentityProvidersRequest>): ListIdentityProvidersRequest {return ListIdentityProvidersRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListIdentityProvidersRequest>): ListIdentityProvidersRequest {const message = createBaseListIdentityProvidersRequest();message.pageSize = object.pageSize ?? 0;@@ -499,18 +493,19 @@ export const ListIdentityProvidersResponse = {toJSON(message: ListIdentityProvidersResponse): unknown {const obj: any = {};- if (message.identityProviders?.length) {- obj.identityProviders = message.identityProviders.map((e) => IdentityProvider.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.identityProviders) {+ obj.identityProviders = message.identityProviders.map((e) => e ? IdentityProvider.toJSON(e) : undefined);+ } else {+ obj.identityProviders = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListIdentityProvidersResponse>): ListIdentityProvidersResponse {return ListIdentityProvidersResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListIdentityProvidersResponse>): ListIdentityProvidersResponse {const message = createBaseListIdentityProvidersResponse();message.identityProviders = object.identityProviders?.map((e) => IdentityProvider.fromPartial(e)) || [];@@ -573,18 +568,16 @@ export const CreateIdentityProviderRequest = {toJSON(message: CreateIdentityProviderRequest): unknown {const obj: any = {};- if (message.identityProvider !== undefined) {- obj.identityProvider = IdentityProvider.toJSON(message.identityProvider);- }- if (message.identityProviderId !== "") {- obj.identityProviderId = message.identityProviderId;- }+ message.identityProvider !== undefined &&+ (obj.identityProvider = message.identityProvider ? IdentityProvider.toJSON(message.identityProvider) : undefined);+ message.identityProviderId !== undefined && (obj.identityProviderId = message.identityProviderId);return obj;},create(base?: DeepPartial<CreateIdentityProviderRequest>): CreateIdentityProviderRequest {return CreateIdentityProviderRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateIdentityProviderRequest>): CreateIdentityProviderRequest {const message = createBaseCreateIdentityProviderRequest();message.identityProvider = (object.identityProvider !== undefined && object.identityProvider !== null)@@ -649,18 +642,16 @@ export const UpdateIdentityProviderRequest = {toJSON(message: UpdateIdentityProviderRequest): unknown {const obj: any = {};- if (message.identityProvider !== undefined) {- obj.identityProvider = IdentityProvider.toJSON(message.identityProvider);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.identityProvider !== undefined &&+ (obj.identityProvider = message.identityProvider ? IdentityProvider.toJSON(message.identityProvider) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateIdentityProviderRequest>): UpdateIdentityProviderRequest {return UpdateIdentityProviderRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateIdentityProviderRequest>): UpdateIdentityProviderRequest {const message = createBaseUpdateIdentityProviderRequest();message.identityProvider = (object.identityProvider !== undefined && object.identityProvider !== null)@@ -712,15 +703,14 @@ export const DeleteIdentityProviderRequest = {toJSON(message: DeleteIdentityProviderRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteIdentityProviderRequest>): DeleteIdentityProviderRequest {return DeleteIdentityProviderRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteIdentityProviderRequest>): DeleteIdentityProviderRequest {const message = createBaseDeleteIdentityProviderRequest();message.name = object.name ?? "";@@ -769,15 +759,14 @@ export const UndeleteIdentityProviderRequest = {toJSON(message: UndeleteIdentityProviderRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<UndeleteIdentityProviderRequest>): UndeleteIdentityProviderRequest {return UndeleteIdentityProviderRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UndeleteIdentityProviderRequest>): UndeleteIdentityProviderRequest {const message = createBaseUndeleteIdentityProviderRequest();message.name = object.name ?? "";@@ -841,18 +830,18 @@ export const TestIdentityProviderRequest = {toJSON(message: TestIdentityProviderRequest): unknown {const obj: any = {};- if (message.identityProvider !== undefined) {- obj.identityProvider = IdentityProvider.toJSON(message.identityProvider);- }- if (message.oauth2Context !== undefined) {- obj.oauth2Context = OAuth2IdentityProviderTestRequestContext.toJSON(message.oauth2Context);- }+ message.identityProvider !== undefined &&+ (obj.identityProvider = message.identityProvider ? IdentityProvider.toJSON(message.identityProvider) : undefined);+ message.oauth2Context !== undefined && (obj.oauth2Context = message.oauth2Context+ ? OAuth2IdentityProviderTestRequestContext.toJSON(message.oauth2Context)+ : undefined);return obj;},create(base?: DeepPartial<TestIdentityProviderRequest>): TestIdentityProviderRequest {return TestIdentityProviderRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TestIdentityProviderRequest>): TestIdentityProviderRequest {const message = createBaseTestIdentityProviderRequest();message.identityProvider = (object.identityProvider !== undefined && object.identityProvider !== null)@@ -906,15 +895,14 @@ export const OAuth2IdentityProviderTestRequestContext = {toJSON(message: OAuth2IdentityProviderTestRequestContext): unknown {const obj: any = {};- if (message.code !== "") {- obj.code = message.code;- }+ message.code !== undefined && (obj.code = message.code);return obj;},create(base?: DeepPartial<OAuth2IdentityProviderTestRequestContext>): OAuth2IdentityProviderTestRequestContext {return OAuth2IdentityProviderTestRequestContext.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OAuth2IdentityProviderTestRequestContext>): OAuth2IdentityProviderTestRequestContext {const message = createBaseOAuth2IdentityProviderTestRequestContext();message.code = object.code ?? "";@@ -959,6 +947,7 @@ export const TestIdentityProviderResponse = {create(base?: DeepPartial<TestIdentityProviderResponse>): TestIdentityProviderResponse {return TestIdentityProviderResponse.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<TestIdentityProviderResponse>): TestIdentityProviderResponse {const message = createBaseTestIdentityProviderResponse();return message;@@ -1074,33 +1063,21 @@ export const IdentityProvider = {toJSON(message: IdentityProvider): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.state !== 0) {- obj.state = stateToJSON(message.state);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.domain !== "") {- obj.domain = message.domain;- }- if (message.type !== 0) {- obj.type = identityProviderTypeToJSON(message.type);- }- if (message.config !== undefined) {- obj.config = IdentityProviderConfig.toJSON(message.config);- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.state !== undefined && (obj.state = stateToJSON(message.state));+ message.title !== undefined && (obj.title = message.title);+ message.domain !== undefined && (obj.domain = message.domain);+ message.type !== undefined && (obj.type = identityProviderTypeToJSON(message.type));+ message.config !== undefined &&+ (obj.config = message.config ? IdentityProviderConfig.toJSON(message.config) : undefined);return obj;},create(base?: DeepPartial<IdentityProvider>): IdentityProvider {return IdentityProvider.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IdentityProvider>): IdentityProvider {const message = createBaseIdentityProvider();message.name = object.name ?? "";@@ -1181,21 +1158,19 @@ export const IdentityProviderConfig = {toJSON(message: IdentityProviderConfig): unknown {const obj: any = {};- if (message.oauth2Config !== undefined) {- obj.oauth2Config = OAuth2IdentityProviderConfig.toJSON(message.oauth2Config);- }- if (message.oidcConfig !== undefined) {- obj.oidcConfig = OIDCIdentityProviderConfig.toJSON(message.oidcConfig);- }- if (message.ldapConfig !== undefined) {- obj.ldapConfig = LDAPIdentityProviderConfig.toJSON(message.ldapConfig);- }+ message.oauth2Config !== undefined &&+ (obj.oauth2Config = message.oauth2Config ? OAuth2IdentityProviderConfig.toJSON(message.oauth2Config) : undefined);+ message.oidcConfig !== undefined &&+ (obj.oidcConfig = message.oidcConfig ? OIDCIdentityProviderConfig.toJSON(message.oidcConfig) : undefined);+ message.ldapConfig !== undefined &&+ (obj.ldapConfig = message.ldapConfig ? LDAPIdentityProviderConfig.toJSON(message.ldapConfig) : undefined);return obj;},create(base?: DeepPartial<IdentityProviderConfig>): IdentityProviderConfig {return IdentityProviderConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IdentityProviderConfig>): IdentityProviderConfig {const message = createBaseIdentityProviderConfig();message.oauth2Config = (object.oauth2Config !== undefined && object.oauth2Config !== null)@@ -1352,39 +1327,27 @@ export const OAuth2IdentityProviderConfig = {toJSON(message: OAuth2IdentityProviderConfig): unknown {const obj: any = {};- if (message.authUrl !== "") {- obj.authUrl = message.authUrl;- }- if (message.tokenUrl !== "") {- obj.tokenUrl = message.tokenUrl;- }- if (message.userInfoUrl !== "") {- obj.userInfoUrl = message.userInfoUrl;- }- if (message.clientId !== "") {- obj.clientId = message.clientId;- }- if (message.clientSecret !== "") {- obj.clientSecret = message.clientSecret;- }- if (message.scopes?.length) {- obj.scopes = message.scopes;- }- if (message.fieldMapping !== undefined) {- obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);- }- if (message.skipTlsVerify === true) {- obj.skipTlsVerify = message.skipTlsVerify;- }- if (message.authStyle !== 0) {- obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);- }+ message.authUrl !== undefined && (obj.authUrl = message.authUrl);+ message.tokenUrl !== undefined && (obj.tokenUrl = message.tokenUrl);+ message.userInfoUrl !== undefined && (obj.userInfoUrl = message.userInfoUrl);+ message.clientId !== undefined && (obj.clientId = message.clientId);+ message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);+ if (message.scopes) {+ obj.scopes = message.scopes.map((e) => e);+ } else {+ obj.scopes = [];+ }+ message.fieldMapping !== undefined &&+ (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);+ message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);+ message.authStyle !== undefined && (obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle));return obj;},create(base?: DeepPartial<OAuth2IdentityProviderConfig>): OAuth2IdentityProviderConfig {return OAuth2IdentityProviderConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OAuth2IdentityProviderConfig>): OAuth2IdentityProviderConfig {const message = createBaseOAuth2IdentityProviderConfig();message.authUrl = object.authUrl ?? "";@@ -1519,33 +1482,25 @@ export const OIDCIdentityProviderConfig = {toJSON(message: OIDCIdentityProviderConfig): unknown {const obj: any = {};- if (message.issuer !== "") {- obj.issuer = message.issuer;- }- if (message.clientId !== "") {- obj.clientId = message.clientId;- }- if (message.clientSecret !== "") {- obj.clientSecret = message.clientSecret;- }- if (message.scopes?.length) {- obj.scopes = message.scopes;- }- if (message.fieldMapping !== undefined) {- obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);- }- if (message.skipTlsVerify === true) {- obj.skipTlsVerify = message.skipTlsVerify;- }- if (message.authStyle !== 0) {- obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle);- }+ message.issuer !== undefined && (obj.issuer = message.issuer);+ message.clientId !== undefined && (obj.clientId = message.clientId);+ message.clientSecret !== undefined && (obj.clientSecret = message.clientSecret);+ if (message.scopes) {+ obj.scopes = message.scopes.map((e) => e);+ } else {+ obj.scopes = [];+ }+ message.fieldMapping !== undefined &&+ (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);+ message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);+ message.authStyle !== undefined && (obj.authStyle = oAuth2AuthStyleToJSON(message.authStyle));return obj;},create(base?: DeepPartial<OIDCIdentityProviderConfig>): OIDCIdentityProviderConfig {return OIDCIdentityProviderConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<OIDCIdentityProviderConfig>): OIDCIdentityProviderConfig {const message = createBaseOIDCIdentityProviderConfig();message.issuer = object.issuer ?? "";@@ -1702,39 +1657,23 @@ export const LDAPIdentityProviderConfig = {toJSON(message: LDAPIdentityProviderConfig): unknown {const obj: any = {};- if (message.host !== "") {- obj.host = message.host;- }- if (message.port !== 0) {- obj.port = Math.round(message.port);- }- if (message.skipTlsVerify === true) {- obj.skipTlsVerify = message.skipTlsVerify;- }- if (message.bindDn !== "") {- obj.bindDn = message.bindDn;- }- if (message.bindPassword !== "") {- obj.bindPassword = message.bindPassword;- }- if (message.baseDn !== "") {- obj.baseDn = message.baseDn;- }- if (message.userFilter !== "") {- obj.userFilter = message.userFilter;- }- if (message.securityProtocol !== "") {- obj.securityProtocol = message.securityProtocol;- }- if (message.fieldMapping !== undefined) {- obj.fieldMapping = FieldMapping.toJSON(message.fieldMapping);- }+ message.host !== undefined && (obj.host = message.host);+ message.port !== undefined && (obj.port = Math.round(message.port));+ message.skipTlsVerify !== undefined && (obj.skipTlsVerify = message.skipTlsVerify);+ message.bindDn !== undefined && (obj.bindDn = message.bindDn);+ message.bindPassword !== undefined && (obj.bindPassword = message.bindPassword);+ message.baseDn !== undefined && (obj.baseDn = message.baseDn);+ message.userFilter !== undefined && (obj.userFilter = message.userFilter);+ message.securityProtocol !== undefined && (obj.securityProtocol = message.securityProtocol);+ message.fieldMapping !== undefined &&+ (obj.fieldMapping = message.fieldMapping ? FieldMapping.toJSON(message.fieldMapping) : undefined);return obj;},create(base?: DeepPartial<LDAPIdentityProviderConfig>): LDAPIdentityProviderConfig {return LDAPIdentityProviderConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<LDAPIdentityProviderConfig>): LDAPIdentityProviderConfig {const message = createBaseLDAPIdentityProviderConfig();message.host = object.host ?? "";@@ -1828,24 +1767,17 @@ export const FieldMapping = {toJSON(message: FieldMapping): unknown {const obj: any = {};- if (message.identifier !== "") {- obj.identifier = message.identifier;- }- if (message.displayName !== "") {- obj.displayName = message.displayName;- }- if (message.email !== "") {- obj.email = message.email;- }- if (message.phone !== "") {- obj.phone = message.phone;- }+ message.identifier !== undefined && (obj.identifier = message.identifier);+ message.displayName !== undefined && (obj.displayName = message.displayName);+ message.email !== undefined && (obj.email = message.email);+ message.phone !== undefined && (obj.phone = message.phone);return obj;},create(base?: DeepPartial<FieldMapping>): FieldMapping {return FieldMapping.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FieldMapping>): FieldMapping {const message = createBaseFieldMapping();message.identifier = object.identifier ?? "";diff --git a/frontend/src/types/proto/v1/inbox_service.ts b/frontend/src/types/proto/v1/inbox_service.tsindex c28c82da66..7281dfea17 100644--- a/frontend/src/types/proto/v1/inbox_service.ts+++ b/frontend/src/types/proto/v1/inbox_service.ts@@ -169,21 +169,16 @@ export const ListInboxRequest = {toJSON(message: ListInboxRequest): unknown {const obj: any = {};- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.filter !== undefined && (obj.filter = message.filter);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListInboxRequest>): ListInboxRequest {return ListInboxRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListInboxRequest>): ListInboxRequest {const message = createBaseListInboxRequest();message.filter = object.filter ?? "";@@ -249,18 +244,19 @@ export const ListInboxResponse = {toJSON(message: ListInboxResponse): unknown {const obj: any = {};- if (message.inboxMessages?.length) {- obj.inboxMessages = message.inboxMessages.map((e) => InboxMessage.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.inboxMessages) {+ obj.inboxMessages = message.inboxMessages.map((e) => e ? InboxMessage.toJSON(e) : undefined);+ } else {+ obj.inboxMessages = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListInboxResponse>): ListInboxResponse {return ListInboxResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListInboxResponse>): ListInboxResponse {const message = createBaseListInboxResponse();message.inboxMessages = object.inboxMessages?.map((e) => InboxMessage.fromPartial(e)) || [];@@ -306,6 +302,7 @@ export const GetInboxSummaryRequest = {create(base?: DeepPartial<GetInboxSummaryRequest>): GetInboxSummaryRequest {return GetInboxSummaryRequest.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<GetInboxSummaryRequest>): GetInboxSummaryRequest {const message = createBaseGetInboxSummaryRequest();return message;@@ -366,18 +363,16 @@ export const UpdateInboxRequest = {toJSON(message: UpdateInboxRequest): unknown {const obj: any = {};- if (message.inboxMessage !== undefined) {- obj.inboxMessage = InboxMessage.toJSON(message.inboxMessage);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.inboxMessage !== undefined &&+ (obj.inboxMessage = message.inboxMessage ? InboxMessage.toJSON(message.inboxMessage) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateInboxRequest>): UpdateInboxRequest {return UpdateInboxRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateInboxRequest>): UpdateInboxRequest {const message = createBaseUpdateInboxRequest();message.inboxMessage = (object.inboxMessage !== undefined && object.inboxMessage !== null)@@ -464,24 +459,18 @@ export const InboxMessage = {toJSON(message: InboxMessage): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.activityUid !== "") {- obj.activityUid = message.activityUid;- }- if (message.status !== 0) {- obj.status = inboxMessage_StatusToJSON(message.status);- }- if (message.activity !== undefined) {- obj.activity = LogEntity.toJSON(message.activity);- }+ message.name !== undefined && (obj.name = message.name);+ message.activityUid !== undefined && (obj.activityUid = message.activityUid);+ message.status !== undefined && (obj.status = inboxMessage_StatusToJSON(message.status));+ message.activity !== undefined &&+ (obj.activity = message.activity ? LogEntity.toJSON(message.activity) : undefined);return obj;},create(base?: DeepPartial<InboxMessage>): InboxMessage {return InboxMessage.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<InboxMessage>): InboxMessage {const message = createBaseInboxMessage();message.name = object.name ?? "";@@ -548,18 +537,15 @@ export const InboxSummary = {toJSON(message: InboxSummary): unknown {const obj: any = {};- if (message.unread !== 0) {- obj.unread = Math.round(message.unread);- }- if (message.unreadError !== 0) {- obj.unreadError = Math.round(message.unreadError);- }+ message.unread !== undefined && (obj.unread = Math.round(message.unread));+ message.unreadError !== undefined && (obj.unreadError = Math.round(message.unreadError));return obj;},create(base?: DeepPartial<InboxSummary>): InboxSummary {return InboxSummary.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<InboxSummary>): InboxSummary {const message = createBaseInboxSummary();message.unread = object.unread ?? 0;diff --git a/frontend/src/types/proto/v1/instance_role_service.ts b/frontend/src/types/proto/v1/instance_role_service.tsindex 2fbf6d76b2..e905f6efa3 100644--- a/frontend/src/types/proto/v1/instance_role_service.ts+++ b/frontend/src/types/proto/v1/instance_role_service.ts@@ -161,15 +161,14 @@ export const GetInstanceRoleRequest = {toJSON(message: GetInstanceRoleRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetInstanceRoleRequest>): GetInstanceRoleRequest {return GetInstanceRoleRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetInstanceRoleRequest>): GetInstanceRoleRequest {const message = createBaseGetInstanceRoleRequest();message.name = object.name ?? "";@@ -253,24 +252,17 @@ export const ListInstanceRolesRequest = {toJSON(message: ListInstanceRolesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.refresh === true) {- obj.refresh = message.refresh;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.refresh !== undefined && (obj.refresh = message.refresh);return obj;},create(base?: DeepPartial<ListInstanceRolesRequest>): ListInstanceRolesRequest {return ListInstanceRolesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListInstanceRolesRequest>): ListInstanceRolesRequest {const message = createBaseListInstanceRolesRequest();message.parent = object.parent ?? "";@@ -335,18 +327,19 @@ export const ListInstanceRolesResponse = {toJSON(message: ListInstanceRolesResponse): unknown {const obj: any = {};- if (message.roles?.length) {- obj.roles = message.roles.map((e) => InstanceRole.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.roles) {+ obj.roles = message.roles.map((e) => e ? InstanceRole.toJSON(e) : undefined);+ } else {+ obj.roles = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListInstanceRolesResponse>): ListInstanceRolesResponse {return ListInstanceRolesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListInstanceRolesResponse>): ListInstanceRolesResponse {const message = createBaseListInstanceRolesResponse();message.roles = object.roles?.map((e) => InstanceRole.fromPartial(e)) || [];@@ -409,18 +402,15 @@ export const CreateInstanceRoleRequest = {toJSON(message: CreateInstanceRoleRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.role !== undefined) {- obj.role = InstanceRole.toJSON(message.role);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.role !== undefined && (obj.role = message.role ? InstanceRole.toJSON(message.role) : undefined);return obj;},create(base?: DeepPartial<CreateInstanceRoleRequest>): CreateInstanceRoleRequest {return CreateInstanceRoleRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateInstanceRoleRequest>): CreateInstanceRoleRequest {const message = createBaseCreateInstanceRoleRequest();message.parent = object.parent ?? "";@@ -485,18 +475,15 @@ export const UpdateInstanceRoleRequest = {toJSON(message: UpdateInstanceRoleRequest): unknown {const obj: any = {};- if (message.role !== undefined) {- obj.role = InstanceRole.toJSON(message.role);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.role !== undefined && (obj.role = message.role ? InstanceRole.toJSON(message.role) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateInstanceRoleRequest>): UpdateInstanceRoleRequest {return UpdateInstanceRoleRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateInstanceRoleRequest>): UpdateInstanceRoleRequest {const message = createBaseUpdateInstanceRoleRequest();message.role = (object.role !== undefined && object.role !== null)@@ -548,15 +535,14 @@ export const DeleteInstanceRoleRequest = {toJSON(message: DeleteInstanceRoleRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteInstanceRoleRequest>): DeleteInstanceRoleRequest {return DeleteInstanceRoleRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteInstanceRoleRequest>): DeleteInstanceRoleRequest {const message = createBaseDeleteInstanceRoleRequest();message.name = object.name ?? "";@@ -605,15 +591,14 @@ export const UndeleteInstanceRoleRequest = {toJSON(message: UndeleteInstanceRoleRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<UndeleteInstanceRoleRequest>): UndeleteInstanceRoleRequest {return UndeleteInstanceRoleRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UndeleteInstanceRoleRequest>): UndeleteInstanceRoleRequest {const message = createBaseUndeleteInstanceRoleRequest();message.name = object.name ?? "";@@ -726,30 +711,19 @@ export const InstanceRole = {toJSON(message: InstanceRole): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.roleName !== "") {- obj.roleName = message.roleName;- }- if (message.password !== undefined) {- obj.password = message.password;- }- if (message.connectionLimit !== undefined) {- obj.connectionLimit = Math.round(message.connectionLimit);- }- if (message.validUntil !== undefined) {- obj.validUntil = message.validUntil;- }- if (message.attribute !== undefined) {- obj.attribute = message.attribute;- }+ message.name !== undefined && (obj.name = message.name);+ message.roleName !== undefined && (obj.roleName = message.roleName);+ message.password !== undefined && (obj.password = message.password);+ message.connectionLimit !== undefined && (obj.connectionLimit = Math.round(message.connectionLimit));+ message.validUntil !== undefined && (obj.validUntil = message.validUntil);+ message.attribute !== undefined && (obj.attribute = message.attribute);return obj;},create(base?: DeepPartial<InstanceRole>): InstanceRole {return InstanceRole.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<InstanceRole>): InstanceRole {const message = createBaseInstanceRole();message.name = object.name ?? "";diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.tsindex 45ae7f09ab..486d3c96e0 100644--- a/frontend/src/types/proto/v1/instance_service.ts+++ b/frontend/src/types/proto/v1/instance_service.ts@@ -313,15 +313,14 @@ export const GetInstanceRequest = {toJSON(message: GetInstanceRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetInstanceRequest>): GetInstanceRequest {return GetInstanceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetInstanceRequest>): GetInstanceRequest {const message = createBaseGetInstanceRequest();message.name = object.name ?? "";@@ -394,21 +393,16 @@ export const ListInstancesRequest = {toJSON(message: ListInstancesRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.showDeleted === true) {- obj.showDeleted = message.showDeleted;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);return obj;},create(base?: DeepPartial<ListInstancesRequest>): ListInstancesRequest {return ListInstancesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListInstancesRequest>): ListInstancesRequest {const message = createBaseListInstancesRequest();message.pageSize = object.pageSize ?? 0;@@ -472,18 +466,19 @@ export const ListInstancesResponse = {toJSON(message: ListInstancesResponse): unknown {const obj: any = {};- if (message.instances?.length) {- obj.instances = message.instances.map((e) => Instance.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.instances) {+ obj.instances = message.instances.map((e) => e ? Instance.toJSON(e) : undefined);+ } else {+ obj.instances = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListInstancesResponse>): ListInstancesResponse {return ListInstancesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListInstancesResponse>): ListInstancesResponse {const message = createBaseListInstancesResponse();message.instances = object.instances?.map((e) => Instance.fromPartial(e)) || [];@@ -557,21 +552,16 @@ export const CreateInstanceRequest = {toJSON(message: CreateInstanceRequest): unknown {const obj: any = {};- if (message.instance !== undefined) {- obj.instance = Instance.toJSON(message.instance);- }- if (message.instanceId !== "") {- obj.instanceId = message.instanceId;- }- if (message.validateOnly === true) {- obj.validateOnly = message.validateOnly;- }+ message.instance !== undefined && (obj.instance = message.instance ? Instance.toJSON(message.instance) : undefined);+ message.instanceId !== undefined && (obj.instanceId = message.instanceId);+ message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);return obj;},create(base?: DeepPartial<CreateInstanceRequest>): CreateInstanceRequest {return CreateInstanceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateInstanceRequest>): CreateInstanceRequest {const message = createBaseCreateInstanceRequest();message.instance = (object.instance !== undefined && object.instance !== null)@@ -637,18 +627,15 @@ export const UpdateInstanceRequest = {toJSON(message: UpdateInstanceRequest): unknown {const obj: any = {};- if (message.instance !== undefined) {- obj.instance = Instance.toJSON(message.instance);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.instance !== undefined && (obj.instance = message.instance ? Instance.toJSON(message.instance) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateInstanceRequest>): UpdateInstanceRequest {return UpdateInstanceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateInstanceRequest>): UpdateInstanceRequest {const message = createBaseUpdateInstanceRequest();message.instance = (object.instance !== undefined && object.instance !== null)@@ -713,18 +700,15 @@ export const DeleteInstanceRequest = {toJSON(message: DeleteInstanceRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.force === true) {- obj.force = message.force;- }+ message.name !== undefined && (obj.name = message.name);+ message.force !== undefined && (obj.force = message.force);return obj;},create(base?: DeepPartial<DeleteInstanceRequest>): DeleteInstanceRequest {return DeleteInstanceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteInstanceRequest>): DeleteInstanceRequest {const message = createBaseDeleteInstanceRequest();message.name = object.name ?? "";@@ -774,15 +758,14 @@ export const UndeleteInstanceRequest = {toJSON(message: UndeleteInstanceRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<UndeleteInstanceRequest>): UndeleteInstanceRequest {return UndeleteInstanceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UndeleteInstanceRequest>): UndeleteInstanceRequest {const message = createBaseUndeleteInstanceRequest();message.name = object.name ?? "";@@ -831,15 +814,14 @@ export const SyncInstanceRequest = {toJSON(message: SyncInstanceRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<SyncInstanceRequest>): SyncInstanceRequest {return SyncInstanceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SyncInstanceRequest>): SyncInstanceRequest {const message = createBaseSyncInstanceRequest();message.name = object.name ?? "";@@ -884,6 +866,7 @@ export const SyncInstanceResponse = {create(base?: DeepPartial<SyncInstanceResponse>): SyncInstanceResponse {return SyncInstanceResponse.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<SyncInstanceResponse>): SyncInstanceResponse {const message = createBaseSyncInstanceResponse();return message;@@ -955,21 +938,17 @@ export const AddDataSourceRequest = {toJSON(message: AddDataSourceRequest): unknown {const obj: any = {};- if (message.instance !== "") {- obj.instance = message.instance;- }- if (message.dataSource !== undefined) {- obj.dataSource = DataSource.toJSON(message.dataSource);- }- if (message.validateOnly === true) {- obj.validateOnly = message.validateOnly;- }+ message.instance !== undefined && (obj.instance = message.instance);+ message.dataSource !== undefined &&+ (obj.dataSource = message.dataSource ? DataSource.toJSON(message.dataSource) : undefined);+ message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);return obj;},create(base?: DeepPartial<AddDataSourceRequest>): AddDataSourceRequest {return AddDataSourceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AddDataSourceRequest>): AddDataSourceRequest {const message = createBaseAddDataSourceRequest();message.instance = object.instance ?? "";@@ -1035,18 +1014,16 @@ export const RemoveDataSourceRequest = {toJSON(message: RemoveDataSourceRequest): unknown {const obj: any = {};- if (message.instance !== "") {- obj.instance = message.instance;- }- if (message.dataSource !== undefined) {- obj.dataSource = DataSource.toJSON(message.dataSource);- }+ message.instance !== undefined && (obj.instance = message.instance);+ message.dataSource !== undefined &&+ (obj.dataSource = message.dataSource ? DataSource.toJSON(message.dataSource) : undefined);return obj;},create(base?: DeepPartial<RemoveDataSourceRequest>): RemoveDataSourceRequest {return RemoveDataSourceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RemoveDataSourceRequest>): RemoveDataSourceRequest {const message = createBaseRemoveDataSourceRequest();message.instance = object.instance ?? "";@@ -1133,24 +1110,18 @@ export const UpdateDataSourceRequest = {toJSON(message: UpdateDataSourceRequest): unknown {const obj: any = {};- if (message.instance !== "") {- obj.instance = message.instance;- }- if (message.dataSource !== undefined) {- obj.dataSource = DataSource.toJSON(message.dataSource);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }- if (message.validateOnly === true) {- obj.validateOnly = message.validateOnly;- }+ message.instance !== undefined && (obj.instance = message.instance);+ message.dataSource !== undefined &&+ (obj.dataSource = message.dataSource ? DataSource.toJSON(message.dataSource) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));+ message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);return obj;},create(base?: DeepPartial<UpdateDataSourceRequest>): UpdateDataSourceRequest {return UpdateDataSourceRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateDataSourceRequest>): UpdateDataSourceRequest {const message = createBaseUpdateDataSourceRequest();message.instance = object.instance ?? "";@@ -1204,15 +1175,14 @@ export const SyncSlowQueriesRequest = {toJSON(message: SyncSlowQueriesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }+ message.parent !== undefined && (obj.parent = message.parent);return obj;},create(base?: DeepPartial<SyncSlowQueriesRequest>): SyncSlowQueriesRequest {return SyncSlowQueriesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SyncSlowQueriesRequest>): SyncSlowQueriesRequest {const message = createBaseSyncSlowQueriesRequest();message.parent = object.parent ?? "";@@ -1261,15 +1231,14 @@ export const InstanceOptions = {toJSON(message: InstanceOptions): unknown {const obj: any = {};- if (message.schemaTenantMode === true) {- obj.schemaTenantMode = message.schemaTenantMode;- }+ message.schemaTenantMode !== undefined && (obj.schemaTenantMode = message.schemaTenantMode);return obj;},create(base?: DeepPartial<InstanceOptions>): InstanceOptions {return InstanceOptions.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<InstanceOptions>): InstanceOptions {const message = createBaseInstanceOptions();message.schemaTenantMode = object.schemaTenantMode ?? false;@@ -1442,45 +1411,29 @@ export const Instance = {toJSON(message: Instance): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.state !== 0) {- obj.state = stateToJSON(message.state);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.engineVersion !== "") {- obj.engineVersion = message.engineVersion;- }- if (message.externalLink !== "") {- obj.externalLink = message.externalLink;- }- if (message.dataSources?.length) {- obj.dataSources = message.dataSources.map((e) => DataSource.toJSON(e));- }- if (message.environment !== "") {- obj.environment = message.environment;- }- if (message.activation === true) {- obj.activation = message.activation;- }- if (message.options !== undefined) {- obj.options = InstanceOptions.toJSON(message.options);- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.state !== undefined && (obj.state = stateToJSON(message.state));+ message.title !== undefined && (obj.title = message.title);+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.engineVersion !== undefined && (obj.engineVersion = message.engineVersion);+ message.externalLink !== undefined && (obj.externalLink = message.externalLink);+ if (message.dataSources) {+ obj.dataSources = message.dataSources.map((e) => e ? DataSource.toJSON(e) : undefined);+ } else {+ obj.dataSources = [];+ }+ message.environment !== undefined && (obj.environment = message.environment);+ message.activation !== undefined && (obj.activation = message.activation);+ message.options !== undefined &&+ (obj.options = message.options ? InstanceOptions.toJSON(message.options) : undefined);return obj;},create(base?: DeepPartial<Instance>): Instance {return Instance.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Instance>): Instance {const message = createBaseInstance();message.name = object.name ?? "";@@ -1761,69 +1714,32 @@ export const DataSource = {toJSON(message: DataSource): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.type !== 0) {- obj.type = dataSourceTypeToJSON(message.type);- }- if (message.username !== "") {- obj.username = message.username;- }- if (message.password !== "") {- obj.password = message.password;- }- if (message.sslCa !== "") {- obj.sslCa = message.sslCa;- }- if (message.sslCert !== "") {- obj.sslCert = message.sslCert;- }- if (message.sslKey !== "") {- obj.sslKey = message.sslKey;- }- if (message.host !== "") {- obj.host = message.host;- }- if (message.port !== "") {- obj.port = message.port;- }- if (message.database !== "") {- obj.database = message.database;- }- if (message.srv === true) {- obj.srv = message.srv;- }- if (message.authenticationDatabase !== "") {- obj.authenticationDatabase = message.authenticationDatabase;- }- if (message.sid !== "") {- obj.sid = message.sid;- }- if (message.serviceName !== "") {- obj.serviceName = message.serviceName;- }- if (message.sshHost !== "") {- obj.sshHost = message.sshHost;- }- if (message.sshPort !== "") {- obj.sshPort = message.sshPort;- }- if (message.sshUser !== "") {- obj.sshUser = message.sshUser;- }- if (message.sshPassword !== "") {- obj.sshPassword = message.sshPassword;- }- if (message.sshPrivateKey !== "") {- obj.sshPrivateKey = message.sshPrivateKey;- }+ message.id !== undefined && (obj.id = message.id);+ message.type !== undefined && (obj.type = dataSourceTypeToJSON(message.type));+ message.username !== undefined && (obj.username = message.username);+ message.password !== undefined && (obj.password = message.password);+ message.sslCa !== undefined && (obj.sslCa = message.sslCa);+ message.sslCert !== undefined && (obj.sslCert = message.sslCert);+ message.sslKey !== undefined && (obj.sslKey = message.sslKey);+ message.host !== undefined && (obj.host = message.host);+ message.port !== undefined && (obj.port = message.port);+ message.database !== undefined && (obj.database = message.database);+ message.srv !== undefined && (obj.srv = message.srv);+ message.authenticationDatabase !== undefined && (obj.authenticationDatabase = message.authenticationDatabase);+ message.sid !== undefined && (obj.sid = message.sid);+ message.serviceName !== undefined && (obj.serviceName = message.serviceName);+ message.sshHost !== undefined && (obj.sshHost = message.sshHost);+ message.sshPort !== undefined && (obj.sshPort = message.sshPort);+ message.sshUser !== undefined && (obj.sshUser = message.sshUser);+ message.sshPassword !== undefined && (obj.sshPassword = message.sshPassword);+ message.sshPrivateKey !== undefined && (obj.sshPrivateKey = message.sshPrivateKey);return obj;},create(base?: DeepPartial<DataSource>): DataSource {return DataSource.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataSource>): DataSource {const message = createBaseDataSource();message.id = object.id ?? "";diff --git a/frontend/src/types/proto/v1/issue_service.ts b/frontend/src/types/proto/v1/issue_service.tsindex b3e6dd84bd..c804235edf 100644--- a/frontend/src/types/proto/v1/issue_service.ts+++ b/frontend/src/types/proto/v1/issue_service.ts@@ -600,18 +600,15 @@ export const GetIssueRequest = {toJSON(message: GetIssueRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.force === true) {- obj.force = message.force;- }+ message.name !== undefined && (obj.name = message.name);+ message.force !== undefined && (obj.force = message.force);return obj;},create(base?: DeepPartial<GetIssueRequest>): GetIssueRequest {return GetIssueRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetIssueRequest>): GetIssueRequest {const message = createBaseGetIssueRequest();message.name = object.name ?? "";@@ -674,18 +671,15 @@ export const CreateIssueRequest = {toJSON(message: CreateIssueRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.issue !== undefined) {- obj.issue = Issue.toJSON(message.issue);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.issue !== undefined && (obj.issue = message.issue ? Issue.toJSON(message.issue) : undefined);return obj;},create(base?: DeepPartial<CreateIssueRequest>): CreateIssueRequest {return CreateIssueRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateIssueRequest>): CreateIssueRequest {const message = createBaseCreateIssueRequest();message.parent = object.parent ?? "";@@ -770,24 +764,17 @@ export const ListIssuesRequest = {toJSON(message: ListIssuesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.filter !== "") {- obj.filter = message.filter;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.filter !== undefined && (obj.filter = message.filter);return obj;},create(base?: DeepPartial<ListIssuesRequest>): ListIssuesRequest {return ListIssuesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListIssuesRequest>): ListIssuesRequest {const message = createBaseListIssuesRequest();message.parent = object.parent ?? "";@@ -852,18 +839,19 @@ export const ListIssuesResponse = {toJSON(message: ListIssuesResponse): unknown {const obj: any = {};- if (message.issues?.length) {- obj.issues = message.issues.map((e) => Issue.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.issues) {+ obj.issues = message.issues.map((e) => e ? Issue.toJSON(e) : undefined);+ } else {+ obj.issues = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListIssuesResponse>): ListIssuesResponse {return ListIssuesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListIssuesResponse>): ListIssuesResponse {const message = createBaseListIssuesResponse();message.issues = object.issues?.map((e) => Issue.fromPartial(e)) || [];@@ -926,18 +914,15 @@ export const UpdateIssueRequest = {toJSON(message: UpdateIssueRequest): unknown {const obj: any = {};- if (message.issue !== undefined) {- obj.issue = Issue.toJSON(message.issue);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.issue !== undefined && (obj.issue = message.issue ? Issue.toJSON(message.issue) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateIssueRequest>): UpdateIssueRequest {return UpdateIssueRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateIssueRequest>): UpdateIssueRequest {const message = createBaseUpdateIssueRequest();message.issue = (object.issue !== undefined && object.issue !== null) ? Issue.fromPartial(object.issue) : undefined;@@ -1033,27 +1018,18 @@ export const SearchIssuesRequest = {toJSON(message: SearchIssuesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.query !== "") {- obj.query = message.query;- }- if (message.filter !== "") {- obj.filter = message.filter;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.query !== undefined && (obj.query = message.query);+ message.filter !== undefined && (obj.filter = message.filter);return obj;},create(base?: DeepPartial<SearchIssuesRequest>): SearchIssuesRequest {return SearchIssuesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchIssuesRequest>): SearchIssuesRequest {const message = createBaseSearchIssuesRequest();message.parent = object.parent ?? "";@@ -1119,18 +1095,19 @@ export const SearchIssuesResponse = {toJSON(message: SearchIssuesResponse): unknown {const obj: any = {};- if (message.issues?.length) {- obj.issues = message.issues.map((e) => Issue.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.issues) {+ obj.issues = message.issues.map((e) => e ? Issue.toJSON(e) : undefined);+ } else {+ obj.issues = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<SearchIssuesResponse>): SearchIssuesResponse {return SearchIssuesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchIssuesResponse>): SearchIssuesResponse {const message = createBaseSearchIssuesResponse();message.issues = object.issues?.map((e) => Issue.fromPartial(e)) || [];@@ -1193,11 +1170,11 @@ export const BatchUpdateIssuesRequest = {toJSON(message: BatchUpdateIssuesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.requests?.length) {- obj.requests = message.requests.map((e) => UpdateIssueRequest.toJSON(e));+ message.parent !== undefined && (obj.parent = message.parent);+ if (message.requests) {+ obj.requests = message.requests.map((e) => e ? UpdateIssueRequest.toJSON(e) : undefined);+ } else {+ obj.requests = [];}return obj;},@@ -1205,6 +1182,7 @@ export const BatchUpdateIssuesRequest = {create(base?: DeepPartial<BatchUpdateIssuesRequest>): BatchUpdateIssuesRequest {return BatchUpdateIssuesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchUpdateIssuesRequest>): BatchUpdateIssuesRequest {const message = createBaseBatchUpdateIssuesRequest();message.parent = object.parent ?? "";@@ -1254,8 +1232,10 @@ export const BatchUpdateIssuesResponse = {toJSON(message: BatchUpdateIssuesResponse): unknown {const obj: any = {};- if (message.issues?.length) {- obj.issues = message.issues.map((e) => Issue.toJSON(e));+ if (message.issues) {+ obj.issues = message.issues.map((e) => e ? Issue.toJSON(e) : undefined);+ } else {+ obj.issues = [];}return obj;},@@ -1263,6 +1243,7 @@ export const BatchUpdateIssuesResponse = {create(base?: DeepPartial<BatchUpdateIssuesResponse>): BatchUpdateIssuesResponse {return BatchUpdateIssuesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchUpdateIssuesResponse>): BatchUpdateIssuesResponse {const message = createBaseBatchUpdateIssuesResponse();message.issues = object.issues?.map((e) => Issue.fromPartial(e)) || [];@@ -1324,18 +1305,15 @@ export const ApproveIssueRequest = {toJSON(message: ApproveIssueRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.comment !== "") {- obj.comment = message.comment;- }+ message.name !== undefined && (obj.name = message.name);+ message.comment !== undefined && (obj.comment = message.comment);return obj;},create(base?: DeepPartial<ApproveIssueRequest>): ApproveIssueRequest {return ApproveIssueRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApproveIssueRequest>): ApproveIssueRequest {const message = createBaseApproveIssueRequest();message.name = object.name ?? "";@@ -1398,18 +1376,15 @@ export const RejectIssueRequest = {toJSON(message: RejectIssueRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.comment !== "") {- obj.comment = message.comment;- }+ message.name !== undefined && (obj.name = message.name);+ message.comment !== undefined && (obj.comment = message.comment);return obj;},create(base?: DeepPartial<RejectIssueRequest>): RejectIssueRequest {return RejectIssueRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RejectIssueRequest>): RejectIssueRequest {const message = createBaseRejectIssueRequest();message.name = object.name ?? "";@@ -1472,18 +1447,15 @@ export const RequestIssueRequest = {toJSON(message: RequestIssueRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.comment !== "") {- obj.comment = message.comment;- }+ message.name !== undefined && (obj.name = message.name);+ message.comment !== undefined && (obj.comment = message.comment);return obj;},create(base?: DeepPartial<RequestIssueRequest>): RequestIssueRequest {return RequestIssueRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RequestIssueRequest>): RequestIssueRequest {const message = createBaseRequestIssueRequest();message.name = object.name ?? "";@@ -1743,66 +1715,43 @@ export const Issue = {toJSON(message: Issue): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.type !== 0) {- obj.type = issue_TypeToJSON(message.type);- }- if (message.status !== 0) {- obj.status = issueStatusToJSON(message.status);- }- if (message.assignee !== "") {- obj.assignee = message.assignee;- }- if (message.assigneeAttention === true) {- obj.assigneeAttention = message.assigneeAttention;- }- if (message.approvers?.length) {- obj.approvers = message.approvers.map((e) => Issue_Approver.toJSON(e));- }- if (message.approvalTemplates?.length) {- obj.approvalTemplates = message.approvalTemplates.map((e) => ApprovalTemplate.toJSON(e));- }- if (message.approvalFindingDone === true) {- obj.approvalFindingDone = message.approvalFindingDone;- }- if (message.approvalFindingError !== "") {- obj.approvalFindingError = message.approvalFindingError;- }- if (message.subscribers?.length) {- obj.subscribers = message.subscribers;- }- if (message.creator !== "") {- obj.creator = message.creator;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }- if (message.plan !== "") {- obj.plan = message.plan;- }- if (message.rollout !== "") {- obj.rollout = message.rollout;- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ message.type !== undefined && (obj.type = issue_TypeToJSON(message.type));+ message.status !== undefined && (obj.status = issueStatusToJSON(message.status));+ message.assignee !== undefined && (obj.assignee = message.assignee);+ message.assigneeAttention !== undefined && (obj.assigneeAttention = message.assigneeAttention);+ if (message.approvers) {+ obj.approvers = message.approvers.map((e) => e ? Issue_Approver.toJSON(e) : undefined);+ } else {+ obj.approvers = [];+ }+ if (message.approvalTemplates) {+ obj.approvalTemplates = message.approvalTemplates.map((e) => e ? ApprovalTemplate.toJSON(e) : undefined);+ } else {+ obj.approvalTemplates = [];+ }+ message.approvalFindingDone !== undefined && (obj.approvalFindingDone = message.approvalFindingDone);+ message.approvalFindingError !== undefined && (obj.approvalFindingError = message.approvalFindingError);+ if (message.subscribers) {+ obj.subscribers = message.subscribers.map((e) => e);+ } else {+ obj.subscribers = [];+ }+ message.creator !== undefined && (obj.creator = message.creator);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());+ message.plan !== undefined && (obj.plan = message.plan);+ message.rollout !== undefined && (obj.rollout = message.rollout);return obj;},create(base?: DeepPartial<Issue>): Issue {return Issue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Issue>): Issue {const message = createBaseIssue();message.name = object.name ?? "";@@ -1881,18 +1830,15 @@ export const Issue_Approver = {toJSON(message: Issue_Approver): unknown {const obj: any = {};- if (message.status !== 0) {- obj.status = issue_Approver_StatusToJSON(message.status);- }- if (message.principal !== "") {- obj.principal = message.principal;- }+ message.status !== undefined && (obj.status = issue_Approver_StatusToJSON(message.status));+ message.principal !== undefined && (obj.principal = message.principal);return obj;},create(base?: DeepPartial<Issue_Approver>): Issue_Approver {return Issue_Approver.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Issue_Approver>): Issue_Approver {const message = createBaseIssue_Approver();message.status = object.status ?? 0;@@ -1977,24 +1923,17 @@ export const ApprovalTemplate = {toJSON(message: ApprovalTemplate): unknown {const obj: any = {};- if (message.flow !== undefined) {- obj.flow = ApprovalFlow.toJSON(message.flow);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.creator !== "") {- obj.creator = message.creator;- }+ message.flow !== undefined && (obj.flow = message.flow ? ApprovalFlow.toJSON(message.flow) : undefined);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ message.creator !== undefined && (obj.creator = message.creator);return obj;},create(base?: DeepPartial<ApprovalTemplate>): ApprovalTemplate {return ApprovalTemplate.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApprovalTemplate>): ApprovalTemplate {const message = createBaseApprovalTemplate();message.flow = (object.flow !== undefined && object.flow !== null)@@ -2048,8 +1987,10 @@ export const ApprovalFlow = {toJSON(message: ApprovalFlow): unknown {const obj: any = {};- if (message.steps?.length) {- obj.steps = message.steps.map((e) => ApprovalStep.toJSON(e));+ if (message.steps) {+ obj.steps = message.steps.map((e) => e ? ApprovalStep.toJSON(e) : undefined);+ } else {+ obj.steps = [];}return obj;},@@ -2057,6 +1998,7 @@ export const ApprovalFlow = {create(base?: DeepPartial<ApprovalFlow>): ApprovalFlow {return ApprovalFlow.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApprovalFlow>): ApprovalFlow {const message = createBaseApprovalFlow();message.steps = object.steps?.map((e) => ApprovalStep.fromPartial(e)) || [];@@ -2118,11 +2060,11 @@ export const ApprovalStep = {toJSON(message: ApprovalStep): unknown {const obj: any = {};- if (message.type !== 0) {- obj.type = approvalStep_TypeToJSON(message.type);- }- if (message.nodes?.length) {- obj.nodes = message.nodes.map((e) => ApprovalNode.toJSON(e));+ message.type !== undefined && (obj.type = approvalStep_TypeToJSON(message.type));+ if (message.nodes) {+ obj.nodes = message.nodes.map((e) => e ? ApprovalNode.toJSON(e) : undefined);+ } else {+ obj.nodes = [];}return obj;},@@ -2130,6 +2072,7 @@ export const ApprovalStep = {create(base?: DeepPartial<ApprovalStep>): ApprovalStep {return ApprovalStep.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApprovalStep>): ApprovalStep {const message = createBaseApprovalStep();message.type = object.type ?? 0;@@ -2214,24 +2157,20 @@ export const ApprovalNode = {toJSON(message: ApprovalNode): unknown {const obj: any = {};- if (message.type !== 0) {- obj.type = approvalNode_TypeToJSON(message.type);- }- if (message.groupValue !== undefined) {- obj.groupValue = approvalNode_GroupValueToJSON(message.groupValue);- }- if (message.role !== undefined) {- obj.role = message.role;- }- if (message.externalNodeId !== undefined) {- obj.externalNodeId = message.externalNodeId;- }+ message.type !== undefined && (obj.type = approvalNode_TypeToJSON(message.type));+ message.groupValue !== undefined &&+ (obj.groupValue = message.groupValue !== undefined+ ? approvalNode_GroupValueToJSON(message.groupValue)+ : undefined);+ message.role !== undefined && (obj.role = message.role);+ message.externalNodeId !== undefined && (obj.externalNodeId = message.externalNodeId);return obj;},create(base?: DeepPartial<ApprovalNode>): ApprovalNode {return ApprovalNode.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ApprovalNode>): ApprovalNode {const message = createBaseApprovalNode();message.type = object.type ?? 0;@@ -2296,18 +2235,16 @@ export const CreateIssueCommentRequest = {toJSON(message: CreateIssueCommentRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.issueComment !== undefined) {- obj.issueComment = IssueComment.toJSON(message.issueComment);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.issueComment !== undefined &&+ (obj.issueComment = message.issueComment ? IssueComment.toJSON(message.issueComment) : undefined);return obj;},create(base?: DeepPartial<CreateIssueCommentRequest>): CreateIssueCommentRequest {return CreateIssueCommentRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateIssueCommentRequest>): CreateIssueCommentRequest {const message = createBaseCreateIssueCommentRequest();message.parent = object.parent ?? "";@@ -2383,21 +2320,17 @@ export const UpdateIssueCommentRequest = {toJSON(message: UpdateIssueCommentRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.issueComment !== undefined) {- obj.issueComment = IssueComment.toJSON(message.issueComment);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.issueComment !== undefined &&+ (obj.issueComment = message.issueComment ? IssueComment.toJSON(message.issueComment) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateIssueCommentRequest>): UpdateIssueCommentRequest {return UpdateIssueCommentRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateIssueCommentRequest>): UpdateIssueCommentRequest {const message = createBaseUpdateIssueCommentRequest();message.parent = object.parent ?? "";@@ -2496,27 +2429,18 @@ export const IssueComment = {toJSON(message: IssueComment): unknown {const obj: any = {};- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.comment !== "") {- obj.comment = message.comment;- }- if (message.payload !== "") {- obj.payload = message.payload;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }+ message.uid !== undefined && (obj.uid = message.uid);+ message.comment !== undefined && (obj.comment = message.comment);+ message.payload !== undefined && (obj.payload = message.payload);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());return obj;},create(base?: DeepPartial<IssueComment>): IssueComment {return IssueComment.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<IssueComment>): IssueComment {const message = createBaseIssueComment();message.uid = object.uid ?? "";diff --git a/frontend/src/types/proto/v1/logging_service.ts b/frontend/src/types/proto/v1/logging_service.tsindex ca1ccafa32..6889c02185 100644--- a/frontend/src/types/proto/v1/logging_service.ts+++ b/frontend/src/types/proto/v1/logging_service.ts@@ -426,24 +426,17 @@ export const ListLogsRequest = {toJSON(message: ListLogsRequest): unknown {const obj: any = {};- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.orderBy !== "") {- obj.orderBy = message.orderBy;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.filter !== undefined && (obj.filter = message.filter);+ message.orderBy !== undefined && (obj.orderBy = message.orderBy);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListLogsRequest>): ListLogsRequest {return ListLogsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListLogsRequest>): ListLogsRequest {const message = createBaseListLogsRequest();message.filter = object.filter ?? "";@@ -508,18 +501,19 @@ export const ListLogsResponse = {toJSON(message: ListLogsResponse): unknown {const obj: any = {};- if (message.logEntities?.length) {- obj.logEntities = message.logEntities.map((e) => LogEntity.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.logEntities) {+ obj.logEntities = message.logEntities.map((e) => e ? LogEntity.toJSON(e) : undefined);+ } else {+ obj.logEntities = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListLogsResponse>): ListLogsResponse {return ListLogsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListLogsResponse>): ListLogsResponse {const message = createBaseListLogsResponse();message.logEntities = object.logEntities?.map((e) => LogEntity.fromPartial(e)) || [];@@ -569,15 +563,14 @@ export const GetLogRequest = {toJSON(message: GetLogRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetLogRequest>): GetLogRequest {return GetLogRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetLogRequest>): GetLogRequest {const message = createBaseGetLogRequest();message.name = object.name ?? "";@@ -726,39 +719,22 @@ export const LogEntity = {toJSON(message: LogEntity): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.creator !== "") {- obj.creator = message.creator;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }- if (message.action !== 0) {- obj.action = logEntity_ActionToJSON(message.action);- }- if (message.level !== 0) {- obj.level = logEntity_LevelToJSON(message.level);- }- if (message.resource !== "") {- obj.resource = message.resource;- }- if (message.payload !== "") {- obj.payload = message.payload;- }- if (message.comment !== "") {- obj.comment = message.comment;- }+ message.name !== undefined && (obj.name = message.name);+ message.creator !== undefined && (obj.creator = message.creator);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());+ message.action !== undefined && (obj.action = logEntity_ActionToJSON(message.action));+ message.level !== undefined && (obj.level = logEntity_LevelToJSON(message.level));+ message.resource !== undefined && (obj.resource = message.resource);+ message.payload !== undefined && (obj.payload = message.payload);+ message.comment !== undefined && (obj.comment = message.comment);return obj;},create(base?: DeepPartial<LogEntity>): LogEntity {return LogEntity.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<LogEntity>): LogEntity {const message = createBaseLogEntity();message.name = object.name ?? "";diff --git a/frontend/src/types/proto/v1/org_policy_service.ts b/frontend/src/types/proto/v1/org_policy_service.tsindex 2210d6c9ed..4218678fc0 100644--- a/frontend/src/types/proto/v1/org_policy_service.ts+++ b/frontend/src/types/proto/v1/org_policy_service.ts@@ -618,21 +618,16 @@ export const CreatePolicyRequest = {toJSON(message: CreatePolicyRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.policy !== undefined) {- obj.policy = Policy.toJSON(message.policy);- }- if (message.type !== 0) {- obj.type = policyTypeToJSON(message.type);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.policy !== undefined && (obj.policy = message.policy ? Policy.toJSON(message.policy) : undefined);+ message.type !== undefined && (obj.type = policyTypeToJSON(message.type));return obj;},create(base?: DeepPartial<CreatePolicyRequest>): CreatePolicyRequest {return CreatePolicyRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreatePolicyRequest>): CreatePolicyRequest {const message = createBaseCreatePolicyRequest();message.parent = object.parent ?? "";@@ -709,21 +704,16 @@ export const UpdatePolicyRequest = {toJSON(message: UpdatePolicyRequest): unknown {const obj: any = {};- if (message.policy !== undefined) {- obj.policy = Policy.toJSON(message.policy);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }- if (message.allowMissing === true) {- obj.allowMissing = message.allowMissing;- }+ message.policy !== undefined && (obj.policy = message.policy ? Policy.toJSON(message.policy) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));+ message.allowMissing !== undefined && (obj.allowMissing = message.allowMissing);return obj;},create(base?: DeepPartial<UpdatePolicyRequest>): UpdatePolicyRequest {return UpdatePolicyRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdatePolicyRequest>): UpdatePolicyRequest {const message = createBaseUpdatePolicyRequest();message.policy = (object.policy !== undefined && object.policy !== null)@@ -776,15 +766,14 @@ export const DeletePolicyRequest = {toJSON(message: DeletePolicyRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeletePolicyRequest>): DeletePolicyRequest {return DeletePolicyRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeletePolicyRequest>): DeletePolicyRequest {const message = createBaseDeletePolicyRequest();message.name = object.name ?? "";@@ -833,15 +822,14 @@ export const GetPolicyRequest = {toJSON(message: GetPolicyRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetPolicyRequest>): GetPolicyRequest {return GetPolicyRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetPolicyRequest>): GetPolicyRequest {const message = createBaseGetPolicyRequest();message.name = object.name ?? "";@@ -936,27 +924,19 @@ export const ListPoliciesRequest = {toJSON(message: ListPoliciesRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.policyType !== undefined) {- obj.policyType = policyTypeToJSON(message.policyType);- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.showDeleted === true) {- obj.showDeleted = message.showDeleted;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.policyType !== undefined &&+ (obj.policyType = message.policyType !== undefined ? policyTypeToJSON(message.policyType) : undefined);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);return obj;},create(base?: DeepPartial<ListPoliciesRequest>): ListPoliciesRequest {return ListPoliciesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListPoliciesRequest>): ListPoliciesRequest {const message = createBaseListPoliciesRequest();message.parent = object.parent ?? "";@@ -1022,18 +1002,19 @@ export const ListPoliciesResponse = {toJSON(message: ListPoliciesResponse): unknown {const obj: any = {};- if (message.policies?.length) {- obj.policies = message.policies.map((e) => Policy.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.policies) {+ obj.policies = message.policies.map((e) => e ? Policy.toJSON(e) : undefined);+ } else {+ obj.policies = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListPoliciesResponse>): ListPoliciesResponse {return ListPoliciesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListPoliciesResponse>): ListPoliciesResponse {const message = createBaseListPoliciesResponse();message.policies = object.policies?.map((e) => Policy.fromPartial(e)) || [];@@ -1275,60 +1256,42 @@ export const Policy = {toJSON(message: Policy): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.inheritFromParent === true) {- obj.inheritFromParent = message.inheritFromParent;- }- if (message.type !== 0) {- obj.type = policyTypeToJSON(message.type);- }- if (message.workspaceIamPolicy !== undefined) {- obj.workspaceIamPolicy = IamPolicy.toJSON(message.workspaceIamPolicy);- }- if (message.deploymentApprovalPolicy !== undefined) {- obj.deploymentApprovalPolicy = DeploymentApprovalPolicy.toJSON(message.deploymentApprovalPolicy);- }- if (message.backupPlanPolicy !== undefined) {- obj.backupPlanPolicy = BackupPlanPolicy.toJSON(message.backupPlanPolicy);- }- if (message.maskingPolicy !== undefined) {- obj.maskingPolicy = MaskingPolicy.toJSON(message.maskingPolicy);- }- if (message.sqlReviewPolicy !== undefined) {- obj.sqlReviewPolicy = SQLReviewPolicy.toJSON(message.sqlReviewPolicy);- }- if (message.slowQueryPolicy !== undefined) {- obj.slowQueryPolicy = SlowQueryPolicy.toJSON(message.slowQueryPolicy);- }- if (message.disableCopyDataPolicy !== undefined) {- obj.disableCopyDataPolicy = DisableCopyDataPolicy.toJSON(message.disableCopyDataPolicy);- }- if (message.maskingRulePolicy !== undefined) {- obj.maskingRulePolicy = MaskingRulePolicy.toJSON(message.maskingRulePolicy);- }- if (message.maskingExceptionPolicy !== undefined) {- obj.maskingExceptionPolicy = MaskingExceptionPolicy.toJSON(message.maskingExceptionPolicy);- }- if (message.enforce === true) {- obj.enforce = message.enforce;- }- if (message.resourceType !== 0) {- obj.resourceType = policyResourceTypeToJSON(message.resourceType);- }- if (message.resourceUid !== "") {- obj.resourceUid = message.resourceUid;- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.inheritFromParent !== undefined && (obj.inheritFromParent = message.inheritFromParent);+ message.type !== undefined && (obj.type = policyTypeToJSON(message.type));+ message.workspaceIamPolicy !== undefined &&+ (obj.workspaceIamPolicy = message.workspaceIamPolicy ? IamPolicy.toJSON(message.workspaceIamPolicy) : undefined);+ message.deploymentApprovalPolicy !== undefined && (obj.deploymentApprovalPolicy = message.deploymentApprovalPolicy+ ? DeploymentApprovalPolicy.toJSON(message.deploymentApprovalPolicy)+ : undefined);+ message.backupPlanPolicy !== undefined &&+ (obj.backupPlanPolicy = message.backupPlanPolicy ? BackupPlanPolicy.toJSON(message.backupPlanPolicy) : undefined);+ message.maskingPolicy !== undefined &&+ (obj.maskingPolicy = message.maskingPolicy ? MaskingPolicy.toJSON(message.maskingPolicy) : undefined);+ message.sqlReviewPolicy !== undefined &&+ (obj.sqlReviewPolicy = message.sqlReviewPolicy ? SQLReviewPolicy.toJSON(message.sqlReviewPolicy) : undefined);+ message.slowQueryPolicy !== undefined &&+ (obj.slowQueryPolicy = message.slowQueryPolicy ? SlowQueryPolicy.toJSON(message.slowQueryPolicy) : undefined);+ message.disableCopyDataPolicy !== undefined && (obj.disableCopyDataPolicy = message.disableCopyDataPolicy+ ? DisableCopyDataPolicy.toJSON(message.disableCopyDataPolicy)+ : undefined);+ message.maskingRulePolicy !== undefined && (obj.maskingRulePolicy = message.maskingRulePolicy+ ? MaskingRulePolicy.toJSON(message.maskingRulePolicy)+ : undefined);+ message.maskingExceptionPolicy !== undefined && (obj.maskingExceptionPolicy = message.maskingExceptionPolicy+ ? MaskingExceptionPolicy.toJSON(message.maskingExceptionPolicy)+ : undefined);+ message.enforce !== undefined && (obj.enforce = message.enforce);+ message.resourceType !== undefined && (obj.resourceType = policyResourceTypeToJSON(message.resourceType));+ message.resourceUid !== undefined && (obj.resourceUid = message.resourceUid);return obj;},create(base?: DeepPartial<Policy>): Policy {return Policy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Policy>): Policy {const message = createBasePolicy();message.name = object.name ?? "";@@ -1428,13 +1391,13 @@ export const DeploymentApprovalPolicy = {toJSON(message: DeploymentApprovalPolicy): unknown {const obj: any = {};- if (message.defaultStrategy !== 0) {- obj.defaultStrategy = approvalStrategyToJSON(message.defaultStrategy);- }- if (message.deploymentApprovalStrategies?.length) {+ message.defaultStrategy !== undefined && (obj.defaultStrategy = approvalStrategyToJSON(message.defaultStrategy));+ if (message.deploymentApprovalStrategies) {obj.deploymentApprovalStrategies = message.deploymentApprovalStrategies.map((e) =>- DeploymentApprovalStrategy.toJSON(e)+ e ? DeploymentApprovalStrategy.toJSON(e) : undefined);+ } else {+ obj.deploymentApprovalStrategies = [];}return obj;},@@ -1442,6 +1405,7 @@ export const DeploymentApprovalPolicy = {create(base?: DeepPartial<DeploymentApprovalPolicy>): DeploymentApprovalPolicy {return DeploymentApprovalPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeploymentApprovalPolicy>): DeploymentApprovalPolicy {const message = createBaseDeploymentApprovalPolicy();message.defaultStrategy = object.defaultStrategy ?? 0;@@ -1516,21 +1480,16 @@ export const DeploymentApprovalStrategy = {toJSON(message: DeploymentApprovalStrategy): unknown {const obj: any = {};- if (message.deploymentType !== 0) {- obj.deploymentType = deploymentTypeToJSON(message.deploymentType);- }- if (message.approvalGroup !== 0) {- obj.approvalGroup = approvalGroupToJSON(message.approvalGroup);- }- if (message.approvalStrategy !== 0) {- obj.approvalStrategy = approvalStrategyToJSON(message.approvalStrategy);- }+ message.deploymentType !== undefined && (obj.deploymentType = deploymentTypeToJSON(message.deploymentType));+ message.approvalGroup !== undefined && (obj.approvalGroup = approvalGroupToJSON(message.approvalGroup));+ message.approvalStrategy !== undefined && (obj.approvalStrategy = approvalStrategyToJSON(message.approvalStrategy));return obj;},create(base?: DeepPartial<DeploymentApprovalStrategy>): DeploymentApprovalStrategy {return DeploymentApprovalStrategy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeploymentApprovalStrategy>): DeploymentApprovalStrategy {const message = createBaseDeploymentApprovalStrategy();message.deploymentType = object.deploymentType ?? 0;@@ -1594,18 +1553,16 @@ export const BackupPlanPolicy = {toJSON(message: BackupPlanPolicy): unknown {const obj: any = {};- if (message.schedule !== 0) {- obj.schedule = backupPlanScheduleToJSON(message.schedule);- }- if (message.retentionDuration !== undefined) {- obj.retentionDuration = Duration.toJSON(message.retentionDuration);- }+ message.schedule !== undefined && (obj.schedule = backupPlanScheduleToJSON(message.schedule));+ message.retentionDuration !== undefined &&+ (obj.retentionDuration = message.retentionDuration ? Duration.toJSON(message.retentionDuration) : undefined);return obj;},create(base?: DeepPartial<BackupPlanPolicy>): BackupPlanPolicy {return BackupPlanPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BackupPlanPolicy>): BackupPlanPolicy {const message = createBaseBackupPlanPolicy();message.schedule = object.schedule ?? 0;@@ -1657,15 +1614,14 @@ export const SlowQueryPolicy = {toJSON(message: SlowQueryPolicy): unknown {const obj: any = {};- if (message.active === true) {- obj.active = message.active;- }+ message.active !== undefined && (obj.active = message.active);return obj;},create(base?: DeepPartial<SlowQueryPolicy>): SlowQueryPolicy {return SlowQueryPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SlowQueryPolicy>): SlowQueryPolicy {const message = createBaseSlowQueryPolicy();message.active = object.active ?? false;@@ -1714,15 +1670,14 @@ export const DisableCopyDataPolicy = {toJSON(message: DisableCopyDataPolicy): unknown {const obj: any = {};- if (message.active === true) {- obj.active = message.active;- }+ message.active !== undefined && (obj.active = message.active);return obj;},create(base?: DeepPartial<DisableCopyDataPolicy>): DisableCopyDataPolicy {return DisableCopyDataPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DisableCopyDataPolicy>): DisableCopyDataPolicy {const message = createBaseDisableCopyDataPolicy();message.active = object.active ?? false;@@ -1771,8 +1726,10 @@ export const MaskingPolicy = {toJSON(message: MaskingPolicy): unknown {const obj: any = {};- if (message.maskData?.length) {- obj.maskData = message.maskData.map((e) => MaskData.toJSON(e));+ if (message.maskData) {+ obj.maskData = message.maskData.map((e) => e ? MaskData.toJSON(e) : undefined);+ } else {+ obj.maskData = [];}return obj;},@@ -1780,6 +1737,7 @@ export const MaskingPolicy = {create(base?: DeepPartial<MaskingPolicy>): MaskingPolicy {return MaskingPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MaskingPolicy>): MaskingPolicy {const message = createBaseMaskingPolicy();message.maskData = object.maskData?.map((e) => MaskData.fromPartial(e)) || [];@@ -1874,27 +1832,18 @@ export const MaskData = {toJSON(message: MaskData): unknown {const obj: any = {};- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.table !== "") {- obj.table = message.table;- }- if (message.column !== "") {- obj.column = message.column;- }- if (message.semanticCategoryId !== "") {- obj.semanticCategoryId = message.semanticCategoryId;- }- if (message.maskingLevel !== 0) {- obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);- }+ message.schema !== undefined && (obj.schema = message.schema);+ message.table !== undefined && (obj.table = message.table);+ message.column !== undefined && (obj.column = message.column);+ message.semanticCategoryId !== undefined && (obj.semanticCategoryId = message.semanticCategoryId);+ message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));return obj;},create(base?: DeepPartial<MaskData>): MaskData {return MaskData.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MaskData>): MaskData {const message = createBaseMaskData();message.schema = object.schema ?? "";@@ -1960,11 +1909,11 @@ export const SQLReviewPolicy = {toJSON(message: SQLReviewPolicy): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.rules?.length) {- obj.rules = message.rules.map((e) => SQLReviewRule.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ if (message.rules) {+ obj.rules = message.rules.map((e) => e ? SQLReviewRule.toJSON(e) : undefined);+ } else {+ obj.rules = [];}return obj;},@@ -1972,6 +1921,7 @@ export const SQLReviewPolicy = {create(base?: DeepPartial<SQLReviewPolicy>): SQLReviewPolicy {return SQLReviewPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SQLReviewPolicy>): SQLReviewPolicy {const message = createBaseSQLReviewPolicy();message.name = object.name ?? "";@@ -2067,27 +2017,18 @@ export const SQLReviewRule = {toJSON(message: SQLReviewRule): unknown {const obj: any = {};- if (message.type !== "") {- obj.type = message.type;- }- if (message.level !== 0) {- obj.level = sQLReviewRuleLevelToJSON(message.level);- }- if (message.payload !== "") {- obj.payload = message.payload;- }- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.comment !== "") {- obj.comment = message.comment;- }+ message.type !== undefined && (obj.type = message.type);+ message.level !== undefined && (obj.level = sQLReviewRuleLevelToJSON(message.level));+ message.payload !== undefined && (obj.payload = message.payload);+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.comment !== undefined && (obj.comment = message.comment);return obj;},create(base?: DeepPartial<SQLReviewRule>): SQLReviewRule {return SQLReviewRule.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SQLReviewRule>): SQLReviewRule {const message = createBaseSQLReviewRule();message.type = object.type ?? "";@@ -2144,8 +2085,12 @@ export const MaskingExceptionPolicy = {toJSON(message: MaskingExceptionPolicy): unknown {const obj: any = {};- if (message.maskingExceptions?.length) {- obj.maskingExceptions = message.maskingExceptions.map((e) => MaskingExceptionPolicy_MaskingException.toJSON(e));+ if (message.maskingExceptions) {+ obj.maskingExceptions = message.maskingExceptions.map((e) =>+ e ? MaskingExceptionPolicy_MaskingException.toJSON(e) : undefined+ );+ } else {+ obj.maskingExceptions = [];}return obj;},@@ -2153,6 +2098,7 @@ export const MaskingExceptionPolicy = {create(base?: DeepPartial<MaskingExceptionPolicy>): MaskingExceptionPolicy {return MaskingExceptionPolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MaskingExceptionPolicy>): MaskingExceptionPolicy {const message = createBaseMaskingExceptionPolicy();message.maskingExceptions =@@ -2237,24 +2183,21 @@ export const MaskingExceptionPolicy_MaskingException = {toJSON(message: MaskingExceptionPolicy_MaskingException): unknown {const obj: any = {};- if (message.action !== 0) {- obj.action = maskingExceptionPolicy_MaskingException_ActionToJSON(message.action);- }- if (message.maskingLevel !== 0) {- obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);- }- if (message.members?.length) {- obj.members = message.members;- }- if (message.condition !== undefined) {- obj.condition = Expr.toJSON(message.condition);- }+ message.action !== undefined && (obj.action = maskingExceptionPolicy_MaskingException_ActionToJSON(message.action));+ message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));+ if (message.members) {+ obj.members = message.members.map((e) => e);+ } else {+ obj.members = [];+ }+ message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);return obj;},create(base?: DeepPartial<MaskingExceptionPolicy_MaskingException>): MaskingExceptionPolicy_MaskingException {return MaskingExceptionPolicy_MaskingException.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MaskingExceptionPolicy_MaskingException>): MaskingExceptionPolicy_MaskingException {const message = createBaseMaskingExceptionPolicy_MaskingException();message.action = object.action ?? 0;@@ -2312,8 +2255,10 @@ export const MaskingRulePolicy = {toJSON(message: MaskingRulePolicy): unknown {const obj: any = {};- if (message.rules?.length) {- obj.rules = message.rules.map((e) => MaskingRulePolicy_MaskingRule.toJSON(e));+ if (message.rules) {+ obj.rules = message.rules.map((e) => e ? MaskingRulePolicy_MaskingRule.toJSON(e) : undefined);+ } else {+ obj.rules = [];}return obj;},@@ -2321,6 +2266,7 @@ export const MaskingRulePolicy = {create(base?: DeepPartial<MaskingRulePolicy>): MaskingRulePolicy {return MaskingRulePolicy.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MaskingRulePolicy>): MaskingRulePolicy {const message = createBaseMaskingRulePolicy();message.rules = object.rules?.map((e) => MaskingRulePolicy_MaskingRule.fromPartial(e)) || [];@@ -2382,18 +2328,15 @@ export const MaskingRulePolicy_MaskingRule = {toJSON(message: MaskingRulePolicy_MaskingRule): unknown {const obj: any = {};- if (message.condition !== undefined) {- obj.condition = Expr.toJSON(message.condition);- }- if (message.maskingLevel !== 0) {- obj.maskingLevel = maskingLevelToJSON(message.maskingLevel);- }+ message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);+ message.maskingLevel !== undefined && (obj.maskingLevel = maskingLevelToJSON(message.maskingLevel));return obj;},create(base?: DeepPartial<MaskingRulePolicy_MaskingRule>): MaskingRulePolicy_MaskingRule {return MaskingRulePolicy_MaskingRule.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MaskingRulePolicy_MaskingRule>): MaskingRulePolicy_MaskingRule {const message = createBaseMaskingRulePolicy_MaskingRule();message.condition = (object.condition !== undefined && object.condition !== null)diff --git a/frontend/src/types/proto/v1/project_service.ts b/frontend/src/types/proto/v1/project_service.tsindex 5a68b3ae51..27e01e12ff 100644--- a/frontend/src/types/proto/v1/project_service.ts+++ b/frontend/src/types/proto/v1/project_service.ts@@ -1209,15 +1209,14 @@ export const GetProjectRequest = {toJSON(message: GetProjectRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetProjectRequest>): GetProjectRequest {return GetProjectRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetProjectRequest>): GetProjectRequest {const message = createBaseGetProjectRequest();message.name = object.name ?? "";@@ -1290,21 +1289,16 @@ export const ListProjectsRequest = {toJSON(message: ListProjectsRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.showDeleted === true) {- obj.showDeleted = message.showDeleted;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.showDeleted !== undefined && (obj.showDeleted = message.showDeleted);return obj;},create(base?: DeepPartial<ListProjectsRequest>): ListProjectsRequest {return ListProjectsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListProjectsRequest>): ListProjectsRequest {const message = createBaseListProjectsRequest();message.pageSize = object.pageSize ?? 0;@@ -1368,18 +1362,19 @@ export const ListProjectsResponse = {toJSON(message: ListProjectsResponse): unknown {const obj: any = {};- if (message.projects?.length) {- obj.projects = message.projects.map((e) => Project.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.projects) {+ obj.projects = message.projects.map((e) => e ? Project.toJSON(e) : undefined);+ } else {+ obj.projects = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListProjectsResponse>): ListProjectsResponse {return ListProjectsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListProjectsResponse>): ListProjectsResponse {const message = createBaseListProjectsResponse();message.projects = object.projects?.map((e) => Project.fromPartial(e)) || [];@@ -1453,21 +1448,16 @@ export const SearchProjectsRequest = {toJSON(message: SearchProjectsRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }- if (message.filter !== "") {- obj.filter = message.filter;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);+ message.filter !== undefined && (obj.filter = message.filter);return obj;},create(base?: DeepPartial<SearchProjectsRequest>): SearchProjectsRequest {return SearchProjectsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchProjectsRequest>): SearchProjectsRequest {const message = createBaseSearchProjectsRequest();message.pageSize = object.pageSize ?? 0;@@ -1531,18 +1521,19 @@ export const SearchProjectsResponse = {toJSON(message: SearchProjectsResponse): unknown {const obj: any = {};- if (message.projects?.length) {- obj.projects = message.projects.map((e) => Project.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.projects) {+ obj.projects = message.projects.map((e) => e ? Project.toJSON(e) : undefined);+ } else {+ obj.projects = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<SearchProjectsResponse>): SearchProjectsResponse {return SearchProjectsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchProjectsResponse>): SearchProjectsResponse {const message = createBaseSearchProjectsResponse();message.projects = object.projects?.map((e) => Project.fromPartial(e)) || [];@@ -1605,18 +1596,15 @@ export const CreateProjectRequest = {toJSON(message: CreateProjectRequest): unknown {const obj: any = {};- if (message.project !== undefined) {- obj.project = Project.toJSON(message.project);- }- if (message.projectId !== "") {- obj.projectId = message.projectId;- }+ message.project !== undefined && (obj.project = message.project ? Project.toJSON(message.project) : undefined);+ message.projectId !== undefined && (obj.projectId = message.projectId);return obj;},create(base?: DeepPartial<CreateProjectRequest>): CreateProjectRequest {return CreateProjectRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateProjectRequest>): CreateProjectRequest {const message = createBaseCreateProjectRequest();message.project = (object.project !== undefined && object.project !== null)@@ -1681,18 +1669,15 @@ export const UpdateProjectRequest = {toJSON(message: UpdateProjectRequest): unknown {const obj: any = {};- if (message.project !== undefined) {- obj.project = Project.toJSON(message.project);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.project !== undefined && (obj.project = message.project ? Project.toJSON(message.project) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateProjectRequest>): UpdateProjectRequest {return UpdateProjectRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateProjectRequest>): UpdateProjectRequest {const message = createBaseUpdateProjectRequest();message.project = (object.project !== undefined && object.project !== null)@@ -1757,18 +1742,15 @@ export const DeleteProjectRequest = {toJSON(message: DeleteProjectRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.force === true) {- obj.force = message.force;- }+ message.name !== undefined && (obj.name = message.name);+ message.force !== undefined && (obj.force = message.force);return obj;},create(base?: DeepPartial<DeleteProjectRequest>): DeleteProjectRequest {return DeleteProjectRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteProjectRequest>): DeleteProjectRequest {const message = createBaseDeleteProjectRequest();message.name = object.name ?? "";@@ -1818,15 +1800,14 @@ export const UndeleteProjectRequest = {toJSON(message: UndeleteProjectRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<UndeleteProjectRequest>): UndeleteProjectRequest {return UndeleteProjectRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UndeleteProjectRequest>): UndeleteProjectRequest {const message = createBaseUndeleteProjectRequest();message.name = object.name ?? "";@@ -1875,15 +1856,14 @@ export const GetIamPolicyRequest = {toJSON(message: GetIamPolicyRequest): unknown {const obj: any = {};- if (message.project !== "") {- obj.project = message.project;- }+ message.project !== undefined && (obj.project = message.project);return obj;},create(base?: DeepPartial<GetIamPolicyRequest>): GetIamPolicyRequest {return GetIamPolicyRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetIamPolicyRequest>): GetIamPolicyRequest {const message = createBaseGetIamPolicyRequest();message.project = object.project ?? "";@@ -1945,11 +1925,11 @@ export const BatchGetIamPolicyRequest = {toJSON(message: BatchGetIamPolicyRequest): unknown {const obj: any = {};- if (message.scope !== "") {- obj.scope = message.scope;- }- if (message.names?.length) {- obj.names = message.names;+ message.scope !== undefined && (obj.scope = message.scope);+ if (message.names) {+ obj.names = message.names.map((e) => e);+ } else {+ obj.names = [];}return obj;},@@ -1957,6 +1937,7 @@ export const BatchGetIamPolicyRequest = {create(base?: DeepPartial<BatchGetIamPolicyRequest>): BatchGetIamPolicyRequest {return BatchGetIamPolicyRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchGetIamPolicyRequest>): BatchGetIamPolicyRequest {const message = createBaseBatchGetIamPolicyRequest();message.scope = object.scope ?? "";@@ -2010,8 +1991,12 @@ export const BatchGetIamPolicyResponse = {toJSON(message: BatchGetIamPolicyResponse): unknown {const obj: any = {};- if (message.policyResults?.length) {- obj.policyResults = message.policyResults.map((e) => BatchGetIamPolicyResponse_PolicyResult.toJSON(e));+ if (message.policyResults) {+ obj.policyResults = message.policyResults.map((e) =>+ e ? BatchGetIamPolicyResponse_PolicyResult.toJSON(e) : undefined+ );+ } else {+ obj.policyResults = [];}return obj;},@@ -2019,6 +2004,7 @@ export const BatchGetIamPolicyResponse = {create(base?: DeepPartial<BatchGetIamPolicyResponse>): BatchGetIamPolicyResponse {return BatchGetIamPolicyResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchGetIamPolicyResponse>): BatchGetIamPolicyResponse {const message = createBaseBatchGetIamPolicyResponse();message.policyResults = object.policyResults?.map((e) => BatchGetIamPolicyResponse_PolicyResult.fromPartial(e)) ||@@ -2081,18 +2067,15 @@ export const BatchGetIamPolicyResponse_PolicyResult = {toJSON(message: BatchGetIamPolicyResponse_PolicyResult): unknown {const obj: any = {};- if (message.project !== "") {- obj.project = message.project;- }- if (message.policy !== undefined) {- obj.policy = IamPolicy.toJSON(message.policy);- }+ message.project !== undefined && (obj.project = message.project);+ message.policy !== undefined && (obj.policy = message.policy ? IamPolicy.toJSON(message.policy) : undefined);return obj;},create(base?: DeepPartial<BatchGetIamPolicyResponse_PolicyResult>): BatchGetIamPolicyResponse_PolicyResult {return BatchGetIamPolicyResponse_PolicyResult.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchGetIamPolicyResponse_PolicyResult>): BatchGetIamPolicyResponse_PolicyResult {const message = createBaseBatchGetIamPolicyResponse_PolicyResult();message.project = object.project ?? "";@@ -2157,18 +2140,15 @@ export const SetIamPolicyRequest = {toJSON(message: SetIamPolicyRequest): unknown {const obj: any = {};- if (message.project !== "") {- obj.project = message.project;- }- if (message.policy !== undefined) {- obj.policy = IamPolicy.toJSON(message.policy);- }+ message.project !== undefined && (obj.project = message.project);+ message.policy !== undefined && (obj.policy = message.policy ? IamPolicy.toJSON(message.policy) : undefined);return obj;},create(base?: DeepPartial<SetIamPolicyRequest>): SetIamPolicyRequest {return SetIamPolicyRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SetIamPolicyRequest>): SetIamPolicyRequest {const message = createBaseSetIamPolicyRequest();message.project = object.project ?? "";@@ -2220,15 +2200,14 @@ export const GetDeploymentConfigRequest = {toJSON(message: GetDeploymentConfigRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetDeploymentConfigRequest>): GetDeploymentConfigRequest {return GetDeploymentConfigRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetDeploymentConfigRequest>): GetDeploymentConfigRequest {const message = createBaseGetDeploymentConfigRequest();message.name = object.name ?? "";@@ -2277,15 +2256,14 @@ export const UpdateDeploymentConfigRequest = {toJSON(message: UpdateDeploymentConfigRequest): unknown {const obj: any = {};- if (message.config !== undefined) {- obj.config = DeploymentConfig.toJSON(message.config);- }+ message.config !== undefined && (obj.config = message.config ? DeploymentConfig.toJSON(message.config) : undefined);return obj;},create(base?: DeepPartial<UpdateDeploymentConfigRequest>): UpdateDeploymentConfigRequest {return UpdateDeploymentConfigRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateDeploymentConfigRequest>): UpdateDeploymentConfigRequest {const message = createBaseUpdateDeploymentConfigRequest();message.config = (object.config !== undefined && object.config !== null)@@ -2362,21 +2340,18 @@ export const UpdateProjectGitOpsInfoRequest = {toJSON(message: UpdateProjectGitOpsInfoRequest): unknown {const obj: any = {};- if (message.projectGitopsInfo !== undefined) {- obj.projectGitopsInfo = ProjectGitOpsInfo.toJSON(message.projectGitopsInfo);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }- if (message.allowMissing === true) {- obj.allowMissing = message.allowMissing;- }+ message.projectGitopsInfo !== undefined && (obj.projectGitopsInfo = message.projectGitopsInfo+ ? ProjectGitOpsInfo.toJSON(message.projectGitopsInfo)+ : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));+ message.allowMissing !== undefined && (obj.allowMissing = message.allowMissing);return obj;},create(base?: DeepPartial<UpdateProjectGitOpsInfoRequest>): UpdateProjectGitOpsInfoRequest {return UpdateProjectGitOpsInfoRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateProjectGitOpsInfoRequest>): UpdateProjectGitOpsInfoRequest {const message = createBaseUpdateProjectGitOpsInfoRequest();message.projectGitopsInfo = (object.projectGitopsInfo !== undefined && object.projectGitopsInfo !== null)@@ -2429,15 +2404,14 @@ export const UnsetProjectGitOpsInfoRequest = {toJSON(message: UnsetProjectGitOpsInfoRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<UnsetProjectGitOpsInfoRequest>): UnsetProjectGitOpsInfoRequest {return UnsetProjectGitOpsInfoRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UnsetProjectGitOpsInfoRequest>): UnsetProjectGitOpsInfoRequest {const message = createBaseUnsetProjectGitOpsInfoRequest();message.name = object.name ?? "";@@ -2486,15 +2460,14 @@ export const GetProjectGitOpsInfoRequest = {toJSON(message: GetProjectGitOpsInfoRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetProjectGitOpsInfoRequest>): GetProjectGitOpsInfoRequest {return GetProjectGitOpsInfoRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetProjectGitOpsInfoRequest>): GetProjectGitOpsInfoRequest {const message = createBaseGetProjectGitOpsInfoRequest();message.name = object.name ?? "";@@ -2543,15 +2516,14 @@ export const SetupSQLReviewCIRequest = {toJSON(message: SetupSQLReviewCIRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<SetupSQLReviewCIRequest>): SetupSQLReviewCIRequest {return SetupSQLReviewCIRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SetupSQLReviewCIRequest>): SetupSQLReviewCIRequest {const message = createBaseSetupSQLReviewCIRequest();message.name = object.name ?? "";@@ -2600,15 +2572,14 @@ export const SetupSQLReviewCIResponse = {toJSON(message: SetupSQLReviewCIResponse): unknown {const obj: any = {};- if (message.pullRequestUrl !== "") {- obj.pullRequestUrl = message.pullRequestUrl;- }+ message.pullRequestUrl !== undefined && (obj.pullRequestUrl = message.pullRequestUrl);return obj;},create(base?: DeepPartial<SetupSQLReviewCIResponse>): SetupSQLReviewCIResponse {return SetupSQLReviewCIResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SetupSQLReviewCIResponse>): SetupSQLReviewCIResponse {const message = createBaseSetupSQLReviewCIResponse();message.pullRequestUrl = object.pullRequestUrl ?? "";@@ -2795,48 +2766,30 @@ export const Project = {toJSON(message: Project): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.state !== 0) {- obj.state = stateToJSON(message.state);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.key !== "") {- obj.key = message.key;- }- if (message.workflow !== 0) {- obj.workflow = workflowToJSON(message.workflow);- }- if (message.visibility !== 0) {- obj.visibility = visibilityToJSON(message.visibility);- }- if (message.tenantMode !== 0) {- obj.tenantMode = tenantModeToJSON(message.tenantMode);- }- if (message.dbNameTemplate !== "") {- obj.dbNameTemplate = message.dbNameTemplate;- }- if (message.schemaChange !== 0) {- obj.schemaChange = schemaChangeToJSON(message.schemaChange);- }- if (message.webhooks?.length) {- obj.webhooks = message.webhooks.map((e) => Webhook.toJSON(e));- }- if (message.dataClassificationConfigId !== "") {- obj.dataClassificationConfigId = message.dataClassificationConfigId;- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.state !== undefined && (obj.state = stateToJSON(message.state));+ message.title !== undefined && (obj.title = message.title);+ message.key !== undefined && (obj.key = message.key);+ message.workflow !== undefined && (obj.workflow = workflowToJSON(message.workflow));+ message.visibility !== undefined && (obj.visibility = visibilityToJSON(message.visibility));+ message.tenantMode !== undefined && (obj.tenantMode = tenantModeToJSON(message.tenantMode));+ message.dbNameTemplate !== undefined && (obj.dbNameTemplate = message.dbNameTemplate);+ message.schemaChange !== undefined && (obj.schemaChange = schemaChangeToJSON(message.schemaChange));+ if (message.webhooks) {+ obj.webhooks = message.webhooks.map((e) => e ? Webhook.toJSON(e) : undefined);+ } else {+ obj.webhooks = [];+ }+ message.dataClassificationConfigId !== undefined &&+ (obj.dataClassificationConfigId = message.dataClassificationConfigId);return obj;},create(base?: DeepPartial<Project>): Project {return Project.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Project>): Project {const message = createBaseProject();message.name = object.name ?? "";@@ -2909,18 +2862,15 @@ export const AddWebhookRequest = {toJSON(message: AddWebhookRequest): unknown {const obj: any = {};- if (message.project !== "") {- obj.project = message.project;- }- if (message.webhook !== undefined) {- obj.webhook = Webhook.toJSON(message.webhook);- }+ message.project !== undefined && (obj.project = message.project);+ message.webhook !== undefined && (obj.webhook = message.webhook ? Webhook.toJSON(message.webhook) : undefined);return obj;},create(base?: DeepPartial<AddWebhookRequest>): AddWebhookRequest {return AddWebhookRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AddWebhookRequest>): AddWebhookRequest {const message = createBaseAddWebhookRequest();message.project = object.project ?? "";@@ -2985,18 +2935,15 @@ export const UpdateWebhookRequest = {toJSON(message: UpdateWebhookRequest): unknown {const obj: any = {};- if (message.webhook !== undefined) {- obj.webhook = Webhook.toJSON(message.webhook);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.webhook !== undefined && (obj.webhook = message.webhook ? Webhook.toJSON(message.webhook) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateWebhookRequest>): UpdateWebhookRequest {return UpdateWebhookRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateWebhookRequest>): UpdateWebhookRequest {const message = createBaseUpdateWebhookRequest();message.webhook = (object.webhook !== undefined && object.webhook !== null)@@ -3048,15 +2995,14 @@ export const RemoveWebhookRequest = {toJSON(message: RemoveWebhookRequest): unknown {const obj: any = {};- if (message.webhook !== undefined) {- obj.webhook = Webhook.toJSON(message.webhook);- }+ message.webhook !== undefined && (obj.webhook = message.webhook ? Webhook.toJSON(message.webhook) : undefined);return obj;},create(base?: DeepPartial<RemoveWebhookRequest>): RemoveWebhookRequest {return RemoveWebhookRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RemoveWebhookRequest>): RemoveWebhookRequest {const message = createBaseRemoveWebhookRequest();message.webhook = (object.webhook !== undefined && object.webhook !== null)@@ -3120,18 +3066,15 @@ export const TestWebhookRequest = {toJSON(message: TestWebhookRequest): unknown {const obj: any = {};- if (message.project !== "") {- obj.project = message.project;- }- if (message.webhook !== undefined) {- obj.webhook = Webhook.toJSON(message.webhook);- }+ message.project !== undefined && (obj.project = message.project);+ message.webhook !== undefined && (obj.webhook = message.webhook ? Webhook.toJSON(message.webhook) : undefined);return obj;},create(base?: DeepPartial<TestWebhookRequest>): TestWebhookRequest {return TestWebhookRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TestWebhookRequest>): TestWebhookRequest {const message = createBaseTestWebhookRequest();message.project = object.project ?? "";@@ -3183,15 +3126,14 @@ export const TestWebhookResponse = {toJSON(message: TestWebhookResponse): unknown {const obj: any = {};- if (message.error !== "") {- obj.error = message.error;- }+ message.error !== undefined && (obj.error = message.error);return obj;},create(base?: DeepPartial<TestWebhookResponse>): TestWebhookResponse {return TestWebhookResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TestWebhookResponse>): TestWebhookResponse {const message = createBaseTestWebhookResponse();message.error = object.error ?? "";@@ -3300,20 +3242,14 @@ export const Webhook = {toJSON(message: Webhook): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.type !== 0) {- obj.type = webhook_TypeToJSON(message.type);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.url !== "") {- obj.url = message.url;- }- if (message.notificationTypes?.length) {+ message.name !== undefined && (obj.name = message.name);+ message.type !== undefined && (obj.type = webhook_TypeToJSON(message.type));+ message.title !== undefined && (obj.title = message.title);+ message.url !== undefined && (obj.url = message.url);+ if (message.notificationTypes) {obj.notificationTypes = message.notificationTypes.map((e) => activity_TypeToJSON(e));+ } else {+ obj.notificationTypes = [];}return obj;},@@ -3321,6 +3257,7 @@ export const Webhook = {create(base?: DeepPartial<Webhook>): Webhook {return Webhook.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Webhook>): Webhook {const message = createBaseWebhook();message.name = object.name ?? "";@@ -3397,21 +3334,16 @@ export const DeploymentConfig = {toJSON(message: DeploymentConfig): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.schedule !== undefined) {- obj.schedule = Schedule.toJSON(message.schedule);- }+ message.name !== undefined && (obj.name = message.name);+ message.title !== undefined && (obj.title = message.title);+ message.schedule !== undefined && (obj.schedule = message.schedule ? Schedule.toJSON(message.schedule) : undefined);return obj;},create(base?: DeepPartial<DeploymentConfig>): DeploymentConfig {return DeploymentConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeploymentConfig>): DeploymentConfig {const message = createBaseDeploymentConfig();message.name = object.name ?? "";@@ -3468,8 +3400,10 @@ export const Schedule = {toJSON(message: Schedule): unknown {const obj: any = {};- if (message.deployments?.length) {- obj.deployments = message.deployments.map((e) => ScheduleDeployment.toJSON(e));+ if (message.deployments) {+ obj.deployments = message.deployments.map((e) => e ? ScheduleDeployment.toJSON(e) : undefined);+ } else {+ obj.deployments = [];}return obj;},@@ -3477,6 +3411,7 @@ export const Schedule = {create(base?: DeepPartial<Schedule>): Schedule {return Schedule.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Schedule>): Schedule {const message = createBaseSchedule();message.deployments = object.deployments?.map((e) => ScheduleDeployment.fromPartial(e)) || [];@@ -3538,18 +3473,15 @@ export const ScheduleDeployment = {toJSON(message: ScheduleDeployment): unknown {const obj: any = {};- if (message.title !== "") {- obj.title = message.title;- }- if (message.spec !== undefined) {- obj.spec = DeploymentSpec.toJSON(message.spec);- }+ message.title !== undefined && (obj.title = message.title);+ message.spec !== undefined && (obj.spec = message.spec ? DeploymentSpec.toJSON(message.spec) : undefined);return obj;},create(base?: DeepPartial<ScheduleDeployment>): ScheduleDeployment {return ScheduleDeployment.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ScheduleDeployment>): ScheduleDeployment {const message = createBaseScheduleDeployment();message.title = object.title ?? "";@@ -3601,15 +3533,15 @@ export const DeploymentSpec = {toJSON(message: DeploymentSpec): unknown {const obj: any = {};- if (message.labelSelector !== undefined) {- obj.labelSelector = LabelSelector.toJSON(message.labelSelector);- }+ message.labelSelector !== undefined &&+ (obj.labelSelector = message.labelSelector ? LabelSelector.toJSON(message.labelSelector) : undefined);return obj;},create(base?: DeepPartial<DeploymentSpec>): DeploymentSpec {return DeploymentSpec.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeploymentSpec>): DeploymentSpec {const message = createBaseDeploymentSpec();message.labelSelector = (object.labelSelector !== undefined && object.labelSelector !== null)@@ -3664,8 +3596,10 @@ export const LabelSelector = {toJSON(message: LabelSelector): unknown {const obj: any = {};- if (message.matchExpressions?.length) {- obj.matchExpressions = message.matchExpressions.map((e) => LabelSelectorRequirement.toJSON(e));+ if (message.matchExpressions) {+ obj.matchExpressions = message.matchExpressions.map((e) => e ? LabelSelectorRequirement.toJSON(e) : undefined);+ } else {+ obj.matchExpressions = [];}return obj;},@@ -3673,6 +3607,7 @@ export const LabelSelector = {create(base?: DeepPartial<LabelSelector>): LabelSelector {return LabelSelector.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<LabelSelector>): LabelSelector {const message = createBaseLabelSelector();message.matchExpressions = object.matchExpressions?.map((e) => LabelSelectorRequirement.fromPartial(e)) || [];@@ -3745,14 +3680,12 @@ export const LabelSelectorRequirement = {toJSON(message: LabelSelectorRequirement): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.operator !== 0) {- obj.operator = operatorTypeToJSON(message.operator);- }- if (message.values?.length) {- obj.values = message.values;+ message.key !== undefined && (obj.key = message.key);+ message.operator !== undefined && (obj.operator = operatorTypeToJSON(message.operator));+ if (message.values) {+ obj.values = message.values.map((e) => e);+ } else {+ obj.values = [];}return obj;},@@ -3760,6 +3693,7 @@ export const LabelSelectorRequirement = {create(base?: DeepPartial<LabelSelectorRequirement>): LabelSelectorRequirement {return LabelSelectorRequirement.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<LabelSelectorRequirement>): LabelSelectorRequirement {const message = createBaseLabelSelectorRequirement();message.key = object.key ?? "";@@ -3806,6 +3740,7 @@ export const Activity = {create(base?: DeepPartial<Activity>): Activity {return Activity.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<Activity>): Activity {const message = createBaseActivity();return message;@@ -3877,21 +3812,16 @@ export const ListDatabaseGroupsRequest = {toJSON(message: ListDatabaseGroupsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListDatabaseGroupsRequest>): ListDatabaseGroupsRequest {return ListDatabaseGroupsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListDatabaseGroupsRequest>): ListDatabaseGroupsRequest {const message = createBaseListDatabaseGroupsRequest();message.parent = object.parent ?? "";@@ -3957,18 +3887,19 @@ export const ListDatabaseGroupsResponse = {toJSON(message: ListDatabaseGroupsResponse): unknown {const obj: any = {};- if (message.databaseGroups?.length) {- obj.databaseGroups = message.databaseGroups.map((e) => DatabaseGroup.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.databaseGroups) {+ obj.databaseGroups = message.databaseGroups.map((e) => e ? DatabaseGroup.toJSON(e) : undefined);+ } else {+ obj.databaseGroups = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListDatabaseGroupsResponse>): ListDatabaseGroupsResponse {return ListDatabaseGroupsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListDatabaseGroupsResponse>): ListDatabaseGroupsResponse {const message = createBaseListDatabaseGroupsResponse();message.databaseGroups = object.databaseGroups?.map((e) => DatabaseGroup.fromPartial(e)) || [];@@ -4031,18 +3962,15 @@ export const GetDatabaseGroupRequest = {toJSON(message: GetDatabaseGroupRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.view !== 0) {- obj.view = databaseGroupViewToJSON(message.view);- }+ message.name !== undefined && (obj.name = message.name);+ message.view !== undefined && (obj.view = databaseGroupViewToJSON(message.view));return obj;},create(base?: DeepPartial<GetDatabaseGroupRequest>): GetDatabaseGroupRequest {return GetDatabaseGroupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetDatabaseGroupRequest>): GetDatabaseGroupRequest {const message = createBaseGetDatabaseGroupRequest();message.name = object.name ?? "";@@ -4127,24 +4055,18 @@ export const CreateDatabaseGroupRequest = {toJSON(message: CreateDatabaseGroupRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.databaseGroup !== undefined) {- obj.databaseGroup = DatabaseGroup.toJSON(message.databaseGroup);- }- if (message.databaseGroupId !== "") {- obj.databaseGroupId = message.databaseGroupId;- }- if (message.validateOnly === true) {- obj.validateOnly = message.validateOnly;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.databaseGroup !== undefined &&+ (obj.databaseGroup = message.databaseGroup ? DatabaseGroup.toJSON(message.databaseGroup) : undefined);+ message.databaseGroupId !== undefined && (obj.databaseGroupId = message.databaseGroupId);+ message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);return obj;},create(base?: DeepPartial<CreateDatabaseGroupRequest>): CreateDatabaseGroupRequest {return CreateDatabaseGroupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateDatabaseGroupRequest>): CreateDatabaseGroupRequest {const message = createBaseCreateDatabaseGroupRequest();message.parent = object.parent ?? "";@@ -4211,18 +4133,16 @@ export const UpdateDatabaseGroupRequest = {toJSON(message: UpdateDatabaseGroupRequest): unknown {const obj: any = {};- if (message.databaseGroup !== undefined) {- obj.databaseGroup = DatabaseGroup.toJSON(message.databaseGroup);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.databaseGroup !== undefined &&+ (obj.databaseGroup = message.databaseGroup ? DatabaseGroup.toJSON(message.databaseGroup) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateDatabaseGroupRequest>): UpdateDatabaseGroupRequest {return UpdateDatabaseGroupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateDatabaseGroupRequest>): UpdateDatabaseGroupRequest {const message = createBaseUpdateDatabaseGroupRequest();message.databaseGroup = (object.databaseGroup !== undefined && object.databaseGroup !== null)@@ -4274,15 +4194,14 @@ export const DeleteDatabaseGroupRequest = {toJSON(message: DeleteDatabaseGroupRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteDatabaseGroupRequest>): DeleteDatabaseGroupRequest {return DeleteDatabaseGroupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteDatabaseGroupRequest>): DeleteDatabaseGroupRequest {const message = createBaseDeleteDatabaseGroupRequest();message.name = object.name ?? "";@@ -4381,20 +4300,19 @@ export const DatabaseGroup = {toJSON(message: DatabaseGroup): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.databasePlaceholder !== "") {- obj.databasePlaceholder = message.databasePlaceholder;- }- if (message.databaseExpr !== undefined) {- obj.databaseExpr = Expr.toJSON(message.databaseExpr);- }- if (message.matchedDatabases?.length) {- obj.matchedDatabases = message.matchedDatabases.map((e) => DatabaseGroup_Database.toJSON(e));- }- if (message.unmatchedDatabases?.length) {- obj.unmatchedDatabases = message.unmatchedDatabases.map((e) => DatabaseGroup_Database.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.databasePlaceholder !== undefined && (obj.databasePlaceholder = message.databasePlaceholder);+ message.databaseExpr !== undefined &&+ (obj.databaseExpr = message.databaseExpr ? Expr.toJSON(message.databaseExpr) : undefined);+ if (message.matchedDatabases) {+ obj.matchedDatabases = message.matchedDatabases.map((e) => e ? DatabaseGroup_Database.toJSON(e) : undefined);+ } else {+ obj.matchedDatabases = [];+ }+ if (message.unmatchedDatabases) {+ obj.unmatchedDatabases = message.unmatchedDatabases.map((e) => e ? DatabaseGroup_Database.toJSON(e) : undefined);+ } else {+ obj.unmatchedDatabases = [];}return obj;},@@ -4402,6 +4320,7 @@ export const DatabaseGroup = {create(base?: DeepPartial<DatabaseGroup>): DatabaseGroup {return DatabaseGroup.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DatabaseGroup>): DatabaseGroup {const message = createBaseDatabaseGroup();message.name = object.name ?? "";@@ -4456,15 +4375,14 @@ export const DatabaseGroup_Database = {toJSON(message: DatabaseGroup_Database): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DatabaseGroup_Database>): DatabaseGroup_Database {return DatabaseGroup_Database.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DatabaseGroup_Database>): DatabaseGroup_Database {const message = createBaseDatabaseGroup_Database();message.name = object.name ?? "";@@ -4548,24 +4466,18 @@ export const CreateSchemaGroupRequest = {toJSON(message: CreateSchemaGroupRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.schemaGroup !== undefined) {- obj.schemaGroup = SchemaGroup.toJSON(message.schemaGroup);- }- if (message.schemaGroupId !== "") {- obj.schemaGroupId = message.schemaGroupId;- }- if (message.validateOnly === true) {- obj.validateOnly = message.validateOnly;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.schemaGroup !== undefined &&+ (obj.schemaGroup = message.schemaGroup ? SchemaGroup.toJSON(message.schemaGroup) : undefined);+ message.schemaGroupId !== undefined && (obj.schemaGroupId = message.schemaGroupId);+ message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);return obj;},create(base?: DeepPartial<CreateSchemaGroupRequest>): CreateSchemaGroupRequest {return CreateSchemaGroupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateSchemaGroupRequest>): CreateSchemaGroupRequest {const message = createBaseCreateSchemaGroupRequest();message.parent = object.parent ?? "";@@ -4632,18 +4544,16 @@ export const UpdateSchemaGroupRequest = {toJSON(message: UpdateSchemaGroupRequest): unknown {const obj: any = {};- if (message.schemaGroup !== undefined) {- obj.schemaGroup = SchemaGroup.toJSON(message.schemaGroup);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.schemaGroup !== undefined &&+ (obj.schemaGroup = message.schemaGroup ? SchemaGroup.toJSON(message.schemaGroup) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateSchemaGroupRequest>): UpdateSchemaGroupRequest {return UpdateSchemaGroupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateSchemaGroupRequest>): UpdateSchemaGroupRequest {const message = createBaseUpdateSchemaGroupRequest();message.schemaGroup = (object.schemaGroup !== undefined && object.schemaGroup !== null)@@ -4695,15 +4605,14 @@ export const DeleteSchemaGroupRequest = {toJSON(message: DeleteSchemaGroupRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteSchemaGroupRequest>): DeleteSchemaGroupRequest {return DeleteSchemaGroupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteSchemaGroupRequest>): DeleteSchemaGroupRequest {const message = createBaseDeleteSchemaGroupRequest();message.name = object.name ?? "";@@ -4776,21 +4685,16 @@ export const ListSchemaGroupsRequest = {toJSON(message: ListSchemaGroupsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListSchemaGroupsRequest>): ListSchemaGroupsRequest {return ListSchemaGroupsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSchemaGroupsRequest>): ListSchemaGroupsRequest {const message = createBaseListSchemaGroupsRequest();message.parent = object.parent ?? "";@@ -4856,18 +4760,19 @@ export const ListSchemaGroupsResponse = {toJSON(message: ListSchemaGroupsResponse): unknown {const obj: any = {};- if (message.schemaGroups?.length) {- obj.schemaGroups = message.schemaGroups.map((e) => SchemaGroup.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.schemaGroups) {+ obj.schemaGroups = message.schemaGroups.map((e) => e ? SchemaGroup.toJSON(e) : undefined);+ } else {+ obj.schemaGroups = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListSchemaGroupsResponse>): ListSchemaGroupsResponse {return ListSchemaGroupsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSchemaGroupsResponse>): ListSchemaGroupsResponse {const message = createBaseListSchemaGroupsResponse();message.schemaGroups = object.schemaGroups?.map((e) => SchemaGroup.fromPartial(e)) || [];@@ -4930,18 +4835,15 @@ export const GetSchemaGroupRequest = {toJSON(message: GetSchemaGroupRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.view !== 0) {- obj.view = schemaGroupViewToJSON(message.view);- }+ message.name !== undefined && (obj.name = message.name);+ message.view !== undefined && (obj.view = schemaGroupViewToJSON(message.view));return obj;},create(base?: DeepPartial<GetSchemaGroupRequest>): GetSchemaGroupRequest {return GetSchemaGroupRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetSchemaGroupRequest>): GetSchemaGroupRequest {const message = createBaseGetSchemaGroupRequest();message.name = object.name ?? "";@@ -5041,20 +4943,18 @@ export const SchemaGroup = {toJSON(message: SchemaGroup): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.tableExpr !== undefined) {- obj.tableExpr = Expr.toJSON(message.tableExpr);- }- if (message.tablePlaceholder !== "") {- obj.tablePlaceholder = message.tablePlaceholder;- }- if (message.matchedTables?.length) {- obj.matchedTables = message.matchedTables.map((e) => SchemaGroup_Table.toJSON(e));- }- if (message.unmatchedTables?.length) {- obj.unmatchedTables = message.unmatchedTables.map((e) => SchemaGroup_Table.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.tableExpr !== undefined && (obj.tableExpr = message.tableExpr ? Expr.toJSON(message.tableExpr) : undefined);+ message.tablePlaceholder !== undefined && (obj.tablePlaceholder = message.tablePlaceholder);+ if (message.matchedTables) {+ obj.matchedTables = message.matchedTables.map((e) => e ? SchemaGroup_Table.toJSON(e) : undefined);+ } else {+ obj.matchedTables = [];+ }+ if (message.unmatchedTables) {+ obj.unmatchedTables = message.unmatchedTables.map((e) => e ? SchemaGroup_Table.toJSON(e) : undefined);+ } else {+ obj.unmatchedTables = [];}return obj;},@@ -5062,6 +4962,7 @@ export const SchemaGroup = {create(base?: DeepPartial<SchemaGroup>): SchemaGroup {return SchemaGroup.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaGroup>): SchemaGroup {const message = createBaseSchemaGroup();message.name = object.name ?? "";@@ -5140,21 +5041,16 @@ export const SchemaGroup_Table = {toJSON(message: SchemaGroup_Table): unknown {const obj: any = {};- if (message.database !== "") {- obj.database = message.database;- }- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.table !== "") {- obj.table = message.table;- }+ message.database !== undefined && (obj.database = message.database);+ message.schema !== undefined && (obj.schema = message.schema);+ message.table !== undefined && (obj.table = message.table);return obj;},create(base?: DeepPartial<SchemaGroup_Table>): SchemaGroup_Table {return SchemaGroup_Table.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaGroup_Table>): SchemaGroup_Table {const message = createBaseSchemaGroup_Table();message.database = object.database ?? "";diff --git a/frontend/src/types/proto/v1/risk_service.ts b/frontend/src/types/proto/v1/risk_service.tsindex c2e42b5130..73d7ce7a42 100644--- a/frontend/src/types/proto/v1/risk_service.ts+++ b/frontend/src/types/proto/v1/risk_service.ts@@ -1,10 +1,10 @@/* eslint-disable */+import * as Long from "long";import type { CallContext, CallOptions } from "nice-grpc-common";import * as _m0 from "protobufjs/minimal";import { Empty } from "../google/protobuf/empty";import { FieldMask } from "../google/protobuf/field_mask";import { Expr } from "../google/type/expr";-import Long = require("long");export const protobufPackage = "bytebase.v1";@@ -185,18 +185,15 @@ export const ListRisksRequest = {toJSON(message: ListRisksRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListRisksRequest>): ListRisksRequest {return ListRisksRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListRisksRequest>): ListRisksRequest {const message = createBaseListRisksRequest();message.pageSize = object.pageSize ?? 0;@@ -259,18 +256,19 @@ export const ListRisksResponse = {toJSON(message: ListRisksResponse): unknown {const obj: any = {};- if (message.risks?.length) {- obj.risks = message.risks.map((e) => Risk.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.risks) {+ obj.risks = message.risks.map((e) => e ? Risk.toJSON(e) : undefined);+ } else {+ obj.risks = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListRisksResponse>): ListRisksResponse {return ListRisksResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListRisksResponse>): ListRisksResponse {const message = createBaseListRisksResponse();message.risks = object.risks?.map((e) => Risk.fromPartial(e)) || [];@@ -320,15 +318,14 @@ export const CreateRiskRequest = {toJSON(message: CreateRiskRequest): unknown {const obj: any = {};- if (message.risk !== undefined) {- obj.risk = Risk.toJSON(message.risk);- }+ message.risk !== undefined && (obj.risk = message.risk ? Risk.toJSON(message.risk) : undefined);return obj;},create(base?: DeepPartial<CreateRiskRequest>): CreateRiskRequest {return CreateRiskRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateRiskRequest>): CreateRiskRequest {const message = createBaseCreateRiskRequest();message.risk = (object.risk !== undefined && object.risk !== null) ? Risk.fromPartial(object.risk) : undefined;@@ -390,18 +387,15 @@ export const UpdateRiskRequest = {toJSON(message: UpdateRiskRequest): unknown {const obj: any = {};- if (message.risk !== undefined) {- obj.risk = Risk.toJSON(message.risk);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.risk !== undefined && (obj.risk = message.risk ? Risk.toJSON(message.risk) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateRiskRequest>): UpdateRiskRequest {return UpdateRiskRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateRiskRequest>): UpdateRiskRequest {const message = createBaseUpdateRiskRequest();message.risk = (object.risk !== undefined && object.risk !== null) ? Risk.fromPartial(object.risk) : undefined;@@ -451,15 +445,14 @@ export const DeleteRiskRequest = {toJSON(message: DeleteRiskRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteRiskRequest>): DeleteRiskRequest {return DeleteRiskRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteRiskRequest>): DeleteRiskRequest {const message = createBaseDeleteRiskRequest();message.name = object.name ?? "";@@ -576,33 +569,20 @@ export const Risk = {toJSON(message: Risk): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.source !== 0) {- obj.source = risk_SourceToJSON(message.source);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.level !== 0) {- obj.level = Math.round(message.level);- }- if (message.active === true) {- obj.active = message.active;- }- if (message.condition !== undefined) {- obj.condition = Expr.toJSON(message.condition);- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.source !== undefined && (obj.source = risk_SourceToJSON(message.source));+ message.title !== undefined && (obj.title = message.title);+ message.level !== undefined && (obj.level = Math.round(message.level));+ message.active !== undefined && (obj.active = message.active);+ message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);return obj;},create(base?: DeepPartial<Risk>): Risk {return Risk.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Risk>): Risk {const message = createBaseRisk();message.name = object.name ?? "";@@ -783,6 +763,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/v1/role_service.ts b/frontend/src/types/proto/v1/role_service.tsindex 4367d8ad21..0aabe1d545 100644--- a/frontend/src/types/proto/v1/role_service.ts+++ b/frontend/src/types/proto/v1/role_service.ts@@ -118,18 +118,15 @@ export const ListRolesRequest = {toJSON(message: ListRolesRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListRolesRequest>): ListRolesRequest {return ListRolesRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListRolesRequest>): ListRolesRequest {const message = createBaseListRolesRequest();message.pageSize = object.pageSize ?? 0;@@ -192,18 +189,19 @@ export const ListRolesResponse = {toJSON(message: ListRolesResponse): unknown {const obj: any = {};- if (message.roles?.length) {- obj.roles = message.roles.map((e) => Role.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.roles) {+ obj.roles = message.roles.map((e) => e ? Role.toJSON(e) : undefined);+ } else {+ obj.roles = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListRolesResponse>): ListRolesResponse {return ListRolesResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListRolesResponse>): ListRolesResponse {const message = createBaseListRolesResponse();message.roles = object.roles?.map((e) => Role.fromPartial(e)) || [];@@ -266,18 +264,15 @@ export const CreateRoleRequest = {toJSON(message: CreateRoleRequest): unknown {const obj: any = {};- if (message.role !== undefined) {- obj.role = Role.toJSON(message.role);- }- if (message.roleId !== "") {- obj.roleId = message.roleId;- }+ message.role !== undefined && (obj.role = message.role ? Role.toJSON(message.role) : undefined);+ message.roleId !== undefined && (obj.roleId = message.roleId);return obj;},create(base?: DeepPartial<CreateRoleRequest>): CreateRoleRequest {return CreateRoleRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateRoleRequest>): CreateRoleRequest {const message = createBaseCreateRoleRequest();message.role = (object.role !== undefined && object.role !== null) ? Role.fromPartial(object.role) : undefined;@@ -340,18 +335,15 @@ export const UpdateRoleRequest = {toJSON(message: UpdateRoleRequest): unknown {const obj: any = {};- if (message.role !== undefined) {- obj.role = Role.toJSON(message.role);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.role !== undefined && (obj.role = message.role ? Role.toJSON(message.role) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateRoleRequest>): UpdateRoleRequest {return UpdateRoleRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateRoleRequest>): UpdateRoleRequest {const message = createBaseUpdateRoleRequest();message.role = (object.role !== undefined && object.role !== null) ? Role.fromPartial(object.role) : undefined;@@ -401,15 +393,14 @@ export const DeleteRoleRequest = {toJSON(message: DeleteRoleRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteRoleRequest>): DeleteRoleRequest {return DeleteRoleRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteRoleRequest>): DeleteRoleRequest {const message = createBaseDeleteRoleRequest();message.name = object.name ?? "";@@ -482,21 +473,16 @@ export const Role = {toJSON(message: Role): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }+ message.name !== undefined && (obj.name = message.name);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);return obj;},create(base?: DeepPartial<Role>): Role {return Role.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Role>): Role {const message = createBaseRole();message.name = object.name ?? "";diff --git a/frontend/src/types/proto/v1/rollout_service.ts b/frontend/src/types/proto/v1/rollout_service.tsindex 88cdf7aef1..b581a3cdd1 100644--- a/frontend/src/types/proto/v1/rollout_service.ts+++ b/frontend/src/types/proto/v1/rollout_service.ts@@ -1,10 +1,10 @@/* eslint-disable */+import * as Long from "long";import type { CallContext, CallOptions } from "nice-grpc-common";import * as _m0 from "protobufjs/minimal";import { FieldMask } from "../google/protobuf/field_mask";import { Timestamp } from "../google/protobuf/timestamp";import { ChangedResources } from "./database_service";-import Long = require("long");export const protobufPackage = "bytebase.v1";@@ -1133,15 +1133,14 @@ export const GetPlanRequest = {toJSON(message: GetPlanRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetPlanRequest>): GetPlanRequest {return GetPlanRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetPlanRequest>): GetPlanRequest {const message = createBaseGetPlanRequest();message.name = object.name ?? "";@@ -1214,21 +1213,16 @@ export const ListPlansRequest = {toJSON(message: ListPlansRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListPlansRequest>): ListPlansRequest {return ListPlansRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListPlansRequest>): ListPlansRequest {const message = createBaseListPlansRequest();message.parent = object.parent ?? "";@@ -1292,18 +1286,19 @@ export const ListPlansResponse = {toJSON(message: ListPlansResponse): unknown {const obj: any = {};- if (message.plans?.length) {- obj.plans = message.plans.map((e) => Plan.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.plans) {+ obj.plans = message.plans.map((e) => e ? Plan.toJSON(e) : undefined);+ } else {+ obj.plans = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListPlansResponse>): ListPlansResponse {return ListPlansResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListPlansResponse>): ListPlansResponse {const message = createBaseListPlansResponse();message.plans = object.plans?.map((e) => Plan.fromPartial(e)) || [];@@ -1366,18 +1361,15 @@ export const CreatePlanRequest = {toJSON(message: CreatePlanRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.plan !== undefined) {- obj.plan = Plan.toJSON(message.plan);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);return obj;},create(base?: DeepPartial<CreatePlanRequest>): CreatePlanRequest {return CreatePlanRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreatePlanRequest>): CreatePlanRequest {const message = createBaseCreatePlanRequest();message.parent = object.parent ?? "";@@ -1440,18 +1432,15 @@ export const UpdatePlanRequest = {toJSON(message: UpdatePlanRequest): unknown {const obj: any = {};- if (message.plan !== undefined) {- obj.plan = Plan.toJSON(message.plan);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdatePlanRequest>): UpdatePlanRequest {return UpdatePlanRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdatePlanRequest>): UpdatePlanRequest {const message = createBaseUpdatePlanRequest();message.plan = (object.plan !== undefined && object.plan !== null) ? Plan.fromPartial(object.plan) : undefined;@@ -1558,23 +1547,15 @@ export const Plan = {toJSON(message: Plan): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.issue !== "") {- obj.issue = message.issue;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.steps?.length) {- obj.steps = message.steps.map((e) => Plan_Step.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.issue !== undefined && (obj.issue = message.issue);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ if (message.steps) {+ obj.steps = message.steps.map((e) => e ? Plan_Step.toJSON(e) : undefined);+ } else {+ obj.steps = [];}return obj;},@@ -1582,6 +1563,7 @@ export const Plan = {create(base?: DeepPartial<Plan>): Plan {return Plan.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Plan>): Plan {const message = createBasePlan();message.name = object.name ?? "";@@ -1635,8 +1617,10 @@ export const Plan_Step = {toJSON(message: Plan_Step): unknown {const obj: any = {};- if (message.specs?.length) {- obj.specs = message.specs.map((e) => Plan_Spec.toJSON(e));+ if (message.specs) {+ obj.specs = message.specs.map((e) => e ? Plan_Spec.toJSON(e) : undefined);+ } else {+ obj.specs = [];}return obj;},@@ -1644,6 +1628,7 @@ export const Plan_Step = {create(base?: DeepPartial<Plan_Step>): Plan_Step {return Plan_Step.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Plan_Step>): Plan_Step {const message = createBasePlan_Step();message.specs = object.specs?.map((e) => Plan_Spec.fromPartial(e)) || [];@@ -1752,27 +1737,24 @@ export const Plan_Spec = {toJSON(message: Plan_Spec): unknown {const obj: any = {};- if (message.earliestAllowedTime !== undefined) {- obj.earliestAllowedTime = message.earliestAllowedTime.toISOString();- }- if (message.id !== "") {- obj.id = message.id;- }- if (message.createDatabaseConfig !== undefined) {- obj.createDatabaseConfig = Plan_CreateDatabaseConfig.toJSON(message.createDatabaseConfig);- }- if (message.changeDatabaseConfig !== undefined) {- obj.changeDatabaseConfig = Plan_ChangeDatabaseConfig.toJSON(message.changeDatabaseConfig);- }- if (message.restoreDatabaseConfig !== undefined) {- obj.restoreDatabaseConfig = Plan_RestoreDatabaseConfig.toJSON(message.restoreDatabaseConfig);- }+ message.earliestAllowedTime !== undefined && (obj.earliestAllowedTime = message.earliestAllowedTime.toISOString());+ message.id !== undefined && (obj.id = message.id);+ message.createDatabaseConfig !== undefined && (obj.createDatabaseConfig = message.createDatabaseConfig+ ? Plan_CreateDatabaseConfig.toJSON(message.createDatabaseConfig)+ : undefined);+ message.changeDatabaseConfig !== undefined && (obj.changeDatabaseConfig = message.changeDatabaseConfig+ ? Plan_ChangeDatabaseConfig.toJSON(message.changeDatabaseConfig)+ : undefined);+ message.restoreDatabaseConfig !== undefined && (obj.restoreDatabaseConfig = message.restoreDatabaseConfig+ ? Plan_RestoreDatabaseConfig.toJSON(message.restoreDatabaseConfig)+ : undefined);return obj;},create(base?: DeepPartial<Plan_Spec>): Plan_Spec {return Plan_Spec.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Plan_Spec>): Plan_Spec {const message = createBasePlan_Spec();message.earliestAllowedTime = object.earliestAllowedTime ?? undefined;@@ -1940,38 +1922,19 @@ export const Plan_CreateDatabaseConfig = {toJSON(message: Plan_CreateDatabaseConfig): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }- if (message.database !== "") {- obj.database = message.database;- }- if (message.table !== "") {- obj.table = message.table;- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }- if (message.cluster !== "") {- obj.cluster = message.cluster;- }- if (message.owner !== "") {- obj.owner = message.owner;- }- if (message.backup !== "") {- obj.backup = message.backup;- }+ message.target !== undefined && (obj.target = message.target);+ message.database !== undefined && (obj.database = message.database);+ message.table !== undefined && (obj.table = message.table);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.cluster !== undefined && (obj.cluster = message.cluster);+ message.owner !== undefined && (obj.owner = message.owner);+ message.backup !== undefined && (obj.backup = message.backup);+ obj.labels = {};if (message.labels) {- const entries = Object.entries(message.labels);- if (entries.length > 0) {- obj.labels = {};- entries.forEach(([k, v]) => {- obj.labels[k] = v;- });- }+ Object.entries(message.labels).forEach(([k, v]) => {+ obj.labels[k] = v;+ });}return obj;},@@ -1979,6 +1942,7 @@ export const Plan_CreateDatabaseConfig = {create(base?: DeepPartial<Plan_CreateDatabaseConfig>): Plan_CreateDatabaseConfig {return Plan_CreateDatabaseConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Plan_CreateDatabaseConfig>): Plan_CreateDatabaseConfig {const message = createBasePlan_CreateDatabaseConfig();message.target = object.target ?? "";@@ -2050,18 +2014,15 @@ export const Plan_CreateDatabaseConfig_LabelsEntry = {toJSON(message: Plan_CreateDatabaseConfig_LabelsEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<Plan_CreateDatabaseConfig_LabelsEntry>): Plan_CreateDatabaseConfig_LabelsEntry {return Plan_CreateDatabaseConfig_LabelsEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Plan_CreateDatabaseConfig_LabelsEntry>): Plan_CreateDatabaseConfig_LabelsEntry {const message = createBasePlan_CreateDatabaseConfig_LabelsEntry();message.key = object.key ?? "";@@ -2170,30 +2131,21 @@ export const Plan_ChangeDatabaseConfig = {toJSON(message: Plan_ChangeDatabaseConfig): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }- if (message.sheet !== "") {- obj.sheet = message.sheet;- }- if (message.type !== 0) {- obj.type = plan_ChangeDatabaseConfig_TypeToJSON(message.type);- }- if (message.schemaVersion !== "") {- obj.schemaVersion = message.schemaVersion;- }- if (message.rollbackEnabled === true) {- obj.rollbackEnabled = message.rollbackEnabled;- }- if (message.rollbackDetail !== undefined) {- obj.rollbackDetail = Plan_ChangeDatabaseConfig_RollbackDetail.toJSON(message.rollbackDetail);- }+ message.target !== undefined && (obj.target = message.target);+ message.sheet !== undefined && (obj.sheet = message.sheet);+ message.type !== undefined && (obj.type = plan_ChangeDatabaseConfig_TypeToJSON(message.type));+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);+ message.rollbackEnabled !== undefined && (obj.rollbackEnabled = message.rollbackEnabled);+ message.rollbackDetail !== undefined && (obj.rollbackDetail = message.rollbackDetail+ ? Plan_ChangeDatabaseConfig_RollbackDetail.toJSON(message.rollbackDetail)+ : undefined);return obj;},create(base?: DeepPartial<Plan_ChangeDatabaseConfig>): Plan_ChangeDatabaseConfig {return Plan_ChangeDatabaseConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Plan_ChangeDatabaseConfig>): Plan_ChangeDatabaseConfig {const message = createBasePlan_ChangeDatabaseConfig();message.target = object.target ?? "";@@ -2262,18 +2214,15 @@ export const Plan_ChangeDatabaseConfig_RollbackDetail = {toJSON(message: Plan_ChangeDatabaseConfig_RollbackDetail): unknown {const obj: any = {};- if (message.rollbackFromTask !== "") {- obj.rollbackFromTask = message.rollbackFromTask;- }- if (message.rollbackFromIssue !== "") {- obj.rollbackFromIssue = message.rollbackFromIssue;- }+ message.rollbackFromTask !== undefined && (obj.rollbackFromTask = message.rollbackFromTask);+ message.rollbackFromIssue !== undefined && (obj.rollbackFromIssue = message.rollbackFromIssue);return obj;},create(base?: DeepPartial<Plan_ChangeDatabaseConfig_RollbackDetail>): Plan_ChangeDatabaseConfig_RollbackDetail {return Plan_ChangeDatabaseConfig_RollbackDetail.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Plan_ChangeDatabaseConfig_RollbackDetail>): Plan_ChangeDatabaseConfig_RollbackDetail {const message = createBasePlan_ChangeDatabaseConfig_RollbackDetail();message.rollbackFromTask = object.rollbackFromTask ?? "";@@ -2360,24 +2309,19 @@ export const Plan_RestoreDatabaseConfig = {toJSON(message: Plan_RestoreDatabaseConfig): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }- if (message.createDatabaseConfig !== undefined) {- obj.createDatabaseConfig = Plan_CreateDatabaseConfig.toJSON(message.createDatabaseConfig);- }- if (message.backup !== undefined) {- obj.backup = message.backup;- }- if (message.pointInTime !== undefined) {- obj.pointInTime = message.pointInTime.toISOString();- }+ message.target !== undefined && (obj.target = message.target);+ message.createDatabaseConfig !== undefined && (obj.createDatabaseConfig = message.createDatabaseConfig+ ? Plan_CreateDatabaseConfig.toJSON(message.createDatabaseConfig)+ : undefined);+ message.backup !== undefined && (obj.backup = message.backup);+ message.pointInTime !== undefined && (obj.pointInTime = message.pointInTime.toISOString());return obj;},create(base?: DeepPartial<Plan_RestoreDatabaseConfig>): Plan_RestoreDatabaseConfig {return Plan_RestoreDatabaseConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Plan_RestoreDatabaseConfig>): Plan_RestoreDatabaseConfig {const message = createBasePlan_RestoreDatabaseConfig();message.target = object.target ?? "";@@ -2455,21 +2399,16 @@ export const ListPlanCheckRunsRequest = {toJSON(message: ListPlanCheckRunsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListPlanCheckRunsRequest>): ListPlanCheckRunsRequest {return ListPlanCheckRunsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListPlanCheckRunsRequest>): ListPlanCheckRunsRequest {const message = createBaseListPlanCheckRunsRequest();message.parent = object.parent ?? "";@@ -2535,18 +2474,19 @@ export const ListPlanCheckRunsResponse = {toJSON(message: ListPlanCheckRunsResponse): unknown {const obj: any = {};- if (message.planCheckRuns?.length) {- obj.planCheckRuns = message.planCheckRuns.map((e) => PlanCheckRun.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.planCheckRuns) {+ obj.planCheckRuns = message.planCheckRuns.map((e) => e ? PlanCheckRun.toJSON(e) : undefined);+ } else {+ obj.planCheckRuns = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListPlanCheckRunsResponse>): ListPlanCheckRunsResponse {return ListPlanCheckRunsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListPlanCheckRunsResponse>): ListPlanCheckRunsResponse {const message = createBaseListPlanCheckRunsResponse();message.planCheckRuns = object.planCheckRuns?.map((e) => PlanCheckRun.fromPartial(e)) || [];@@ -2596,15 +2536,14 @@ export const RunPlanChecksRequest = {toJSON(message: RunPlanChecksRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<RunPlanChecksRequest>): RunPlanChecksRequest {return RunPlanChecksRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RunPlanChecksRequest>): RunPlanChecksRequest {const message = createBaseRunPlanChecksRequest();message.name = object.name ?? "";@@ -2649,6 +2588,7 @@ export const RunPlanChecksResponse = {create(base?: DeepPartial<RunPlanChecksResponse>): RunPlanChecksResponse {return RunPlanChecksResponse.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<RunPlanChecksResponse>): RunPlanChecksResponse {const message = createBaseRunPlanChecksResponse();return message;@@ -2720,11 +2660,11 @@ export const BatchRunTasksRequest = {toJSON(message: BatchRunTasksRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.tasks?.length) {- obj.tasks = message.tasks;+ message.parent !== undefined && (obj.parent = message.parent);+ if (message.tasks) {+ obj.tasks = message.tasks.map((e) => e);+ } else {+ obj.tasks = [];}message.reason !== undefined && (obj.reason = message.reason);return obj;@@ -2733,6 +2673,7 @@ export const BatchRunTasksRequest = {create(base?: DeepPartial<BatchRunTasksRequest>): BatchRunTasksRequest {return BatchRunTasksRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchRunTasksRequest>): BatchRunTasksRequest {const message = createBaseBatchRunTasksRequest();message.parent = object.parent ?? "";@@ -2779,6 +2720,7 @@ export const BatchRunTasksResponse = {create(base?: DeepPartial<BatchRunTasksResponse>): BatchRunTasksResponse {return BatchRunTasksResponse.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<BatchRunTasksResponse>): BatchRunTasksResponse {const message = createBaseBatchRunTasksResponse();return message;@@ -2850,11 +2792,11 @@ export const BatchSkipTasksRequest = {toJSON(message: BatchSkipTasksRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.tasks?.length) {- obj.tasks = message.tasks;+ message.parent !== undefined && (obj.parent = message.parent);+ if (message.tasks) {+ obj.tasks = message.tasks.map((e) => e);+ } else {+ obj.tasks = [];}message.reason !== undefined && (obj.reason = message.reason);return obj;@@ -2863,6 +2805,7 @@ export const BatchSkipTasksRequest = {create(base?: DeepPartial<BatchSkipTasksRequest>): BatchSkipTasksRequest {return BatchSkipTasksRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchSkipTasksRequest>): BatchSkipTasksRequest {const message = createBaseBatchSkipTasksRequest();message.parent = object.parent ?? "";@@ -2909,6 +2852,7 @@ export const BatchSkipTasksResponse = {create(base?: DeepPartial<BatchSkipTasksResponse>): BatchSkipTasksResponse {return BatchSkipTasksResponse.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<BatchSkipTasksResponse>): BatchSkipTasksResponse {const message = createBaseBatchSkipTasksResponse();return message;@@ -2980,11 +2924,11 @@ export const BatchCancelTaskRunsRequest = {toJSON(message: BatchCancelTaskRunsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.taskRuns?.length) {- obj.taskRuns = message.taskRuns;+ message.parent !== undefined && (obj.parent = message.parent);+ if (message.taskRuns) {+ obj.taskRuns = message.taskRuns.map((e) => e);+ } else {+ obj.taskRuns = [];}message.reason !== undefined && (obj.reason = message.reason);return obj;@@ -2993,6 +2937,7 @@ export const BatchCancelTaskRunsRequest = {create(base?: DeepPartial<BatchCancelTaskRunsRequest>): BatchCancelTaskRunsRequest {return BatchCancelTaskRunsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<BatchCancelTaskRunsRequest>): BatchCancelTaskRunsRequest {const message = createBaseBatchCancelTaskRunsRequest();message.parent = object.parent ?? "";@@ -3039,6 +2984,7 @@ export const BatchCancelTaskRunsResponse = {create(base?: DeepPartial<BatchCancelTaskRunsResponse>): BatchCancelTaskRunsResponse {return BatchCancelTaskRunsResponse.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<BatchCancelTaskRunsResponse>): BatchCancelTaskRunsResponse {const message = createBaseBatchCancelTaskRunsResponse();return message;@@ -3186,39 +3132,26 @@ export const PlanCheckRun = {toJSON(message: PlanCheckRun): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.type !== 0) {- obj.type = planCheckRun_TypeToJSON(message.type);- }- if (message.status !== 0) {- obj.status = planCheckRun_StatusToJSON(message.status);- }- if (message.target !== "") {- obj.target = message.target;- }- if (message.sheet !== "") {- obj.sheet = message.sheet;- }- if (message.results?.length) {- obj.results = message.results.map((e) => PlanCheckRun_Result.toJSON(e));- }- if (message.error !== "") {- obj.error = message.error;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.type !== undefined && (obj.type = planCheckRun_TypeToJSON(message.type));+ message.status !== undefined && (obj.status = planCheckRun_StatusToJSON(message.status));+ message.target !== undefined && (obj.target = message.target);+ message.sheet !== undefined && (obj.sheet = message.sheet);+ if (message.results) {+ obj.results = message.results.map((e) => e ? PlanCheckRun_Result.toJSON(e) : undefined);+ } else {+ obj.results = [];+ }+ message.error !== undefined && (obj.error = message.error);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());return obj;},create(base?: DeepPartial<PlanCheckRun>): PlanCheckRun {return PlanCheckRun.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRun>): PlanCheckRun {const message = createBasePlanCheckRun();message.name = object.name ?? "";@@ -3336,30 +3269,23 @@ export const PlanCheckRun_Result = {toJSON(message: PlanCheckRun_Result): unknown {const obj: any = {};- if (message.status !== 0) {- obj.status = planCheckRun_Result_StatusToJSON(message.status);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.content !== "") {- obj.content = message.content;- }- if (message.code !== 0) {- obj.code = Math.round(message.code);- }- if (message.sqlSummaryReport !== undefined) {- obj.sqlSummaryReport = PlanCheckRun_Result_SqlSummaryReport.toJSON(message.sqlSummaryReport);- }- if (message.sqlReviewReport !== undefined) {- obj.sqlReviewReport = PlanCheckRun_Result_SqlReviewReport.toJSON(message.sqlReviewReport);- }+ message.status !== undefined && (obj.status = planCheckRun_Result_StatusToJSON(message.status));+ message.title !== undefined && (obj.title = message.title);+ message.content !== undefined && (obj.content = message.content);+ message.code !== undefined && (obj.code = Math.round(message.code));+ message.sqlSummaryReport !== undefined && (obj.sqlSummaryReport = message.sqlSummaryReport+ ? PlanCheckRun_Result_SqlSummaryReport.toJSON(message.sqlSummaryReport)+ : undefined);+ message.sqlReviewReport !== undefined && (obj.sqlReviewReport = message.sqlReviewReport+ ? PlanCheckRun_Result_SqlReviewReport.toJSON(message.sqlReviewReport)+ : undefined);return obj;},create(base?: DeepPartial<PlanCheckRun_Result>): PlanCheckRun_Result {return PlanCheckRun_Result.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRun_Result>): PlanCheckRun_Result {const message = createBasePlanCheckRun_Result();message.status = object.status ?? 0;@@ -3452,24 +3378,22 @@ export const PlanCheckRun_Result_SqlSummaryReport = {toJSON(message: PlanCheckRun_Result_SqlSummaryReport): unknown {const obj: any = {};- if (message.code !== 0) {- obj.code = Math.round(message.code);- }- if (message.statementTypes?.length) {- obj.statementTypes = message.statementTypes;- }- if (message.affectedRows !== 0) {- obj.affectedRows = Math.round(message.affectedRows);- }- if (message.changedResources !== undefined) {- obj.changedResources = ChangedResources.toJSON(message.changedResources);- }+ message.code !== undefined && (obj.code = Math.round(message.code));+ if (message.statementTypes) {+ obj.statementTypes = message.statementTypes.map((e) => e);+ } else {+ obj.statementTypes = [];+ }+ message.affectedRows !== undefined && (obj.affectedRows = Math.round(message.affectedRows));+ message.changedResources !== undefined &&+ (obj.changedResources = message.changedResources ? ChangedResources.toJSON(message.changedResources) : undefined);return obj;},create(base?: DeepPartial<PlanCheckRun_Result_SqlSummaryReport>): PlanCheckRun_Result_SqlSummaryReport {return PlanCheckRun_Result_SqlSummaryReport.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRun_Result_SqlSummaryReport>): PlanCheckRun_Result_SqlSummaryReport {const message = createBasePlanCheckRun_Result_SqlSummaryReport();message.code = object.code ?? 0;@@ -3558,24 +3482,17 @@ export const PlanCheckRun_Result_SqlReviewReport = {toJSON(message: PlanCheckRun_Result_SqlReviewReport): unknown {const obj: any = {};- if (message.line !== 0) {- obj.line = Math.round(message.line);- }- if (message.column !== 0) {- obj.column = Math.round(message.column);- }- if (message.detail !== "") {- obj.detail = message.detail;- }- if (message.code !== 0) {- obj.code = Math.round(message.code);- }+ message.line !== undefined && (obj.line = Math.round(message.line));+ message.column !== undefined && (obj.column = Math.round(message.column));+ message.detail !== undefined && (obj.detail = message.detail);+ message.code !== undefined && (obj.code = Math.round(message.code));return obj;},create(base?: DeepPartial<PlanCheckRun_Result_SqlReviewReport>): PlanCheckRun_Result_SqlReviewReport {return PlanCheckRun_Result_SqlReviewReport.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PlanCheckRun_Result_SqlReviewReport>): PlanCheckRun_Result_SqlReviewReport {const message = createBasePlanCheckRun_Result_SqlReviewReport();message.line = object.line ?? 0;@@ -3627,15 +3544,14 @@ export const GetRolloutRequest = {toJSON(message: GetRolloutRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetRolloutRequest>): GetRolloutRequest {return GetRolloutRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetRolloutRequest>): GetRolloutRequest {const message = createBaseGetRolloutRequest();message.name = object.name ?? "";@@ -3697,18 +3613,15 @@ export const CreateRolloutRequest = {toJSON(message: CreateRolloutRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.plan !== "") {- obj.plan = message.plan;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.plan !== undefined && (obj.plan = message.plan);return obj;},create(base?: DeepPartial<CreateRolloutRequest>): CreateRolloutRequest {return CreateRolloutRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateRolloutRequest>): CreateRolloutRequest {const message = createBaseCreateRolloutRequest();message.parent = object.parent ?? "";@@ -3771,18 +3684,15 @@ export const PreviewRolloutRequest = {toJSON(message: PreviewRolloutRequest): unknown {const obj: any = {};- if (message.project !== "") {- obj.project = message.project;- }- if (message.plan !== undefined) {- obj.plan = Plan.toJSON(message.plan);- }+ message.project !== undefined && (obj.project = message.project);+ message.plan !== undefined && (obj.plan = message.plan ? Plan.toJSON(message.plan) : undefined);return obj;},create(base?: DeepPartial<PreviewRolloutRequest>): PreviewRolloutRequest {return PreviewRolloutRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PreviewRolloutRequest>): PreviewRolloutRequest {const message = createBasePreviewRolloutRequest();message.project = object.project ?? "";@@ -3856,21 +3766,16 @@ export const ListTaskRunsRequest = {toJSON(message: ListTaskRunsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListTaskRunsRequest>): ListTaskRunsRequest {return ListTaskRunsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListTaskRunsRequest>): ListTaskRunsRequest {const message = createBaseListTaskRunsRequest();message.parent = object.parent ?? "";@@ -3934,18 +3839,19 @@ export const ListTaskRunsResponse = {toJSON(message: ListTaskRunsResponse): unknown {const obj: any = {};- if (message.taskRuns?.length) {- obj.taskRuns = message.taskRuns.map((e) => TaskRun.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.taskRuns) {+ obj.taskRuns = message.taskRuns.map((e) => e ? TaskRun.toJSON(e) : undefined);+ } else {+ obj.taskRuns = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListTaskRunsResponse>): ListTaskRunsResponse {return ListTaskRunsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListTaskRunsResponse>): ListTaskRunsResponse {const message = createBaseListTaskRunsResponse();message.taskRuns = object.taskRuns?.map((e) => TaskRun.fromPartial(e)) || [];@@ -4041,20 +3947,14 @@ export const Rollout = {toJSON(message: Rollout): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.plan !== "") {- obj.plan = message.plan;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.stages?.length) {- obj.stages = message.stages.map((e) => Stage.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.plan !== undefined && (obj.plan = message.plan);+ message.title !== undefined && (obj.title = message.title);+ if (message.stages) {+ obj.stages = message.stages.map((e) => e ? Stage.toJSON(e) : undefined);+ } else {+ obj.stages = [];}return obj;},@@ -4062,6 +3962,7 @@ export const Rollout = {create(base?: DeepPartial<Rollout>): Rollout {return Rollout.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Rollout>): Rollout {const message = createBaseRollout();message.name = object.name ?? "";@@ -4160,20 +4061,14 @@ export const Stage = {toJSON(message: Stage): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.environment !== "") {- obj.environment = message.environment;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.tasks?.length) {- obj.tasks = message.tasks.map((e) => Task.toJSON(e));+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.environment !== undefined && (obj.environment = message.environment);+ message.title !== undefined && (obj.title = message.title);+ if (message.tasks) {+ obj.tasks = message.tasks.map((e) => e ? Task.toJSON(e) : undefined);+ } else {+ obj.tasks = [];}return obj;},@@ -4181,6 +4076,7 @@ export const Stage = {create(base?: DeepPartial<Stage>): Stage {return Stage.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Stage>): Stage {const message = createBaseStage();message.name = object.name ?? "";@@ -4413,57 +4309,42 @@ export const Task = {toJSON(message: Task): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.specId !== "") {- obj.specId = message.specId;- }- if (message.status !== 0) {- obj.status = task_StatusToJSON(message.status);- }- if (message.skippedReason !== "") {- obj.skippedReason = message.skippedReason;- }- if (message.type !== 0) {- obj.type = task_TypeToJSON(message.type);- }- if (message.blockedByTasks?.length) {- obj.blockedByTasks = message.blockedByTasks;- }- if (message.target !== "") {- obj.target = message.target;- }- if (message.databaseCreate !== undefined) {- obj.databaseCreate = Task_DatabaseCreate.toJSON(message.databaseCreate);- }- if (message.databaseSchemaBaseline !== undefined) {- obj.databaseSchemaBaseline = Task_DatabaseSchemaBaseline.toJSON(message.databaseSchemaBaseline);- }- if (message.databaseSchemaUpdate !== undefined) {- obj.databaseSchemaUpdate = Task_DatabaseSchemaUpdate.toJSON(message.databaseSchemaUpdate);- }- if (message.databaseDataUpdate !== undefined) {- obj.databaseDataUpdate = Task_DatabaseDataUpdate.toJSON(message.databaseDataUpdate);- }- if (message.databaseBackup !== undefined) {- obj.databaseBackup = Task_DatabaseBackup.toJSON(message.databaseBackup);- }- if (message.databaseRestoreRestore !== undefined) {- obj.databaseRestoreRestore = Task_DatabaseRestoreRestore.toJSON(message.databaseRestoreRestore);- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.title !== undefined && (obj.title = message.title);+ message.specId !== undefined && (obj.specId = message.specId);+ message.status !== undefined && (obj.status = task_StatusToJSON(message.status));+ message.skippedReason !== undefined && (obj.skippedReason = message.skippedReason);+ message.type !== undefined && (obj.type = task_TypeToJSON(message.type));+ if (message.blockedByTasks) {+ obj.blockedByTasks = message.blockedByTasks.map((e) => e);+ } else {+ obj.blockedByTasks = [];+ }+ message.target !== undefined && (obj.target = message.target);+ message.databaseCreate !== undefined &&+ (obj.databaseCreate = message.databaseCreate ? Task_DatabaseCreate.toJSON(message.databaseCreate) : undefined);+ message.databaseSchemaBaseline !== undefined && (obj.databaseSchemaBaseline = message.databaseSchemaBaseline+ ? Task_DatabaseSchemaBaseline.toJSON(message.databaseSchemaBaseline)+ : undefined);+ message.databaseSchemaUpdate !== undefined && (obj.databaseSchemaUpdate = message.databaseSchemaUpdate+ ? Task_DatabaseSchemaUpdate.toJSON(message.databaseSchemaUpdate)+ : undefined);+ message.databaseDataUpdate !== undefined && (obj.databaseDataUpdate = message.databaseDataUpdate+ ? Task_DatabaseDataUpdate.toJSON(message.databaseDataUpdate)+ : undefined);+ message.databaseBackup !== undefined &&+ (obj.databaseBackup = message.databaseBackup ? Task_DatabaseBackup.toJSON(message.databaseBackup) : undefined);+ message.databaseRestoreRestore !== undefined && (obj.databaseRestoreRestore = message.databaseRestoreRestore+ ? Task_DatabaseRestoreRestore.toJSON(message.databaseRestoreRestore)+ : undefined);return obj;},create(base?: DeepPartial<Task>): Task {return Task.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Task>): Task {const message = createBaseTask();message.name = object.name ?? "";@@ -4616,32 +4497,17 @@ export const Task_DatabaseCreate = {toJSON(message: Task_DatabaseCreate): unknown {const obj: any = {};- if (message.project !== "") {- obj.project = message.project;- }- if (message.database !== "") {- obj.database = message.database;- }- if (message.table !== "") {- obj.table = message.table;- }- if (message.sheet !== "") {- obj.sheet = message.sheet;- }- if (message.characterSet !== "") {- obj.characterSet = message.characterSet;- }- if (message.collation !== "") {- obj.collation = message.collation;- }+ message.project !== undefined && (obj.project = message.project);+ message.database !== undefined && (obj.database = message.database);+ message.table !== undefined && (obj.table = message.table);+ message.sheet !== undefined && (obj.sheet = message.sheet);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ obj.labels = {};if (message.labels) {- const entries = Object.entries(message.labels);- if (entries.length > 0) {- obj.labels = {};- entries.forEach(([k, v]) => {- obj.labels[k] = v;- });- }+ Object.entries(message.labels).forEach(([k, v]) => {+ obj.labels[k] = v;+ });}return obj;},@@ -4649,6 +4515,7 @@ export const Task_DatabaseCreate = {create(base?: DeepPartial<Task_DatabaseCreate>): Task_DatabaseCreate {return Task_DatabaseCreate.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Task_DatabaseCreate>): Task_DatabaseCreate {const message = createBaseTask_DatabaseCreate();message.project = object.project ?? "";@@ -4718,18 +4585,15 @@ export const Task_DatabaseCreate_LabelsEntry = {toJSON(message: Task_DatabaseCreate_LabelsEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== "") {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<Task_DatabaseCreate_LabelsEntry>): Task_DatabaseCreate_LabelsEntry {return Task_DatabaseCreate_LabelsEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Task_DatabaseCreate_LabelsEntry>): Task_DatabaseCreate_LabelsEntry {const message = createBaseTask_DatabaseCreate_LabelsEntry();message.key = object.key ?? "";@@ -4779,15 +4643,14 @@ export const Task_DatabaseSchemaBaseline = {toJSON(message: Task_DatabaseSchemaBaseline): unknown {const obj: any = {};- if (message.schemaVersion !== "") {- obj.schemaVersion = message.schemaVersion;- }+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);return obj;},create(base?: DeepPartial<Task_DatabaseSchemaBaseline>): Task_DatabaseSchemaBaseline {return Task_DatabaseSchemaBaseline.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Task_DatabaseSchemaBaseline>): Task_DatabaseSchemaBaseline {const message = createBaseTask_DatabaseSchemaBaseline();message.schemaVersion = object.schemaVersion ?? "";@@ -4849,18 +4712,15 @@ export const Task_DatabaseSchemaUpdate = {toJSON(message: Task_DatabaseSchemaUpdate): unknown {const obj: any = {};- if (message.sheet !== "") {- obj.sheet = message.sheet;- }- if (message.schemaVersion !== "") {- obj.schemaVersion = message.schemaVersion;- }+ message.sheet !== undefined && (obj.sheet = message.sheet);+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);return obj;},create(base?: DeepPartial<Task_DatabaseSchemaUpdate>): Task_DatabaseSchemaUpdate {return Task_DatabaseSchemaUpdate.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Task_DatabaseSchemaUpdate>): Task_DatabaseSchemaUpdate {const message = createBaseTask_DatabaseSchemaUpdate();message.sheet = object.sheet ?? "";@@ -5000,36 +4860,22 @@ export const Task_DatabaseDataUpdate = {toJSON(message: Task_DatabaseDataUpdate): unknown {const obj: any = {};- if (message.sheet !== "") {- obj.sheet = message.sheet;- }- if (message.schemaVersion !== "") {- obj.schemaVersion = message.schemaVersion;- }- if (message.rollbackEnabled === true) {- obj.rollbackEnabled = message.rollbackEnabled;- }- if (message.rollbackSqlStatus !== 0) {- obj.rollbackSqlStatus = task_DatabaseDataUpdate_RollbackSqlStatusToJSON(message.rollbackSqlStatus);- }- if (message.rollbackError !== "") {- obj.rollbackError = message.rollbackError;- }- if (message.rollbackSheet !== "") {- obj.rollbackSheet = message.rollbackSheet;- }- if (message.rollbackFromIssue !== "") {- obj.rollbackFromIssue = message.rollbackFromIssue;- }- if (message.rollbackFromTask !== "") {- obj.rollbackFromTask = message.rollbackFromTask;- }+ message.sheet !== undefined && (obj.sheet = message.sheet);+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);+ message.rollbackEnabled !== undefined && (obj.rollbackEnabled = message.rollbackEnabled);+ message.rollbackSqlStatus !== undefined &&+ (obj.rollbackSqlStatus = task_DatabaseDataUpdate_RollbackSqlStatusToJSON(message.rollbackSqlStatus));+ message.rollbackError !== undefined && (obj.rollbackError = message.rollbackError);+ message.rollbackSheet !== undefined && (obj.rollbackSheet = message.rollbackSheet);+ message.rollbackFromIssue !== undefined && (obj.rollbackFromIssue = message.rollbackFromIssue);+ message.rollbackFromTask !== undefined && (obj.rollbackFromTask = message.rollbackFromTask);return obj;},create(base?: DeepPartial<Task_DatabaseDataUpdate>): Task_DatabaseDataUpdate {return Task_DatabaseDataUpdate.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Task_DatabaseDataUpdate>): Task_DatabaseDataUpdate {const message = createBaseTask_DatabaseDataUpdate();message.sheet = object.sheet ?? "";@@ -5085,15 +4931,14 @@ export const Task_DatabaseBackup = {toJSON(message: Task_DatabaseBackup): unknown {const obj: any = {};- if (message.backup !== "") {- obj.backup = message.backup;- }+ message.backup !== undefined && (obj.backup = message.backup);return obj;},create(base?: DeepPartial<Task_DatabaseBackup>): Task_DatabaseBackup {return Task_DatabaseBackup.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Task_DatabaseBackup>): Task_DatabaseBackup {const message = createBaseTask_DatabaseBackup();message.backup = object.backup ?? "";@@ -5166,21 +5011,16 @@ export const Task_DatabaseRestoreRestore = {toJSON(message: Task_DatabaseRestoreRestore): unknown {const obj: any = {};- if (message.target !== "") {- obj.target = message.target;- }- if (message.backup !== undefined) {- obj.backup = message.backup;- }- if (message.pointInTime !== undefined) {- obj.pointInTime = message.pointInTime.toISOString();- }+ message.target !== undefined && (obj.target = message.target);+ message.backup !== undefined && (obj.backup = message.backup);+ message.pointInTime !== undefined && (obj.pointInTime = message.pointInTime.toISOString());return obj;},create(base?: DeepPartial<Task_DatabaseRestoreRestore>): Task_DatabaseRestoreRestore {return Task_DatabaseRestoreRestore.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Task_DatabaseRestoreRestore>): Task_DatabaseRestoreRestore {const message = createBaseTask_DatabaseRestoreRestore();message.target = object.target ?? "";@@ -5355,45 +5195,24 @@ export const TaskRun = {toJSON(message: TaskRun): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.uid !== "") {- obj.uid = message.uid;- }- if (message.creator !== "") {- obj.creator = message.creator;- }- if (message.updater !== "") {- obj.updater = message.updater;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.status !== 0) {- obj.status = taskRun_StatusToJSON(message.status);- }- if (message.detail !== "") {- obj.detail = message.detail;- }- if (message.changeHistory !== "") {- obj.changeHistory = message.changeHistory;- }- if (message.schemaVersion !== "") {- obj.schemaVersion = message.schemaVersion;- }+ message.name !== undefined && (obj.name = message.name);+ message.uid !== undefined && (obj.uid = message.uid);+ message.creator !== undefined && (obj.creator = message.creator);+ message.updater !== undefined && (obj.updater = message.updater);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());+ message.title !== undefined && (obj.title = message.title);+ message.status !== undefined && (obj.status = taskRun_StatusToJSON(message.status));+ message.detail !== undefined && (obj.detail = message.detail);+ message.changeHistory !== undefined && (obj.changeHistory = message.changeHistory);+ message.schemaVersion !== undefined && (obj.schemaVersion = message.schemaVersion);return obj;},create(base?: DeepPartial<TaskRun>): TaskRun {return TaskRun.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TaskRun>): TaskRun {const message = createBaseTaskRun();message.name = object.name ?? "";@@ -6383,6 +6202,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/v1/schema_design_service.ts b/frontend/src/types/proto/v1/schema_design_service.tsindex a10e6c896a..33e8531668 100644--- a/frontend/src/types/proto/v1/schema_design_service.ts+++ b/frontend/src/types/proto/v1/schema_design_service.ts@@ -419,57 +419,31 @@ export const SchemaDesign = {toJSON(message: SchemaDesign): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.schema !== "") {- obj.schema = message.schema;- }- if (message.schemaMetadata !== undefined) {- obj.schemaMetadata = DatabaseMetadata.toJSON(message.schemaMetadata);- }- if (message.baselineSchema !== "") {- obj.baselineSchema = message.baselineSchema;- }- if (message.baselineSchemaMetadata !== undefined) {- obj.baselineSchemaMetadata = DatabaseMetadata.toJSON(message.baselineSchemaMetadata);- }- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.baselineDatabase !== "") {- obj.baselineDatabase = message.baselineDatabase;- }- if (message.baselineSheetName !== "") {- obj.baselineSheetName = message.baselineSheetName;- }- if (message.type !== 0) {- obj.type = schemaDesign_TypeToJSON(message.type);- }- if (message.etag !== "") {- obj.etag = message.etag;- }- if (message.creator !== "") {- obj.creator = message.creator;- }- if (message.updater !== "") {- obj.updater = message.updater;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }+ message.name !== undefined && (obj.name = message.name);+ message.title !== undefined && (obj.title = message.title);+ message.schema !== undefined && (obj.schema = message.schema);+ message.schemaMetadata !== undefined &&+ (obj.schemaMetadata = message.schemaMetadata ? DatabaseMetadata.toJSON(message.schemaMetadata) : undefined);+ message.baselineSchema !== undefined && (obj.baselineSchema = message.baselineSchema);+ message.baselineSchemaMetadata !== undefined && (obj.baselineSchemaMetadata = message.baselineSchemaMetadata+ ? DatabaseMetadata.toJSON(message.baselineSchemaMetadata)+ : undefined);+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.baselineDatabase !== undefined && (obj.baselineDatabase = message.baselineDatabase);+ message.baselineSheetName !== undefined && (obj.baselineSheetName = message.baselineSheetName);+ message.type !== undefined && (obj.type = schemaDesign_TypeToJSON(message.type));+ message.etag !== undefined && (obj.etag = message.etag);+ message.creator !== undefined && (obj.creator = message.creator);+ message.updater !== undefined && (obj.updater = message.updater);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());return obj;},create(base?: DeepPartial<SchemaDesign>): SchemaDesign {return SchemaDesign.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaDesign>): SchemaDesign {const message = createBaseSchemaDesign();message.name = object.name ?? "";@@ -537,15 +511,14 @@ export const GetSchemaDesignRequest = {toJSON(message: GetSchemaDesignRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetSchemaDesignRequest>): GetSchemaDesignRequest {return GetSchemaDesignRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetSchemaDesignRequest>): GetSchemaDesignRequest {const message = createBaseGetSchemaDesignRequest();message.name = object.name ?? "";@@ -629,24 +602,17 @@ export const ListSchemaDesignsRequest = {toJSON(message: ListSchemaDesignsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.filter !== undefined && (obj.filter = message.filter);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {return ListSchemaDesignsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSchemaDesignsRequest>): ListSchemaDesignsRequest {const message = createBaseListSchemaDesignsRequest();message.parent = object.parent ?? "";@@ -713,18 +679,19 @@ export const ListSchemaDesignsResponse = {toJSON(message: ListSchemaDesignsResponse): unknown {const obj: any = {};- if (message.schemaDesigns?.length) {- obj.schemaDesigns = message.schemaDesigns.map((e) => SchemaDesign.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.schemaDesigns) {+ obj.schemaDesigns = message.schemaDesigns.map((e) => e ? SchemaDesign.toJSON(e) : undefined);+ } else {+ obj.schemaDesigns = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListSchemaDesignsResponse>): ListSchemaDesignsResponse {return ListSchemaDesignsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSchemaDesignsResponse>): ListSchemaDesignsResponse {const message = createBaseListSchemaDesignsResponse();message.schemaDesigns = object.schemaDesigns?.map((e) => SchemaDesign.fromPartial(e)) || [];@@ -787,18 +754,16 @@ export const CreateSchemaDesignRequest = {toJSON(message: CreateSchemaDesignRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.schemaDesign !== undefined) {- obj.schemaDesign = SchemaDesign.toJSON(message.schemaDesign);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.schemaDesign !== undefined &&+ (obj.schemaDesign = message.schemaDesign ? SchemaDesign.toJSON(message.schemaDesign) : undefined);return obj;},create(base?: DeepPartial<CreateSchemaDesignRequest>): CreateSchemaDesignRequest {return CreateSchemaDesignRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateSchemaDesignRequest>): CreateSchemaDesignRequest {const message = createBaseCreateSchemaDesignRequest();message.parent = object.parent ?? "";@@ -863,18 +828,16 @@ export const UpdateSchemaDesignRequest = {toJSON(message: UpdateSchemaDesignRequest): unknown {const obj: any = {};- if (message.schemaDesign !== undefined) {- obj.schemaDesign = SchemaDesign.toJSON(message.schemaDesign);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.schemaDesign !== undefined &&+ (obj.schemaDesign = message.schemaDesign ? SchemaDesign.toJSON(message.schemaDesign) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateSchemaDesignRequest>): UpdateSchemaDesignRequest {return UpdateSchemaDesignRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateSchemaDesignRequest>): UpdateSchemaDesignRequest {const message = createBaseUpdateSchemaDesignRequest();message.schemaDesign = (object.schemaDesign !== undefined && object.schemaDesign !== null)@@ -939,18 +902,15 @@ export const MergeSchemaDesignRequest = {toJSON(message: MergeSchemaDesignRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.targetName !== "") {- obj.targetName = message.targetName;- }+ message.name !== undefined && (obj.name = message.name);+ message.targetName !== undefined && (obj.targetName = message.targetName);return obj;},create(base?: DeepPartial<MergeSchemaDesignRequest>): MergeSchemaDesignRequest {return MergeSchemaDesignRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<MergeSchemaDesignRequest>): MergeSchemaDesignRequest {const message = createBaseMergeSchemaDesignRequest();message.name = object.name ?? "";@@ -1013,18 +973,15 @@ export const ParseSchemaStringRequest = {toJSON(message: ParseSchemaStringRequest): unknown {const obj: any = {};- if (message.schemaString !== "") {- obj.schemaString = message.schemaString;- }- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }+ message.schemaString !== undefined && (obj.schemaString = message.schemaString);+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));return obj;},create(base?: DeepPartial<ParseSchemaStringRequest>): ParseSchemaStringRequest {return ParseSchemaStringRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ParseSchemaStringRequest>): ParseSchemaStringRequest {const message = createBaseParseSchemaStringRequest();message.schemaString = object.schemaString ?? "";@@ -1076,15 +1033,15 @@ export const ParseSchemaStringResponse = {toJSON(message: ParseSchemaStringResponse): unknown {const obj: any = {};- if (message.schemaMetadata !== undefined) {- obj.schemaMetadata = DatabaseMetadata.toJSON(message.schemaMetadata);- }+ message.schemaMetadata !== undefined &&+ (obj.schemaMetadata = message.schemaMetadata ? DatabaseMetadata.toJSON(message.schemaMetadata) : undefined);return obj;},create(base?: DeepPartial<ParseSchemaStringResponse>): ParseSchemaStringResponse {return ParseSchemaStringResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ParseSchemaStringResponse>): ParseSchemaStringResponse {const message = createBaseParseSchemaStringResponse();message.schemaMetadata = (object.schemaMetadata !== undefined && object.schemaMetadata !== null)@@ -1135,15 +1092,14 @@ export const DeleteSchemaDesignRequest = {toJSON(message: DeleteSchemaDesignRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteSchemaDesignRequest>): DeleteSchemaDesignRequest {return DeleteSchemaDesignRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteSchemaDesignRequest>): DeleteSchemaDesignRequest {const message = createBaseDeleteSchemaDesignRequest();message.name = object.name ?? "";diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.tsindex d7ae82991e..e7820cba49 100644--- a/frontend/src/types/proto/v1/setting_service.ts+++ b/frontend/src/types/proto/v1/setting_service.ts@@ -455,18 +455,15 @@ export const ListSettingsRequest = {toJSON(message: ListSettingsRequest): unknown {const obj: any = {};- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<ListSettingsRequest>): ListSettingsRequest {return ListSettingsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSettingsRequest>): ListSettingsRequest {const message = createBaseListSettingsRequest();message.pageSize = object.pageSize ?? 0;@@ -529,18 +526,19 @@ export const ListSettingsResponse = {toJSON(message: ListSettingsResponse): unknown {const obj: any = {};- if (message.settings?.length) {- obj.settings = message.settings.map((e) => Setting.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.settings) {+ obj.settings = message.settings.map((e) => e ? Setting.toJSON(e) : undefined);+ } else {+ obj.settings = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<ListSettingsResponse>): ListSettingsResponse {return ListSettingsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ListSettingsResponse>): ListSettingsResponse {const message = createBaseListSettingsResponse();message.settings = object.settings?.map((e) => Setting.fromPartial(e)) || [];@@ -590,15 +588,14 @@ export const GetSettingRequest = {toJSON(message: GetSettingRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<GetSettingRequest>): GetSettingRequest {return GetSettingRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetSettingRequest>): GetSettingRequest {const message = createBaseGetSettingRequest();message.name = object.name ?? "";@@ -647,15 +644,14 @@ export const GetSettingResponse = {toJSON(message: GetSettingResponse): unknown {const obj: any = {};- if (message.setting !== undefined) {- obj.setting = Setting.toJSON(message.setting);- }+ message.setting !== undefined && (obj.setting = message.setting ? Setting.toJSON(message.setting) : undefined);return obj;},create(base?: DeepPartial<GetSettingResponse>): GetSettingResponse {return GetSettingResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetSettingResponse>): GetSettingResponse {const message = createBaseGetSettingResponse();message.setting = (object.setting !== undefined && object.setting !== null)@@ -719,18 +715,15 @@ export const SetSettingRequest = {toJSON(message: SetSettingRequest): unknown {const obj: any = {};- if (message.setting !== undefined) {- obj.setting = Setting.toJSON(message.setting);- }- if (message.validateOnly === true) {- obj.validateOnly = message.validateOnly;- }+ message.setting !== undefined && (obj.setting = message.setting ? Setting.toJSON(message.setting) : undefined);+ message.validateOnly !== undefined && (obj.validateOnly = message.validateOnly);return obj;},create(base?: DeepPartial<SetSettingRequest>): SetSettingRequest {return SetSettingRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SetSettingRequest>): SetSettingRequest {const message = createBaseSetSettingRequest();message.setting = (object.setting !== undefined && object.setting !== null)@@ -795,18 +788,15 @@ export const Setting = {toJSON(message: Setting): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.value !== undefined) {- obj.value = Value.toJSON(message.value);- }+ message.name !== undefined && (obj.name = message.name);+ message.value !== undefined && (obj.value = message.value ? Value.toJSON(message.value) : undefined);return obj;},create(base?: DeepPartial<Setting>): Setting {return Setting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Setting>): Setting {const message = createBaseSetting();message.name = object.name ?? "";@@ -998,45 +988,51 @@ export const Value = {toJSON(message: Value): unknown {const obj: any = {};- if (message.stringValue !== undefined) {- obj.stringValue = message.stringValue;- }- if (message.smtpMailDeliverySettingValue !== undefined) {- obj.smtpMailDeliverySettingValue = SMTPMailDeliverySettingValue.toJSON(message.smtpMailDeliverySettingValue);- }- if (message.appImSettingValue !== undefined) {- obj.appImSettingValue = AppIMSetting.toJSON(message.appImSettingValue);- }- if (message.agentPluginSettingValue !== undefined) {- obj.agentPluginSettingValue = AgentPluginSetting.toJSON(message.agentPluginSettingValue);- }- if (message.workspaceProfileSettingValue !== undefined) {- obj.workspaceProfileSettingValue = WorkspaceProfileSetting.toJSON(message.workspaceProfileSettingValue);- }- if (message.workspaceApprovalSettingValue !== undefined) {- obj.workspaceApprovalSettingValue = WorkspaceApprovalSetting.toJSON(message.workspaceApprovalSettingValue);- }- if (message.workspaceTrialSettingValue !== undefined) {- obj.workspaceTrialSettingValue = WorkspaceTrialSetting.toJSON(message.workspaceTrialSettingValue);- }- if (message.externalApprovalSettingValue !== undefined) {- obj.externalApprovalSettingValue = ExternalApprovalSetting.toJSON(message.externalApprovalSettingValue);- }- if (message.schemaTemplateSettingValue !== undefined) {- obj.schemaTemplateSettingValue = SchemaTemplateSetting.toJSON(message.schemaTemplateSettingValue);- }- if (message.dataClassificationSettingValue !== undefined) {- obj.dataClassificationSettingValue = DataClassificationSetting.toJSON(message.dataClassificationSettingValue);- }- if (message.semanticCategorySettingValue !== undefined) {- obj.semanticCategorySettingValue = SemanticCategorySetting.toJSON(message.semanticCategorySettingValue);- }+ message.stringValue !== undefined && (obj.stringValue = message.stringValue);+ message.smtpMailDeliverySettingValue !== undefined &&+ (obj.smtpMailDeliverySettingValue = message.smtpMailDeliverySettingValue+ ? SMTPMailDeliverySettingValue.toJSON(message.smtpMailDeliverySettingValue)+ : undefined);+ message.appImSettingValue !== undefined &&+ (obj.appImSettingValue = message.appImSettingValue ? AppIMSetting.toJSON(message.appImSettingValue) : undefined);+ message.agentPluginSettingValue !== undefined && (obj.agentPluginSettingValue = message.agentPluginSettingValue+ ? AgentPluginSetting.toJSON(message.agentPluginSettingValue)+ : undefined);+ message.workspaceProfileSettingValue !== undefined &&+ (obj.workspaceProfileSettingValue = message.workspaceProfileSettingValue+ ? WorkspaceProfileSetting.toJSON(message.workspaceProfileSettingValue)+ : undefined);+ message.workspaceApprovalSettingValue !== undefined &&+ (obj.workspaceApprovalSettingValue = message.workspaceApprovalSettingValue+ ? WorkspaceApprovalSetting.toJSON(message.workspaceApprovalSettingValue)+ : undefined);+ message.workspaceTrialSettingValue !== undefined &&+ (obj.workspaceTrialSettingValue = message.workspaceTrialSettingValue+ ? WorkspaceTrialSetting.toJSON(message.workspaceTrialSettingValue)+ : undefined);+ message.externalApprovalSettingValue !== undefined &&+ (obj.externalApprovalSettingValue = message.externalApprovalSettingValue+ ? ExternalApprovalSetting.toJSON(message.externalApprovalSettingValue)+ : undefined);+ message.schemaTemplateSettingValue !== undefined &&+ (obj.schemaTemplateSettingValue = message.schemaTemplateSettingValue+ ? SchemaTemplateSetting.toJSON(message.schemaTemplateSettingValue)+ : undefined);+ message.dataClassificationSettingValue !== undefined &&+ (obj.dataClassificationSettingValue = message.dataClassificationSettingValue+ ? DataClassificationSetting.toJSON(message.dataClassificationSettingValue)+ : undefined);+ message.semanticCategorySettingValue !== undefined &&+ (obj.semanticCategorySettingValue = message.semanticCategorySettingValue+ ? SemanticCategorySetting.toJSON(message.semanticCategorySettingValue)+ : undefined);return obj;},create(base?: DeepPartial<Value>): Value {return Value.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Value>): Value {const message = createBaseValue();message.stringValue = object.stringValue ?? undefined;@@ -1250,45 +1246,26 @@ export const SMTPMailDeliverySettingValue = {toJSON(message: SMTPMailDeliverySettingValue): unknown {const obj: any = {};- if (message.server !== "") {- obj.server = message.server;- }- if (message.port !== 0) {- obj.port = Math.round(message.port);- }- if (message.encryption !== 0) {- obj.encryption = sMTPMailDeliverySettingValue_EncryptionToJSON(message.encryption);- }- if (message.ca !== undefined) {- obj.ca = message.ca;- }- if (message.key !== undefined) {- obj.key = message.key;- }- if (message.cert !== undefined) {- obj.cert = message.cert;- }- if (message.authentication !== 0) {- obj.authentication = sMTPMailDeliverySettingValue_AuthenticationToJSON(message.authentication);- }- if (message.username !== "") {- obj.username = message.username;- }- if (message.password !== undefined) {- obj.password = message.password;- }- if (message.from !== "") {- obj.from = message.from;- }- if (message.to !== "") {- obj.to = message.to;- }+ message.server !== undefined && (obj.server = message.server);+ message.port !== undefined && (obj.port = Math.round(message.port));+ message.encryption !== undefined &&+ (obj.encryption = sMTPMailDeliverySettingValue_EncryptionToJSON(message.encryption));+ message.ca !== undefined && (obj.ca = message.ca);+ message.key !== undefined && (obj.key = message.key);+ message.cert !== undefined && (obj.cert = message.cert);+ message.authentication !== undefined &&+ (obj.authentication = sMTPMailDeliverySettingValue_AuthenticationToJSON(message.authentication));+ message.username !== undefined && (obj.username = message.username);+ message.password !== undefined && (obj.password = message.password);+ message.from !== undefined && (obj.from = message.from);+ message.to !== undefined && (obj.to = message.to);return obj;},create(base?: DeepPartial<SMTPMailDeliverySettingValue>): SMTPMailDeliverySettingValue {return SMTPMailDeliverySettingValue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SMTPMailDeliverySettingValue>): SMTPMailDeliverySettingValue {const message = createBaseSMTPMailDeliverySettingValue();message.server = object.server ?? "";@@ -1384,24 +1361,19 @@ export const AppIMSetting = {toJSON(message: AppIMSetting): unknown {const obj: any = {};- if (message.imType !== 0) {- obj.imType = appIMSetting_IMTypeToJSON(message.imType);- }- if (message.appId !== "") {- obj.appId = message.appId;- }- if (message.appSecret !== "") {- obj.appSecret = message.appSecret;- }- if (message.externalApproval !== undefined) {- obj.externalApproval = AppIMSetting_ExternalApproval.toJSON(message.externalApproval);- }+ message.imType !== undefined && (obj.imType = appIMSetting_IMTypeToJSON(message.imType));+ message.appId !== undefined && (obj.appId = message.appId);+ message.appSecret !== undefined && (obj.appSecret = message.appSecret);+ message.externalApproval !== undefined && (obj.externalApproval = message.externalApproval+ ? AppIMSetting_ExternalApproval.toJSON(message.externalApproval)+ : undefined);return obj;},create(base?: DeepPartial<AppIMSetting>): AppIMSetting {return AppIMSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AppIMSetting>): AppIMSetting {const message = createBaseAppIMSetting();message.imType = object.imType ?? 0;@@ -1468,18 +1440,15 @@ export const AppIMSetting_ExternalApproval = {toJSON(message: AppIMSetting_ExternalApproval): unknown {const obj: any = {};- if (message.enabled === true) {- obj.enabled = message.enabled;- }- if (message.approvalDefinitionId !== "") {- obj.approvalDefinitionId = message.approvalDefinitionId;- }+ message.enabled !== undefined && (obj.enabled = message.enabled);+ message.approvalDefinitionId !== undefined && (obj.approvalDefinitionId = message.approvalDefinitionId);return obj;},create(base?: DeepPartial<AppIMSetting_ExternalApproval>): AppIMSetting_ExternalApproval {return AppIMSetting_ExternalApproval.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AppIMSetting_ExternalApproval>): AppIMSetting_ExternalApproval {const message = createBaseAppIMSetting_ExternalApproval();message.enabled = object.enabled ?? false;@@ -1539,18 +1508,15 @@ export const AgentPluginSetting = {toJSON(message: AgentPluginSetting): unknown {const obj: any = {};- if (message.url !== "") {- obj.url = message.url;- }- if (message.token !== "") {- obj.token = message.token;- }+ message.url !== undefined && (obj.url = message.url);+ message.token !== undefined && (obj.token = message.token);return obj;},create(base?: DeepPartial<AgentPluginSetting>): AgentPluginSetting {return AgentPluginSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AgentPluginSetting>): AgentPluginSetting {const message = createBaseAgentPluginSetting();message.url = object.url ?? "";@@ -1666,30 +1632,25 @@ export const WorkspaceProfileSetting = {toJSON(message: WorkspaceProfileSetting): unknown {const obj: any = {};- if (message.externalUrl !== "") {- obj.externalUrl = message.externalUrl;- }- if (message.disallowSignup === true) {- obj.disallowSignup = message.disallowSignup;- }- if (message.require2fa === true) {- obj.require2fa = message.require2fa;- }- if (message.outboundIpList?.length) {- obj.outboundIpList = message.outboundIpList;- }- if (message.gitopsWebhookUrl !== "") {- obj.gitopsWebhookUrl = message.gitopsWebhookUrl;- }- if (message.refreshTokenDuration !== undefined) {- obj.refreshTokenDuration = Duration.toJSON(message.refreshTokenDuration);- }+ message.externalUrl !== undefined && (obj.externalUrl = message.externalUrl);+ message.disallowSignup !== undefined && (obj.disallowSignup = message.disallowSignup);+ message.require2fa !== undefined && (obj.require2fa = message.require2fa);+ if (message.outboundIpList) {+ obj.outboundIpList = message.outboundIpList.map((e) => e);+ } else {+ obj.outboundIpList = [];+ }+ message.gitopsWebhookUrl !== undefined && (obj.gitopsWebhookUrl = message.gitopsWebhookUrl);+ message.refreshTokenDuration !== undefined && (obj.refreshTokenDuration = message.refreshTokenDuration+ ? Duration.toJSON(message.refreshTokenDuration)+ : undefined);return obj;},create(base?: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {return WorkspaceProfileSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<WorkspaceProfileSetting>): WorkspaceProfileSetting {const message = createBaseWorkspaceProfileSetting();message.externalUrl = object.externalUrl ?? "";@@ -1749,8 +1710,10 @@ export const WorkspaceApprovalSetting = {toJSON(message: WorkspaceApprovalSetting): unknown {const obj: any = {};- if (message.rules?.length) {- obj.rules = message.rules.map((e) => WorkspaceApprovalSetting_Rule.toJSON(e));+ if (message.rules) {+ obj.rules = message.rules.map((e) => e ? WorkspaceApprovalSetting_Rule.toJSON(e) : undefined);+ } else {+ obj.rules = [];}return obj;},@@ -1758,6 +1721,7 @@ export const WorkspaceApprovalSetting = {create(base?: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {return WorkspaceApprovalSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<WorkspaceApprovalSetting>): WorkspaceApprovalSetting {const message = createBaseWorkspaceApprovalSetting();message.rules = object.rules?.map((e) => WorkspaceApprovalSetting_Rule.fromPartial(e)) || [];@@ -1819,18 +1783,16 @@ export const WorkspaceApprovalSetting_Rule = {toJSON(message: WorkspaceApprovalSetting_Rule): unknown {const obj: any = {};- if (message.template !== undefined) {- obj.template = ApprovalTemplate.toJSON(message.template);- }- if (message.condition !== undefined) {- obj.condition = Expr.toJSON(message.condition);- }+ message.template !== undefined &&+ (obj.template = message.template ? ApprovalTemplate.toJSON(message.template) : undefined);+ message.condition !== undefined && (obj.condition = message.condition ? Expr.toJSON(message.condition) : undefined);return obj;},create(base?: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {return WorkspaceApprovalSetting_Rule.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<WorkspaceApprovalSetting_Rule>): WorkspaceApprovalSetting_Rule {const message = createBaseWorkspaceApprovalSetting_Rule();message.template = (object.template !== undefined && object.template !== null)@@ -1886,8 +1848,10 @@ export const ExternalApprovalSetting = {toJSON(message: ExternalApprovalSetting): unknown {const obj: any = {};- if (message.nodes?.length) {- obj.nodes = message.nodes.map((e) => ExternalApprovalSetting_Node.toJSON(e));+ if (message.nodes) {+ obj.nodes = message.nodes.map((e) => e ? ExternalApprovalSetting_Node.toJSON(e) : undefined);+ } else {+ obj.nodes = [];}return obj;},@@ -1895,6 +1859,7 @@ export const ExternalApprovalSetting = {create(base?: DeepPartial<ExternalApprovalSetting>): ExternalApprovalSetting {return ExternalApprovalSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExternalApprovalSetting>): ExternalApprovalSetting {const message = createBaseExternalApprovalSetting();message.nodes = object.nodes?.map((e) => ExternalApprovalSetting_Node.fromPartial(e)) || [];@@ -1967,21 +1932,16 @@ export const ExternalApprovalSetting_Node = {toJSON(message: ExternalApprovalSetting_Node): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.endpoint !== "") {- obj.endpoint = message.endpoint;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.endpoint !== undefined && (obj.endpoint = message.endpoint);return obj;},create(base?: DeepPartial<ExternalApprovalSetting_Node>): ExternalApprovalSetting_Node {return ExternalApprovalSetting_Node.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExternalApprovalSetting_Node>): ExternalApprovalSetting_Node {const message = createBaseExternalApprovalSetting_Node();message.id = object.id ?? "";@@ -2049,11 +2009,17 @@ export const SchemaTemplateSetting = {toJSON(message: SchemaTemplateSetting): unknown {const obj: any = {};- if (message.fieldTemplates?.length) {- obj.fieldTemplates = message.fieldTemplates.map((e) => SchemaTemplateSetting_FieldTemplate.toJSON(e));- }- if (message.columnTypes?.length) {- obj.columnTypes = message.columnTypes.map((e) => SchemaTemplateSetting_ColumnType.toJSON(e));+ if (message.fieldTemplates) {+ obj.fieldTemplates = message.fieldTemplates.map((e) =>+ e ? SchemaTemplateSetting_FieldTemplate.toJSON(e) : undefined+ );+ } else {+ obj.fieldTemplates = [];+ }+ if (message.columnTypes) {+ obj.columnTypes = message.columnTypes.map((e) => e ? SchemaTemplateSetting_ColumnType.toJSON(e) : undefined);+ } else {+ obj.columnTypes = [];}return obj;},@@ -2061,6 +2027,7 @@ export const SchemaTemplateSetting = {create(base?: DeepPartial<SchemaTemplateSetting>): SchemaTemplateSetting {return SchemaTemplateSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaTemplateSetting>): SchemaTemplateSetting {const message = createBaseSchemaTemplateSetting();message.fieldTemplates = object.fieldTemplates?.map((e) => SchemaTemplateSetting_FieldTemplate.fromPartial(e)) ||@@ -2146,24 +2113,17 @@ export const SchemaTemplateSetting_FieldTemplate = {toJSON(message: SchemaTemplateSetting_FieldTemplate): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.category !== "") {- obj.category = message.category;- }- if (message.column !== undefined) {- obj.column = ColumnMetadata.toJSON(message.column);- }+ message.id !== undefined && (obj.id = message.id);+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.category !== undefined && (obj.category = message.category);+ message.column !== undefined && (obj.column = message.column ? ColumnMetadata.toJSON(message.column) : undefined);return obj;},create(base?: DeepPartial<SchemaTemplateSetting_FieldTemplate>): SchemaTemplateSetting_FieldTemplate {return SchemaTemplateSetting_FieldTemplate.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaTemplateSetting_FieldTemplate>): SchemaTemplateSetting_FieldTemplate {const message = createBaseSchemaTemplateSetting_FieldTemplate();message.id = object.id ?? "";@@ -2241,14 +2201,12 @@ export const SchemaTemplateSetting_ColumnType = {toJSON(message: SchemaTemplateSetting_ColumnType): unknown {const obj: any = {};- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.enabled === true) {- obj.enabled = message.enabled;- }- if (message.types?.length) {- obj.types = message.types;+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.enabled !== undefined && (obj.enabled = message.enabled);+ if (message.types) {+ obj.types = message.types.map((e) => e);+ } else {+ obj.types = [];}return obj;},@@ -2256,6 +2214,7 @@ export const SchemaTemplateSetting_ColumnType = {create(base?: DeepPartial<SchemaTemplateSetting_ColumnType>): SchemaTemplateSetting_ColumnType {return SchemaTemplateSetting_ColumnType.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SchemaTemplateSetting_ColumnType>): SchemaTemplateSetting_ColumnType {const message = createBaseSchemaTemplateSetting_ColumnType();message.engine = object.engine ?? 0;@@ -2363,30 +2322,19 @@ export const WorkspaceTrialSetting = {toJSON(message: WorkspaceTrialSetting): unknown {const obj: any = {};- if (message.instanceCount !== 0) {- obj.instanceCount = Math.round(message.instanceCount);- }- if (message.expireTime !== undefined) {- obj.expireTime = message.expireTime.toISOString();- }- if (message.issuedTime !== undefined) {- obj.issuedTime = message.issuedTime.toISOString();- }- if (message.subject !== "") {- obj.subject = message.subject;- }- if (message.orgName !== "") {- obj.orgName = message.orgName;- }- if (message.plan !== 0) {- obj.plan = planTypeToJSON(message.plan);- }+ message.instanceCount !== undefined && (obj.instanceCount = Math.round(message.instanceCount));+ message.expireTime !== undefined && (obj.expireTime = message.expireTime.toISOString());+ message.issuedTime !== undefined && (obj.issuedTime = message.issuedTime.toISOString());+ message.subject !== undefined && (obj.subject = message.subject);+ message.orgName !== undefined && (obj.orgName = message.orgName);+ message.plan !== undefined && (obj.plan = planTypeToJSON(message.plan));return obj;},create(base?: DeepPartial<WorkspaceTrialSetting>): WorkspaceTrialSetting {return WorkspaceTrialSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<WorkspaceTrialSetting>): WorkspaceTrialSetting {const message = createBaseWorkspaceTrialSetting();message.instanceCount = object.instanceCount ?? 0;@@ -2444,8 +2392,12 @@ export const DataClassificationSetting = {toJSON(message: DataClassificationSetting): unknown {const obj: any = {};- if (message.configs?.length) {- obj.configs = message.configs.map((e) => DataClassificationSetting_DataClassificationConfig.toJSON(e));+ if (message.configs) {+ obj.configs = message.configs.map((e) =>+ e ? DataClassificationSetting_DataClassificationConfig.toJSON(e) : undefined+ );+ } else {+ obj.configs = [];}return obj;},@@ -2453,6 +2405,7 @@ export const DataClassificationSetting = {create(base?: DeepPartial<DataClassificationSetting>): DataClassificationSetting {return DataClassificationSetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting>): DataClassificationSetting {const message = createBaseDataClassificationSetting();message.configs = object.configs?.map((e) => DataClassificationSetting_DataClassificationConfig.fromPartial(e)) ||@@ -2558,23 +2511,20 @@ export const DataClassificationSetting_DataClassificationConfig = {toJSON(message: DataClassificationSetting_DataClassificationConfig): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.levels?.length) {- obj.levels = message.levels.map((e) => DataClassificationSetting_DataClassificationConfig_Level.toJSON(e));- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ if (message.levels) {+ obj.levels = message.levels.map((e) =>+ e ? DataClassificationSetting_DataClassificationConfig_Level.toJSON(e) : undefined+ );+ } else {+ obj.levels = [];+ }+ obj.classification = {};if (message.classification) {- const entries = Object.entries(message.classification);- if (entries.length > 0) {- obj.classification = {};- entries.forEach(([k, v]) => {- obj.classification[k] = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(v);- });- }+ Object.entries(message.classification).forEach(([k, v]) => {+ obj.classification[k] = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(v);+ });}return obj;},@@ -2584,6 +2534,7 @@ export const DataClassificationSetting_DataClassificationConfig = {): DataClassificationSetting_DataClassificationConfig {return DataClassificationSetting_DataClassificationConfig.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting_DataClassificationConfig>,): DataClassificationSetting_DataClassificationConfig {@@ -2683,18 +2634,10 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {toJSON(message: DataClassificationSetting_DataClassificationConfig_Level): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.sensitive === true) {- obj.sensitive = message.sensitive;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ message.sensitive !== undefined && (obj.sensitive = message.sensitive);return obj;},@@ -2703,6 +2646,7 @@ export const DataClassificationSetting_DataClassificationConfig_Level = {): DataClassificationSetting_DataClassificationConfig_Level {return DataClassificationSetting_DataClassificationConfig_Level.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting_DataClassificationConfig_Level>,): DataClassificationSetting_DataClassificationConfig_Level {@@ -2797,18 +2741,10 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificatitoJSON(message: DataClassificationSetting_DataClassificationConfig_DataClassification): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }- if (message.levelId !== undefined) {- obj.levelId = message.levelId;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);+ message.levelId !== undefined && (obj.levelId = message.levelId);return obj;},@@ -2817,6 +2753,7 @@ export const DataClassificationSetting_DataClassificationConfig_DataClassificati): DataClassificationSetting_DataClassificationConfig_DataClassification {return DataClassificationSetting_DataClassificationConfig_DataClassification.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting_DataClassificationConfig_DataClassification>,): DataClassificationSetting_DataClassificationConfig_DataClassification {@@ -2897,12 +2834,10 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEntoJSON(message: DataClassificationSetting_DataClassificationConfig_ClassificationEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value !== undefined) {- obj.value = DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(message.value);- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value+ ? DataClassificationSetting_DataClassificationConfig_DataClassification.toJSON(message.value)+ : undefined);return obj;},@@ -2911,6 +2846,7 @@ export const DataClassificationSetting_DataClassificationConfig_ClassificationEn): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {return DataClassificationSetting_DataClassificationConfig_ClassificationEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DataClassificationSetting_DataClassificationConfig_ClassificationEntry>,): DataClassificationSetting_DataClassificationConfig_ClassificationEntry {@@ -2968,8 +2904,12 @@ export const SemanticCategorySetting = {toJSON(message: SemanticCategorySetting): unknown {const obj: any = {};- if (message.categories?.length) {- obj.categories = message.categories.map((e) => SemanticCategorySetting_SemanticCategory.toJSON(e));+ if (message.categories) {+ obj.categories = message.categories.map((e) =>+ e ? SemanticCategorySetting_SemanticCategory.toJSON(e) : undefined+ );+ } else {+ obj.categories = [];}return obj;},@@ -2977,6 +2917,7 @@ export const SemanticCategorySetting = {create(base?: DeepPartial<SemanticCategorySetting>): SemanticCategorySetting {return SemanticCategorySetting.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SemanticCategorySetting>): SemanticCategorySetting {const message = createBaseSemanticCategorySetting();message.categories = object.categories?.map((e) => SemanticCategorySetting_SemanticCategory.fromPartial(e)) || [];@@ -3049,21 +2990,16 @@ export const SemanticCategorySetting_SemanticCategory = {toJSON(message: SemanticCategorySetting_SemanticCategory): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.description !== "") {- obj.description = message.description;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.description !== undefined && (obj.description = message.description);return obj;},create(base?: DeepPartial<SemanticCategorySetting_SemanticCategory>): SemanticCategorySetting_SemanticCategory {return SemanticCategorySetting_SemanticCategory.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SemanticCategorySetting_SemanticCategory>): SemanticCategorySetting_SemanticCategory {const message = createBaseSemanticCategorySetting_SemanticCategory();message.id = object.id ?? "";diff --git a/frontend/src/types/proto/v1/sheet_service.ts b/frontend/src/types/proto/v1/sheet_service.tsindex 253b69a5ec..1fb833dfea 100644--- a/frontend/src/types/proto/v1/sheet_service.ts+++ b/frontend/src/types/proto/v1/sheet_service.ts@@ -1,10 +1,10 @@/* eslint-disable */+import * as Long from "long";import type { CallContext, CallOptions } from "nice-grpc-common";import * as _m0 from "protobufjs/minimal";import { Empty } from "../google/protobuf/empty";import { FieldMask } from "../google/protobuf/field_mask";import { Timestamp } from "../google/protobuf/timestamp";-import Long = require("long");export const protobufPackage = "bytebase.v1";@@ -385,18 +385,15 @@ export const CreateSheetRequest = {toJSON(message: CreateSheetRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.sheet !== undefined) {- obj.sheet = Sheet.toJSON(message.sheet);- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.sheet !== undefined && (obj.sheet = message.sheet ? Sheet.toJSON(message.sheet) : undefined);return obj;},create(base?: DeepPartial<CreateSheetRequest>): CreateSheetRequest {return CreateSheetRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<CreateSheetRequest>): CreateSheetRequest {const message = createBaseCreateSheetRequest();message.parent = object.parent ?? "";@@ -459,18 +456,15 @@ export const GetSheetRequest = {toJSON(message: GetSheetRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.raw === true) {- obj.raw = message.raw;- }+ message.name !== undefined && (obj.name = message.name);+ message.raw !== undefined && (obj.raw = message.raw);return obj;},create(base?: DeepPartial<GetSheetRequest>): GetSheetRequest {return GetSheetRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<GetSheetRequest>): GetSheetRequest {const message = createBaseGetSheetRequest();message.name = object.name ?? "";@@ -533,18 +527,15 @@ export const UpdateSheetRequest = {toJSON(message: UpdateSheetRequest): unknown {const obj: any = {};- if (message.sheet !== undefined) {- obj.sheet = Sheet.toJSON(message.sheet);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.sheet !== undefined && (obj.sheet = message.sheet ? Sheet.toJSON(message.sheet) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateSheetRequest>): UpdateSheetRequest {return UpdateSheetRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateSheetRequest>): UpdateSheetRequest {const message = createBaseUpdateSheetRequest();message.sheet = (object.sheet !== undefined && object.sheet !== null) ? Sheet.fromPartial(object.sheet) : undefined;@@ -607,18 +598,16 @@ export const UpdateSheetOrganizerRequest = {toJSON(message: UpdateSheetOrganizerRequest): unknown {const obj: any = {};- if (message.organizer !== undefined) {- obj.organizer = SheetOrganizer.toJSON(message.organizer);- }- if (message.updateMask !== undefined) {- obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask));- }+ message.organizer !== undefined &&+ (obj.organizer = message.organizer ? SheetOrganizer.toJSON(message.organizer) : undefined);+ message.updateMask !== undefined && (obj.updateMask = FieldMask.toJSON(FieldMask.wrap(message.updateMask)));return obj;},create(base?: DeepPartial<UpdateSheetOrganizerRequest>): UpdateSheetOrganizerRequest {return UpdateSheetOrganizerRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateSheetOrganizerRequest>): UpdateSheetOrganizerRequest {const message = createBaseUpdateSheetOrganizerRequest();message.organizer = (object.organizer !== undefined && object.organizer !== null)@@ -694,21 +683,16 @@ export const SheetOrganizer = {toJSON(message: SheetOrganizer): unknown {const obj: any = {};- if (message.sheet !== "") {- obj.sheet = message.sheet;- }- if (message.starred === true) {- obj.starred = message.starred;- }- if (message.pinned === true) {- obj.pinned = message.pinned;- }+ message.sheet !== undefined && (obj.sheet = message.sheet);+ message.starred !== undefined && (obj.starred = message.starred);+ message.pinned !== undefined && (obj.pinned = message.pinned);return obj;},create(base?: DeepPartial<SheetOrganizer>): SheetOrganizer {return SheetOrganizer.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SheetOrganizer>): SheetOrganizer {const message = createBaseSheetOrganizer();message.sheet = object.sheet ?? "";@@ -759,15 +743,14 @@ export const DeleteSheetRequest = {toJSON(message: DeleteSheetRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);return obj;},create(base?: DeepPartial<DeleteSheetRequest>): DeleteSheetRequest {return DeleteSheetRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DeleteSheetRequest>): DeleteSheetRequest {const message = createBaseDeleteSheetRequest();message.name = object.name ?? "";@@ -851,24 +834,17 @@ export const SearchSheetsRequest = {toJSON(message: SearchSheetsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }- if (message.filter !== "") {- obj.filter = message.filter;- }- if (message.pageSize !== 0) {- obj.pageSize = Math.round(message.pageSize);- }- if (message.pageToken !== "") {- obj.pageToken = message.pageToken;- }+ message.parent !== undefined && (obj.parent = message.parent);+ message.filter !== undefined && (obj.filter = message.filter);+ message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize));+ message.pageToken !== undefined && (obj.pageToken = message.pageToken);return obj;},create(base?: DeepPartial<SearchSheetsRequest>): SearchSheetsRequest {return SearchSheetsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchSheetsRequest>): SearchSheetsRequest {const message = createBaseSearchSheetsRequest();message.parent = object.parent ?? "";@@ -933,18 +909,19 @@ export const SearchSheetsResponse = {toJSON(message: SearchSheetsResponse): unknown {const obj: any = {};- if (message.sheets?.length) {- obj.sheets = message.sheets.map((e) => Sheet.toJSON(e));- }- if (message.nextPageToken !== "") {- obj.nextPageToken = message.nextPageToken;+ if (message.sheets) {+ obj.sheets = message.sheets.map((e) => e ? Sheet.toJSON(e) : undefined);+ } else {+ obj.sheets = [];}+ message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken);return obj;},create(base?: DeepPartial<SearchSheetsResponse>): SearchSheetsResponse {return SearchSheetsResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SearchSheetsResponse>): SearchSheetsResponse {const message = createBaseSearchSheetsResponse();message.sheets = object.sheets?.map((e) => Sheet.fromPartial(e)) || [];@@ -994,15 +971,14 @@ export const SyncSheetsRequest = {toJSON(message: SyncSheetsRequest): unknown {const obj: any = {};- if (message.parent !== "") {- obj.parent = message.parent;- }+ message.parent !== undefined && (obj.parent = message.parent);return obj;},create(base?: DeepPartial<SyncSheetsRequest>): SyncSheetsRequest {return SyncSheetsRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<SyncSheetsRequest>): SyncSheetsRequest {const message = createBaseSyncSheetsRequest();message.parent = object.parent ?? "";@@ -1199,51 +1175,27 @@ export const Sheet = {toJSON(message: Sheet): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.database !== "") {- obj.database = message.database;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.creator !== "") {- obj.creator = message.creator;- }- if (message.createTime !== undefined) {- obj.createTime = message.createTime.toISOString();- }- if (message.updateTime !== undefined) {- obj.updateTime = message.updateTime.toISOString();- }- if (message.content.length !== 0) {- obj.content = base64FromBytes(message.content);- }- if (message.contentSize !== 0) {- obj.contentSize = Math.round(message.contentSize);- }- if (message.visibility !== 0) {- obj.visibility = sheet_VisibilityToJSON(message.visibility);- }- if (message.source !== 0) {- obj.source = sheet_SourceToJSON(message.source);- }- if (message.type !== 0) {- obj.type = sheet_TypeToJSON(message.type);- }- if (message.starred === true) {- obj.starred = message.starred;- }- if (message.payload !== "") {- obj.payload = message.payload;- }+ message.name !== undefined && (obj.name = message.name);+ message.database !== undefined && (obj.database = message.database);+ message.title !== undefined && (obj.title = message.title);+ message.creator !== undefined && (obj.creator = message.creator);+ message.createTime !== undefined && (obj.createTime = message.createTime.toISOString());+ message.updateTime !== undefined && (obj.updateTime = message.updateTime.toISOString());+ message.content !== undefined &&+ (obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array(0)));+ message.contentSize !== undefined && (obj.contentSize = Math.round(message.contentSize));+ message.visibility !== undefined && (obj.visibility = sheet_VisibilityToJSON(message.visibility));+ message.source !== undefined && (obj.source = sheet_SourceToJSON(message.source));+ message.type !== undefined && (obj.type = sheet_TypeToJSON(message.type));+ message.starred !== undefined && (obj.starred = message.starred);+ message.payload !== undefined && (obj.payload = message.payload);return obj;},create(base?: DeepPartial<Sheet>): Sheet {return Sheet.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Sheet>): Sheet {const message = createBaseSheet();message.name = object.name ?? "";@@ -1814,6 +1766,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.tsindex f244baeffb..a4a97abed9 100644--- a/frontend/src/types/proto/v1/sql_service.ts+++ b/frontend/src/types/proto/v1/sql_service.ts@@ -1,11 +1,11 @@/* eslint-disable */+import * as Long from "long";import type { CallContext, CallOptions } from "nice-grpc-common";import * as _m0 from "protobufjs/minimal";import { Duration } from "../google/protobuf/duration";import { NullValue, nullValueFromJSON, nullValueToJSON, Value } from "../google/protobuf/struct";import { Engine, engineFromJSON, engineToJSON } from "./common";import { DatabaseMetadata } from "./database_service";-import Long = require("long");export const protobufPackage = "bytebase.v1";@@ -344,21 +344,17 @@ export const DifferPreviewRequest = {toJSON(message: DifferPreviewRequest): unknown {const obj: any = {};- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.oldSchema !== "") {- obj.oldSchema = message.oldSchema;- }- if (message.newMetadata !== undefined) {- obj.newMetadata = DatabaseMetadata.toJSON(message.newMetadata);- }+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.oldSchema !== undefined && (obj.oldSchema = message.oldSchema);+ message.newMetadata !== undefined &&+ (obj.newMetadata = message.newMetadata ? DatabaseMetadata.toJSON(message.newMetadata) : undefined);return obj;},create(base?: DeepPartial<DifferPreviewRequest>): DifferPreviewRequest {return DifferPreviewRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DifferPreviewRequest>): DifferPreviewRequest {const message = createBaseDifferPreviewRequest();message.engine = object.engine ?? 0;@@ -411,15 +407,14 @@ export const DifferPreviewResponse = {toJSON(message: DifferPreviewResponse): unknown {const obj: any = {};- if (message.schema !== "") {- obj.schema = message.schema;- }+ message.schema !== undefined && (obj.schema = message.schema);return obj;},create(base?: DeepPartial<DifferPreviewResponse>): DifferPreviewResponse {return DifferPreviewResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<DifferPreviewResponse>): DifferPreviewResponse {const message = createBaseDifferPreviewResponse();message.schema = object.schema ?? "";@@ -514,27 +509,18 @@ export const AdminExecuteRequest = {toJSON(message: AdminExecuteRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.connectionDatabase !== "") {- obj.connectionDatabase = message.connectionDatabase;- }- if (message.statement !== "") {- obj.statement = message.statement;- }- if (message.limit !== 0) {- obj.limit = Math.round(message.limit);- }- if (message.timeout !== undefined) {- obj.timeout = Duration.toJSON(message.timeout);- }+ message.name !== undefined && (obj.name = message.name);+ message.connectionDatabase !== undefined && (obj.connectionDatabase = message.connectionDatabase);+ message.statement !== undefined && (obj.statement = message.statement);+ message.limit !== undefined && (obj.limit = Math.round(message.limit));+ message.timeout !== undefined && (obj.timeout = message.timeout ? Duration.toJSON(message.timeout) : undefined);return obj;},create(base?: DeepPartial<AdminExecuteRequest>): AdminExecuteRequest {return AdminExecuteRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AdminExecuteRequest>): AdminExecuteRequest {const message = createBaseAdminExecuteRequest();message.name = object.name ?? "";@@ -589,8 +575,10 @@ export const AdminExecuteResponse = {toJSON(message: AdminExecuteResponse): unknown {const obj: any = {};- if (message.results?.length) {- obj.results = message.results.map((e) => QueryResult.toJSON(e));+ if (message.results) {+ obj.results = message.results.map((e) => e ? QueryResult.toJSON(e) : undefined);+ } else {+ obj.results = [];}return obj;},@@ -598,6 +586,7 @@ export const AdminExecuteResponse = {create(base?: DeepPartial<AdminExecuteResponse>): AdminExecuteResponse {return AdminExecuteResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<AdminExecuteResponse>): AdminExecuteResponse {const message = createBaseAdminExecuteResponse();message.results = object.results?.map((e) => QueryResult.fromPartial(e)) || [];@@ -703,30 +692,19 @@ export const ExportRequest = {toJSON(message: ExportRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.connectionDatabase !== "") {- obj.connectionDatabase = message.connectionDatabase;- }- if (message.statement !== "") {- obj.statement = message.statement;- }- if (message.limit !== 0) {- obj.limit = Math.round(message.limit);- }- if (message.format !== 0) {- obj.format = exportRequest_FormatToJSON(message.format);- }- if (message.admin === true) {- obj.admin = message.admin;- }+ message.name !== undefined && (obj.name = message.name);+ message.connectionDatabase !== undefined && (obj.connectionDatabase = message.connectionDatabase);+ message.statement !== undefined && (obj.statement = message.statement);+ message.limit !== undefined && (obj.limit = Math.round(message.limit));+ message.format !== undefined && (obj.format = exportRequest_FormatToJSON(message.format));+ message.admin !== undefined && (obj.admin = message.admin);return obj;},create(base?: DeepPartial<ExportRequest>): ExportRequest {return ExportRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExportRequest>): ExportRequest {const message = createBaseExportRequest();message.name = object.name ?? "";@@ -780,15 +758,15 @@ export const ExportResponse = {toJSON(message: ExportResponse): unknown {const obj: any = {};- if (message.content.length !== 0) {- obj.content = base64FromBytes(message.content);- }+ message.content !== undefined &&+ (obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array(0)));return obj;},create(base?: DeepPartial<ExportResponse>): ExportResponse {return ExportResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<ExportResponse>): ExportResponse {const message = createBaseExportResponse();message.content = object.content ?? new Uint8Array(0);@@ -883,27 +861,18 @@ export const QueryRequest = {toJSON(message: QueryRequest): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }- if (message.connectionDatabase !== "") {- obj.connectionDatabase = message.connectionDatabase;- }- if (message.statement !== "") {- obj.statement = message.statement;- }- if (message.limit !== 0) {- obj.limit = Math.round(message.limit);- }- if (message.timeout !== undefined) {- obj.timeout = Duration.toJSON(message.timeout);- }+ message.name !== undefined && (obj.name = message.name);+ message.connectionDatabase !== undefined && (obj.connectionDatabase = message.connectionDatabase);+ message.statement !== undefined && (obj.statement = message.statement);+ message.limit !== undefined && (obj.limit = Math.round(message.limit));+ message.timeout !== undefined && (obj.timeout = message.timeout ? Duration.toJSON(message.timeout) : undefined);return obj;},create(base?: DeepPartial<QueryRequest>): QueryRequest {return QueryRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<QueryRequest>): QueryRequest {const message = createBaseQueryRequest();message.name = object.name ?? "";@@ -982,21 +951,24 @@ export const QueryResponse = {toJSON(message: QueryResponse): unknown {const obj: any = {};- if (message.results?.length) {- obj.results = message.results.map((e) => QueryResult.toJSON(e));- }- if (message.advices?.length) {- obj.advices = message.advices.map((e) => Advice.toJSON(e));+ if (message.results) {+ obj.results = message.results.map((e) => e ? QueryResult.toJSON(e) : undefined);+ } else {+ obj.results = [];}- if (message.allowExport === true) {- obj.allowExport = message.allowExport;+ if (message.advices) {+ obj.advices = message.advices.map((e) => e ? Advice.toJSON(e) : undefined);+ } else {+ obj.advices = [];}+ message.allowExport !== undefined && (obj.allowExport = message.allowExport);return obj;},create(base?: DeepPartial<QueryResponse>): QueryResponse {return QueryResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<QueryResponse>): QueryResponse {const message = createBaseQueryResponse();message.results = object.results?.map((e) => QueryResult.fromPartial(e)) || [];@@ -1159,36 +1131,41 @@ export const QueryResult = {toJSON(message: QueryResult): unknown {const obj: any = {};- if (message.columnNames?.length) {- obj.columnNames = message.columnNames;- }- if (message.columnTypeNames?.length) {- obj.columnTypeNames = message.columnTypeNames;- }- if (message.rows?.length) {- obj.rows = message.rows.map((e) => QueryRow.toJSON(e));- }- if (message.masked?.length) {- obj.masked = message.masked;- }- if (message.sensitive?.length) {- obj.sensitive = message.sensitive;- }- if (message.error !== "") {- obj.error = message.error;- }- if (message.latency !== undefined) {- obj.latency = Duration.toJSON(message.latency);- }- if (message.statement !== "") {- obj.statement = message.statement;- }+ if (message.columnNames) {+ obj.columnNames = message.columnNames.map((e) => e);+ } else {+ obj.columnNames = [];+ }+ if (message.columnTypeNames) {+ obj.columnTypeNames = message.columnTypeNames.map((e) => e);+ } else {+ obj.columnTypeNames = [];+ }+ if (message.rows) {+ obj.rows = message.rows.map((e) => e ? QueryRow.toJSON(e) : undefined);+ } else {+ obj.rows = [];+ }+ if (message.masked) {+ obj.masked = message.masked.map((e) => e);+ } else {+ obj.masked = [];+ }+ if (message.sensitive) {+ obj.sensitive = message.sensitive.map((e) => e);+ } else {+ obj.sensitive = [];+ }+ message.error !== undefined && (obj.error = message.error);+ message.latency !== undefined && (obj.latency = message.latency ? Duration.toJSON(message.latency) : undefined);+ message.statement !== undefined && (obj.statement = message.statement);return obj;},create(base?: DeepPartial<QueryResult>): QueryResult {return QueryResult.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<QueryResult>): QueryResult {const message = createBaseQueryResult();message.columnNames = object.columnNames?.map((e) => e) || [];@@ -1246,8 +1223,10 @@ export const QueryRow = {toJSON(message: QueryRow): unknown {const obj: any = {};- if (message.values?.length) {- obj.values = message.values.map((e) => RowValue.toJSON(e));+ if (message.values) {+ obj.values = message.values.map((e) => e ? RowValue.toJSON(e) : undefined);+ } else {+ obj.values = [];}return obj;},@@ -1255,6 +1234,7 @@ export const QueryRow = {create(base?: DeepPartial<QueryRow>): QueryRow {return QueryRow.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<QueryRow>): QueryRow {const message = createBaseQueryRow();message.values = object.values?.map((e) => RowValue.fromPartial(e)) || [];@@ -1427,45 +1407,26 @@ export const RowValue = {toJSON(message: RowValue): unknown {const obj: any = {};- if (message.nullValue !== undefined) {- obj.nullValue = nullValueToJSON(message.nullValue);- }- if (message.boolValue !== undefined) {- obj.boolValue = message.boolValue;- }- if (message.bytesValue !== undefined) {- obj.bytesValue = base64FromBytes(message.bytesValue);- }- if (message.doubleValue !== undefined) {- obj.doubleValue = message.doubleValue;- }- if (message.floatValue !== undefined) {- obj.floatValue = message.floatValue;- }- if (message.int32Value !== undefined) {- obj.int32Value = Math.round(message.int32Value);- }- if (message.int64Value !== undefined) {- obj.int64Value = Math.round(message.int64Value);- }- if (message.stringValue !== undefined) {- obj.stringValue = message.stringValue;- }- if (message.uint32Value !== undefined) {- obj.uint32Value = Math.round(message.uint32Value);- }- if (message.uint64Value !== undefined) {- obj.uint64Value = Math.round(message.uint64Value);- }- if (message.valueValue !== undefined) {- obj.valueValue = message.valueValue;- }+ message.nullValue !== undefined &&+ (obj.nullValue = message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined);+ message.boolValue !== undefined && (obj.boolValue = message.boolValue);+ message.bytesValue !== undefined &&+ (obj.bytesValue = message.bytesValue !== undefined ? base64FromBytes(message.bytesValue) : undefined);+ message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue);+ message.floatValue !== undefined && (obj.floatValue = message.floatValue);+ message.int32Value !== undefined && (obj.int32Value = Math.round(message.int32Value));+ message.int64Value !== undefined && (obj.int64Value = Math.round(message.int64Value));+ message.stringValue !== undefined && (obj.stringValue = message.stringValue);+ message.uint32Value !== undefined && (obj.uint32Value = Math.round(message.uint32Value));+ message.uint64Value !== undefined && (obj.uint64Value = Math.round(message.uint64Value));+ message.valueValue !== undefined && (obj.valueValue = message.valueValue);return obj;},create(base?: DeepPartial<RowValue>): RowValue {return RowValue.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<RowValue>): RowValue {const message = createBaseRowValue();message.nullValue = object.nullValue ?? undefined;@@ -1581,30 +1542,19 @@ export const Advice = {toJSON(message: Advice): unknown {const obj: any = {};- if (message.status !== 0) {- obj.status = advice_StatusToJSON(message.status);- }- if (message.code !== 0) {- obj.code = Math.round(message.code);- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.content !== "") {- obj.content = message.content;- }- if (message.line !== 0) {- obj.line = Math.round(message.line);- }- if (message.detail !== "") {- obj.detail = message.detail;- }+ message.status !== undefined && (obj.status = advice_StatusToJSON(message.status));+ message.code !== undefined && (obj.code = Math.round(message.code));+ message.title !== undefined && (obj.title = message.title);+ message.content !== undefined && (obj.content = message.content);+ message.line !== undefined && (obj.line = Math.round(message.line));+ message.detail !== undefined && (obj.detail = message.detail);return obj;},create(base?: DeepPartial<Advice>): Advice {return Advice.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Advice>): Advice {const message = createBaseAdvice();message.status = object.status ?? 0;@@ -1682,21 +1632,16 @@ export const PrettyRequest = {toJSON(message: PrettyRequest): unknown {const obj: any = {};- if (message.engine !== 0) {- obj.engine = engineToJSON(message.engine);- }- if (message.currentSchema !== "") {- obj.currentSchema = message.currentSchema;- }- if (message.expectedSchema !== "") {- obj.expectedSchema = message.expectedSchema;- }+ message.engine !== undefined && (obj.engine = engineToJSON(message.engine));+ message.currentSchema !== undefined && (obj.currentSchema = message.currentSchema);+ message.expectedSchema !== undefined && (obj.expectedSchema = message.expectedSchema);return obj;},create(base?: DeepPartial<PrettyRequest>): PrettyRequest {return PrettyRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PrettyRequest>): PrettyRequest {const message = createBasePrettyRequest();message.engine = object.engine ?? 0;@@ -1760,18 +1705,15 @@ export const PrettyResponse = {toJSON(message: PrettyResponse): unknown {const obj: any = {};- if (message.currentSchema !== "") {- obj.currentSchema = message.currentSchema;- }- if (message.expectedSchema !== "") {- obj.expectedSchema = message.expectedSchema;- }+ message.currentSchema !== undefined && (obj.currentSchema = message.currentSchema);+ message.expectedSchema !== undefined && (obj.expectedSchema = message.expectedSchema);return obj;},create(base?: DeepPartial<PrettyResponse>): PrettyResponse {return PrettyResponse.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PrettyResponse>): PrettyResponse {const message = createBasePrettyResponse();message.currentSchema = object.currentSchema ?? "";@@ -2043,6 +1985,8 @@ function longToNumber(long: Long): number {return long.toNumber();}+// If you get a compile-error about 'Constructor<Long> and ... have no overlap',+// add '--ts_proto_opt=esModuleInterop=true' as a flag when calling 'protoc'.if (_m0.util.Long !== Long) {_m0.util.Long = Long as any;_m0.configure();diff --git a/frontend/src/types/proto/v1/subscription_service.ts b/frontend/src/types/proto/v1/subscription_service.tsindex 8ebbbe583a..219bb6c2af 100644--- a/frontend/src/types/proto/v1/subscription_service.ts+++ b/frontend/src/types/proto/v1/subscription_service.ts@@ -137,6 +137,7 @@ export const GetSubscriptionRequest = {create(base?: DeepPartial<GetSubscriptionRequest>): GetSubscriptionRequest {return GetSubscriptionRequest.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<GetSubscriptionRequest>): GetSubscriptionRequest {const message = createBaseGetSubscriptionRequest();return message;@@ -180,6 +181,7 @@ export const GetFeatureMatrixRequest = {create(base?: DeepPartial<GetFeatureMatrixRequest>): GetFeatureMatrixRequest {return GetFeatureMatrixRequest.fromPartial(base ?? {});},+fromPartial(_: DeepPartial<GetFeatureMatrixRequest>): GetFeatureMatrixRequest {const message = createBaseGetFeatureMatrixRequest();return message;@@ -227,15 +229,14 @@ export const UpdateSubscriptionRequest = {toJSON(message: UpdateSubscriptionRequest): unknown {const obj: any = {};- if (message.patch !== undefined) {- obj.patch = PatchSubscription.toJSON(message.patch);- }+ message.patch !== undefined && (obj.patch = message.patch ? PatchSubscription.toJSON(message.patch) : undefined);return obj;},create(base?: DeepPartial<UpdateSubscriptionRequest>): UpdateSubscriptionRequest {return UpdateSubscriptionRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<UpdateSubscriptionRequest>): UpdateSubscriptionRequest {const message = createBaseUpdateSubscriptionRequest();message.patch = (object.patch !== undefined && object.patch !== null)@@ -286,15 +287,14 @@ export const TrialSubscriptionRequest = {toJSON(message: TrialSubscriptionRequest): unknown {const obj: any = {};- if (message.trial !== undefined) {- obj.trial = TrialSubscription.toJSON(message.trial);- }+ message.trial !== undefined && (obj.trial = message.trial ? TrialSubscription.toJSON(message.trial) : undefined);return obj;},create(base?: DeepPartial<TrialSubscriptionRequest>): TrialSubscriptionRequest {return TrialSubscriptionRequest.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TrialSubscriptionRequest>): TrialSubscriptionRequest {const message = createBaseTrialSubscriptionRequest();message.trial = (object.trial !== undefined && object.trial !== null)@@ -345,15 +345,14 @@ export const PatchSubscription = {toJSON(message: PatchSubscription): unknown {const obj: any = {};- if (message.license !== "") {- obj.license = message.license;- }+ message.license !== undefined && (obj.license = message.license);return obj;},create(base?: DeepPartial<PatchSubscription>): PatchSubscription {return PatchSubscription.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PatchSubscription>): PatchSubscription {const message = createBasePatchSubscription();message.license = object.license ?? "";@@ -426,21 +425,16 @@ export const TrialSubscription = {toJSON(message: TrialSubscription): unknown {const obj: any = {};- if (message.plan !== 0) {- obj.plan = planTypeToJSON(message.plan);- }- if (message.days !== 0) {- obj.days = Math.round(message.days);- }- if (message.instanceCount !== 0) {- obj.instanceCount = Math.round(message.instanceCount);- }+ message.plan !== undefined && (obj.plan = planTypeToJSON(message.plan));+ message.days !== undefined && (obj.days = Math.round(message.days));+ message.instanceCount !== undefined && (obj.instanceCount = Math.round(message.instanceCount));return obj;},create(base?: DeepPartial<TrialSubscription>): TrialSubscription {return TrialSubscription.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<TrialSubscription>): TrialSubscription {const message = createBaseTrialSubscription();message.plan = object.plan ?? 0;@@ -567,33 +561,20 @@ export const Subscription = {toJSON(message: Subscription): unknown {const obj: any = {};- if (message.instanceCount !== 0) {- obj.instanceCount = Math.round(message.instanceCount);- }- if (message.expiresTime !== undefined) {- obj.expiresTime = message.expiresTime.toISOString();- }- if (message.startedTime !== undefined) {- obj.startedTime = message.startedTime.toISOString();- }- if (message.plan !== 0) {- obj.plan = planTypeToJSON(message.plan);- }- if (message.trialing === true) {- obj.trialing = message.trialing;- }- if (message.orgId !== "") {- obj.orgId = message.orgId;- }- if (message.orgName !== "") {- obj.orgName = message.orgName;- }+ message.instanceCount !== undefined && (obj.instanceCount = Math.round(message.instanceCount));+ message.expiresTime !== undefined && (obj.expiresTime = message.expiresTime.toISOString());+ message.startedTime !== undefined && (obj.startedTime = message.startedTime.toISOString());+ message.plan !== undefined && (obj.plan = planTypeToJSON(message.plan));+ message.trialing !== undefined && (obj.trialing = message.trialing);+ message.orgId !== undefined && (obj.orgId = message.orgId);+ message.orgName !== undefined && (obj.orgName = message.orgName);return obj;},create(base?: DeepPartial<Subscription>): Subscription {return Subscription.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Subscription>): Subscription {const message = createBaseSubscription();message.instanceCount = object.instanceCount ?? 0;@@ -648,8 +629,10 @@ export const FeatureMatrix = {toJSON(message: FeatureMatrix): unknown {const obj: any = {};- if (message.features?.length) {- obj.features = message.features.map((e) => Feature.toJSON(e));+ if (message.features) {+ obj.features = message.features.map((e) => e ? Feature.toJSON(e) : undefined);+ } else {+ obj.features = [];}return obj;},@@ -657,6 +640,7 @@ export const FeatureMatrix = {create(base?: DeepPartial<FeatureMatrix>): FeatureMatrix {return FeatureMatrix.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FeatureMatrix>): FeatureMatrix {const message = createBaseFeatureMatrix();message.features = object.features?.map((e) => Feature.fromPartial(e)) || [];@@ -726,17 +710,12 @@ export const Feature = {toJSON(message: Feature): unknown {const obj: any = {};- if (message.name !== "") {- obj.name = message.name;- }+ message.name !== undefined && (obj.name = message.name);+ obj.matrix = {};if (message.matrix) {- const entries = Object.entries(message.matrix);- if (entries.length > 0) {- obj.matrix = {};- entries.forEach(([k, v]) => {- obj.matrix[k] = v;- });- }+ Object.entries(message.matrix).forEach(([k, v]) => {+ obj.matrix[k] = v;+ });}return obj;},@@ -744,6 +723,7 @@ export const Feature = {create(base?: DeepPartial<Feature>): Feature {return Feature.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Feature>): Feature {const message = createBaseFeature();message.name = object.name ?? "";@@ -811,18 +791,15 @@ export const Feature_MatrixEntry = {toJSON(message: Feature_MatrixEntry): unknown {const obj: any = {};- if (message.key !== "") {- obj.key = message.key;- }- if (message.value === true) {- obj.value = message.value;- }+ message.key !== undefined && (obj.key = message.key);+ message.value !== undefined && (obj.value = message.value);return obj;},create(base?: DeepPartial<Feature_MatrixEntry>): Feature_MatrixEntry {return Feature_MatrixEntry.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Feature_MatrixEntry>): Feature_MatrixEntry {const message = createBaseFeature_MatrixEntry();message.key = object.key ?? "";diff --git a/frontend/src/types/proto/v1/vcs.ts b/frontend/src/types/proto/v1/vcs.tsindex 11616e9982..49a2376923 100644--- a/frontend/src/types/proto/v1/vcs.ts+++ b/frontend/src/types/proto/v1/vcs.ts@@ -251,45 +251,29 @@ export const PushEvent = {toJSON(message: PushEvent): unknown {const obj: any = {};- if (message.vcsType !== 0) {- obj.vcsType = vcsTypeToJSON(message.vcsType);- }- if (message.baseDir !== "") {- obj.baseDir = message.baseDir;- }- if (message.ref !== "") {- obj.ref = message.ref;- }- if (message.before !== "") {- obj.before = message.before;- }- if (message.after !== "") {- obj.after = message.after;- }- if (message.repositoryId !== "") {- obj.repositoryId = message.repositoryId;- }- if (message.repositoryUrl !== "") {- obj.repositoryUrl = message.repositoryUrl;- }- if (message.repositoryFullPath !== "") {- obj.repositoryFullPath = message.repositoryFullPath;- }- if (message.authorName !== "") {- obj.authorName = message.authorName;- }- if (message.commits?.length) {- obj.commits = message.commits.map((e) => Commit.toJSON(e));- }- if (message.fileCommit !== undefined) {- obj.fileCommit = FileCommit.toJSON(message.fileCommit);- }+ message.vcsType !== undefined && (obj.vcsType = vcsTypeToJSON(message.vcsType));+ message.baseDir !== undefined && (obj.baseDir = message.baseDir);+ message.ref !== undefined && (obj.ref = message.ref);+ message.before !== undefined && (obj.before = message.before);+ message.after !== undefined && (obj.after = message.after);+ message.repositoryId !== undefined && (obj.repositoryId = message.repositoryId);+ message.repositoryUrl !== undefined && (obj.repositoryUrl = message.repositoryUrl);+ message.repositoryFullPath !== undefined && (obj.repositoryFullPath = message.repositoryFullPath);+ message.authorName !== undefined && (obj.authorName = message.authorName);+ if (message.commits) {+ obj.commits = message.commits.map((e) => e ? Commit.toJSON(e) : undefined);+ } else {+ obj.commits = [];+ }+ message.fileCommit !== undefined &&+ (obj.fileCommit = message.fileCommit ? FileCommit.toJSON(message.fileCommit) : undefined);return obj;},create(base?: DeepPartial<PushEvent>): PushEvent {return PushEvent.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<PushEvent>): PushEvent {const message = createBasePushEvent();message.vcsType = object.vcsType ?? 0;@@ -450,32 +434,22 @@ export const Commit = {toJSON(message: Commit): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.message !== "") {- obj.message = message.message;- }- if (message.createdTime !== undefined) {- obj.createdTime = message.createdTime.toISOString();- }- if (message.url !== "") {- obj.url = message.url;- }- if (message.authorName !== "") {- obj.authorName = message.authorName;- }- if (message.authorEmail !== "") {- obj.authorEmail = message.authorEmail;- }- if (message.addedList?.length) {- obj.addedList = message.addedList;- }- if (message.modifiedList?.length) {- obj.modifiedList = message.modifiedList;+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.message !== undefined && (obj.message = message.message);+ message.createdTime !== undefined && (obj.createdTime = message.createdTime.toISOString());+ message.url !== undefined && (obj.url = message.url);+ message.authorName !== undefined && (obj.authorName = message.authorName);+ message.authorEmail !== undefined && (obj.authorEmail = message.authorEmail);+ if (message.addedList) {+ obj.addedList = message.addedList.map((e) => e);+ } else {+ obj.addedList = [];+ }+ if (message.modifiedList) {+ obj.modifiedList = message.modifiedList.map((e) => e);+ } else {+ obj.modifiedList = [];}return obj;},@@ -483,6 +457,7 @@ export const Commit = {create(base?: DeepPartial<Commit>): Commit {return Commit.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<Commit>): Commit {const message = createBaseCommit();message.id = object.id ?? "";@@ -627,36 +602,21 @@ export const FileCommit = {toJSON(message: FileCommit): unknown {const obj: any = {};- if (message.id !== "") {- obj.id = message.id;- }- if (message.title !== "") {- obj.title = message.title;- }- if (message.message !== "") {- obj.message = message.message;- }- if (message.createdTime !== undefined) {- obj.createdTime = message.createdTime.toISOString();- }- if (message.url !== "") {- obj.url = message.url;- }- if (message.authorName !== "") {- obj.authorName = message.authorName;- }- if (message.authorEmail !== "") {- obj.authorEmail = message.authorEmail;- }- if (message.added !== "") {- obj.added = message.added;- }+ message.id !== undefined && (obj.id = message.id);+ message.title !== undefined && (obj.title = message.title);+ message.message !== undefined && (obj.message = message.message);+ message.createdTime !== undefined && (obj.createdTime = message.createdTime.toISOString());+ message.url !== undefined && (obj.url = message.url);+ message.authorName !== undefined && (obj.authorName = message.authorName);+ message.authorEmail !== undefined && (obj.authorEmail = message.authorEmail);+ message.added !== undefined && (obj.added = message.added);return obj;},create(base?: DeepPartial<FileCommit>): FileCommit {return FileCommit.fromPartial(base ?? {});},+fromPartial(object: DeepPartial<FileCommit>): FileCommit {const message = createBaseFileCommit();message.id = object.id ?? "";diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yamlindex 75624680a2..b8473a45cd 100644--- a/proto/buf.gen.yaml+++ b/proto/buf.gen.yaml@@ -11,7 +11,7 @@ plugins:out: generated-goopt:- paths=source_relative- - plugin: buf.build/community/stephenh-ts-proto:v1.156.7+ - plugin: buf.build/community/stephenh-ts-proto:v1.152.1out: ../frontend/src/types/proto# reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-protoopt: env=browser,useOptionals=messages,outputServices=nice-grpc,outputServices=generic-definitions,useExactTypes=false