Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: implement filter audit logs by create time (#11930)

boojack5fbe7bb7b29c
diff --git a/backend/api/v1/audit_log_service.go b/backend/api/v1/audit_log_service.go
index 8afffa97dc..fa10f0bd13 100644
--- a/backend/api/v1/audit_log_service.go
+++ b/backend/api/v1/audit_log_service.go
@@ -208,7 +208,8 @@ func getSearchAuditLogsFilter(filter string) (*store.AuditLogFilter, *status.Sta
getFilter = func(expr celast.Expr) (string, error) {
switch expr.Kind() {
case celast.CallKind:
- switch expr.AsCall().FunctionName() {
+ functionName := expr.AsCall().FunctionName()
+ switch functionName {
case "_||_":
var args []string
for _, arg := range expr.AsCall().Args() {
@@ -253,8 +254,37 @@ func getSearchAuditLogsFilter(filter string) (*store.AuditLogFilter, *status.Sta
positionalArgs = append(positionalArgs, value)
return fmt.Sprintf("payload->>'%s'=$%d", variable, len(positionalArgs)), nil
+ case "_>=_", "_<=_":
+ var variable, value string
+ for _, arg := range expr.AsCall().Args() {
+ switch arg.Kind() {
+ case celast.IdentKind:
+ variable = arg.AsIdent()
+ case celast.LiteralKind:
+ lit, ok := arg.AsLiteral().Value().(string)
+ if !ok {
+ return "", errors.Errorf("expect string, got %T, hint: filter literals should be string", arg.AsLiteral().Value())
+ }
+ value = lit
+ }
+ }
+ if variable != "create_time" {
+ return "", errors.Errorf(`">=" and "<=" are only supported for "create_time"`)
+ }
+
+ t, err := time.Parse(time.RFC3339, value)
+ if err != nil {
+ return "", errors.Errorf("failed to parse time %v, error: %v", value, err)
+ }
+ ts := t.Unix()
+ positionalArgs = append(positionalArgs, ts)
+ if functionName == "_>=_" {
+ return fmt.Sprintf("created_ts >= $%d", len(positionalArgs)), nil
+ }
+ return fmt.Sprintf("created_ts <= $%d", len(positionalArgs)), nil
+
default:
- return "", errors.Errorf("unexpected function %v", expr.AsCall().FunctionName())
+ return "", errors.Errorf("unexpected function %v", functionName)
}
default:
diff --git a/frontend/src/types/proto/google/protobuf/any.ts b/frontend/src/types/proto/google/protobuf/any.ts
index 1c425c789d..afc5514bd2 100644
--- a/frontend/src/types/proto/google/protobuf/any.ts
+++ b/frontend/src/types/proto/google/protobuf/any.ts
@@ -34,7 +34,7 @@ export const protobufPackage = "google.protobuf";
* foo = any.unpack(Foo.getDefaultInstance());
* }
*
- * Example 3: Pack and unpack a message in Python.
+ * Example 3: Pack and unpack a message in Python.
*
* foo = Foo(...)
* any = Any()
@@ -44,7 +44,7 @@ export const protobufPackage = "google.protobuf";
* any.Unpack(foo)
* ...
*
- * Example 4: Pack and unpack a message in Go
+ * Example 4: Pack and unpack a message in Go
*
* foo := &pb.Foo{...}
* any, err := anypb.New(foo)
@@ -64,7 +64,7 @@ export const protobufPackage = "google.protobuf";
* name "y.z".
*
* JSON
- * ====
+ *
* The JSON representation of an `Any` value uses the regular
* representation of the deserialized, embedded message, with an
* additional field `@type` which contains the type URL. Example:
@@ -116,8 +116,7 @@ export interface Any {
*
* Note: this functionality is not currently available in the official
* protobuf release, and it is not used for type URLs beginning with
- * type.googleapis.com. As of May 2023, there are no widely used type server
- * implementations and no plans to implement one.
+ * type.googleapis.com.
*
* Schemes other than `http`, `https` (or the empty scheme) might be
* used with implementation specific semantics.
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index 3185d3cbac..e228fcead9 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -4,124 +4,6 @@ import _m0 from "protobufjs/minimal";
export const protobufPackage = "google.protobuf";
-/** The full set of known editions. */
-export enum Edition {
- /** EDITION_UNKNOWN - A placeholder for an unknown edition value. */
- EDITION_UNKNOWN = "EDITION_UNKNOWN",
- /**
- * EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like
- * distinct editions. These can't be used to specify the edition of proto
- * files, but feature definitions must supply proto2/proto3 defaults for
- * backwards compatibility.
- */
- EDITION_PROTO2 = "EDITION_PROTO2",
- EDITION_PROTO3 = "EDITION_PROTO3",
- /**
- * EDITION_2023 - Editions that have been released. The specific values are arbitrary and
- * should not be depended on, but they will always be time-ordered for easy
- * comparison.
- */
- EDITION_2023 = "EDITION_2023",
- /**
- * EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be
- * used or relyed on outside of tests.
- */
- EDITION_1_TEST_ONLY = "EDITION_1_TEST_ONLY",
- EDITION_2_TEST_ONLY = "EDITION_2_TEST_ONLY",
- EDITION_99997_TEST_ONLY = "EDITION_99997_TEST_ONLY",
- EDITION_99998_TEST_ONLY = "EDITION_99998_TEST_ONLY",
- EDITION_99999_TEST_ONLY = "EDITION_99999_TEST_ONLY",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function editionFromJSON(object: any): Edition {
- switch (object) {
- case 0:
- case "EDITION_UNKNOWN":
- return Edition.EDITION_UNKNOWN;
- case 998:
- case "EDITION_PROTO2":
- return Edition.EDITION_PROTO2;
- case 999:
- case "EDITION_PROTO3":
- return Edition.EDITION_PROTO3;
- case 1000:
- case "EDITION_2023":
- return Edition.EDITION_2023;
- case 1:
- case "EDITION_1_TEST_ONLY":
- return Edition.EDITION_1_TEST_ONLY;
- case 2:
- case "EDITION_2_TEST_ONLY":
- return Edition.EDITION_2_TEST_ONLY;
- case 99997:
- case "EDITION_99997_TEST_ONLY":
- return Edition.EDITION_99997_TEST_ONLY;
- case 99998:
- case "EDITION_99998_TEST_ONLY":
- return Edition.EDITION_99998_TEST_ONLY;
- case 99999:
- case "EDITION_99999_TEST_ONLY":
- return Edition.EDITION_99999_TEST_ONLY;
- case -1:
- case "UNRECOGNIZED":
- default:
- return Edition.UNRECOGNIZED;
- }
-}
-
-export function editionToJSON(object: Edition): string {
- switch (object) {
- case Edition.EDITION_UNKNOWN:
- return "EDITION_UNKNOWN";
- case Edition.EDITION_PROTO2:
- return "EDITION_PROTO2";
- case Edition.EDITION_PROTO3:
- return "EDITION_PROTO3";
- case Edition.EDITION_2023:
- return "EDITION_2023";
- case Edition.EDITION_1_TEST_ONLY:
- return "EDITION_1_TEST_ONLY";
- case Edition.EDITION_2_TEST_ONLY:
- return "EDITION_2_TEST_ONLY";
- case Edition.EDITION_99997_TEST_ONLY:
- return "EDITION_99997_TEST_ONLY";
- case Edition.EDITION_99998_TEST_ONLY:
- return "EDITION_99998_TEST_ONLY";
- case Edition.EDITION_99999_TEST_ONLY:
- return "EDITION_99999_TEST_ONLY";
- case Edition.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function editionToNumber(object: Edition): number {
- switch (object) {
- case Edition.EDITION_UNKNOWN:
- return 0;
- case Edition.EDITION_PROTO2:
- return 998;
- case Edition.EDITION_PROTO3:
- return 999;
- case Edition.EDITION_2023:
- return 1000;
- case Edition.EDITION_1_TEST_ONLY:
- return 1;
- case Edition.EDITION_2_TEST_ONLY:
- return 2;
- case Edition.EDITION_99997_TEST_ONLY:
- return 99997;
- case Edition.EDITION_99998_TEST_ONLY:
- return 99998;
- case Edition.EDITION_99999_TEST_ONLY:
- return 99999;
- case Edition.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
/**
* The protocol compiler can output a FileDescriptorSet containing the .proto
* files it parses.
@@ -169,8 +51,8 @@ export interface FileDescriptorProto {
* If `edition` is present, this value must be "editions".
*/
syntax: string;
- /** The edition of the proto file. */
- edition: Edition;
+ /** The edition of the proto file, which is an opaque string. */
+ edition: string;
}
/** Describes a message type. */
@@ -214,98 +96,6 @@ export interface DescriptorProto_ReservedRange {
export interface ExtensionRangeOptions {
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
- /**
- * For external users: DO NOT USE. We are in the process of open sourcing
- * extension declaration and executing internal cleanups before it can be
- * used externally.
- */
- declaration: ExtensionRangeOptions_Declaration[];
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
- /**
- * The verification state of the range.
- * TODO: flip the default to DECLARATION once all empty ranges
- * are marked as UNVERIFIED.
- */
- verification: ExtensionRangeOptions_VerificationState;
-}
-
-/** The verification state of the extension range. */
-export enum ExtensionRangeOptions_VerificationState {
- /** DECLARATION - All the extensions of the range must be declared. */
- DECLARATION = "DECLARATION",
- UNVERIFIED = "UNVERIFIED",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function extensionRangeOptions_VerificationStateFromJSON(object: any): ExtensionRangeOptions_VerificationState {
- switch (object) {
- case 0:
- case "DECLARATION":
- return ExtensionRangeOptions_VerificationState.DECLARATION;
- case 1:
- case "UNVERIFIED":
- return ExtensionRangeOptions_VerificationState.UNVERIFIED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return ExtensionRangeOptions_VerificationState.UNRECOGNIZED;
- }
-}
-
-export function extensionRangeOptions_VerificationStateToJSON(object: ExtensionRangeOptions_VerificationState): string {
- switch (object) {
- case ExtensionRangeOptions_VerificationState.DECLARATION:
- return "DECLARATION";
- case ExtensionRangeOptions_VerificationState.UNVERIFIED:
- return "UNVERIFIED";
- case ExtensionRangeOptions_VerificationState.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function extensionRangeOptions_VerificationStateToNumber(
- object: ExtensionRangeOptions_VerificationState,
-): number {
- switch (object) {
- case ExtensionRangeOptions_VerificationState.DECLARATION:
- return 0;
- case ExtensionRangeOptions_VerificationState.UNVERIFIED:
- return 1;
- case ExtensionRangeOptions_VerificationState.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
-export interface ExtensionRangeOptions_Declaration {
- /** The extension number declared within the extension range. */
- number: number;
- /**
- * The fully-qualified name of the extension field. There must be a leading
- * dot in front of the full name.
- */
- fullName: string;
- /**
- * The fully-qualified type name of the extension field. Unlike
- * Metadata.type, Declaration.type must have a leading dot for messages
- * and enums.
- */
- type: string;
- /**
- * If true, indicates that the number is reserved in the extension range,
- * and any extension field with the number will fail to compile. Set this
- * when a declared extension field is deleted.
- */
- reserved: boolean;
- /**
- * If true, indicates that the extension must be defined as repeated.
- * Otherwise the extension must be defined as optional.
- */
- repeated: boolean;
}
/** Describes a field within a message. */
@@ -403,10 +193,9 @@ export enum FieldDescriptorProto_Type {
TYPE_STRING = "TYPE_STRING",
/**
* TYPE_GROUP - Tag-delimited aggregate.
- * Group type is deprecated and not supported after google.protobuf. However, Proto3
+ * Group type is deprecated and not supported in proto3. However, Proto3
* implementations should still be able to parse the group wire format and
- * treat group fields as unknown fields. In Editions, the group wire format
- * can be enabled via the `message_encoding` feature.
+ * treat group fields as unknown fields.
*/
TYPE_GROUP = "TYPE_GROUP",
/** TYPE_MESSAGE - Length-delimited aggregate. */
@@ -578,13 +367,8 @@ export function fieldDescriptorProto_TypeToNumber(object: FieldDescriptorProto_T
export enum FieldDescriptorProto_Label {
/** LABEL_OPTIONAL - 0 is reserved for errors */
LABEL_OPTIONAL = "LABEL_OPTIONAL",
- LABEL_REPEATED = "LABEL_REPEATED",
- /**
- * LABEL_REQUIRED - The required label is only allowed in google.protobuf. In proto3 and Editions
- * it's explicitly prohibited. In Editions, the `field_presence` feature
- * can be used to get this behavior.
- */
LABEL_REQUIRED = "LABEL_REQUIRED",
+ LABEL_REPEATED = "LABEL_REPEATED",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -593,12 +377,12 @@ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptor
case 1:
case "LABEL_OPTIONAL":
return FieldDescriptorProto_Label.LABEL_OPTIONAL;
- case 3:
- case "LABEL_REPEATED":
- return FieldDescriptorProto_Label.LABEL_REPEATED;
case 2:
case "LABEL_REQUIRED":
return FieldDescriptorProto_Label.LABEL_REQUIRED;
+ case 3:
+ case "LABEL_REPEATED":
+ return FieldDescriptorProto_Label.LABEL_REPEATED;
case -1:
case "UNRECOGNIZED":
default:
@@ -610,10 +394,10 @@ export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_La
switch (object) {
case FieldDescriptorProto_Label.LABEL_OPTIONAL:
return "LABEL_OPTIONAL";
- case FieldDescriptorProto_Label.LABEL_REPEATED:
- return "LABEL_REPEATED";
case FieldDescriptorProto_Label.LABEL_REQUIRED:
return "LABEL_REQUIRED";
+ case FieldDescriptorProto_Label.LABEL_REPEATED:
+ return "LABEL_REPEATED";
case FieldDescriptorProto_Label.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -624,10 +408,10 @@ export function fieldDescriptorProto_LabelToNumber(object: FieldDescriptorProto_
switch (object) {
case FieldDescriptorProto_Label.LABEL_OPTIONAL:
return 1;
- case FieldDescriptorProto_Label.LABEL_REPEATED:
- return 3;
case FieldDescriptorProto_Label.LABEL_REQUIRED:
return 2;
+ case FieldDescriptorProto_Label.LABEL_REPEATED:
+ return 3;
case FieldDescriptorProto_Label.UNRECOGNIZED:
default:
return -1;
@@ -821,10 +605,6 @@ export interface FileOptions {
* determining the ruby package.
*/
rubyPackage: string;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/**
* The parser stores options it doesn't recognize here.
* See the documentation for the "Options" section above.
@@ -957,16 +737,12 @@ export interface MessageOptions {
* This should only be used as a temporary measure against broken builds due
* to the change in behavior for JSON field name conflicts.
*
- * TODO This is legacy behavior we plan to remove once downstream
+ * TODO(b/261750190) This is legacy behavior we plan to remove once downstream
* teams have had time to migrate.
*
* @deprecated
*/
deprecatedLegacyJsonFieldConflicts: boolean;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -975,10 +751,8 @@ export interface FieldOptions {
/**
* The ctype option instructs the C++ code generator to use a different
* representation of the field than it normally would. See the specific
- * options below. This option is only implemented to support use of
- * [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
- * type "bytes" in the open source release -- sorry, we'll try to include
- * other types in a future version!
+ * options below. This option is not yet implemented in the open source
+ * release -- sorry, we'll try to include it in a future version!
*/
ctype: FieldOptions_CType;
/**
@@ -986,9 +760,7 @@ export interface FieldOptions {
* a more efficient representation on the wire. Rather than repeatedly
* writing the tag and type for each element, the entire array is encoded as
* a single length-delimited blob. In proto3, only explicit setting it to
- * false will avoid using packed encoding. This option is prohibited in
- * Editions, but the `repeated_field_encoding` feature can be used to control
- * the behavior.
+ * false will avoid using packed encoding.
*/
packed: boolean;
/**
@@ -1059,12 +831,7 @@ export interface FieldOptions {
*/
debugRedact: boolean;
retention: FieldOptions_OptionRetention;
- targets: FieldOptions_OptionTargetType[];
- editionDefaults: FieldOptions_EditionDefault[];
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
+ target: FieldOptions_OptionTargetType;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1072,14 +839,6 @@ export interface FieldOptions {
export enum FieldOptions_CType {
/** STRING - Default mode. */
STRING = "STRING",
- /**
- * CORD - The option [ctype=CORD] may be applied to a non-repeated field of type
- * "bytes". It indicates that in C++, the data should be stored in a Cord
- * instead of a string. For very large strings, this may reduce memory
- * fragmentation. It may also allow better performance when parsing from a
- * Cord, or when parsing with aliasing enabled, as the parsed Cord may then
- * alias the original buffer.
- */
CORD = "CORD",
STRING_PIECE = "STRING_PIECE",
UNRECOGNIZED = "UNRECOGNIZED",
@@ -1360,17 +1119,7 @@ export function fieldOptions_OptionTargetTypeToNumber(object: FieldOptions_Optio
}
}
-export interface FieldOptions_EditionDefault {
- edition: Edition;
- /** Textproto value. */
- value: string;
-}
-
export interface OneofOptions {
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1393,16 +1142,12 @@ export interface EnumOptions {
* and strips underscored from the fields before comparison in proto3 only.
* The new behavior takes `json_name` into account and applies to proto2 as
* well.
- * TODO Remove this legacy behavior once downstream teams have
+ * TODO(b/261750190) Remove this legacy behavior once downstream teams have
* had time to migrate.
*
* @deprecated
*/
deprecatedLegacyJsonFieldConflicts: boolean;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1415,25 +1160,11 @@ export interface EnumValueOptions {
* this is a formalization for deprecating enum values.
*/
deprecated: boolean;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
- /**
- * Indicate that fields annotated with this enum value should not be printed
- * out when using debug formats, e.g. when the field contains sensitive
- * credentials.
- */
- debugRedact: boolean;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
export interface ServiceOptions {
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/**
* Is this service deprecated?
* Depending on the target platform, this can emit Deprecated annotations
@@ -1454,10 +1185,6 @@ export interface MethodOptions {
*/
deprecated: boolean;
idempotencyLevel: MethodOptions_IdempotencyLevel;
- /** Any features defined in the specific edition. */
- features:
- | FeatureSet
- | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1557,519 +1284,145 @@ export interface UninterpretedOption_NamePart {
}
/**
- * TODO Enums in C++ gencode (and potentially other languages) are
- * not well scoped. This means that each of the feature enums below can clash
- * with each other. The short names we've chosen maximize call-site
- * readability, but leave us very open to this scenario. A future feature will
- * be designed and implemented to handle this, hopefully before we ever hit a
- * conflict here.
+ * Encapsulates information about the original source file from which a
+ * FileDescriptorProto was generated.
*/
-export interface FeatureSet {
- fieldPresence: FeatureSet_FieldPresence;
- enumType: FeatureSet_EnumType;
- repeatedFieldEncoding: FeatureSet_RepeatedFieldEncoding;
- utf8Validation: FeatureSet_Utf8Validation;
- messageEncoding: FeatureSet_MessageEncoding;
- jsonFormat: FeatureSet_JsonFormat;
+export interface SourceCodeInfo {
+ /**
+ * A Location identifies a piece of source code in a .proto file which
+ * corresponds to a particular definition. This information is intended
+ * to be useful to IDEs, code indexers, documentation generators, and similar
+ * tools.
+ *
+ * For example, say we have a file like:
+ * message Foo {
+ * optional string foo = 1;
+ * }
+ * Let's look at just the field definition:
+ * optional string foo = 1;
+ * ^ ^^ ^^ ^ ^^^
+ * a bc de f ghi
+ * We have the following locations:
+ * span path represents
+ * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
+ * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
+ * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
+ * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
+ * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
+ *
+ * Notes:
+ * - A location may refer to a repeated field itself (i.e. not to any
+ * particular index within it). This is used whenever a set of elements are
+ * logically enclosed in a single code segment. For example, an entire
+ * extend block (possibly containing multiple extension definitions) will
+ * have an outer location whose path refers to the "extensions" repeated
+ * field without an index.
+ * - Multiple locations may have the same path. This happens when a single
+ * logical declaration is spread out across multiple places. The most
+ * obvious example is the "extend" block again -- there may be multiple
+ * extend blocks in the same scope, each of which will have the same path.
+ * - A location's span is not always a subset of its parent's span. For
+ * example, the "extendee" of an extension declaration appears at the
+ * beginning of the "extend" block and is shared by all extensions within
+ * the block.
+ * - Just because a location's span is a subset of some other location's span
+ * does not mean that it is a descendant. For example, a "group" defines
+ * both a type and a field in a single declaration. Thus, the locations
+ * corresponding to the type and field and their components will overlap.
+ * - Code which tries to interpret locations should probably be designed to
+ * ignore those that it doesn't understand, as more types of locations could
+ * be recorded in the future.
+ */
+ location: SourceCodeInfo_Location[];
}
-export enum FeatureSet_FieldPresence {
- FIELD_PRESENCE_UNKNOWN = "FIELD_PRESENCE_UNKNOWN",
- EXPLICIT = "EXPLICIT",
- IMPLICIT = "IMPLICIT",
- LEGACY_REQUIRED = "LEGACY_REQUIRED",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function featureSet_FieldPresenceFromJSON(object: any): FeatureSet_FieldPresence {
- switch (object) {
- case 0:
- case "FIELD_PRESENCE_UNKNOWN":
- return FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN;
- case 1:
- case "EXPLICIT":
- return FeatureSet_FieldPresence.EXPLICIT;
- case 2:
- case "IMPLICIT":
- return FeatureSet_FieldPresence.IMPLICIT;
- case 3:
- case "LEGACY_REQUIRED":
- return FeatureSet_FieldPresence.LEGACY_REQUIRED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_FieldPresence.UNRECOGNIZED;
- }
-}
-
-export function featureSet_FieldPresenceToJSON(object: FeatureSet_FieldPresence): string {
- switch (object) {
- case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN:
- return "FIELD_PRESENCE_UNKNOWN";
- case FeatureSet_FieldPresence.EXPLICIT:
- return "EXPLICIT";
- case FeatureSet_FieldPresence.IMPLICIT:
- return "IMPLICIT";
- case FeatureSet_FieldPresence.LEGACY_REQUIRED:
- return "LEGACY_REQUIRED";
- case FeatureSet_FieldPresence.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function featureSet_FieldPresenceToNumber(object: FeatureSet_FieldPresence): number {
- switch (object) {
- case FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN:
- return 0;
- case FeatureSet_FieldPresence.EXPLICIT:
- return 1;
- case FeatureSet_FieldPresence.IMPLICIT:
- return 2;
- case FeatureSet_FieldPresence.LEGACY_REQUIRED:
- return 3;
- case FeatureSet_FieldPresence.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
-export enum FeatureSet_EnumType {
- ENUM_TYPE_UNKNOWN = "ENUM_TYPE_UNKNOWN",
- OPEN = "OPEN",
- CLOSED = "CLOSED",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function featureSet_EnumTypeFromJSON(object: any): FeatureSet_EnumType {
- switch (object) {
- case 0:
- case "ENUM_TYPE_UNKNOWN":
- return FeatureSet_EnumType.ENUM_TYPE_UNKNOWN;
- case 1:
- case "OPEN":
- return FeatureSet_EnumType.OPEN;
- case 2:
- case "CLOSED":
- return FeatureSet_EnumType.CLOSED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_EnumType.UNRECOGNIZED;
- }
-}
-
-export function featureSet_EnumTypeToJSON(object: FeatureSet_EnumType): string {
- switch (object) {
- case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN:
- return "ENUM_TYPE_UNKNOWN";
- case FeatureSet_EnumType.OPEN:
- return "OPEN";
- case FeatureSet_EnumType.CLOSED:
- return "CLOSED";
- case FeatureSet_EnumType.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function featureSet_EnumTypeToNumber(object: FeatureSet_EnumType): number {
- switch (object) {
- case FeatureSet_EnumType.ENUM_TYPE_UNKNOWN:
- return 0;
- case FeatureSet_EnumType.OPEN:
- return 1;
- case FeatureSet_EnumType.CLOSED:
- return 2;
- case FeatureSet_EnumType.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
-export enum FeatureSet_RepeatedFieldEncoding {
- REPEATED_FIELD_ENCODING_UNKNOWN = "REPEATED_FIELD_ENCODING_UNKNOWN",
- PACKED = "PACKED",
- EXPANDED = "EXPANDED",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function featureSet_RepeatedFieldEncodingFromJSON(object: any): FeatureSet_RepeatedFieldEncoding {
- switch (object) {
- case 0:
- case "REPEATED_FIELD_ENCODING_UNKNOWN":
- return FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN;
- case 1:
- case "PACKED":
- return FeatureSet_RepeatedFieldEncoding.PACKED;
- case 2:
- case "EXPANDED":
- return FeatureSet_RepeatedFieldEncoding.EXPANDED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED;
- }
-}
-
-export function featureSet_RepeatedFieldEncodingToJSON(object: FeatureSet_RepeatedFieldEncoding): string {
- switch (object) {
- case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN:
- return "REPEATED_FIELD_ENCODING_UNKNOWN";
- case FeatureSet_RepeatedFieldEncoding.PACKED:
- return "PACKED";
- case FeatureSet_RepeatedFieldEncoding.EXPANDED:
- return "EXPANDED";
- case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function featureSet_RepeatedFieldEncodingToNumber(object: FeatureSet_RepeatedFieldEncoding): number {
- switch (object) {
- case FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN:
- return 0;
- case FeatureSet_RepeatedFieldEncoding.PACKED:
- return 1;
- case FeatureSet_RepeatedFieldEncoding.EXPANDED:
- return 2;
- case FeatureSet_RepeatedFieldEncoding.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
-export enum FeatureSet_Utf8Validation {
- UTF8_VALIDATION_UNKNOWN = "UTF8_VALIDATION_UNKNOWN",
- NONE = "NONE",
- VERIFY = "VERIFY",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8Validation {
- switch (object) {
- case 0:
- case "UTF8_VALIDATION_UNKNOWN":
- return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;
- case 1:
- case "NONE":
- return FeatureSet_Utf8Validation.NONE;
- case 2:
- case "VERIFY":
- return FeatureSet_Utf8Validation.VERIFY;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_Utf8Validation.UNRECOGNIZED;
- }
-}
-
-export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validation): string {
- switch (object) {
- case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:
- return "UTF8_VALIDATION_UNKNOWN";
- case FeatureSet_Utf8Validation.NONE:
- return "NONE";
- case FeatureSet_Utf8Validation.VERIFY:
- return "VERIFY";
- case FeatureSet_Utf8Validation.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function featureSet_Utf8ValidationToNumber(object: FeatureSet_Utf8Validation): number {
- switch (object) {
- case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:
- return 0;
- case FeatureSet_Utf8Validation.NONE:
- return 1;
- case FeatureSet_Utf8Validation.VERIFY:
- return 2;
- case FeatureSet_Utf8Validation.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
-export enum FeatureSet_MessageEncoding {
- MESSAGE_ENCODING_UNKNOWN = "MESSAGE_ENCODING_UNKNOWN",
- LENGTH_PREFIXED = "LENGTH_PREFIXED",
- DELIMITED = "DELIMITED",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function featureSet_MessageEncodingFromJSON(object: any): FeatureSet_MessageEncoding {
- switch (object) {
- case 0:
- case "MESSAGE_ENCODING_UNKNOWN":
- return FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN;
- case 1:
- case "LENGTH_PREFIXED":
- return FeatureSet_MessageEncoding.LENGTH_PREFIXED;
- case 2:
- case "DELIMITED":
- return FeatureSet_MessageEncoding.DELIMITED;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_MessageEncoding.UNRECOGNIZED;
- }
-}
-
-export function featureSet_MessageEncodingToJSON(object: FeatureSet_MessageEncoding): string {
- switch (object) {
- case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN:
- return "MESSAGE_ENCODING_UNKNOWN";
- case FeatureSet_MessageEncoding.LENGTH_PREFIXED:
- return "LENGTH_PREFIXED";
- case FeatureSet_MessageEncoding.DELIMITED:
- return "DELIMITED";
- case FeatureSet_MessageEncoding.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function featureSet_MessageEncodingToNumber(object: FeatureSet_MessageEncoding): number {
- switch (object) {
- case FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN:
- return 0;
- case FeatureSet_MessageEncoding.LENGTH_PREFIXED:
- return 1;
- case FeatureSet_MessageEncoding.DELIMITED:
- return 2;
- case FeatureSet_MessageEncoding.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
-export enum FeatureSet_JsonFormat {
- JSON_FORMAT_UNKNOWN = "JSON_FORMAT_UNKNOWN",
- ALLOW = "ALLOW",
- LEGACY_BEST_EFFORT = "LEGACY_BEST_EFFORT",
- UNRECOGNIZED = "UNRECOGNIZED",
-}
-
-export function featureSet_JsonFormatFromJSON(object: any): FeatureSet_JsonFormat {
- switch (object) {
- case 0:
- case "JSON_FORMAT_UNKNOWN":
- return FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN;
- case 1:
- case "ALLOW":
- return FeatureSet_JsonFormat.ALLOW;
- case 2:
- case "LEGACY_BEST_EFFORT":
- return FeatureSet_JsonFormat.LEGACY_BEST_EFFORT;
- case -1:
- case "UNRECOGNIZED":
- default:
- return FeatureSet_JsonFormat.UNRECOGNIZED;
- }
-}
-
-export function featureSet_JsonFormatToJSON(object: FeatureSet_JsonFormat): string {
- switch (object) {
- case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN:
- return "JSON_FORMAT_UNKNOWN";
- case FeatureSet_JsonFormat.ALLOW:
- return "ALLOW";
- case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT:
- return "LEGACY_BEST_EFFORT";
- case FeatureSet_JsonFormat.UNRECOGNIZED:
- default:
- return "UNRECOGNIZED";
- }
-}
-
-export function featureSet_JsonFormatToNumber(object: FeatureSet_JsonFormat): number {
- switch (object) {
- case FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN:
- return 0;
- case FeatureSet_JsonFormat.ALLOW:
- return 1;
- case FeatureSet_JsonFormat.LEGACY_BEST_EFFORT:
- return 2;
- case FeatureSet_JsonFormat.UNRECOGNIZED:
- default:
- return -1;
- }
-}
-
-/**
- * A compiled specification for the defaults of a set of features. These
- * messages are generated from FeatureSet extensions and can be used to seed
- * feature resolution. The resolution with this object becomes a simple search
- * for the closest matching edition, followed by proto merges.
- */
-export interface FeatureSetDefaults {
- defaults: FeatureSetDefaults_FeatureSetEditionDefault[];
- /**
- * The minimum supported edition (inclusive) when this was constructed.
- * Editions before this will not have defaults.
- */
- minimumEdition: Edition;
- /**
- * The maximum known edition (inclusive) when this was constructed. Editions
- * after this will not have reliable defaults.
- */
- maximumEdition: Edition;
-}
-
-/**
- * A map from every known edition with a unique set of defaults to its
- * defaults. Not all editions may be contained here. For a given edition,
- * the defaults at the closest matching edition ordered at or before it should
- * be used. This field must be in strict ascending order by edition.
- */
-export interface FeatureSetDefaults_FeatureSetEditionDefault {
- edition: Edition;
- features: FeatureSet | undefined;
-}
-
-/**
- * Encapsulates information about the original source file from which a
- * FileDescriptorProto was generated.
- */
-export interface SourceCodeInfo {
- /**
- * A Location identifies a piece of source code in a .proto file which
- * corresponds to a particular definition. This information is intended
- * to be useful to IDEs, code indexers, documentation generators, and similar
- * tools.
- *
- * For example, say we have a file like:
- * message Foo {
- * optional string foo = 1;
- * }
- * Let's look at just the field definition:
- * optional string foo = 1;
- * ^ ^^ ^^ ^ ^^^
- * a bc de f ghi
- * We have the following locations:
- * span path represents
- * [a,i) [ 4, 0, 2, 0 ] The whole field definition.
- * [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
- * [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
- * [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
- * [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
- *
- * Notes:
- * - A location may refer to a repeated field itself (i.e. not to any
- * particular index within it). This is used whenever a set of elements are
- * logically enclosed in a single code segment. For example, an entire
- * extend block (possibly containing multiple extension definitions) will
- * have an outer location whose path refers to the "extensions" repeated
- * field without an index.
- * - Multiple locations may have the same path. This happens when a single
- * logical declaration is spread out across multiple places. The most
- * obvious example is the "extend" block again -- there may be multiple
- * extend blocks in the same scope, each of which will have the same path.
- * - A location's span is not always a subset of its parent's span. For
- * example, the "extendee" of an extension declaration appears at the
- * beginning of the "extend" block and is shared by all extensions within
- * the block.
- * - Just because a location's span is a subset of some other location's span
- * does not mean that it is a descendant. For example, a "group" defines
- * both a type and a field in a single declaration. Thus, the locations
- * corresponding to the type and field and their components will overlap.
- * - Code which tries to interpret locations should probably be designed to
- * ignore those that it doesn't understand, as more types of locations could
- * be recorded in the future.
- */
- location: SourceCodeInfo_Location[];
-}
-
-export interface SourceCodeInfo_Location {
- /**
- * Identifies which part of the FileDescriptorProto was defined at this
- * location.
- *
- * Each element is a field number or an index. They form a path from
- * the root FileDescriptorProto to the place where the definition occurs.
- * For example, this path:
- * [ 4, 3, 2, 7, 1 ]
- * refers to:
- * file.message_type(3) // 4, 3
- * .field(7) // 2, 7
- * .name() // 1
- * This is because FileDescriptorProto.message_type has field number 4:
- * repeated DescriptorProto message_type = 4;
- * and DescriptorProto.field has field number 2:
- * repeated FieldDescriptorProto field = 2;
- * and FieldDescriptorProto.name has field number 1:
- * optional string name = 1;
- *
- * Thus, the above path gives the location of a field name. If we removed
- * the last element:
- * [ 4, 3, 2, 7 ]
- * this path refers to the whole field declaration (from the beginning
- * of the label to the terminating semicolon).
- */
- path: number[];
- /**
- * Always has exactly three or four elements: start line, start column,
- * end line (optional, otherwise assumed same as start line), end column.
- * These are packed into a single field for efficiency. Note that line
- * and column numbers are zero-based -- typically you will want to add
- * 1 to each before displaying to a user.
- */
- span: number[];
- /**
- * If this SourceCodeInfo represents a complete declaration, these are any
- * comments appearing before and after the declaration which appear to be
- * attached to the declaration.
- *
- * A series of line comments appearing on consecutive lines, with no other
- * tokens appearing on those lines, will be treated as a single comment.
- *
- * leading_detached_comments will keep paragraphs of comments that appear
- * before (but not connected to) the current element. Each paragraph,
- * separated by empty lines, will be one comment element in the repeated
- * field.
- *
- * Only the comment content is provided; comment markers (e.g. //) are
- * stripped out. For block comments, leading whitespace and an asterisk
- * will be stripped from the beginning of each line other than the first.
- * Newlines are included in the output.
- *
- * Examples:
- *
- * optional int32 foo = 1; // Comment attached to foo.
- * // Comment attached to bar.
- * optional int32 bar = 2;
- *
- * optional string baz = 3;
- * // Comment attached to baz.
- * // Another line attached to baz.
- *
- * // Comment attached to moo.
- * //
- * // Another line attached to moo.
- * optional double moo = 4;
- *
- * // Detached comment for corge. This is not leading or trailing comments
- * // to moo or corge because there are blank lines separating it from
- * // both.
- *
- * // Detached comment for corge paragraph 2.
- *
- * optional string corge = 5;
- * /* Block comment attached
- * * to corge. Leading asterisks
- * * will be removed. * /
- * /* Block comment attached to
- * * grault. * /
- * optional int32 grault = 6;
- *
- * // ignored detached comments.
- */
- leadingComments: string;
- trailingComments: string;
- leadingDetachedComments: string[];
+export interface SourceCodeInfo_Location {
+ /**
+ * Identifies which part of the FileDescriptorProto was defined at this
+ * location.
+ *
+ * Each element is a field number or an index. They form a path from
+ * the root FileDescriptorProto to the place where the definition occurs.
+ * For example, this path:
+ * [ 4, 3, 2, 7, 1 ]
+ * refers to:
+ * file.message_type(3) // 4, 3
+ * .field(7) // 2, 7
+ * .name() // 1
+ * This is because FileDescriptorProto.message_type has field number 4:
+ * repeated DescriptorProto message_type = 4;
+ * and DescriptorProto.field has field number 2:
+ * repeated FieldDescriptorProto field = 2;
+ * and FieldDescriptorProto.name has field number 1:
+ * optional string name = 1;
+ *
+ * Thus, the above path gives the location of a field name. If we removed
+ * the last element:
+ * [ 4, 3, 2, 7 ]
+ * this path refers to the whole field declaration (from the beginning
+ * of the label to the terminating semicolon).
+ */
+ path: number[];
+ /**
+ * Always has exactly three or four elements: start line, start column,
+ * end line (optional, otherwise assumed same as start line), end column.
+ * These are packed into a single field for efficiency. Note that line
+ * and column numbers are zero-based -- typically you will want to add
+ * 1 to each before displaying to a user.
+ */
+ span: number[];
+ /**
+ * If this SourceCodeInfo represents a complete declaration, these are any
+ * comments appearing before and after the declaration which appear to be
+ * attached to the declaration.
+ *
+ * A series of line comments appearing on consecutive lines, with no other
+ * tokens appearing on those lines, will be treated as a single comment.
+ *
+ * leading_detached_comments will keep paragraphs of comments that appear
+ * before (but not connected to) the current element. Each paragraph,
+ * separated by empty lines, will be one comment element in the repeated
+ * field.
+ *
+ * Only the comment content is provided; comment markers (e.g. //) are
+ * stripped out. For block comments, leading whitespace and an asterisk
+ * will be stripped from the beginning of each line other than the first.
+ * Newlines are included in the output.
+ *
+ * Examples:
+ *
+ * optional int32 foo = 1; // Comment attached to foo.
+ * // Comment attached to bar.
+ * optional int32 bar = 2;
+ *
+ * optional string baz = 3;
+ * // Comment attached to baz.
+ * // Another line attached to baz.
+ *
+ * // Comment attached to moo.
+ * //
+ * // Another line attached to moo.
+ * optional double moo = 4;
+ *
+ * // Detached comment for corge. This is not leading or trailing comments
+ * // to moo or corge because there are blank lines separating it from
+ * // both.
+ *
+ * // Detached comment for corge paragraph 2.
+ *
+ * optional string corge = 5;
+ * /* Block comment attached
+ * * to corge. Leading asterisks
+ * * will be removed. * /
+ * /* Block comment attached to
+ * * grault. * /
+ * optional int32 grault = 6;
+ *
+ * // ignored detached comments.
+ */
+ leadingComments: string;
+ trailingComments: string;
+ leadingDetachedComments: string[];
}
/**
@@ -2240,7 +1593,7 @@ function createBaseFileDescriptorProto(): FileDescriptorProto {
options: undefined,
sourceCodeInfo: undefined,
syntax: "",
- edition: Edition.EDITION_UNKNOWN,
+ edition: "",
};
}
@@ -2286,8 +1639,8 @@ export const FileDescriptorProto = {
if (message.syntax !== "") {
writer.uint32(98).string(message.syntax);
}
- if (message.edition !== Edition.EDITION_UNKNOWN) {
- writer.uint32(112).int32(editionToNumber(message.edition));
+ if (message.edition !== "") {
+ writer.uint32(106).string(message.edition);
}
return writer;
},
@@ -2403,12 +1756,12 @@ export const FileDescriptorProto = {
message.syntax = reader.string();
continue;
- case 14:
- if (tag !== 112) {
+ case 13:
+ if (tag !== 106) {
break;
}
- message.edition = editionFromJSON(reader.int32());
+ message.edition = reader.string();
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -2447,7 +1800,7 @@ export const FileDescriptorProto = {
options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined,
sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined,
syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "",
- edition: isSet(object.edition) ? editionFromJSON(object.edition) : Edition.EDITION_UNKNOWN,
+ edition: isSet(object.edition) ? globalThis.String(object.edition) : "",
};
},
@@ -2489,8 +1842,8 @@ export const FileDescriptorProto = {
if (message.syntax !== "") {
obj.syntax = message.syntax;
}
- if (message.edition !== Edition.EDITION_UNKNOWN) {
- obj.edition = editionToJSON(message.edition);
+ if (message.edition !== "") {
+ obj.edition = message.edition;
}
return obj;
},
@@ -2516,7 +1869,7 @@ export const FileDescriptorProto = {
? SourceCodeInfo.fromPartial(object.sourceCodeInfo)
: undefined;
message.syntax = object.syntax ?? "";
- message.edition = object.edition ?? Edition.EDITION_UNKNOWN;
+ message.edition = object.edition ?? "";
return message;
},
};
@@ -2910,12 +2263,7 @@ export const DescriptorProto_ReservedRange = {
};
function createBaseExtensionRangeOptions(): ExtensionRangeOptions {
- return {
- uninterpretedOption: [],
- declaration: [],
- features: undefined,
- verification: ExtensionRangeOptions_VerificationState.DECLARATION,
- };
+ return { uninterpretedOption: [] };
}
export const ExtensionRangeOptions = {
@@ -2923,15 +2271,6 @@ export const ExtensionRangeOptions = {
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
- for (const v of message.declaration) {
- ExtensionRangeOptions_Declaration.encode(v!, writer.uint32(18).fork()).ldelim();
- }
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim();
- }
- if (message.verification !== ExtensionRangeOptions_VerificationState.DECLARATION) {
- writer.uint32(24).int32(extensionRangeOptions_VerificationStateToNumber(message.verification));
- }
return writer;
},
@@ -2949,27 +2288,6 @@ export const ExtensionRangeOptions = {
message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32()));
continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.declaration.push(ExtensionRangeOptions_Declaration.decode(reader, reader.uint32()));
- continue;
- case 50:
- if (tag !== 402) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.verification = extensionRangeOptions_VerificationStateFromJSON(reader.int32());
- continue;
}
if ((tag & 7) === 4 || tag === 0) {
break;
@@ -2984,13 +2302,6 @@ export const ExtensionRangeOptions = {
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
- declaration: globalThis.Array.isArray(object?.declaration)
- ? object.declaration.map((e: any) => ExtensionRangeOptions_Declaration.fromJSON(e))
- : [],
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
- verification: isSet(object.verification)
- ? extensionRangeOptions_VerificationStateFromJSON(object.verification)
- : ExtensionRangeOptions_VerificationState.DECLARATION,
};
},
@@ -2999,15 +2310,6 @@ export const ExtensionRangeOptions = {
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
- if (message.declaration?.length) {
- obj.declaration = message.declaration.map((e) => ExtensionRangeOptions_Declaration.toJSON(e));
- }
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
- if (message.verification !== ExtensionRangeOptions_VerificationState.DECLARATION) {
- obj.verification = extensionRangeOptions_VerificationStateToJSON(message.verification);
- }
return obj;
},
@@ -3017,130 +2319,6 @@ export const ExtensionRangeOptions = {
fromPartial(object: DeepPartial<ExtensionRangeOptions>): ExtensionRangeOptions {
const message = createBaseExtensionRangeOptions();
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
- message.declaration = object.declaration?.map((e) => ExtensionRangeOptions_Declaration.fromPartial(e)) || [];
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
- message.verification = object.verification ?? ExtensionRangeOptions_VerificationState.DECLARATION;
- return message;
- },
-};
-
-function createBaseExtensionRangeOptions_Declaration(): ExtensionRangeOptions_Declaration {
- return { number: 0, fullName: "", type: "", reserved: false, repeated: false };
-}
-
-export const ExtensionRangeOptions_Declaration = {
- encode(message: ExtensionRangeOptions_Declaration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.number !== 0) {
- writer.uint32(8).int32(message.number);
- }
- if (message.fullName !== "") {
- writer.uint32(18).string(message.fullName);
- }
- if (message.type !== "") {
- writer.uint32(26).string(message.type);
- }
- if (message.reserved === true) {
- writer.uint32(40).bool(message.reserved);
- }
- if (message.repeated === true) {
- writer.uint32(48).bool(message.repeated);
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions_Declaration {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseExtensionRangeOptions_Declaration();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 8) {
- break;
- }
-
- message.number = reader.int32();
- continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.fullName = reader.string();
- continue;
- case 3:
- if (tag !== 26) {
- break;
- }
-
- message.type = reader.string();
- continue;
- case 5:
- if (tag !== 40) {
- break;
- }
-
- message.reserved = reader.bool();
- continue;
- case 6:
- if (tag !== 48) {
- break;
- }
-
- message.repeated = reader.bool();
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): ExtensionRangeOptions_Declaration {
- return {
- number: isSet(object.number) ? globalThis.Number(object.number) : 0,
- fullName: isSet(object.fullName) ? globalThis.String(object.fullName) : "",
- type: isSet(object.type) ? globalThis.String(object.type) : "",
- reserved: isSet(object.reserved) ? globalThis.Boolean(object.reserved) : false,
- repeated: isSet(object.repeated) ? globalThis.Boolean(object.repeated) : false,
- };
- },
-
- toJSON(message: ExtensionRangeOptions_Declaration): unknown {
- const obj: any = {};
- if (message.number !== 0) {
- obj.number = Math.round(message.number);
- }
- if (message.fullName !== "") {
- obj.fullName = message.fullName;
- }
- if (message.type !== "") {
- obj.type = message.type;
- }
- if (message.reserved === true) {
- obj.reserved = message.reserved;
- }
- if (message.repeated === true) {
- obj.repeated = message.repeated;
- }
- return obj;
- },
-
- create(base?: DeepPartial<ExtensionRangeOptions_Declaration>): ExtensionRangeOptions_Declaration {
- return ExtensionRangeOptions_Declaration.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<ExtensionRangeOptions_Declaration>): ExtensionRangeOptions_Declaration {
- const message = createBaseExtensionRangeOptions_Declaration();
- message.number = object.number ?? 0;
- message.fullName = object.fullName ?? "";
- message.type = object.type ?? "";
- message.reserved = object.reserved ?? false;
- message.repeated = object.repeated ?? false;
return message;
},
};
@@ -3997,7 +3175,6 @@ function createBaseFileOptions(): FileOptions {
phpNamespace: "",
phpMetadataNamespace: "",
rubyPackage: "",
- features: undefined,
uninterpretedOption: [],
};
}
@@ -4064,9 +3241,6 @@ export const FileOptions = {
if (message.rubyPackage !== "") {
writer.uint32(362).string(message.rubyPackage);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(402).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4220,13 +3394,6 @@ export const FileOptions = {
message.rubyPackage = reader.string();
continue;
- case 50:
- if (tag !== 402) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -4269,7 +3436,6 @@ export const FileOptions = {
phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "",
phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "",
rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "",
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4338,9 +3504,6 @@ export const FileOptions = {
if (message.rubyPackage !== "") {
obj.rubyPackage = message.rubyPackage;
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4372,9 +3535,6 @@ export const FileOptions = {
message.phpNamespace = object.phpNamespace ?? "";
message.phpMetadataNamespace = object.phpMetadataNamespace ?? "";
message.rubyPackage = object.rubyPackage ?? "";
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -4387,7 +3547,6 @@ function createBaseMessageOptions(): MessageOptions {
deprecated: false,
mapEntry: false,
deprecatedLegacyJsonFieldConflicts: false,
- features: undefined,
uninterpretedOption: [],
};
}
@@ -4409,9 +3568,6 @@ export const MessageOptions = {
if (message.deprecatedLegacyJsonFieldConflicts === true) {
writer.uint32(88).bool(message.deprecatedLegacyJsonFieldConflicts);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(98).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4460,13 +3616,6 @@ export const MessageOptions = {
message.deprecatedLegacyJsonFieldConflicts = reader.bool();
continue;
- case 12:
- if (tag !== 98) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -4496,7 +3645,6 @@ export const MessageOptions = {
deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts)
: false,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4520,9 +3668,6 @@ export const MessageOptions = {
if (message.deprecatedLegacyJsonFieldConflicts === true) {
obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4539,9 +3684,6 @@ export const MessageOptions = {
message.deprecated = object.deprecated ?? false;
message.mapEntry = object.mapEntry ?? false;
message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -4558,9 +3700,7 @@ function createBaseFieldOptions(): FieldOptions {
weak: false,
debugRedact: false,
retention: FieldOptions_OptionRetention.RETENTION_UNKNOWN,
- targets: [],
- editionDefaults: [],
- features: undefined,
+ target: FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN,
uninterpretedOption: [],
};
}
@@ -4594,16 +3734,8 @@ export const FieldOptions = {
if (message.retention !== FieldOptions_OptionRetention.RETENTION_UNKNOWN) {
writer.uint32(136).int32(fieldOptions_OptionRetentionToNumber(message.retention));
}
- writer.uint32(154).fork();
- for (const v of message.targets) {
- writer.int32(fieldOptions_OptionTargetTypeToNumber(v));
- }
- writer.ldelim();
- for (const v of message.editionDefaults) {
- FieldOptions_EditionDefault.encode(v!, writer.uint32(162).fork()).ldelim();
- }
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(170).fork()).ldelim();
+ if (message.target !== FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN) {
+ writer.uint32(144).int32(fieldOptions_OptionTargetTypeToNumber(message.target));
}
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
@@ -4681,36 +3813,12 @@ export const FieldOptions = {
message.retention = fieldOptions_OptionRetentionFromJSON(reader.int32());
continue;
- case 19:
- if (tag === 152) {
- message.targets.push(fieldOptions_OptionTargetTypeFromJSON(reader.int32()));
-
- continue;
- }
-
- if (tag === 154) {
- const end2 = reader.uint32() + reader.pos;
- while (reader.pos < end2) {
- message.targets.push(fieldOptions_OptionTargetTypeFromJSON(reader.int32()));
- }
-
- continue;
- }
-
- break;
- case 20:
- if (tag !== 162) {
- break;
- }
-
- message.editionDefaults.push(FieldOptions_EditionDefault.decode(reader, reader.uint32()));
- continue;
- case 21:
- if (tag !== 170) {
+ case 18:
+ if (tag !== 144) {
break;
}
- message.features = FeatureSet.decode(reader, reader.uint32());
+ message.target = fieldOptions_OptionTargetTypeFromJSON(reader.int32());
continue;
case 999:
if (tag !== 7994) {
@@ -4741,13 +3849,9 @@ export const FieldOptions = {
retention: isSet(object.retention)
? fieldOptions_OptionRetentionFromJSON(object.retention)
: FieldOptions_OptionRetention.RETENTION_UNKNOWN,
- targets: globalThis.Array.isArray(object?.targets)
- ? object.targets.map((e: any) => fieldOptions_OptionTargetTypeFromJSON(e))
- : [],
- editionDefaults: globalThis.Array.isArray(object?.editionDefaults)
- ? object.editionDefaults.map((e: any) => FieldOptions_EditionDefault.fromJSON(e))
- : [],
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
+ target: isSet(object.target)
+ ? fieldOptions_OptionTargetTypeFromJSON(object.target)
+ : FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4783,14 +3887,8 @@ export const FieldOptions = {
if (message.retention !== FieldOptions_OptionRetention.RETENTION_UNKNOWN) {
obj.retention = fieldOptions_OptionRetentionToJSON(message.retention);
}
- if (message.targets?.length) {
- obj.targets = message.targets.map((e) => fieldOptions_OptionTargetTypeToJSON(e));
- }
- if (message.editionDefaults?.length) {
- obj.editionDefaults = message.editionDefaults.map((e) => FieldOptions_EditionDefault.toJSON(e));
- }
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
+ if (message.target !== FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN) {
+ obj.target = fieldOptions_OptionTargetTypeToJSON(message.target);
}
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
@@ -4806,105 +3904,24 @@ export const FieldOptions = {
message.ctype = object.ctype ?? FieldOptions_CType.STRING;
message.packed = object.packed ?? false;
message.jstype = object.jstype ?? FieldOptions_JSType.JS_NORMAL;
- message.lazy = object.lazy ?? false;
- message.unverifiedLazy = object.unverifiedLazy ?? false;
- message.deprecated = object.deprecated ?? false;
- message.weak = object.weak ?? false;
- message.debugRedact = object.debugRedact ?? false;
- message.retention = object.retention ?? FieldOptions_OptionRetention.RETENTION_UNKNOWN;
- message.targets = object.targets?.map((e) => e) || [];
- message.editionDefaults = object.editionDefaults?.map((e) => FieldOptions_EditionDefault.fromPartial(e)) || [];
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
- message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
- return message;
- },
-};
-
-function createBaseFieldOptions_EditionDefault(): FieldOptions_EditionDefault {
- return { edition: Edition.EDITION_UNKNOWN, value: "" };
-}
-
-export const FieldOptions_EditionDefault = {
- encode(message: FieldOptions_EditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.edition !== Edition.EDITION_UNKNOWN) {
- writer.uint32(24).int32(editionToNumber(message.edition));
- }
- if (message.value !== "") {
- writer.uint32(18).string(message.value);
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_EditionDefault {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFieldOptions_EditionDefault();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.edition = editionFromJSON(reader.int32());
- continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.value = reader.string();
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FieldOptions_EditionDefault {
- return {
- edition: isSet(object.edition) ? editionFromJSON(object.edition) : Edition.EDITION_UNKNOWN,
- value: isSet(object.value) ? globalThis.String(object.value) : "",
- };
- },
-
- toJSON(message: FieldOptions_EditionDefault): unknown {
- const obj: any = {};
- if (message.edition !== Edition.EDITION_UNKNOWN) {
- obj.edition = editionToJSON(message.edition);
- }
- if (message.value !== "") {
- obj.value = message.value;
- }
- return obj;
- },
-
- create(base?: DeepPartial<FieldOptions_EditionDefault>): FieldOptions_EditionDefault {
- return FieldOptions_EditionDefault.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<FieldOptions_EditionDefault>): FieldOptions_EditionDefault {
- const message = createBaseFieldOptions_EditionDefault();
- message.edition = object.edition ?? Edition.EDITION_UNKNOWN;
- message.value = object.value ?? "";
+ message.lazy = object.lazy ?? false;
+ message.unverifiedLazy = object.unverifiedLazy ?? false;
+ message.deprecated = object.deprecated ?? false;
+ message.weak = object.weak ?? false;
+ message.debugRedact = object.debugRedact ?? false;
+ message.retention = object.retention ?? FieldOptions_OptionRetention.RETENTION_UNKNOWN;
+ message.target = object.target ?? FieldOptions_OptionTargetType.TARGET_TYPE_UNKNOWN;
+ message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
};
function createBaseOneofOptions(): OneofOptions {
- return { features: undefined, uninterpretedOption: [] };
+ return { uninterpretedOption: [] };
}
export const OneofOptions = {
encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(10).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4918,13 +3935,6 @@ export const OneofOptions = {
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
- case 1:
- if (tag !== 10) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -4943,7 +3953,6 @@ export const OneofOptions = {
fromJSON(object: any): OneofOptions {
return {
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4952,9 +3961,6 @@ export const OneofOptions = {
toJSON(message: OneofOptions): unknown {
const obj: any = {};
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4966,22 +3972,13 @@ export const OneofOptions = {
},
fromPartial(object: DeepPartial<OneofOptions>): OneofOptions {
const message = createBaseOneofOptions();
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
};
function createBaseEnumOptions(): EnumOptions {
- return {
- allowAlias: false,
- deprecated: false,
- deprecatedLegacyJsonFieldConflicts: false,
- features: undefined,
- uninterpretedOption: [],
- };
+ return { allowAlias: false, deprecated: false, deprecatedLegacyJsonFieldConflicts: false, uninterpretedOption: [] };
}
export const EnumOptions = {
@@ -4995,9 +3992,6 @@ export const EnumOptions = {
if (message.deprecatedLegacyJsonFieldConflicts === true) {
writer.uint32(48).bool(message.deprecatedLegacyJsonFieldConflicts);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(58).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -5032,13 +4026,6 @@ export const EnumOptions = {
message.deprecatedLegacyJsonFieldConflicts = reader.bool();
continue;
- case 7:
- if (tag !== 58) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -5062,7 +4049,6 @@ export const EnumOptions = {
deprecatedLegacyJsonFieldConflicts: isSet(object.deprecatedLegacyJsonFieldConflicts)
? globalThis.Boolean(object.deprecatedLegacyJsonFieldConflicts)
: false,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -5080,9 +4066,6 @@ export const EnumOptions = {
if (message.deprecatedLegacyJsonFieldConflicts === true) {
obj.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -5097,16 +4080,13 @@ export const EnumOptions = {
message.allowAlias = object.allowAlias ?? false;
message.deprecated = object.deprecated ?? false;
message.deprecatedLegacyJsonFieldConflicts = object.deprecatedLegacyJsonFieldConflicts ?? false;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
};
function createBaseEnumValueOptions(): EnumValueOptions {
- return { deprecated: false, features: undefined, debugRedact: false, uninterpretedOption: [] };
+ return { deprecated: false, uninterpretedOption: [] };
}
export const EnumValueOptions = {
@@ -5114,12 +4094,6 @@ export const EnumValueOptions = {
if (message.deprecated === true) {
writer.uint32(8).bool(message.deprecated);
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();
- }
- if (message.debugRedact === true) {
- writer.uint32(24).bool(message.debugRedact);
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -5140,20 +4114,6 @@ export const EnumValueOptions = {
message.deprecated = reader.bool();
continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.debugRedact = reader.bool();
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -5173,8 +4133,6 @@ export const EnumValueOptions = {
fromJSON(object: any): EnumValueOptions {
return {
deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
- debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -5186,12 +4144,6 @@ export const EnumValueOptions = {
if (message.deprecated === true) {
obj.deprecated = message.deprecated;
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
- if (message.debugRedact === true) {
- obj.debugRedact = message.debugRedact;
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -5204,24 +4156,17 @@ export const EnumValueOptions = {
fromPartial(object: DeepPartial<EnumValueOptions>): EnumValueOptions {
const message = createBaseEnumValueOptions();
message.deprecated = object.deprecated ?? false;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
- message.debugRedact = object.debugRedact ?? false;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
};
function createBaseServiceOptions(): ServiceOptions {
- return { features: undefined, deprecated: false, uninterpretedOption: [] };
+ return { deprecated: false, uninterpretedOption: [] };
}
export const ServiceOptions = {
encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(274).fork()).ldelim();
- }
if (message.deprecated === true) {
writer.uint32(264).bool(message.deprecated);
}
@@ -5238,13 +4183,6 @@ export const ServiceOptions = {
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
- case 34:
- if (tag !== 274) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 33:
if (tag !== 264) {
break;
@@ -5270,7 +4208,6 @@ export const ServiceOptions = {
fromJSON(object: any): ServiceOptions {
return {
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
@@ -5280,9 +4217,6 @@ export const ServiceOptions = {
toJSON(message: ServiceOptions): unknown {
const obj: any = {};
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.deprecated === true) {
obj.deprecated = message.deprecated;
}
@@ -5297,9 +4231,6 @@ export const ServiceOptions = {
},
fromPartial(object: DeepPartial<ServiceOptions>): ServiceOptions {
const message = createBaseServiceOptions();
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.deprecated = object.deprecated ?? false;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
@@ -5310,7 +4241,6 @@ function createBaseMethodOptions(): MethodOptions {
return {
deprecated: false,
idempotencyLevel: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN,
- features: undefined,
uninterpretedOption: [],
};
}
@@ -5323,9 +4253,6 @@ export const MethodOptions = {
if (message.idempotencyLevel !== MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN) {
writer.uint32(272).int32(methodOptions_IdempotencyLevelToNumber(message.idempotencyLevel));
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(282).fork()).ldelim();
- }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -5353,13 +4280,6 @@ export const MethodOptions = {
message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(reader.int32());
continue;
- case 35:
- if (tag !== 282) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
case 999:
if (tag !== 7994) {
break;
@@ -5382,7 +4302,6 @@ export const MethodOptions = {
idempotencyLevel: isSet(object.idempotencyLevel)
? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel)
: MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -5397,9 +4316,6 @@ export const MethodOptions = {
if (message.idempotencyLevel !== MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN) {
obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel);
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -5413,9 +4329,6 @@ export const MethodOptions = {
const message = createBaseMethodOptions();
message.deprecated = object.deprecated ?? false;
message.idempotencyLevel = object.idempotencyLevel ?? MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -5658,329 +4571,6 @@ export const UninterpretedOption_NamePart = {
},
};
-function createBaseFeatureSet(): FeatureSet {
- return {
- fieldPresence: FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN,
- enumType: FeatureSet_EnumType.ENUM_TYPE_UNKNOWN,
- repeatedFieldEncoding: FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN,
- utf8Validation: FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN,
- messageEncoding: FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN,
- jsonFormat: FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN,
- };
-}
-
-export const FeatureSet = {
- encode(message: FeatureSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.fieldPresence !== FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN) {
- writer.uint32(8).int32(featureSet_FieldPresenceToNumber(message.fieldPresence));
- }
- if (message.enumType !== FeatureSet_EnumType.ENUM_TYPE_UNKNOWN) {
- writer.uint32(16).int32(featureSet_EnumTypeToNumber(message.enumType));
- }
- if (message.repeatedFieldEncoding !== FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN) {
- writer.uint32(24).int32(featureSet_RepeatedFieldEncodingToNumber(message.repeatedFieldEncoding));
- }
- if (message.utf8Validation !== FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN) {
- writer.uint32(32).int32(featureSet_Utf8ValidationToNumber(message.utf8Validation));
- }
- if (message.messageEncoding !== FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN) {
- writer.uint32(40).int32(featureSet_MessageEncodingToNumber(message.messageEncoding));
- }
- if (message.jsonFormat !== FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN) {
- writer.uint32(48).int32(featureSet_JsonFormatToNumber(message.jsonFormat));
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSet {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFeatureSet();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 8) {
- break;
- }
-
- message.fieldPresence = featureSet_FieldPresenceFromJSON(reader.int32());
- continue;
- case 2:
- if (tag !== 16) {
- break;
- }
-
- message.enumType = featureSet_EnumTypeFromJSON(reader.int32());
- continue;
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.repeatedFieldEncoding = featureSet_RepeatedFieldEncodingFromJSON(reader.int32());
- continue;
- case 4:
- if (tag !== 32) {
- break;
- }
-
- message.utf8Validation = featureSet_Utf8ValidationFromJSON(reader.int32());
- continue;
- case 5:
- if (tag !== 40) {
- break;
- }
-
- message.messageEncoding = featureSet_MessageEncodingFromJSON(reader.int32());
- continue;
- case 6:
- if (tag !== 48) {
- break;
- }
-
- message.jsonFormat = featureSet_JsonFormatFromJSON(reader.int32());
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FeatureSet {
- return {
- fieldPresence: isSet(object.fieldPresence)
- ? featureSet_FieldPresenceFromJSON(object.fieldPresence)
- : FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN,
- enumType: isSet(object.enumType)
- ? featureSet_EnumTypeFromJSON(object.enumType)
- : FeatureSet_EnumType.ENUM_TYPE_UNKNOWN,
- repeatedFieldEncoding: isSet(object.repeatedFieldEncoding)
- ? featureSet_RepeatedFieldEncodingFromJSON(object.repeatedFieldEncoding)
- : FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN,
- utf8Validation: isSet(object.utf8Validation)
- ? featureSet_Utf8ValidationFromJSON(object.utf8Validation)
- : FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN,
- messageEncoding: isSet(object.messageEncoding)
- ? featureSet_MessageEncodingFromJSON(object.messageEncoding)
- : FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN,
- jsonFormat: isSet(object.jsonFormat)
- ? featureSet_JsonFormatFromJSON(object.jsonFormat)
- : FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN,
- };
- },
-
- toJSON(message: FeatureSet): unknown {
- const obj: any = {};
- if (message.fieldPresence !== FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN) {
- obj.fieldPresence = featureSet_FieldPresenceToJSON(message.fieldPresence);
- }
- if (message.enumType !== FeatureSet_EnumType.ENUM_TYPE_UNKNOWN) {
- obj.enumType = featureSet_EnumTypeToJSON(message.enumType);
- }
- if (message.repeatedFieldEncoding !== FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN) {
- obj.repeatedFieldEncoding = featureSet_RepeatedFieldEncodingToJSON(message.repeatedFieldEncoding);
- }
- if (message.utf8Validation !== FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN) {
- obj.utf8Validation = featureSet_Utf8ValidationToJSON(message.utf8Validation);
- }
- if (message.messageEncoding !== FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN) {
- obj.messageEncoding = featureSet_MessageEncodingToJSON(message.messageEncoding);
- }
- if (message.jsonFormat !== FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN) {
- obj.jsonFormat = featureSet_JsonFormatToJSON(message.jsonFormat);
- }
- return obj;
- },
-
- create(base?: DeepPartial<FeatureSet>): FeatureSet {
- return FeatureSet.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<FeatureSet>): FeatureSet {
- const message = createBaseFeatureSet();
- message.fieldPresence = object.fieldPresence ?? FeatureSet_FieldPresence.FIELD_PRESENCE_UNKNOWN;
- message.enumType = object.enumType ?? FeatureSet_EnumType.ENUM_TYPE_UNKNOWN;
- message.repeatedFieldEncoding = object.repeatedFieldEncoding ??
- FeatureSet_RepeatedFieldEncoding.REPEATED_FIELD_ENCODING_UNKNOWN;
- message.utf8Validation = object.utf8Validation ?? FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;
- message.messageEncoding = object.messageEncoding ?? FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN;
- message.jsonFormat = object.jsonFormat ?? FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN;
- return message;
- },
-};
-
-function createBaseFeatureSetDefaults(): FeatureSetDefaults {
- return { defaults: [], minimumEdition: Edition.EDITION_UNKNOWN, maximumEdition: Edition.EDITION_UNKNOWN };
-}
-
-export const FeatureSetDefaults = {
- encode(message: FeatureSetDefaults, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- for (const v of message.defaults) {
- FeatureSetDefaults_FeatureSetEditionDefault.encode(v!, writer.uint32(10).fork()).ldelim();
- }
- if (message.minimumEdition !== Edition.EDITION_UNKNOWN) {
- writer.uint32(32).int32(editionToNumber(message.minimumEdition));
- }
- if (message.maximumEdition !== Edition.EDITION_UNKNOWN) {
- writer.uint32(40).int32(editionToNumber(message.maximumEdition));
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFeatureSetDefaults();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (tag !== 10) {
- break;
- }
-
- message.defaults.push(FeatureSetDefaults_FeatureSetEditionDefault.decode(reader, reader.uint32()));
- continue;
- case 4:
- if (tag !== 32) {
- break;
- }
-
- message.minimumEdition = editionFromJSON(reader.int32());
- continue;
- case 5:
- if (tag !== 40) {
- break;
- }
-
- message.maximumEdition = editionFromJSON(reader.int32());
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FeatureSetDefaults {
- return {
- defaults: globalThis.Array.isArray(object?.defaults)
- ? object.defaults.map((e: any) => FeatureSetDefaults_FeatureSetEditionDefault.fromJSON(e))
- : [],
- minimumEdition: isSet(object.minimumEdition) ? editionFromJSON(object.minimumEdition) : Edition.EDITION_UNKNOWN,
- maximumEdition: isSet(object.maximumEdition) ? editionFromJSON(object.maximumEdition) : Edition.EDITION_UNKNOWN,
- };
- },
-
- toJSON(message: FeatureSetDefaults): unknown {
- const obj: any = {};
- if (message.defaults?.length) {
- obj.defaults = message.defaults.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.toJSON(e));
- }
- if (message.minimumEdition !== Edition.EDITION_UNKNOWN) {
- obj.minimumEdition = editionToJSON(message.minimumEdition);
- }
- if (message.maximumEdition !== Edition.EDITION_UNKNOWN) {
- obj.maximumEdition = editionToJSON(message.maximumEdition);
- }
- return obj;
- },
-
- create(base?: DeepPartial<FeatureSetDefaults>): FeatureSetDefaults {
- return FeatureSetDefaults.fromPartial(base ?? {});
- },
- fromPartial(object: DeepPartial<FeatureSetDefaults>): FeatureSetDefaults {
- const message = createBaseFeatureSetDefaults();
- message.defaults = object.defaults?.map((e) => FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(e)) || [];
- message.minimumEdition = object.minimumEdition ?? Edition.EDITION_UNKNOWN;
- message.maximumEdition = object.maximumEdition ?? Edition.EDITION_UNKNOWN;
- return message;
- },
-};
-
-function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault {
- return { edition: Edition.EDITION_UNKNOWN, features: undefined };
-}
-
-export const FeatureSetDefaults_FeatureSetEditionDefault = {
- encode(message: FeatureSetDefaults_FeatureSetEditionDefault, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
- if (message.edition !== Edition.EDITION_UNKNOWN) {
- writer.uint32(24).int32(editionToNumber(message.edition));
- }
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();
- }
- return writer;
- },
-
- decode(input: _m0.Reader | Uint8Array, length?: number): FeatureSetDefaults_FeatureSetEditionDefault {
- const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
- let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();
- while (reader.pos < end) {
- const tag = reader.uint32();
- switch (tag >>> 3) {
- case 3:
- if (tag !== 24) {
- break;
- }
-
- message.edition = editionFromJSON(reader.int32());
- continue;
- case 2:
- if (tag !== 18) {
- break;
- }
-
- message.features = FeatureSet.decode(reader, reader.uint32());
- continue;
- }
- if ((tag & 7) === 4 || tag === 0) {
- break;
- }
- reader.skipType(tag & 7);
- }
- return message;
- },
-
- fromJSON(object: any): FeatureSetDefaults_FeatureSetEditionDefault {
- return {
- edition: isSet(object.edition) ? editionFromJSON(object.edition) : Edition.EDITION_UNKNOWN,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
- };
- },
-
- toJSON(message: FeatureSetDefaults_FeatureSetEditionDefault): unknown {
- const obj: any = {};
- if (message.edition !== Edition.EDITION_UNKNOWN) {
- obj.edition = editionToJSON(message.edition);
- }
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
- }
- return obj;
- },
-
- create(base?: DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>): FeatureSetDefaults_FeatureSetEditionDefault {
- return FeatureSetDefaults_FeatureSetEditionDefault.fromPartial(base ?? {});
- },
- fromPartial(
- object: DeepPartial<FeatureSetDefaults_FeatureSetEditionDefault>,
- ): FeatureSetDefaults_FeatureSetEditionDefault {
- const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();
- message.edition = object.edition ?? Edition.EDITION_UNKNOWN;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
- : undefined;
- return message;
- },
-};
-
function createBaseSourceCodeInfo(): SourceCodeInfo {
return { location: [] };
}
diff --git a/frontend/src/types/proto/google/protobuf/struct.ts b/frontend/src/types/proto/google/protobuf/struct.ts
index da35159e1f..31ff603438 100644
--- a/frontend/src/types/proto/google/protobuf/struct.ts
+++ b/frontend/src/types/proto/google/protobuf/struct.ts
@@ -8,7 +8,7 @@ export const protobufPackage = "google.protobuf";
* `NullValue` is a singleton enumeration to represent the null value for the
* `Value` type union.
*
- * The JSON representation for `NullValue` is JSON `null`.
+ * The JSON representation for `NullValue` is JSON `null`.
*/
export enum NullValue {
/** NULL_VALUE - Null value. */
diff --git a/frontend/src/types/proto/google/protobuf/timestamp.ts b/frontend/src/types/proto/google/protobuf/timestamp.ts
index 5781891bc0..51695e08d0 100644
--- a/frontend/src/types/proto/google/protobuf/timestamp.ts
+++ b/frontend/src/types/proto/google/protobuf/timestamp.ts
@@ -92,7 +92,7 @@ export const protobufPackage = "google.protobuf";
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
- * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
+ * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
*/
export interface Timestamp {
diff --git a/frontend/src/types/proto/v1/audit_log_service.ts b/frontend/src/types/proto/v1/audit_log_service.ts
index 78b4ddd54b..6426c4c487 100644
--- a/frontend/src/types/proto/v1/audit_log_service.ts
+++ b/frontend/src/types/proto/v1/audit_log_service.ts
@@ -8,6 +8,14 @@ import { ExportFormat, exportFormatFromJSON, exportFormatToJSON, exportFormatToN
export const protobufPackage = "bytebase.v1";
export interface SearchAuditLogsRequest {
+ /**
+ * The filter of the log. It should be a valid CEL expression.
+ * For example:
+ * - filter = "method == '/bytebase.v1.SQLService/Query'"
+ * - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ * - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ * - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
+ */
filter: string;
/**
* The order by of the log.
@@ -42,6 +50,14 @@ export interface SearchAuditLogsResponse {
}
export interface ExportAuditLogsRequest {
+ /**
+ * The filter of the log. It should be a valid CEL expression.
+ * For example:
+ * - filter = "method == '/bytebase.v1.SQLService/Query'"
+ * - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ * - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ * - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
+ */
filter: string;
/**
* The order by of the log.
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index e25eba146c..3ab6598c4f 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -239,6 +239,13 @@ paths:
parameters:
- name: filter
in: query
+ description: |-
+ The filter of the log. It should be a valid CEL expression.
+ For example:
+ - filter = "method == '/bytebase.v1.SQLService/Query'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
schema:
type: string
- name: orderBy
@@ -9630,6 +9637,13 @@ components:
properties:
filter:
type: string
+ description: |-
+ The filter of the log. It should be a valid CEL expression.
+ For example:
+ - filter = "method == '/bytebase.v1.SQLService/Query'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
orderBy:
type: string
description: |-
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 8d958b3757..0d2c6b7e71 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -1139,7 +1139,7 @@ DATABASE_CONNECTION is the anomaly type for database connection, e.g. the databa
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| filter | [string](#string) | | |
+| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. For example: - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; |
| order_by | [string](#string) | | The order by of the log. Only support order by create_time. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
| format | [ExportFormat](#bytebase-v1-ExportFormat) | | The export format. |
@@ -1171,7 +1171,7 @@ DATABASE_CONNECTION is the anomaly type for database connection, e.g. the databa
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| filter | [string](#string) | | |
+| filter | [string](#string) | | The filter of the log. It should be a valid CEL expression. For example: - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34; - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; |
| order_by | [string](#string) | | The order by of the log. Only support order by create_time. For example: - order_by = &#34;create_time asc&#34; - order_by = &#34;create_time desc&#34; |
| page_size | [int32](#int32) | | The maximum number of logs to return. The service may return fewer than this value. If unspecified, at most 100 log entries will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. |
| page_token | [string](#string) | | A page token, received from a previous `SearchLogs` call. Provide this to retrieve the subsequent page. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index b38790d7ba..594b55a839 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -3929,7 +3929,12 @@ Some fields are omitted because they are too large or contain sensitive informat
<td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The filter of the log. It should be a valid CEL expression.
+For example:
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; </p></td>
</tr>
<tr>
@@ -3995,7 +4000,12 @@ For example:
<td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The filter of the log. It should be a valid CEL expression.
+For example:
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; user == &#39;users/[email protected]&#39;&#34;
+ - filter = &#34;method == &#39;/bytebase.v1.SQLService/Query&#39; &amp;&amp; severity == &#39;ERROR&#39; &amp;&amp; create_time &lt;= &#39;2021-01-01T00:00:00Z&#39; &amp;&amp; create_time &gt;= &#39;2020-01-01T00:00:00Z&#39;&#34; </p></td>
</tr>
<tr>
diff --git a/proto/generated-go/store/activity.pb.go b/proto/generated-go/store/activity.pb.go
index fda9a84f03..aad667653f 100644
--- a/proto/generated-go/store/activity.pb.go
+++ b/proto/generated-go/store/activity.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/activity.proto
diff --git a/proto/generated-go/store/approval.pb.go b/proto/generated-go/store/approval.pb.go
index 7e35db2f87..220831aed6 100644
--- a/proto/generated-go/store/approval.pb.go
+++ b/proto/generated-go/store/approval.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/approval.proto
diff --git a/proto/generated-go/store/audit_log.pb.go b/proto/generated-go/store/audit_log.pb.go
index 6700cfeda5..eee09bba77 100644
--- a/proto/generated-go/store/audit_log.pb.go
+++ b/proto/generated-go/store/audit_log.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/audit_log.proto
diff --git a/proto/generated-go/store/branch.pb.go b/proto/generated-go/store/branch.pb.go
index 200705a295..2854ed68f0 100644
--- a/proto/generated-go/store/branch.pb.go
+++ b/proto/generated-go/store/branch.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/branch.proto
diff --git a/proto/generated-go/store/changelist.pb.go b/proto/generated-go/store/changelist.pb.go
index 2cb94084ee..ad81783fd8 100644
--- a/proto/generated-go/store/changelist.pb.go
+++ b/proto/generated-go/store/changelist.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/changelist.proto
diff --git a/proto/generated-go/store/common.pb.go b/proto/generated-go/store/common.pb.go
index 49ef8fc992..b88eaeec9d 100644
--- a/proto/generated-go/store/common.pb.go
+++ b/proto/generated-go/store/common.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/common.proto
diff --git a/proto/generated-go/store/data_source.pb.go b/proto/generated-go/store/data_source.pb.go
index 221f5dcd0d..fcaa974bcc 100644
--- a/proto/generated-go/store/data_source.pb.go
+++ b/proto/generated-go/store/data_source.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/data_source.proto
diff --git a/proto/generated-go/store/database.pb.go b/proto/generated-go/store/database.pb.go
index 91fcdf14b5..1fe8801ca0 100644
--- a/proto/generated-go/store/database.pb.go
+++ b/proto/generated-go/store/database.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/database.proto
diff --git a/proto/generated-go/store/export_archive.pb.go b/proto/generated-go/store/export_archive.pb.go
index da7b523598..60a4aa67cb 100644
--- a/proto/generated-go/store/export_archive.pb.go
+++ b/proto/generated-go/store/export_archive.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/export_archive.proto
diff --git a/proto/generated-go/store/idp.pb.go b/proto/generated-go/store/idp.pb.go
index bb449e0f6f..70a3905059 100644
--- a/proto/generated-go/store/idp.pb.go
+++ b/proto/generated-go/store/idp.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/idp.proto
diff --git a/proto/generated-go/store/instance.pb.go b/proto/generated-go/store/instance.pb.go
index c634e647b4..606ccbfec7 100644
--- a/proto/generated-go/store/instance.pb.go
+++ b/proto/generated-go/store/instance.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/instance.proto
diff --git a/proto/generated-go/store/instance_change_history.pb.go b/proto/generated-go/store/instance_change_history.pb.go
index ba132b65d5..cd8e8c20d5 100644
--- a/proto/generated-go/store/instance_change_history.pb.go
+++ b/proto/generated-go/store/instance_change_history.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/instance_change_history.proto
diff --git a/proto/generated-go/store/issue.pb.go b/proto/generated-go/store/issue.pb.go
index 0d0483b4d5..94d4f9d149 100644
--- a/proto/generated-go/store/issue.pb.go
+++ b/proto/generated-go/store/issue.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/issue.proto
diff --git a/proto/generated-go/store/issue_comment.pb.go b/proto/generated-go/store/issue_comment.pb.go
index 2c053c9f04..2651dbcb0c 100644
--- a/proto/generated-go/store/issue_comment.pb.go
+++ b/proto/generated-go/store/issue_comment.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/issue_comment.proto
diff --git a/proto/generated-go/store/plan.pb.go b/proto/generated-go/store/plan.pb.go
index 5257746e48..0416df6963 100644
--- a/proto/generated-go/store/plan.pb.go
+++ b/proto/generated-go/store/plan.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/plan.proto
diff --git a/proto/generated-go/store/plan_check_run.pb.go b/proto/generated-go/store/plan_check_run.pb.go
index 2b85998d73..70403a5734 100644
--- a/proto/generated-go/store/plan_check_run.pb.go
+++ b/proto/generated-go/store/plan_check_run.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/plan_check_run.proto
diff --git a/proto/generated-go/store/policy.pb.go b/proto/generated-go/store/policy.pb.go
index c423be6029..39ca8ce17f 100644
--- a/proto/generated-go/store/policy.pb.go
+++ b/proto/generated-go/store/policy.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/policy.proto
diff --git a/proto/generated-go/store/project.pb.go b/proto/generated-go/store/project.pb.go
index a8fc7baa1e..dfd6596e3c 100644
--- a/proto/generated-go/store/project.pb.go
+++ b/proto/generated-go/store/project.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/project.proto
diff --git a/proto/generated-go/store/query_history.pb.go b/proto/generated-go/store/query_history.pb.go
index 62f82d09a7..7d3f76fd0e 100644
--- a/proto/generated-go/store/query_history.pb.go
+++ b/proto/generated-go/store/query_history.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/query_history.proto
diff --git a/proto/generated-go/store/role.pb.go b/proto/generated-go/store/role.pb.go
index 3c32938505..31abeb1eac 100644
--- a/proto/generated-go/store/role.pb.go
+++ b/proto/generated-go/store/role.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/role.proto
diff --git a/proto/generated-go/store/setting.pb.go b/proto/generated-go/store/setting.pb.go
index 976f543406..d8b73e4464 100644
--- a/proto/generated-go/store/setting.pb.go
+++ b/proto/generated-go/store/setting.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/setting.proto
diff --git a/proto/generated-go/store/sheet.pb.go b/proto/generated-go/store/sheet.pb.go
index 64a275c759..2af483f286 100644
--- a/proto/generated-go/store/sheet.pb.go
+++ b/proto/generated-go/store/sheet.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/sheet.proto
diff --git a/proto/generated-go/store/slow_query.pb.go b/proto/generated-go/store/slow_query.pb.go
index 3df2ce561a..b82626c6f1 100644
--- a/proto/generated-go/store/slow_query.pb.go
+++ b/proto/generated-go/store/slow_query.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/slow_query.proto
diff --git a/proto/generated-go/store/task_run.pb.go b/proto/generated-go/store/task_run.pb.go
index 3064c9b8d6..aa5d487771 100644
--- a/proto/generated-go/store/task_run.pb.go
+++ b/proto/generated-go/store/task_run.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/task_run.proto
diff --git a/proto/generated-go/store/task_run_log.pb.go b/proto/generated-go/store/task_run_log.pb.go
index 0571dc8aac..bfc3b7aad3 100644
--- a/proto/generated-go/store/task_run_log.pb.go
+++ b/proto/generated-go/store/task_run_log.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/task_run_log.proto
diff --git a/proto/generated-go/store/user.pb.go b/proto/generated-go/store/user.pb.go
index 3b5b5dba4d..a7873302d8 100644
--- a/proto/generated-go/store/user.pb.go
+++ b/proto/generated-go/store/user.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/user.proto
diff --git a/proto/generated-go/store/vcs.pb.go b/proto/generated-go/store/vcs.pb.go
index 386a3a0912..356b4f1b32 100644
--- a/proto/generated-go/store/vcs.pb.go
+++ b/proto/generated-go/store/vcs.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: store/vcs.proto
diff --git a/proto/generated-go/v1/actuator_service.pb.go b/proto/generated-go/v1/actuator_service.pb.go
index fcca096102..a02a0ba7c2 100644
--- a/proto/generated-go/v1/actuator_service.pb.go
+++ b/proto/generated-go/v1/actuator_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/actuator_service.proto
diff --git a/proto/generated-go/v1/anomaly_service.pb.go b/proto/generated-go/v1/anomaly_service.pb.go
index d459913926..9d765186a8 100644
--- a/proto/generated-go/v1/anomaly_service.pb.go
+++ b/proto/generated-go/v1/anomaly_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/anomaly_service.proto
diff --git a/proto/generated-go/v1/audit_log_service.pb.go b/proto/generated-go/v1/audit_log_service.pb.go
index e96d990fc4..b7c909e75f 100644
--- a/proto/generated-go/v1/audit_log_service.pb.go
+++ b/proto/generated-go/v1/audit_log_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/audit_log_service.proto
@@ -95,6 +95,12 @@ type SearchAuditLogsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+ // The filter of the log. It should be a valid CEL expression.
+ // For example:
+ // - filter = "method == '/bytebase.v1.SQLService/Query'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
// The order by of the log.
// Only support order by create_time.
@@ -235,6 +241,12 @@ type ExportAuditLogsRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+ // The filter of the log. It should be a valid CEL expression.
+ // For example:
+ // - filter = "method == '/bytebase.v1.SQLService/Query'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
// The order by of the log.
// Only support order by create_time.
diff --git a/proto/generated-go/v1/auth_service.pb.go b/proto/generated-go/v1/auth_service.pb.go
index a165c1b80c..566d778eaf 100644
--- a/proto/generated-go/v1/auth_service.pb.go
+++ b/proto/generated-go/v1/auth_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/auth_service.proto
diff --git a/proto/generated-go/v1/branch_service.pb.go b/proto/generated-go/v1/branch_service.pb.go
index e138dbddd7..8f774fc750 100644
--- a/proto/generated-go/v1/branch_service.pb.go
+++ b/proto/generated-go/v1/branch_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/branch_service.proto
diff --git a/proto/generated-go/v1/cel_service.pb.go b/proto/generated-go/v1/cel_service.pb.go
index 1df9d17a18..64b8b9dc3f 100644
--- a/proto/generated-go/v1/cel_service.pb.go
+++ b/proto/generated-go/v1/cel_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/cel_service.proto
diff --git a/proto/generated-go/v1/changelist_service.pb.go b/proto/generated-go/v1/changelist_service.pb.go
index d191dcaba3..6d8e168bb7 100644
--- a/proto/generated-go/v1/changelist_service.pb.go
+++ b/proto/generated-go/v1/changelist_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/changelist_service.proto
diff --git a/proto/generated-go/v1/common.pb.go b/proto/generated-go/v1/common.pb.go
index 62ba39f26d..3a00c7876c 100644
--- a/proto/generated-go/v1/common.pb.go
+++ b/proto/generated-go/v1/common.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/common.proto
diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.go
index d2ef7cf959..9a4511a27d 100644
--- a/proto/generated-go/v1/database_service.pb.go
+++ b/proto/generated-go/v1/database_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/database_service.proto
diff --git a/proto/generated-go/v1/environment_service.pb.go b/proto/generated-go/v1/environment_service.pb.go
index 5d4975a498..73beb3511a 100644
--- a/proto/generated-go/v1/environment_service.pb.go
+++ b/proto/generated-go/v1/environment_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/environment_service.proto
diff --git a/proto/generated-go/v1/iam_policy.pb.go b/proto/generated-go/v1/iam_policy.pb.go
index 8cc6d8f7a6..1395347356 100644
--- a/proto/generated-go/v1/iam_policy.pb.go
+++ b/proto/generated-go/v1/iam_policy.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/iam_policy.proto
diff --git a/proto/generated-go/v1/idp_service.pb.go b/proto/generated-go/v1/idp_service.pb.go
index 8bdb2ef356..88df09414b 100644
--- a/proto/generated-go/v1/idp_service.pb.go
+++ b/proto/generated-go/v1/idp_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/idp_service.proto
diff --git a/proto/generated-go/v1/instance_role_service.pb.go b/proto/generated-go/v1/instance_role_service.pb.go
index 1fcc9a6e14..9980ac8eff 100644
--- a/proto/generated-go/v1/instance_role_service.pb.go
+++ b/proto/generated-go/v1/instance_role_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/instance_role_service.proto
diff --git a/proto/generated-go/v1/instance_service.pb.go b/proto/generated-go/v1/instance_service.pb.go
index ebbba4251f..3434fa52c3 100644
--- a/proto/generated-go/v1/instance_service.pb.go
+++ b/proto/generated-go/v1/instance_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/instance_service.proto
diff --git a/proto/generated-go/v1/issue_service.pb.go b/proto/generated-go/v1/issue_service.pb.go
index 9fe7445146..8f1c85a339 100644
--- a/proto/generated-go/v1/issue_service.pb.go
+++ b/proto/generated-go/v1/issue_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/issue_service.proto
diff --git a/proto/generated-go/v1/logging_service.pb.go b/proto/generated-go/v1/logging_service.pb.go
index eb6f0b3b9b..7270fb6971 100644
--- a/proto/generated-go/v1/logging_service.pb.go
+++ b/proto/generated-go/v1/logging_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/logging_service.proto
diff --git a/proto/generated-go/v1/org_policy_service.pb.go b/proto/generated-go/v1/org_policy_service.pb.go
index d118e0a1e9..e58f7fa66d 100644
--- a/proto/generated-go/v1/org_policy_service.pb.go
+++ b/proto/generated-go/v1/org_policy_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/org_policy_service.proto
diff --git a/proto/generated-go/v1/project_service.pb.go b/proto/generated-go/v1/project_service.pb.go
index 538c0e0af2..7514dde5f4 100644
--- a/proto/generated-go/v1/project_service.pb.go
+++ b/proto/generated-go/v1/project_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/project_service.proto
diff --git a/proto/generated-go/v1/risk_service.pb.go b/proto/generated-go/v1/risk_service.pb.go
index 8cd2cb73ac..603b8e2996 100644
--- a/proto/generated-go/v1/risk_service.pb.go
+++ b/proto/generated-go/v1/risk_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/risk_service.proto
diff --git a/proto/generated-go/v1/role_service.pb.go b/proto/generated-go/v1/role_service.pb.go
index 1cc62f87cb..1f5ec27a98 100644
--- a/proto/generated-go/v1/role_service.pb.go
+++ b/proto/generated-go/v1/role_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/role_service.proto
diff --git a/proto/generated-go/v1/rollout_service.pb.go b/proto/generated-go/v1/rollout_service.pb.go
index c077da20fa..9ad15ca8af 100644
--- a/proto/generated-go/v1/rollout_service.pb.go
+++ b/proto/generated-go/v1/rollout_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/rollout_service.proto
diff --git a/proto/generated-go/v1/setting_service.pb.go b/proto/generated-go/v1/setting_service.pb.go
index f7ddf73929..c9fc5acc3b 100644
--- a/proto/generated-go/v1/setting_service.pb.go
+++ b/proto/generated-go/v1/setting_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/setting_service.proto
diff --git a/proto/generated-go/v1/sheet_service.pb.go b/proto/generated-go/v1/sheet_service.pb.go
index 6db290057a..143871b726 100644
--- a/proto/generated-go/v1/sheet_service.pb.go
+++ b/proto/generated-go/v1/sheet_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/sheet_service.proto
diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.go
index ee3c5a437d..ee1b908df3 100644
--- a/proto/generated-go/v1/sql_service.pb.go
+++ b/proto/generated-go/v1/sql_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/sql_service.proto
diff --git a/proto/generated-go/v1/subscription_service.pb.go b/proto/generated-go/v1/subscription_service.pb.go
index e9562cc5d7..3d45afd17c 100644
--- a/proto/generated-go/v1/subscription_service.pb.go
+++ b/proto/generated-go/v1/subscription_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/subscription_service.proto
diff --git a/proto/generated-go/v1/vcs_connector_service.pb.go b/proto/generated-go/v1/vcs_connector_service.pb.go
index 6579fdbd9d..56f26d1ede 100644
--- a/proto/generated-go/v1/vcs_connector_service.pb.go
+++ b/proto/generated-go/v1/vcs_connector_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/vcs_connector_service.proto
diff --git a/proto/generated-go/v1/vcs_provider_service.pb.go b/proto/generated-go/v1/vcs_provider_service.pb.go
index d829d5d95e..1bc3e63cdb 100644
--- a/proto/generated-go/v1/vcs_provider_service.pb.go
+++ b/proto/generated-go/v1/vcs_provider_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/vcs_provider_service.proto
diff --git a/proto/generated-go/v1/worksheet_service.pb.go b/proto/generated-go/v1/worksheet_service.pb.go
index f265014b2f..54f0233699 100644
--- a/proto/generated-go/v1/worksheet_service.pb.go
+++ b/proto/generated-go/v1/worksheet_service.pb.go
@@ -1,6 +1,6 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.34.0
+// protoc-gen-go v1.34.1
// protoc (unknown)
// source: v1/worksheet_service.proto
diff --git a/proto/v1/audit_log_service.proto b/proto/v1/audit_log_service.proto
index 1569ad3264..124fffc4e6 100644
--- a/proto/v1/audit_log_service.proto
+++ b/proto/v1/audit_log_service.proto
@@ -23,6 +23,12 @@ service AuditLogService {
}
message SearchAuditLogsRequest {
+ // The filter of the log. It should be a valid CEL expression.
+ // For example:
+ // - filter = "method == '/bytebase.v1.SQLService/Query'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
string filter = 1;
// The order by of the log.
@@ -53,6 +59,12 @@ message SearchAuditLogsResponse {
}
message ExportAuditLogsRequest {
+ // The filter of the log. It should be a valid CEL expression.
+ // For example:
+ // - filter = "method == '/bytebase.v1.SQLService/Query'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && user == 'users/[email protected]'"
+ // - filter = "method == '/bytebase.v1.SQLService/Query' && severity == 'ERROR' && create_time <= '2021-01-01T00:00:00Z' && create_time >= '2020-01-01T00:00:00Z'"
string filter = 1;
// The order by of the log.