diff --git a/api/generated/google/api/Visibility.ts b/api/generated/google/api/Visibility.ts new file mode 100644 index 000000000..73027c259 --- /dev/null +++ b/api/generated/google/api/Visibility.ts @@ -0,0 +1,11 @@ +// Original file: vendor/proto/google/api/visibility.proto + +import type { VisibilityRule as _google_api_VisibilityRule, VisibilityRule__Output as _google_api_VisibilityRule__Output } from '../../google/api/VisibilityRule'; + +export interface Visibility { + 'rules'?: (_google_api_VisibilityRule)[]; +} + +export interface Visibility__Output { + 'rules': (_google_api_VisibilityRule__Output)[]; +} diff --git a/api/generated/google/api/VisibilityRule.ts b/api/generated/google/api/VisibilityRule.ts new file mode 100644 index 000000000..9b834ee56 --- /dev/null +++ b/api/generated/google/api/VisibilityRule.ts @@ -0,0 +1,12 @@ +// Original file: vendor/proto/google/api/visibility.proto + + +export interface VisibilityRule { + 'selector'?: (string); + 'restriction'?: (string); +} + +export interface VisibilityRule__Output { + 'selector': (string); + 'restriction': (string); +} diff --git a/api/generated/google/protobuf/EnumOptions.ts b/api/generated/google/protobuf/EnumOptions.ts index b92ade4f9..bca846f06 100644 --- a/api/generated/google/protobuf/EnumOptions.ts +++ b/api/generated/google/protobuf/EnumOptions.ts @@ -1,15 +1,18 @@ // Original file: null import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import type { VisibilityRule as _google_api_VisibilityRule, VisibilityRule__Output as _google_api_VisibilityRule__Output } from '../../google/api/VisibilityRule'; export interface EnumOptions { 'allowAlias'?: (boolean); 'deprecated'?: (boolean); 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.google.api.enumVisibility'?: (_google_api_VisibilityRule | null); } export interface EnumOptions__Output { 'allowAlias': (boolean); 'deprecated': (boolean); 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.google.api.enumVisibility': (_google_api_VisibilityRule__Output | null); } diff --git a/api/generated/google/protobuf/EnumValueOptions.ts b/api/generated/google/protobuf/EnumValueOptions.ts index e60ee6f4c..3ec98c8fc 100644 --- a/api/generated/google/protobuf/EnumValueOptions.ts +++ b/api/generated/google/protobuf/EnumValueOptions.ts @@ -1,13 +1,16 @@ // Original file: null import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import type { VisibilityRule as _google_api_VisibilityRule, VisibilityRule__Output as _google_api_VisibilityRule__Output } from '../../google/api/VisibilityRule'; export interface EnumValueOptions { 'deprecated'?: (boolean); 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.google.api.valueVisibility'?: (_google_api_VisibilityRule | null); } export interface EnumValueOptions__Output { 'deprecated': (boolean); 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.google.api.valueVisibility': (_google_api_VisibilityRule__Output | null); } diff --git a/api/generated/google/protobuf/FieldOptions.ts b/api/generated/google/protobuf/FieldOptions.ts index 521cd3568..ffc8a037d 100644 --- a/api/generated/google/protobuf/FieldOptions.ts +++ b/api/generated/google/protobuf/FieldOptions.ts @@ -1,6 +1,8 @@ // Original file: null import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import type { JSONSchema as _grpc_gateway_protoc_gen_openapiv2_options_JSONSchema, JSONSchema__Output as _grpc_gateway_protoc_gen_openapiv2_options_JSONSchema__Output } from '../../grpc/gateway/protoc_gen_openapiv2/options/JSONSchema'; +import type { VisibilityRule as _google_api_VisibilityRule, VisibilityRule__Output as _google_api_VisibilityRule__Output } from '../../google/api/VisibilityRule'; // Original file: null @@ -26,6 +28,8 @@ export interface FieldOptions { 'jstype'?: (_google_protobuf_FieldOptions_JSType | keyof typeof _google_protobuf_FieldOptions_JSType); 'weak'?: (boolean); 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field'?: (_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema | null); + '.google.api.fieldVisibility'?: (_google_api_VisibilityRule | null); } export interface FieldOptions__Output { @@ -36,4 +40,6 @@ export interface FieldOptions__Output { 'jstype': (_google_protobuf_FieldOptions_JSType); 'weak': (boolean); 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Field': (_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema__Output | null); + '.google.api.fieldVisibility': (_google_api_VisibilityRule__Output | null); } diff --git a/api/generated/google/protobuf/FileOptions.ts b/api/generated/google/protobuf/FileOptions.ts index b9f031981..b7c44c857 100644 --- a/api/generated/google/protobuf/FileOptions.ts +++ b/api/generated/google/protobuf/FileOptions.ts @@ -1,6 +1,7 @@ // Original file: null import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import type { Swagger as _grpc_gateway_protoc_gen_openapiv2_options_Swagger, Swagger__Output as _grpc_gateway_protoc_gen_openapiv2_options_Swagger__Output } from '../../grpc/gateway/protoc_gen_openapiv2/options/Swagger'; // Original file: null @@ -26,6 +27,7 @@ export interface FileOptions { 'objcClassPrefix'?: (string); 'csharpNamespace'?: (string); 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger'?: (_grpc_gateway_protoc_gen_openapiv2_options_Swagger | null); } export interface FileOptions__Output { @@ -44,4 +46,5 @@ export interface FileOptions__Output { 'objcClassPrefix': (string); 'csharpNamespace': (string); 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Swagger': (_grpc_gateway_protoc_gen_openapiv2_options_Swagger__Output | null); } diff --git a/api/generated/google/protobuf/ListValue.ts b/api/generated/google/protobuf/ListValue.ts new file mode 100644 index 000000000..fa762b9ba --- /dev/null +++ b/api/generated/google/protobuf/ListValue.ts @@ -0,0 +1,11 @@ +// Original file: null + +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../google/protobuf/Value'; + +export interface ListValue { + 'values'?: (_google_protobuf_Value)[]; +} + +export interface ListValue__Output { + 'values': (_google_protobuf_Value__Output)[]; +} diff --git a/api/generated/google/protobuf/MessageOptions.ts b/api/generated/google/protobuf/MessageOptions.ts index 31f669eb0..8631a0534 100644 --- a/api/generated/google/protobuf/MessageOptions.ts +++ b/api/generated/google/protobuf/MessageOptions.ts @@ -1,6 +1,8 @@ // Original file: null import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import type { Schema as _grpc_gateway_protoc_gen_openapiv2_options_Schema, Schema__Output as _grpc_gateway_protoc_gen_openapiv2_options_Schema__Output } from '../../grpc/gateway/protoc_gen_openapiv2/options/Schema'; +import type { VisibilityRule as _google_api_VisibilityRule, VisibilityRule__Output as _google_api_VisibilityRule__Output } from '../../google/api/VisibilityRule'; export interface MessageOptions { 'messageSetWireFormat'?: (boolean); @@ -8,6 +10,8 @@ export interface MessageOptions { 'deprecated'?: (boolean); 'mapEntry'?: (boolean); 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema'?: (_grpc_gateway_protoc_gen_openapiv2_options_Schema | null); + '.google.api.messageVisibility'?: (_google_api_VisibilityRule | null); } export interface MessageOptions__Output { @@ -16,4 +20,6 @@ export interface MessageOptions__Output { 'deprecated': (boolean); 'mapEntry': (boolean); 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Schema': (_grpc_gateway_protoc_gen_openapiv2_options_Schema__Output | null); + '.google.api.messageVisibility': (_google_api_VisibilityRule__Output | null); } diff --git a/api/generated/google/protobuf/MethodOptions.ts b/api/generated/google/protobuf/MethodOptions.ts index 5f81f0dd9..c21d3e9bd 100644 --- a/api/generated/google/protobuf/MethodOptions.ts +++ b/api/generated/google/protobuf/MethodOptions.ts @@ -1,16 +1,22 @@ // Original file: null import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import type { Operation as _grpc_gateway_protoc_gen_openapiv2_options_Operation, Operation__Output as _grpc_gateway_protoc_gen_openapiv2_options_Operation__Output } from '../../grpc/gateway/protoc_gen_openapiv2/options/Operation'; +import type { VisibilityRule as _google_api_VisibilityRule, VisibilityRule__Output as _google_api_VisibilityRule__Output } from '../../google/api/VisibilityRule'; import type { HttpRule as _google_api_HttpRule, HttpRule__Output as _google_api_HttpRule__Output } from '../../google/api/HttpRule'; export interface MethodOptions { 'deprecated'?: (boolean); 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation'?: (_grpc_gateway_protoc_gen_openapiv2_options_Operation | null); + '.google.api.methodVisibility'?: (_google_api_VisibilityRule | null); '.google.api.http'?: (_google_api_HttpRule | null); } export interface MethodOptions__Output { 'deprecated': (boolean); 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Operation': (_grpc_gateway_protoc_gen_openapiv2_options_Operation__Output | null); + '.google.api.methodVisibility': (_google_api_VisibilityRule__Output | null); '.google.api.http': (_google_api_HttpRule__Output | null); } diff --git a/api/generated/google/protobuf/NullValue.ts b/api/generated/google/protobuf/NullValue.ts new file mode 100644 index 000000000..377aab885 --- /dev/null +++ b/api/generated/google/protobuf/NullValue.ts @@ -0,0 +1,5 @@ +// Original file: null + +export enum NullValue { + NULL_VALUE = 0, +} diff --git a/api/generated/google/protobuf/ServiceOptions.ts b/api/generated/google/protobuf/ServiceOptions.ts index 4899506a4..e941ccc8e 100644 --- a/api/generated/google/protobuf/ServiceOptions.ts +++ b/api/generated/google/protobuf/ServiceOptions.ts @@ -1,13 +1,19 @@ // Original file: null import type { UninterpretedOption as _google_protobuf_UninterpretedOption, UninterpretedOption__Output as _google_protobuf_UninterpretedOption__Output } from '../../google/protobuf/UninterpretedOption'; +import type { Tag as _grpc_gateway_protoc_gen_openapiv2_options_Tag, Tag__Output as _grpc_gateway_protoc_gen_openapiv2_options_Tag__Output } from '../../grpc/gateway/protoc_gen_openapiv2/options/Tag'; +import type { VisibilityRule as _google_api_VisibilityRule, VisibilityRule__Output as _google_api_VisibilityRule__Output } from '../../google/api/VisibilityRule'; export interface ServiceOptions { 'deprecated'?: (boolean); 'uninterpretedOption'?: (_google_protobuf_UninterpretedOption)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag'?: (_grpc_gateway_protoc_gen_openapiv2_options_Tag | null); + '.google.api.apiVisibility'?: (_google_api_VisibilityRule | null); } export interface ServiceOptions__Output { 'deprecated': (boolean); 'uninterpretedOption': (_google_protobuf_UninterpretedOption__Output)[]; + '.grpc.gateway.protoc_gen_openapiv2.options.openapiv2Tag': (_grpc_gateway_protoc_gen_openapiv2_options_Tag__Output | null); + '.google.api.apiVisibility': (_google_api_VisibilityRule__Output | null); } diff --git a/api/generated/google/protobuf/Struct.ts b/api/generated/google/protobuf/Struct.ts new file mode 100644 index 000000000..41b79eab3 --- /dev/null +++ b/api/generated/google/protobuf/Struct.ts @@ -0,0 +1,11 @@ +// Original file: null + +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../google/protobuf/Value'; + +export interface Struct { + 'fields'?: ({[key: string]: _google_protobuf_Value}); +} + +export interface Struct__Output { + 'fields': ({[key: string]: _google_protobuf_Value__Output}); +} diff --git a/api/generated/google/protobuf/Value.ts b/api/generated/google/protobuf/Value.ts new file mode 100644 index 000000000..636c45794 --- /dev/null +++ b/api/generated/google/protobuf/Value.ts @@ -0,0 +1,25 @@ +// Original file: null + +import type { NullValue as _google_protobuf_NullValue } from '../../google/protobuf/NullValue'; +import type { Struct as _google_protobuf_Struct, Struct__Output as _google_protobuf_Struct__Output } from '../../google/protobuf/Struct'; +import type { ListValue as _google_protobuf_ListValue, ListValue__Output as _google_protobuf_ListValue__Output } from '../../google/protobuf/ListValue'; + +export interface Value { + 'nullValue'?: (_google_protobuf_NullValue | keyof typeof _google_protobuf_NullValue); + 'numberValue'?: (number | string); + 'stringValue'?: (string); + 'boolValue'?: (boolean); + 'structValue'?: (_google_protobuf_Struct | null); + 'listValue'?: (_google_protobuf_ListValue | null); + 'kind'?: "nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"; +} + +export interface Value__Output { + 'nullValue'?: (_google_protobuf_NullValue); + 'numberValue'?: (number); + 'stringValue'?: (string); + 'boolValue'?: (boolean); + 'structValue'?: (_google_protobuf_Struct__Output | null); + 'listValue'?: (_google_protobuf_ListValue__Output | null); + 'kind': "nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"; +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Contact.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Contact.ts new file mode 100644 index 000000000..03bbbb523 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Contact.ts @@ -0,0 +1,14 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + + +export interface Contact { + 'name'?: (string); + 'url'?: (string); + 'email'?: (string); +} + +export interface Contact__Output { + 'name': (string); + 'url': (string); + 'email': (string); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.ts new file mode 100644 index 000000000..752ddf5aa --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation.ts @@ -0,0 +1,12 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + + +export interface ExternalDocumentation { + 'description'?: (string); + 'url'?: (string); +} + +export interface ExternalDocumentation__Output { + 'description': (string); + 'url': (string); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Header.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Header.ts new file mode 100644 index 000000000..9682a0238 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Header.ts @@ -0,0 +1,18 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + + +export interface Header { + 'description'?: (string); + 'type'?: (string); + 'format'?: (string); + 'default'?: (string); + 'pattern'?: (string); +} + +export interface Header__Output { + 'description': (string); + 'type': (string); + 'format': (string); + 'default': (string); + 'pattern': (string); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.ts new file mode 100644 index 000000000..24e27e852 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter.ts @@ -0,0 +1,28 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + + +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +export enum _grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_Type { + UNKNOWN = 0, + STRING = 1, + NUMBER = 2, + INTEGER = 3, + BOOLEAN = 4, +} + +export interface HeaderParameter { + 'name'?: (string); + 'description'?: (string); + 'type'?: (_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_Type | keyof typeof _grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_Type); + 'format'?: (string); + 'required'?: (boolean); +} + +export interface HeaderParameter__Output { + 'name': (string); + 'description': (string); + 'type': (_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter_Type); + 'format': (string); + 'required': (boolean); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Info.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Info.ts new file mode 100644 index 000000000..e1de9d1f3 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Info.ts @@ -0,0 +1,25 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { Contact as _grpc_gateway_protoc_gen_openapiv2_options_Contact, Contact__Output as _grpc_gateway_protoc_gen_openapiv2_options_Contact__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Contact'; +import type { License as _grpc_gateway_protoc_gen_openapiv2_options_License, License__Output as _grpc_gateway_protoc_gen_openapiv2_options_License__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/License'; +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../../../google/protobuf/Value'; + +export interface Info { + 'title'?: (string); + 'description'?: (string); + 'termsOfService'?: (string); + 'contact'?: (_grpc_gateway_protoc_gen_openapiv2_options_Contact | null); + 'license'?: (_grpc_gateway_protoc_gen_openapiv2_options_License | null); + 'version'?: (string); + 'extensions'?: ({[key: string]: _google_protobuf_Value}); +} + +export interface Info__Output { + 'title': (string); + 'description': (string); + 'termsOfService': (string); + 'contact': (_grpc_gateway_protoc_gen_openapiv2_options_Contact__Output | null); + 'license': (_grpc_gateway_protoc_gen_openapiv2_options_License__Output | null); + 'version': (string); + 'extensions': ({[key: string]: _google_protobuf_Value__Output}); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.ts new file mode 100644 index 000000000..049ecc019 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/JSONSchema.ts @@ -0,0 +1,83 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../../../google/protobuf/Value'; +import type { Long } from '@grpc/proto-loader'; + +export interface _grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration { + 'pathParamName'?: (string); +} + +export interface _grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration__Output { + 'pathParamName': (string); +} + +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +export enum _grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_JSONSchemaSimpleTypes { + UNKNOWN = 0, + ARRAY = 1, + BOOLEAN = 2, + INTEGER = 3, + NULL = 4, + NUMBER = 5, + OBJECT = 6, + STRING = 7, +} + +export interface JSONSchema { + 'ref'?: (string); + 'title'?: (string); + 'description'?: (string); + 'default'?: (string); + 'readOnly'?: (boolean); + 'example'?: (string); + 'multipleOf'?: (number | string); + 'maximum'?: (number | string); + 'exclusiveMaximum'?: (boolean); + 'minimum'?: (number | string); + 'exclusiveMinimum'?: (boolean); + 'maxLength'?: (number | string | Long); + 'minLength'?: (number | string | Long); + 'pattern'?: (string); + 'maxItems'?: (number | string | Long); + 'minItems'?: (number | string | Long); + 'uniqueItems'?: (boolean); + 'maxProperties'?: (number | string | Long); + 'minProperties'?: (number | string | Long); + 'required'?: (string)[]; + 'array'?: (string)[]; + 'type'?: (_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_JSONSchemaSimpleTypes | keyof typeof _grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_JSONSchemaSimpleTypes)[]; + 'format'?: (string); + 'enum'?: (string)[]; + 'extensions'?: ({[key: string]: _google_protobuf_Value}); + 'fieldConfiguration'?: (_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration | null); +} + +export interface JSONSchema__Output { + 'ref': (string); + 'title': (string); + 'description': (string); + 'default': (string); + 'readOnly': (boolean); + 'example': (string); + 'multipleOf': (number); + 'maximum': (number); + 'exclusiveMaximum': (boolean); + 'minimum': (number); + 'exclusiveMinimum': (boolean); + 'maxLength': (Long); + 'minLength': (Long); + 'pattern': (string); + 'maxItems': (Long); + 'minItems': (Long); + 'uniqueItems': (boolean); + 'maxProperties': (Long); + 'minProperties': (Long); + 'required': (string)[]; + 'array': (string)[]; + 'type': (_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_JSONSchemaSimpleTypes)[]; + 'format': (string); + 'enum': (string)[]; + 'extensions': ({[key: string]: _google_protobuf_Value__Output}); + 'fieldConfiguration': (_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_FieldConfiguration__Output | null); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/License.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/License.ts new file mode 100644 index 000000000..9169ce809 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/License.ts @@ -0,0 +1,12 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + + +export interface License { + 'name'?: (string); + 'url'?: (string); +} + +export interface License__Output { + 'name': (string); + 'url': (string); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Operation.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Operation.ts new file mode 100644 index 000000000..047fc5664 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Operation.ts @@ -0,0 +1,40 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { ExternalDocumentation as _grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation, ExternalDocumentation__Output as _grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation'; +import type { Response as _grpc_gateway_protoc_gen_openapiv2_options_Response, Response__Output as _grpc_gateway_protoc_gen_openapiv2_options_Response__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Response'; +import type { Scheme as _grpc_gateway_protoc_gen_openapiv2_options_Scheme } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Scheme'; +import type { SecurityRequirement as _grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement, SecurityRequirement__Output as _grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement'; +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../../../google/protobuf/Value'; +import type { Parameters as _grpc_gateway_protoc_gen_openapiv2_options_Parameters, Parameters__Output as _grpc_gateway_protoc_gen_openapiv2_options_Parameters__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Parameters'; + +export interface Operation { + 'tags'?: (string)[]; + 'summary'?: (string); + 'description'?: (string); + 'externalDocs'?: (_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation | null); + 'operationId'?: (string); + 'consumes'?: (string)[]; + 'produces'?: (string)[]; + 'responses'?: ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_Response}); + 'schemes'?: (_grpc_gateway_protoc_gen_openapiv2_options_Scheme | keyof typeof _grpc_gateway_protoc_gen_openapiv2_options_Scheme)[]; + 'deprecated'?: (boolean); + 'security'?: (_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement)[]; + 'extensions'?: ({[key: string]: _google_protobuf_Value}); + 'parameters'?: (_grpc_gateway_protoc_gen_openapiv2_options_Parameters | null); +} + +export interface Operation__Output { + 'tags': (string)[]; + 'summary': (string); + 'description': (string); + 'externalDocs': (_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation__Output | null); + 'operationId': (string); + 'consumes': (string)[]; + 'produces': (string)[]; + 'responses': ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_Response__Output}); + 'schemes': (_grpc_gateway_protoc_gen_openapiv2_options_Scheme)[]; + 'deprecated': (boolean); + 'security': (_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement__Output)[]; + 'extensions': ({[key: string]: _google_protobuf_Value__Output}); + 'parameters': (_grpc_gateway_protoc_gen_openapiv2_options_Parameters__Output | null); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Parameters.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Parameters.ts new file mode 100644 index 000000000..a96d7d868 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Parameters.ts @@ -0,0 +1,11 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { HeaderParameter as _grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter, HeaderParameter__Output as _grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/HeaderParameter'; + +export interface Parameters { + 'headers'?: (_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter)[]; +} + +export interface Parameters__Output { + 'headers': (_grpc_gateway_protoc_gen_openapiv2_options_HeaderParameter__Output)[]; +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Response.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Response.ts new file mode 100644 index 000000000..3deae068e --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Response.ts @@ -0,0 +1,21 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { Schema as _grpc_gateway_protoc_gen_openapiv2_options_Schema, Schema__Output as _grpc_gateway_protoc_gen_openapiv2_options_Schema__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Schema'; +import type { Header as _grpc_gateway_protoc_gen_openapiv2_options_Header, Header__Output as _grpc_gateway_protoc_gen_openapiv2_options_Header__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Header'; +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../../../google/protobuf/Value'; + +export interface Response { + 'description'?: (string); + 'schema'?: (_grpc_gateway_protoc_gen_openapiv2_options_Schema | null); + 'headers'?: ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_Header}); + 'examples'?: ({[key: string]: string}); + 'extensions'?: ({[key: string]: _google_protobuf_Value}); +} + +export interface Response__Output { + 'description': (string); + 'schema': (_grpc_gateway_protoc_gen_openapiv2_options_Schema__Output | null); + 'headers': ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_Header__Output}); + 'examples': ({[key: string]: string}); + 'extensions': ({[key: string]: _google_protobuf_Value__Output}); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Schema.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Schema.ts new file mode 100644 index 000000000..c06121c4a --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Schema.ts @@ -0,0 +1,20 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { JSONSchema as _grpc_gateway_protoc_gen_openapiv2_options_JSONSchema, JSONSchema__Output as _grpc_gateway_protoc_gen_openapiv2_options_JSONSchema__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/JSONSchema'; +import type { ExternalDocumentation as _grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation, ExternalDocumentation__Output as _grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation'; + +export interface Schema { + 'jsonSchema'?: (_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema | null); + 'discriminator'?: (string); + 'readOnly'?: (boolean); + 'externalDocs'?: (_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation | null); + 'example'?: (string); +} + +export interface Schema__Output { + 'jsonSchema': (_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema__Output | null); + 'discriminator': (string); + 'readOnly': (boolean); + 'externalDocs': (_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation__Output | null); + 'example': (string); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Scheme.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Scheme.ts new file mode 100644 index 000000000..5809b06b8 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Scheme.ts @@ -0,0 +1,9 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +export enum Scheme { + UNKNOWN = 0, + HTTP = 1, + HTTPS = 2, + WS = 3, + WSS = 4, +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Scopes.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Scopes.ts new file mode 100644 index 000000000..5b3e8a1ec --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Scopes.ts @@ -0,0 +1,10 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + + +export interface Scopes { + 'scope'?: ({[key: string]: string}); +} + +export interface Scopes__Output { + 'scope': ({[key: string]: string}); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.ts new file mode 100644 index 000000000..f34ffce75 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions.ts @@ -0,0 +1,11 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { SecurityScheme as _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme, SecurityScheme__Output as _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme'; + +export interface SecurityDefinitions { + 'security'?: ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme}); +} + +export interface SecurityDefinitions__Output { + 'security': ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme__Output}); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.ts new file mode 100644 index 000000000..626771e2f --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement.ts @@ -0,0 +1,18 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + + +export interface _grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue { + 'scope'?: (string)[]; +} + +export interface _grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue__Output { + 'scope': (string)[]; +} + +export interface SecurityRequirement { + 'securityRequirement'?: ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue}); +} + +export interface SecurityRequirement__Output { + 'securityRequirement': ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement_SecurityRequirementValue__Output}); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.ts new file mode 100644 index 000000000..9d7a85482 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/SecurityScheme.ts @@ -0,0 +1,55 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { Scopes as _grpc_gateway_protoc_gen_openapiv2_options_Scopes, Scopes__Output as _grpc_gateway_protoc_gen_openapiv2_options_Scopes__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Scopes'; +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../../../google/protobuf/Value'; + +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +export enum _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_Flow { + FLOW_INVALID = 0, + FLOW_IMPLICIT = 1, + FLOW_PASSWORD = 2, + FLOW_APPLICATION = 3, + FLOW_ACCESS_CODE = 4, +} + +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +export enum _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_In { + IN_INVALID = 0, + IN_QUERY = 1, + IN_HEADER = 2, +} + +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +export enum _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_Type { + TYPE_INVALID = 0, + TYPE_BASIC = 1, + TYPE_API_KEY = 2, + TYPE_OAUTH2 = 3, +} + +export interface SecurityScheme { + 'type'?: (_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_Type | keyof typeof _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_Type); + 'description'?: (string); + 'name'?: (string); + 'in'?: (_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_In | keyof typeof _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_In); + 'flow'?: (_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_Flow | keyof typeof _grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_Flow); + 'authorizationUrl'?: (string); + 'tokenUrl'?: (string); + 'scopes'?: (_grpc_gateway_protoc_gen_openapiv2_options_Scopes | null); + 'extensions'?: ({[key: string]: _google_protobuf_Value}); +} + +export interface SecurityScheme__Output { + 'type': (_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_Type); + 'description': (string); + 'name': (string); + 'in': (_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_In); + 'flow': (_grpc_gateway_protoc_gen_openapiv2_options_SecurityScheme_Flow); + 'authorizationUrl': (string); + 'tokenUrl': (string); + 'scopes': (_grpc_gateway_protoc_gen_openapiv2_options_Scopes__Output | null); + 'extensions': ({[key: string]: _google_protobuf_Value__Output}); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Swagger.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Swagger.ts new file mode 100644 index 000000000..07ed61d77 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Swagger.ts @@ -0,0 +1,42 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { Info as _grpc_gateway_protoc_gen_openapiv2_options_Info, Info__Output as _grpc_gateway_protoc_gen_openapiv2_options_Info__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Info'; +import type { Scheme as _grpc_gateway_protoc_gen_openapiv2_options_Scheme } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Scheme'; +import type { Response as _grpc_gateway_protoc_gen_openapiv2_options_Response, Response__Output as _grpc_gateway_protoc_gen_openapiv2_options_Response__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Response'; +import type { SecurityDefinitions as _grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions, SecurityDefinitions__Output as _grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/SecurityDefinitions'; +import type { SecurityRequirement as _grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement, SecurityRequirement__Output as _grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/SecurityRequirement'; +import type { Tag as _grpc_gateway_protoc_gen_openapiv2_options_Tag, Tag__Output as _grpc_gateway_protoc_gen_openapiv2_options_Tag__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/Tag'; +import type { ExternalDocumentation as _grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation, ExternalDocumentation__Output as _grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation'; +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../../../google/protobuf/Value'; + +export interface Swagger { + 'swagger'?: (string); + 'info'?: (_grpc_gateway_protoc_gen_openapiv2_options_Info | null); + 'host'?: (string); + 'basePath'?: (string); + 'schemes'?: (_grpc_gateway_protoc_gen_openapiv2_options_Scheme | keyof typeof _grpc_gateway_protoc_gen_openapiv2_options_Scheme)[]; + 'consumes'?: (string)[]; + 'produces'?: (string)[]; + 'responses'?: ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_Response}); + 'securityDefinitions'?: (_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions | null); + 'security'?: (_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement)[]; + 'tags'?: (_grpc_gateway_protoc_gen_openapiv2_options_Tag)[]; + 'externalDocs'?: (_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation | null); + 'extensions'?: ({[key: string]: _google_protobuf_Value}); +} + +export interface Swagger__Output { + 'swagger': (string); + 'info': (_grpc_gateway_protoc_gen_openapiv2_options_Info__Output | null); + 'host': (string); + 'basePath': (string); + 'schemes': (_grpc_gateway_protoc_gen_openapiv2_options_Scheme)[]; + 'consumes': (string)[]; + 'produces': (string)[]; + 'responses': ({[key: string]: _grpc_gateway_protoc_gen_openapiv2_options_Response__Output}); + 'securityDefinitions': (_grpc_gateway_protoc_gen_openapiv2_options_SecurityDefinitions__Output | null); + 'security': (_grpc_gateway_protoc_gen_openapiv2_options_SecurityRequirement__Output)[]; + 'tags': (_grpc_gateway_protoc_gen_openapiv2_options_Tag__Output)[]; + 'externalDocs': (_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation__Output | null); + 'extensions': ({[key: string]: _google_protobuf_Value__Output}); +} diff --git a/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Tag.ts b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Tag.ts new file mode 100644 index 000000000..da44ba9f5 --- /dev/null +++ b/api/generated/grpc/gateway/protoc_gen_openapiv2/options/Tag.ts @@ -0,0 +1,18 @@ +// Original file: vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto + +import type { ExternalDocumentation as _grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation, ExternalDocumentation__Output as _grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation__Output } from '../../../../grpc/gateway/protoc_gen_openapiv2/options/ExternalDocumentation'; +import type { Value as _google_protobuf_Value, Value__Output as _google_protobuf_Value__Output } from '../../../../google/protobuf/Value'; + +export interface Tag { + 'name'?: (string); + 'description'?: (string); + 'externalDocs'?: (_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation | null); + 'extensions'?: ({[key: string]: _google_protobuf_Value}); +} + +export interface Tag__Output { + 'name': (string); + 'description': (string); + 'externalDocs': (_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation__Output | null); + 'extensions': ({[key: string]: _google_protobuf_Value__Output}); +} diff --git a/api/generated/index.ts b/api/generated/index.ts index 4703c99c8..4d16a5f58 100644 --- a/api/generated/index.ts +++ b/api/generated/index.ts @@ -26,6 +26,8 @@ export interface ProtoGrpcType { CustomHttpPattern: MessageTypeDefinition Http: MessageTypeDefinition HttpRule: MessageTypeDefinition + Visibility: MessageTypeDefinition + VisibilityRule: MessageTypeDefinition } protobuf: { Any: MessageTypeDefinition @@ -42,21 +44,51 @@ export interface ProtoGrpcType { FileDescriptorSet: MessageTypeDefinition FileOptions: MessageTypeDefinition GeneratedCodeInfo: MessageTypeDefinition + ListValue: MessageTypeDefinition MessageOptions: MessageTypeDefinition MethodDescriptorProto: MessageTypeDefinition MethodOptions: MessageTypeDefinition + NullValue: EnumTypeDefinition OneofDescriptorProto: MessageTypeDefinition OneofOptions: MessageTypeDefinition ServiceDescriptorProto: MessageTypeDefinition ServiceOptions: MessageTypeDefinition SourceCodeInfo: MessageTypeDefinition + Struct: MessageTypeDefinition Timestamp: MessageTypeDefinition UninterpretedOption: MessageTypeDefinition + Value: MessageTypeDefinition } rpc: { Status: MessageTypeDefinition } } + grpc: { + gateway: { + protoc_gen_openapiv2: { + options: { + Contact: MessageTypeDefinition + ExternalDocumentation: MessageTypeDefinition + Header: MessageTypeDefinition + HeaderParameter: MessageTypeDefinition + Info: MessageTypeDefinition + JSONSchema: MessageTypeDefinition + License: MessageTypeDefinition + Operation: MessageTypeDefinition + Parameters: MessageTypeDefinition + Response: MessageTypeDefinition + Schema: MessageTypeDefinition + Scheme: EnumTypeDefinition + Scopes: MessageTypeDefinition + SecurityDefinitions: MessageTypeDefinition + SecurityRequirement: MessageTypeDefinition + SecurityScheme: MessageTypeDefinition + Swagger: MessageTypeDefinition + Tag: MessageTypeDefinition + } + } + } + } spacemesh: { v1: { Account: MessageTypeDefinition @@ -101,6 +133,7 @@ export interface ProtoGrpcType { CurrentEpochResponse: MessageTypeDefinition CurrentLayerRequest: MessageTypeDefinition CurrentLayerResponse: MessageTypeDefinition + DataStats: MessageTypeDefinition DebugService: SubtypeConstructor & { service: _spacemesh_v1_DebugServiceDefinition } EchoRequest: MessageTypeDefinition EchoResponse: MessageTypeDefinition @@ -118,6 +151,7 @@ export interface ProtoGrpcType { Event: MessageTypeDefinition EventAtxPubished: MessageTypeDefinition EventBeacon: MessageTypeDefinition + EventBestProofSelected: MessageTypeDefinition EventEligibilities: MessageTypeDefinition EventInitComplete: MessageTypeDefinition EventInitFailed: MessageTypeDefinition @@ -129,8 +163,12 @@ export interface ProtoGrpcType { EventPostServiceStarted: MessageTypeDefinition EventPostServiceStopped: MessageTypeDefinition EventPostStart: MessageTypeDefinition + EventProofDownloadedFromPoet: MessageTypeDefinition EventProposal: MessageTypeDefinition + EventRegisteredInPoet: MessageTypeDefinition EventStreamRequest: MessageTypeDefinition + EventWaitingForPoETRegistrationWindow: MessageTypeDefinition + EventWaitingForPoETRoundEnd: MessageTypeDefinition GenProofRequest: MessageTypeDefinition GenProofResponse: MessageTypeDefinition GenProofStatus: EnumTypeDefinition @@ -183,6 +221,7 @@ export interface ProtoGrpcType { ParseTransactionRequest: MessageTypeDefinition ParseTransactionResponse: MessageTypeDefinition PeerInfo: MessageTypeDefinition + PeerRequestStats: MessageTypeDefinition PostConfigResponse: MessageTypeDefinition PostInfoService: SubtypeConstructor & { service: _spacemesh_v1_PostInfoServiceDefinition } PostService: SubtypeConstructor & { service: _spacemesh_v1_PostServiceDefinition } @@ -248,20 +287,15 @@ export interface ProtoGrpcType { ActivationService: SubtypeConstructor & { service: _spacemesh_v2alpha1_ActivationServiceDefinition } ActivationStreamRequest: MessageTypeDefinition ActivationStreamService: SubtypeConstructor & { service: _spacemesh_v2alpha1_ActivationStreamServiceDefinition } - ActivationV1: MessageTypeDefinition ActivationsCountRequest: MessageTypeDefinition ActivationsCountResponse: MessageTypeDefinition - PoetMembershipProof: MessageTypeDefinition - Post: MessageTypeDefinition - PostMeta: MessageTypeDefinition Reward: MessageTypeDefinition RewardList: MessageTypeDefinition RewardRequest: MessageTypeDefinition RewardService: SubtypeConstructor & { service: _spacemesh_v2alpha1_RewardServiceDefinition } RewardStreamRequest: MessageTypeDefinition RewardStreamService: SubtypeConstructor & { service: _spacemesh_v2alpha1_RewardStreamServiceDefinition } - RewardV1: MessageTypeDefinition - VRFPostIndex: MessageTypeDefinition + SortOrder: EnumTypeDefinition } } } diff --git a/api/generated/spacemesh/v1/Activation.ts b/api/generated/spacemesh/v1/Activation.ts index d1407a06d..2c8d016d3 100644 --- a/api/generated/spacemesh/v1/Activation.ts +++ b/api/generated/spacemesh/v1/Activation.ts @@ -14,6 +14,7 @@ export interface Activation { 'prevAtx'?: (_spacemesh_v1_ActivationId | null); 'numUnits'?: (number); 'sequence'?: (number | string | Long); + 'previousAtxs'?: (_spacemesh_v1_ActivationId)[]; } export interface Activation__Output { @@ -24,4 +25,5 @@ export interface Activation__Output { 'prevAtx': (_spacemesh_v1_ActivationId__Output | null); 'numUnits': (number); 'sequence': (Long); + 'previousAtxs': (_spacemesh_v1_ActivationId__Output)[]; } diff --git a/api/generated/spacemesh/v1/ConnectionInfo.ts b/api/generated/spacemesh/v1/ConnectionInfo.ts index 43ee14272..55230a20a 100644 --- a/api/generated/spacemesh/v1/ConnectionInfo.ts +++ b/api/generated/spacemesh/v1/ConnectionInfo.ts @@ -2,14 +2,28 @@ import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../google/protobuf/Duration'; +// Original file: vendor/api/spacemesh/v1/admin_types.proto + +export enum _spacemesh_v1_ConnectionInfo_Kind { + Uknown = 0, + Inbound = 1, + Outbound = 2, + HPInbound = 3, + HPOutbound = 4, + RelayInbound = 5, + RelayOutbound = 6, +} + export interface ConnectionInfo { 'address'?: (string); 'uptime'?: (_google_protobuf_Duration | null); 'outbound'?: (boolean); + 'kind'?: (_spacemesh_v1_ConnectionInfo_Kind | keyof typeof _spacemesh_v1_ConnectionInfo_Kind); } export interface ConnectionInfo__Output { 'address': (string); 'uptime': (_google_protobuf_Duration__Output | null); 'outbound': (boolean); + 'kind': (_spacemesh_v1_ConnectionInfo_Kind); } diff --git a/api/generated/spacemesh/v1/DataStats.ts b/api/generated/spacemesh/v1/DataStats.ts new file mode 100644 index 000000000..1f0037433 --- /dev/null +++ b/api/generated/spacemesh/v1/DataStats.ts @@ -0,0 +1,17 @@ +// Original file: vendor/api/spacemesh/v1/debug_types.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface DataStats { + 'bytesSent'?: (number | string | Long); + 'bytesReceived'?: (number | string | Long); + 'sendRate'?: (number | string | Long)[]; + 'recvRate'?: (number | string | Long)[]; +} + +export interface DataStats__Output { + 'bytesSent': (Long); + 'bytesReceived': (Long); + 'sendRate': (Long)[]; + 'recvRate': (Long)[]; +} diff --git a/api/generated/spacemesh/v1/Event.ts b/api/generated/spacemesh/v1/Event.ts index af54ffa49..191e3f074 100644 --- a/api/generated/spacemesh/v1/Event.ts +++ b/api/generated/spacemesh/v1/Event.ts @@ -15,6 +15,11 @@ import type { EventInitFailed as _spacemesh_v1_EventInitFailed, EventInitFailed_ import type { EventMalfeasance as _spacemesh_v1_EventMalfeasance, EventMalfeasance__Output as _spacemesh_v1_EventMalfeasance__Output } from '../../spacemesh/v1/EventMalfeasance'; import type { EventPostServiceStarted as _spacemesh_v1_EventPostServiceStarted, EventPostServiceStarted__Output as _spacemesh_v1_EventPostServiceStarted__Output } from '../../spacemesh/v1/EventPostServiceStarted'; import type { EventPostServiceStopped as _spacemesh_v1_EventPostServiceStopped, EventPostServiceStopped__Output as _spacemesh_v1_EventPostServiceStopped__Output } from '../../spacemesh/v1/EventPostServiceStopped'; +import type { EventWaitingForPoETRegistrationWindow as _spacemesh_v1_EventWaitingForPoETRegistrationWindow, EventWaitingForPoETRegistrationWindow__Output as _spacemesh_v1_EventWaitingForPoETRegistrationWindow__Output } from '../../spacemesh/v1/EventWaitingForPoETRegistrationWindow'; +import type { EventProofDownloadedFromPoet as _spacemesh_v1_EventProofDownloadedFromPoet, EventProofDownloadedFromPoet__Output as _spacemesh_v1_EventProofDownloadedFromPoet__Output } from '../../spacemesh/v1/EventProofDownloadedFromPoet'; +import type { EventRegisteredInPoet as _spacemesh_v1_EventRegisteredInPoet, EventRegisteredInPoet__Output as _spacemesh_v1_EventRegisteredInPoet__Output } from '../../spacemesh/v1/EventRegisteredInPoet'; +import type { EventBestProofSelected as _spacemesh_v1_EventBestProofSelected, EventBestProofSelected__Output as _spacemesh_v1_EventBestProofSelected__Output } from '../../spacemesh/v1/EventBestProofSelected'; +import type { EventWaitingForPoETRoundEnd as _spacemesh_v1_EventWaitingForPoETRoundEnd, EventWaitingForPoETRoundEnd__Output as _spacemesh_v1_EventWaitingForPoETRoundEnd__Output } from '../../spacemesh/v1/EventWaitingForPoETRoundEnd'; export interface Event { 'timestamp'?: (_google_protobuf_Timestamp | null); @@ -34,7 +39,12 @@ export interface Event { 'malfeasance'?: (_spacemesh_v1_EventMalfeasance | null); 'postServiceStarted'?: (_spacemesh_v1_EventPostServiceStarted | null); 'postServiceStopped'?: (_spacemesh_v1_EventPostServiceStopped | null); - 'details'?: "beacon"|"initStart"|"initComplete"|"postStart"|"postComplete"|"poetWaitRound"|"poetWaitProof"|"atxPublished"|"eligibilities"|"proposal"|"initFailed"|"malfeasance"|"postServiceStarted"|"postServiceStopped"; + 'waitingForPoetRegistrationWindow'?: (_spacemesh_v1_EventWaitingForPoETRegistrationWindow | null); + 'proofDownloadedFromPoet'?: (_spacemesh_v1_EventProofDownloadedFromPoet | null); + 'registeredInPoet'?: (_spacemesh_v1_EventRegisteredInPoet | null); + 'bestProofSelected'?: (_spacemesh_v1_EventBestProofSelected | null); + 'waitingForPoetRoundEnd'?: (_spacemesh_v1_EventWaitingForPoETRoundEnd | null); + 'details'?: "beacon"|"initStart"|"initComplete"|"postStart"|"postComplete"|"poetWaitRound"|"poetWaitProof"|"atxPublished"|"eligibilities"|"proposal"|"initFailed"|"malfeasance"|"postServiceStarted"|"postServiceStopped"|"waitingForPoetRegistrationWindow"|"proofDownloadedFromPoet"|"registeredInPoet"|"bestProofSelected"|"waitingForPoetRoundEnd"; } export interface Event__Output { @@ -55,5 +65,10 @@ export interface Event__Output { 'malfeasance'?: (_spacemesh_v1_EventMalfeasance__Output | null); 'postServiceStarted'?: (_spacemesh_v1_EventPostServiceStarted__Output | null); 'postServiceStopped'?: (_spacemesh_v1_EventPostServiceStopped__Output | null); - 'details': "beacon"|"initStart"|"initComplete"|"postStart"|"postComplete"|"poetWaitRound"|"poetWaitProof"|"atxPublished"|"eligibilities"|"proposal"|"initFailed"|"malfeasance"|"postServiceStarted"|"postServiceStopped"; + 'waitingForPoetRegistrationWindow'?: (_spacemesh_v1_EventWaitingForPoETRegistrationWindow__Output | null); + 'proofDownloadedFromPoet'?: (_spacemesh_v1_EventProofDownloadedFromPoet__Output | null); + 'registeredInPoet'?: (_spacemesh_v1_EventRegisteredInPoet__Output | null); + 'bestProofSelected'?: (_spacemesh_v1_EventBestProofSelected__Output | null); + 'waitingForPoetRoundEnd'?: (_spacemesh_v1_EventWaitingForPoETRoundEnd__Output | null); + 'details': "beacon"|"initStart"|"initComplete"|"postStart"|"postComplete"|"poetWaitRound"|"poetWaitProof"|"atxPublished"|"eligibilities"|"proposal"|"initFailed"|"malfeasance"|"postServiceStarted"|"postServiceStopped"|"waitingForPoetRegistrationWindow"|"proofDownloadedFromPoet"|"registeredInPoet"|"bestProofSelected"|"waitingForPoetRoundEnd"; } diff --git a/api/generated/spacemesh/v1/EventBestProofSelected.ts b/api/generated/spacemesh/v1/EventBestProofSelected.ts new file mode 100644 index 000000000..a8c52f7ce --- /dev/null +++ b/api/generated/spacemesh/v1/EventBestProofSelected.ts @@ -0,0 +1,17 @@ +// Original file: vendor/api/spacemesh/v1/admin_types.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface EventBestProofSelected { + 'url'?: (string); + 'roundId'?: (string); + 'ticks'?: (number | string | Long); + 'smesher'?: (Buffer | Uint8Array | string); +} + +export interface EventBestProofSelected__Output { + 'url': (string); + 'roundId': (string); + 'ticks': (Long); + 'smesher': (Buffer); +} diff --git a/api/generated/spacemesh/v1/EventProofDownloadedFromPoet.ts b/api/generated/spacemesh/v1/EventProofDownloadedFromPoet.ts new file mode 100644 index 000000000..594d9abe1 --- /dev/null +++ b/api/generated/spacemesh/v1/EventProofDownloadedFromPoet.ts @@ -0,0 +1,15 @@ +// Original file: vendor/api/spacemesh/v1/admin_types.proto + +import type { Long } from '@grpc/proto-loader'; + +export interface EventProofDownloadedFromPoet { + 'url'?: (string); + 'roundId'?: (string); + 'ticks'?: (number | string | Long); +} + +export interface EventProofDownloadedFromPoet__Output { + 'url': (string); + 'roundId': (string); + 'ticks': (Long); +} diff --git a/api/generated/spacemesh/v1/EventRegisteredInPoet.ts b/api/generated/spacemesh/v1/EventRegisteredInPoet.ts new file mode 100644 index 000000000..21b6add86 --- /dev/null +++ b/api/generated/spacemesh/v1/EventRegisteredInPoet.ts @@ -0,0 +1,14 @@ +// Original file: vendor/api/spacemesh/v1/admin_types.proto + + +export interface EventRegisteredInPoet { + 'url'?: (string); + 'smesher'?: (Buffer | Uint8Array | string); + 'roundId'?: (string); +} + +export interface EventRegisteredInPoet__Output { + 'url': (string); + 'smesher': (Buffer); + 'roundId': (string); +} diff --git a/api/generated/spacemesh/v1/EventWaitingForPoETRegistrationWindow.ts b/api/generated/spacemesh/v1/EventWaitingForPoETRegistrationWindow.ts new file mode 100644 index 000000000..24153e5e9 --- /dev/null +++ b/api/generated/spacemesh/v1/EventWaitingForPoETRegistrationWindow.ts @@ -0,0 +1,17 @@ +// Original file: vendor/api/spacemesh/v1/admin_types.proto + +import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../google/protobuf/Timestamp'; + +export interface EventWaitingForPoETRegistrationWindow { + 'current'?: (number); + 'publish'?: (number); + 'roundEnd'?: (_google_protobuf_Timestamp | null); + 'smesher'?: (Buffer | Uint8Array | string); +} + +export interface EventWaitingForPoETRegistrationWindow__Output { + 'current': (number); + 'publish': (number); + 'roundEnd': (_google_protobuf_Timestamp__Output | null); + 'smesher': (Buffer); +} diff --git a/api/generated/spacemesh/v1/EventWaitingForPoETRoundEnd.ts b/api/generated/spacemesh/v1/EventWaitingForPoETRoundEnd.ts new file mode 100644 index 000000000..07eb2830f --- /dev/null +++ b/api/generated/spacemesh/v1/EventWaitingForPoETRoundEnd.ts @@ -0,0 +1,17 @@ +// Original file: vendor/api/spacemesh/v1/admin_types.proto + +import type { Timestamp as _google_protobuf_Timestamp, Timestamp__Output as _google_protobuf_Timestamp__Output } from '../../google/protobuf/Timestamp'; + +export interface EventWaitingForPoETRoundEnd { + 'publish'?: (number); + 'target'?: (number); + 'roundEnd'?: (_google_protobuf_Timestamp | null); + 'smesher'?: (Buffer | Uint8Array | string); +} + +export interface EventWaitingForPoETRoundEnd__Output { + 'publish': (number); + 'target': (number); + 'roundEnd': (_google_protobuf_Timestamp__Output | null); + 'smesher': (Buffer); +} diff --git a/api/generated/spacemesh/v1/MalfeasanceProof.ts b/api/generated/spacemesh/v1/MalfeasanceProof.ts index e9d717be4..e1fb607b9 100644 --- a/api/generated/spacemesh/v1/MalfeasanceProof.ts +++ b/api/generated/spacemesh/v1/MalfeasanceProof.ts @@ -11,6 +11,7 @@ export enum _spacemesh_v1_MalfeasanceProof_MalfeasanceType { MALFEASANCE_BALLOT = 2, MALFEASANCE_HARE = 3, MALFEASANCE_POST_INDEX = 4, + MALFEASANCE_INCORRECT_PREV_ATX = 5, } export interface MalfeasanceProof { diff --git a/api/generated/spacemesh/v1/NetworkInfoResponse.ts b/api/generated/spacemesh/v1/NetworkInfoResponse.ts index ff7f7563e..68157851f 100644 --- a/api/generated/spacemesh/v1/NetworkInfoResponse.ts +++ b/api/generated/spacemesh/v1/NetworkInfoResponse.ts @@ -1,5 +1,6 @@ // Original file: vendor/api/spacemesh/v1/debug_types.proto +import type { DataStats as _spacemesh_v1_DataStats, DataStats__Output as _spacemesh_v1_DataStats__Output } from '../../spacemesh/v1/DataStats'; // Original file: vendor/api/spacemesh/v1/debug_types.proto @@ -25,6 +26,7 @@ export interface NetworkInfoResponse { 'natTypeTcp'?: (_spacemesh_v1_NetworkInfoResponse_NATType | keyof typeof _spacemesh_v1_NetworkInfoResponse_NATType); 'reachability'?: (_spacemesh_v1_NetworkInfoResponse_Reachability | keyof typeof _spacemesh_v1_NetworkInfoResponse_Reachability); 'dhtServerEnabled'?: (boolean); + 'stats'?: ({[key: string]: _spacemesh_v1_DataStats}); } export interface NetworkInfoResponse__Output { @@ -35,4 +37,5 @@ export interface NetworkInfoResponse__Output { 'natTypeTcp': (_spacemesh_v1_NetworkInfoResponse_NATType); 'reachability': (_spacemesh_v1_NetworkInfoResponse_Reachability); 'dhtServerEnabled': (boolean); + 'stats': ({[key: string]: _spacemesh_v1_DataStats__Output}); } diff --git a/api/generated/spacemesh/v1/PeerInfo.ts b/api/generated/spacemesh/v1/PeerInfo.ts index 23de6d6b1..4da2e8e09 100644 --- a/api/generated/spacemesh/v1/PeerInfo.ts +++ b/api/generated/spacemesh/v1/PeerInfo.ts @@ -1,15 +1,33 @@ // Original file: vendor/api/spacemesh/v1/admin_types.proto import type { ConnectionInfo as _spacemesh_v1_ConnectionInfo, ConnectionInfo__Output as _spacemesh_v1_ConnectionInfo__Output } from '../../spacemesh/v1/ConnectionInfo'; +import type { PeerRequestStats as _spacemesh_v1_PeerRequestStats, PeerRequestStats__Output as _spacemesh_v1_PeerRequestStats__Output } from '../../spacemesh/v1/PeerRequestStats'; +import type { Long } from '@grpc/proto-loader'; export interface PeerInfo { 'id'?: (string); 'connections'?: (_spacemesh_v1_ConnectionInfo)[]; 'tags'?: (string)[]; + 'clientStats'?: (_spacemesh_v1_PeerRequestStats | null); + 'serverStats'?: (_spacemesh_v1_PeerRequestStats | null); + 'bytesSent'?: (number | string | Long); + 'bytesReceived'?: (number | string | Long); + 'sendRate'?: (number | string | Long)[]; + 'recvRate'?: (number | string | Long)[]; + '_clientStats'?: "clientStats"; + '_serverStats'?: "serverStats"; } export interface PeerInfo__Output { 'id': (string); 'connections': (_spacemesh_v1_ConnectionInfo__Output)[]; 'tags': (string)[]; + 'clientStats'?: (_spacemesh_v1_PeerRequestStats__Output | null); + 'serverStats'?: (_spacemesh_v1_PeerRequestStats__Output | null); + 'bytesSent': (Long); + 'bytesReceived': (Long); + 'sendRate': (Long)[]; + 'recvRate': (Long)[]; + '_clientStats': "clientStats"; + '_serverStats': "serverStats"; } diff --git a/api/generated/spacemesh/v1/PeerRequestStats.ts b/api/generated/spacemesh/v1/PeerRequestStats.ts new file mode 100644 index 000000000..73938d0b5 --- /dev/null +++ b/api/generated/spacemesh/v1/PeerRequestStats.ts @@ -0,0 +1,18 @@ +// Original file: vendor/api/spacemesh/v1/admin_types.proto + +import type { Duration as _google_protobuf_Duration, Duration__Output as _google_protobuf_Duration__Output } from '../../google/protobuf/Duration'; +import type { Long } from '@grpc/proto-loader'; + +export interface PeerRequestStats { + 'successCount'?: (number | string | Long); + 'failureCount'?: (number | string | Long); + 'latency'?: (_google_protobuf_Duration | null); + '_latency'?: "latency"; +} + +export interface PeerRequestStats__Output { + 'successCount': (Long); + 'failureCount': (Long); + 'latency'?: (_google_protobuf_Duration__Output | null); + '_latency': "latency"; +} diff --git a/api/generated/spacemesh/v2alpha1/Activation.ts b/api/generated/spacemesh/v2alpha1/Activation.ts index 11a3a0f16..46504c1bc 100644 --- a/api/generated/spacemesh/v2alpha1/Activation.ts +++ b/api/generated/spacemesh/v2alpha1/Activation.ts @@ -1,13 +1,23 @@ // Original file: vendor/api/spacemesh/v2alpha1/activation.proto -import type { ActivationV1 as _spacemesh_v2alpha1_ActivationV1, ActivationV1__Output as _spacemesh_v2alpha1_ActivationV1__Output } from '../../spacemesh/v2alpha1/ActivationV1'; +import type { Long } from '@grpc/proto-loader'; export interface Activation { - 'v1'?: (_spacemesh_v2alpha1_ActivationV1 | null); - 'versioned'?: "v1"; + 'id'?: (Buffer | Uint8Array | string); + 'smesherId'?: (Buffer | Uint8Array | string); + 'publishEpoch'?: (number); + 'coinbase'?: (string); + 'weight'?: (number | string | Long); + 'height'?: (number | string | Long); + 'numUnits'?: (number); } export interface Activation__Output { - 'v1'?: (_spacemesh_v2alpha1_ActivationV1__Output | null); - 'versioned': "v1"; + 'id': (Buffer); + 'smesherId': (Buffer); + 'publishEpoch': (number); + 'coinbase': (string); + 'weight': (Long); + 'height': (Long); + 'numUnits': (number); } diff --git a/api/generated/spacemesh/v2alpha1/ActivationRequest.ts b/api/generated/spacemesh/v2alpha1/ActivationRequest.ts index 3b8041445..aee7087c8 100644 --- a/api/generated/spacemesh/v2alpha1/ActivationRequest.ts +++ b/api/generated/spacemesh/v2alpha1/ActivationRequest.ts @@ -5,8 +5,8 @@ import type { Long } from '@grpc/proto-loader'; export interface ActivationRequest { 'startEpoch'?: (number); 'endEpoch'?: (number); - 'id'?: (Buffer | Uint8Array | string); - 'nodeId'?: (Buffer | Uint8Array | string); + 'id'?: (Buffer | Uint8Array | string)[]; + 'smesherId'?: (Buffer | Uint8Array | string)[]; 'coinbase'?: (string); 'offset'?: (number | string | Long); 'limit'?: (number | string | Long); @@ -15,8 +15,8 @@ export interface ActivationRequest { export interface ActivationRequest__Output { 'startEpoch': (number); 'endEpoch': (number); - 'id': (Buffer); - 'nodeId': (Buffer); + 'id': (Buffer)[]; + 'smesherId': (Buffer)[]; 'coinbase': (string); 'offset': (Long); 'limit': (Long); diff --git a/api/generated/spacemesh/v2alpha1/ActivationStreamRequest.ts b/api/generated/spacemesh/v2alpha1/ActivationStreamRequest.ts index 5fad837a2..17acdb2db 100644 --- a/api/generated/spacemesh/v2alpha1/ActivationStreamRequest.ts +++ b/api/generated/spacemesh/v2alpha1/ActivationStreamRequest.ts @@ -4,8 +4,8 @@ export interface ActivationStreamRequest { 'startEpoch'?: (number); 'endEpoch'?: (number); - 'id'?: (Buffer | Uint8Array | string); - 'nodeId'?: (Buffer | Uint8Array | string); + 'id'?: (Buffer | Uint8Array | string)[]; + 'smesherId'?: (Buffer | Uint8Array | string)[]; 'coinbase'?: (string); 'watch'?: (boolean); } @@ -13,8 +13,8 @@ export interface ActivationStreamRequest { export interface ActivationStreamRequest__Output { 'startEpoch': (number); 'endEpoch': (number); - 'id': (Buffer); - 'nodeId': (Buffer); + 'id': (Buffer)[]; + 'smesherId': (Buffer)[]; 'coinbase': (string); 'watch': (boolean); } diff --git a/api/generated/spacemesh/v2alpha1/ActivationV1.ts b/api/generated/spacemesh/v2alpha1/ActivationV1.ts deleted file mode 100644 index 9732971ec..000000000 --- a/api/generated/spacemesh/v2alpha1/ActivationV1.ts +++ /dev/null @@ -1,47 +0,0 @@ -// Original file: vendor/api/spacemesh/v2alpha1/activation.proto - -import type { Post as _spacemesh_v2alpha1_Post, Post__Output as _spacemesh_v2alpha1_Post__Output } from '../../spacemesh/v2alpha1/Post'; -import type { PoetMembershipProof as _spacemesh_v2alpha1_PoetMembershipProof, PoetMembershipProof__Output as _spacemesh_v2alpha1_PoetMembershipProof__Output } from '../../spacemesh/v2alpha1/PoetMembershipProof'; -import type { PostMeta as _spacemesh_v2alpha1_PostMeta, PostMeta__Output as _spacemesh_v2alpha1_PostMeta__Output } from '../../spacemesh/v2alpha1/PostMeta'; -import type { VRFPostIndex as _spacemesh_v2alpha1_VRFPostIndex, VRFPostIndex__Output as _spacemesh_v2alpha1_VRFPostIndex__Output } from '../../spacemesh/v2alpha1/VRFPostIndex'; -import type { Long } from '@grpc/proto-loader'; - -export interface ActivationV1 { - 'id'?: (Buffer | Uint8Array | string); - 'nodeId'?: (Buffer | Uint8Array | string); - 'signature'?: (Buffer | Uint8Array | string); - 'publishEpoch'?: (number); - 'sequence'?: (number | string | Long); - 'previousAtx'?: (Buffer | Uint8Array | string); - 'positioningAtx'?: (Buffer | Uint8Array | string); - 'committmentAtx'?: (Buffer | Uint8Array | string); - 'initialPost'?: (_spacemesh_v2alpha1_Post | null); - 'coinbase'?: (string); - 'units'?: (number); - 'baseHeight'?: (number); - 'ticks'?: (number); - 'membership'?: (_spacemesh_v2alpha1_PoetMembershipProof | null); - 'post'?: (_spacemesh_v2alpha1_Post | null); - 'postMeta'?: (_spacemesh_v2alpha1_PostMeta | null); - 'vrfPostIndex'?: (_spacemesh_v2alpha1_VRFPostIndex | null); -} - -export interface ActivationV1__Output { - 'id': (Buffer); - 'nodeId': (Buffer); - 'signature': (Buffer); - 'publishEpoch': (number); - 'sequence': (Long); - 'previousAtx': (Buffer); - 'positioningAtx': (Buffer); - 'committmentAtx': (Buffer); - 'initialPost': (_spacemesh_v2alpha1_Post__Output | null); - 'coinbase': (string); - 'units': (number); - 'baseHeight': (number); - 'ticks': (number); - 'membership': (_spacemesh_v2alpha1_PoetMembershipProof__Output | null); - 'post': (_spacemesh_v2alpha1_Post__Output | null); - 'postMeta': (_spacemesh_v2alpha1_PostMeta__Output | null); - 'vrfPostIndex': (_spacemesh_v2alpha1_VRFPostIndex__Output | null); -} diff --git a/api/generated/spacemesh/v2alpha1/PoetMembershipProof.ts b/api/generated/spacemesh/v2alpha1/PoetMembershipProof.ts deleted file mode 100644 index d1c50754a..000000000 --- a/api/generated/spacemesh/v2alpha1/PoetMembershipProof.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Original file: vendor/api/spacemesh/v2alpha1/activation.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface PoetMembershipProof { - 'proofNodes'?: (Buffer | Uint8Array | string)[]; - 'leaf'?: (number | string | Long); -} - -export interface PoetMembershipProof__Output { - 'proofNodes': (Buffer)[]; - 'leaf': (Long); -} diff --git a/api/generated/spacemesh/v2alpha1/Post.ts b/api/generated/spacemesh/v2alpha1/Post.ts deleted file mode 100644 index 0dd89c5df..000000000 --- a/api/generated/spacemesh/v2alpha1/Post.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Original file: vendor/api/spacemesh/v2alpha1/activation.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface Post { - 'nonce'?: (number); - 'indices'?: (Buffer | Uint8Array | string); - 'pow'?: (number | string | Long); -} - -export interface Post__Output { - 'nonce': (number); - 'indices': (Buffer); - 'pow': (Long); -} diff --git a/api/generated/spacemesh/v2alpha1/PostMeta.ts b/api/generated/spacemesh/v2alpha1/PostMeta.ts deleted file mode 100644 index d9fadfbfd..000000000 --- a/api/generated/spacemesh/v2alpha1/PostMeta.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Original file: vendor/api/spacemesh/v2alpha1/activation.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface PostMeta { - 'challenge'?: (Buffer | Uint8Array | string); - 'labelsPerUnit'?: (number | string | Long); -} - -export interface PostMeta__Output { - 'challenge': (Buffer); - 'labelsPerUnit': (Long); -} diff --git a/api/generated/spacemesh/v2alpha1/Reward.ts b/api/generated/spacemesh/v2alpha1/Reward.ts index 89289572e..e4aa14949 100644 --- a/api/generated/spacemesh/v2alpha1/Reward.ts +++ b/api/generated/spacemesh/v2alpha1/Reward.ts @@ -1,13 +1,19 @@ // Original file: vendor/api/spacemesh/v2alpha1/reward.proto -import type { RewardV1 as _spacemesh_v2alpha1_RewardV1, RewardV1__Output as _spacemesh_v2alpha1_RewardV1__Output } from '../../spacemesh/v2alpha1/RewardV1'; +import type { Long } from '@grpc/proto-loader'; export interface Reward { - 'v1'?: (_spacemesh_v2alpha1_RewardV1 | null); - 'versioned'?: "v1"; + 'layer'?: (number); + 'total'?: (number | string | Long); + 'layerReward'?: (number | string | Long); + 'coinbase'?: (string); + 'smesher'?: (Buffer | Uint8Array | string); } export interface Reward__Output { - 'v1'?: (_spacemesh_v2alpha1_RewardV1__Output | null); - 'versioned': "v1"; + 'layer': (number); + 'total': (Long); + 'layerReward': (Long); + 'coinbase': (string); + 'smesher': (Buffer); } diff --git a/api/generated/spacemesh/v2alpha1/RewardRequest.ts b/api/generated/spacemesh/v2alpha1/RewardRequest.ts index f70e57190..b48e207de 100644 --- a/api/generated/spacemesh/v2alpha1/RewardRequest.ts +++ b/api/generated/spacemesh/v2alpha1/RewardRequest.ts @@ -1,5 +1,6 @@ // Original file: vendor/api/spacemesh/v2alpha1/reward.proto +import type { SortOrder as _spacemesh_v2alpha1_SortOrder } from '../../spacemesh/v2alpha1/SortOrder'; import type { Long } from '@grpc/proto-loader'; export interface RewardRequest { @@ -9,6 +10,7 @@ export interface RewardRequest { 'smesher'?: (Buffer | Uint8Array | string); 'offset'?: (number | string | Long); 'limit'?: (number | string | Long); + 'sortOrder'?: (_spacemesh_v2alpha1_SortOrder | keyof typeof _spacemesh_v2alpha1_SortOrder); 'filterBy'?: "coinbase"|"smesher"; } @@ -19,5 +21,6 @@ export interface RewardRequest__Output { 'smesher'?: (Buffer); 'offset': (Long); 'limit': (Long); + 'sortOrder': (_spacemesh_v2alpha1_SortOrder); 'filterBy': "coinbase"|"smesher"; } diff --git a/api/generated/spacemesh/v2alpha1/RewardV1.ts b/api/generated/spacemesh/v2alpha1/RewardV1.ts deleted file mode 100644 index 65d2faeed..000000000 --- a/api/generated/spacemesh/v2alpha1/RewardV1.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Original file: vendor/api/spacemesh/v2alpha1/reward.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface RewardV1 { - 'layer'?: (number); - 'total'?: (number | string | Long); - 'layerReward'?: (number | string | Long); - 'coinbase'?: (string); - 'smesher'?: (Buffer | Uint8Array | string); -} - -export interface RewardV1__Output { - 'layer': (number); - 'total': (Long); - 'layerReward': (Long); - 'coinbase': (string); - 'smesher': (Buffer); -} diff --git a/api/generated/spacemesh/v2alpha1/SortOrder.ts b/api/generated/spacemesh/v2alpha1/SortOrder.ts new file mode 100644 index 000000000..8027e2e89 --- /dev/null +++ b/api/generated/spacemesh/v2alpha1/SortOrder.ts @@ -0,0 +1,6 @@ +// Original file: vendor/api/spacemesh/v2alpha1/v2alpha1.proto + +export enum SortOrder { + ASC = 0, + DESC = 1, +} diff --git a/api/generated/spacemesh/v2alpha1/VRFPostIndex.ts b/api/generated/spacemesh/v2alpha1/VRFPostIndex.ts deleted file mode 100644 index 522c9f266..000000000 --- a/api/generated/spacemesh/v2alpha1/VRFPostIndex.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Original file: vendor/api/spacemesh/v2alpha1/activation.proto - -import type { Long } from '@grpc/proto-loader'; - -export interface VRFPostIndex { - 'nonce'?: (number | string | Long); -} - -export interface VRFPostIndex__Output { - 'nonce': (Long); -} diff --git a/app/screens/node/Node.tsx b/app/screens/node/Node.tsx index b4a4b54d0..167b83f78 100644 --- a/app/screens/node/Node.tsx +++ b/app/screens/node/Node.tsx @@ -372,7 +372,7 @@ const Node = ({ history, location }: Props) => { const renderTable = (data: RowData[]) => data.map(([label, value], idx) => { return ( - + {label} {value} diff --git a/app/screens/node/NodeEventActivityRow.tsx b/app/screens/node/NodeEventActivityRow.tsx index 2f412b50f..f6833b377 100644 --- a/app/screens/node/NodeEventActivityRow.tsx +++ b/app/screens/node/NodeEventActivityRow.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { NodeEvent } from '../../../shared/types'; import ErrorMessage from '../../basicComponents/ErrorMessage'; -import { getEventType } from '../../../shared/utils'; +import { getEventType, longToNumber } from '../../../shared/utils'; import { CustomTimeAgo } from '../../basicComponents'; import { getNodeEventStage } from './nodeEventUtils'; @@ -42,6 +42,7 @@ export default (event: NodeEvent) => { if (!event) { return 'Node is connecting...'; } + const now = Date.now(); switch (getEventType(event)) { case 'initStart': { return 'Started PoS data initialization'; @@ -50,23 +51,6 @@ export default (event: NodeEvent) => { return 'Completed PoS data initialization'; case 'initFailed': return 'PoS data initialization failed'; - case 'poetWaitRound': - return withTime( - 'Waiting for PoET registration window', - event.timestamp, - event.poetWaitRound?.wait - ); - case 'poetWaitProof': { - return withTime( - `Waiting for the finish of PoET round${ - event?.poetWaitProof?.publish - ? ` for epoch ${event.poetWaitProof.publish}` - : '' - }`, - event.timestamp, - event.poetWaitProof?.wait - ); - } case 'postStart': { return "Generating PoST proof for the PoET's challenge"; } @@ -88,6 +72,62 @@ export default (event: NodeEvent) => { return `Published proposal on layer ${event.proposal?.layer}`; case 'beacon': return `Node computed randomness beacon for epoch ${event.beacon?.epoch}`; + case 'waitingForPoetRegistrationWindow': { + // API returns absolute time + const roundEnd = + typeof event.waitingForPoetRegistrationWindow?.roundEnd?.seconds === + 'string' + ? parseInt( + event.waitingForPoetRegistrationWindow?.roundEnd?.seconds, + 10 + ) + : event.waitingForPoetRegistrationWindow?.roundEnd?.seconds; + const until = roundEnd ? longToNumber(roundEnd) * 1000 : now; + return withTime( + `Waiting for PoET registration window in epoch ${ + event.waitingForPoetRegistrationWindow?.publish ?? '' + } to open`, + now, + until - now + ); + } + case 'waitingForPoetRoundEnd': { + // API returns absolute time + const roundEnd = + typeof event.waitingForPoetRoundEnd?.roundEnd?.seconds === 'string' + ? parseInt(event.waitingForPoetRoundEnd?.roundEnd?.seconds, 10) + : event.waitingForPoetRoundEnd?.roundEnd?.seconds; + const until = roundEnd ? longToNumber(roundEnd) * 1000 : now; + + return withTime( + `Waiting for the finish of PoET round for epoch ${ + event.waitingForPoetRoundEnd?.publish ?? '' + }. Round ends in`, + now, + until - now + ); + } + case 'bestProofSelected': { + const ticks = longToNumber( + typeof event.bestProofSelected?.ticks === 'string' + ? parseInt(event.bestProofSelected?.ticks, 10) + : event.bestProofSelected?.ticks ?? 0 + ); + return `The best PoET proof is selected for round ${ + event.bestProofSelected?.roundId ?? '' + }: ${ticks} ticks ${ + event.bestProofSelected?.url + ? `(URL: ${event.bestProofSelected?.url})` + : '' + }`; + } + case 'registeredInPoet': + return `Registered in PoET. Round ID: ${event.registeredInPoet?.roundId}`; + // Deprecated + case 'poetWaitProof': + case 'poetWaitRound': { + return null; + } default: return event.help ?? 'Node is preparing...'; } diff --git a/app/screens/node/NodeEventsLog.tsx b/app/screens/node/NodeEventsLog.tsx index eedfa344f..87184f020 100644 --- a/app/screens/node/NodeEventsLog.tsx +++ b/app/screens/node/NodeEventsLog.tsx @@ -15,13 +15,22 @@ import { RootState } from '../../types'; import { NodeEvent } from '../../../shared/types'; import { epochByLayer, nextEpochTime } from '../../../shared/layerUtils'; import { BackButton, CorneredContainer } from '../../components/common'; -import { getEventPayload, toHexString } from '../../../shared/utils'; +import { + getEventPayload, + getEventType, + toHexString, +} from '../../../shared/utils'; import { safeReactKey, setRef } from '../../infra/utils'; import { MainPath } from '../../routerPaths'; import Address, { AddressType } from '../../components/common/Address'; import { getNodeEventStatusColor } from './nodeEventUtils'; import NodeEventActivityRow from './NodeEventActivityRow'; +const DEPRECATED_EVENTS: NodeEvent['details'][] = [ + 'poetWaitRound', + 'poetWaitProof', +]; + const Wrapper = styled.div` display: flex; flex-direction: row; @@ -127,18 +136,22 @@ const ensureSmesherIdType = (s: string | Buffer | Uint8Array | undefined) => { }; const renderSmesherID = (e: NodeEvent) => { - const payload = getEventPayload(e); - if (!payload || !('smesher' in payload)) { + try { + const payload = getEventPayload(e); + if (!payload || !('smesher' in payload)) { + return null; + } + const smesherId = ensureSmesherIdType(payload.smesher); + if (!smesherId) return null; + return ( + + Smesher ID:  +
+ + ); + } catch (e) { return null; } - const smesherId = ensureSmesherIdType(payload.smesher); - if (!smesherId) return null; - return ( - - Smesher ID:  -
- - ); }; const NodeEventsLog = ({ history }: RouteComponentProps) => { @@ -185,14 +198,14 @@ const NodeEventsLog = ({ history }: RouteComponentProps) => { }, [events.length, shouldSticky, scrollToItem]); const renderRow = (e: NodeEvent, idx: number) => { - // TODO: Refactor screen and Node Dashboard - // to avoid excessive re-rendering of the whole screen - // on each progress update, which causes blinking + // Drop deprecated events + const type = getEventType(e); + if (DEPRECATED_EVENTS.includes(type)) { + return null; + } + return ( - + addr.match(/^(\w+)1/)?.[1] || null; +/* eslint-disable no-nested-ternary */ export const longToNumber = (val: Long | number) => - typeof val === 'number' ? val : val.toNumber(); + typeof val === 'number' + ? val + : val instanceof Long + ? val.toNumber() + : Object.hasOwn(val, 'low') && Object.hasOwn(val, 'high') + ? Long.fromValue(val).toNumber() + : NaN; +/* eslint-enable no-nested-ternary */ export const convertBytesToMiB = (maxFileSize: number) => maxFileSize / 1024 / 1024; diff --git a/vendor/api b/vendor/api index cce5b1667..5458078c8 160000 --- a/vendor/api +++ b/vendor/api @@ -1 +1 @@ -Subproject commit cce5b166740dfdfb09acc3b6a6f3ad89961703cb +Subproject commit 5458078c8fa1be9356c09fa00d1c5696bea76822 diff --git a/vendor/proto/google/api/visibility.proto b/vendor/proto/google/api/visibility.proto new file mode 100644 index 000000000..b01b0fdfa --- /dev/null +++ b/vendor/proto/google/api/visibility.proto @@ -0,0 +1,113 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/descriptor.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/visibility;visibility"; +option java_multiple_files = true; +option java_outer_classname = "VisibilityProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.EnumOptions { + // See `VisibilityRule`. + google.api.VisibilityRule enum_visibility = 72295727; +} + +extend google.protobuf.EnumValueOptions { + // See `VisibilityRule`. + google.api.VisibilityRule value_visibility = 72295727; +} + +extend google.protobuf.FieldOptions { + // See `VisibilityRule`. + google.api.VisibilityRule field_visibility = 72295727; +} + +extend google.protobuf.MessageOptions { + // See `VisibilityRule`. + google.api.VisibilityRule message_visibility = 72295727; +} + +extend google.protobuf.MethodOptions { + // See `VisibilityRule`. + google.api.VisibilityRule method_visibility = 72295727; +} + +extend google.protobuf.ServiceOptions { + // See `VisibilityRule`. + google.api.VisibilityRule api_visibility = 72295727; +} + +// `Visibility` restricts service consumer's access to service elements, +// such as whether an application can call a visibility-restricted method. +// The restriction is expressed by applying visibility labels on service +// elements. The visibility labels are elsewhere linked to service consumers. +// +// A service can define multiple visibility labels, but a service consumer +// should be granted at most one visibility label. Multiple visibility +// labels for a single service consumer are not supported. +// +// If an element and all its parents have no visibility label, its visibility +// is unconditionally granted. +// +// Example: +// +// visibility: +// rules: +// - selector: google.calendar.Calendar.EnhancedSearch +// restriction: PREVIEW +// - selector: google.calendar.Calendar.Delegate +// restriction: INTERNAL +// +// Here, all methods are publicly visible except for the restricted methods +// EnhancedSearch and Delegate. +message Visibility { + // A list of visibility rules that apply to individual API elements. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated VisibilityRule rules = 1; +} + +// A visibility rule provides visibility configuration for an individual API +// element. +message VisibilityRule { + // Selects methods, messages, fields, enums, etc. to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + string selector = 1; + + // A comma-separated list of visibility labels that apply to the `selector`. + // Any of the listed labels can be used to grant the visibility. + // + // If a rule has multiple labels, removing one of the labels but not all of + // them can break clients. + // + // Example: + // + // visibility: + // rules: + // - selector: google.calendar.Calendar.EnhancedSearch + // restriction: INTERNAL, PREVIEW + // + // Removing INTERNAL from this restriction will break clients that rely on + // this method and only had access to it through INTERNAL. + string restriction = 2; +} \ No newline at end of file diff --git a/vendor/proto/google/protobuf/descriptor.proto b/vendor/proto/google/protobuf/descriptor.proto index d29fdec5e..288489339 100644 --- a/vendor/proto/google/protobuf/descriptor.proto +++ b/vendor/proto/google/protobuf/descriptor.proto @@ -36,7 +36,6 @@ // A valid .proto file can be translated directly to a FileDescriptorProto // without any other information (e.g. without reading its imports). - syntax = "proto2"; package google.protobuf; @@ -58,6 +57,42 @@ message FileDescriptorSet { repeated FileDescriptorProto file = 1; } +// The full set of known editions. +enum Edition { + // A placeholder for an unknown edition value. + EDITION_UNKNOWN = 0; + + // A placeholder edition for specifying default behaviors *before* a feature + // was first introduced. This is effectively an "infinite past". + EDITION_LEGACY = 900; + + // 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 = 998; + EDITION_PROTO3 = 999; + + // 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 = 1000; + EDITION_2024 = 1001; + + // Placeholder editions for testing feature resolution. These should not be + // used or relied on outside of tests. + EDITION_1_TEST_ONLY = 1; + EDITION_2_TEST_ONLY = 2; + EDITION_99997_TEST_ONLY = 99997; + EDITION_99998_TEST_ONLY = 99998; + EDITION_99999_TEST_ONLY = 99999; + + // Placeholder for specifying unbounded edition support. This should only + // ever be used by plugins that can expect to never require any changes to + // support a new edition. + EDITION_MAX = 0x7FFFFFFF; +} + // Describes a complete .proto file. message FileDescriptorProto { optional string name = 1; // file name, relative to root of source tree @@ -86,8 +121,13 @@ message FileDescriptorProto { optional SourceCodeInfo source_code_info = 9; // The syntax of the proto file. - // The supported values are "proto2" and "proto3". + // The supported values are "proto2", "proto3", and "editions". + // + // If `edition` is present, this value must be "editions". optional string syntax = 12; + + // The edition of the proto file. + optional Edition edition = 14; } // Describes a message type. @@ -129,6 +169,51 @@ message ExtensionRangeOptions { // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; + message Declaration { + // The extension number declared within the extension range. + optional int32 number = 1; + + // The fully-qualified name of the extension field. There must be a leading + // dot in front of the full name. + optional string full_name = 2; + + // The fully-qualified type name of the extension field. Unlike + // Metadata.type, Declaration.type must have a leading dot for messages + // and enums. + optional string type = 3; + + // 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. + optional bool reserved = 5; + + // If true, indicates that the extension must be defined as repeated. + // Otherwise the extension must be defined as optional. + optional bool repeated = 6; + + reserved 4; // removed is_repeated + } + + // 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. + repeated Declaration declaration = 2 [retention = RETENTION_SOURCE]; + + // Any features defined in the specific edition. + optional FeatureSet features = 50; + + // The verification state of the extension range. + enum VerificationState { + // All the extensions of the range must be declared. + DECLARATION = 0; + UNVERIFIED = 1; + } + + // The verification state of the range. + // TODO: flip the default to DECLARATION once all empty ranges + // are marked as UNVERIFIED. + optional VerificationState verification = 3 + [default = UNVERIFIED, retention = RETENTION_SOURCE]; // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; @@ -153,9 +238,10 @@ message FieldDescriptorProto { TYPE_BOOL = 8; TYPE_STRING = 9; // Tag-delimited aggregate. - // Group type is deprecated and not supported in proto3. However, Proto3 + // Group type is deprecated and not supported after google.protobuf. However, Proto3 // implementations should still be able to parse the group wire format and - // treat group fields as unknown fields. + // treat group fields as unknown fields. In Editions, the group wire format + // can be enabled via the `message_encoding` feature. TYPE_GROUP = 10; TYPE_MESSAGE = 11; // Length-delimited aggregate. @@ -172,8 +258,11 @@ message FieldDescriptorProto { enum Label { // 0 is reserved for errors LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; LABEL_REPEATED = 3; + // 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 = 2; } optional string name = 1; @@ -199,7 +288,6 @@ message FieldDescriptorProto { // For booleans, "true" or "false". // For strings, contains the default text contents (not escaped in any way). // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? optional string default_value = 7; // If set, gives the index of a oneof in the containing type's oneof_decl @@ -217,12 +305,12 @@ message FieldDescriptorProto { // If true, this is a proto3 "optional". When a proto3 field is optional, it // tracks presence regardless of field type. // - // When proto3_optional is true, this field must be belong to a oneof to - // signal to old proto3 clients that presence is tracked for this field. This - // oneof is known as a "synthetic" oneof, and this field must be its sole - // member (each proto3 optional field gets its own synthetic oneof). Synthetic - // oneofs exist in the descriptor only, and do not generate any API. Synthetic - // oneofs must be ordered after all "real" oneofs. + // When proto3_optional is true, this field must belong to a oneof to signal + // to old proto3 clients that presence is tracked for this field. This oneof + // is known as a "synthetic" oneof, and this field must be its sole member + // (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs + // exist in the descriptor only, and do not generate any API. Synthetic oneofs + // must be ordered after all "real" oneofs. // // For message fields, proto3_optional doesn't create any semantic change, // since non-repeated message fields always track presence. However it still @@ -306,7 +394,6 @@ message MethodDescriptorProto { optional bool server_streaming = 6 [default = false]; } - // =================================================================== // Options @@ -347,18 +434,17 @@ message FileOptions { // domain names. optional string java_package = 1; - - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). + // Controls the name of the wrapper Java class generated for the .proto file. + // That class will always contain the .proto file's getDescriptor() method as + // well as any top-level extensions defined in the .proto file. + // If java_multiple_files is disabled, then all the other classes from the + // .proto file will be nested inside the single wrapper outer class. optional string java_outer_classname = 8; - // If set true, then the Java code generator will generate a separate .java + // If enabled, then the Java code generator will generate a separate .java // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be + // file. Thus, these types will *not* be nested inside the wrapper class + // named by java_outer_classname. However, the wrapper class will still be // generated to contain the file's getDescriptor() method as well as any // top-level extensions defined in the file. optional bool java_multiple_files = 10 [default = false]; @@ -366,15 +452,18 @@ message FileOptions { // This option does nothing. optional bool java_generate_equals_and_hash = 20 [deprecated=true]; - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. + // A proto2 file can set this to true to opt in to UTF-8 checking for Java, + // which will throw an exception if invalid UTF-8 is parsed from the wire or + // assigned to a string field. + // + // TODO: clarify exactly what kinds of field types this option + // applies to, and update these docs accordingly. + // + // Proto3 files already perform these checks. Setting the option explicitly to + // false has no effect: it cannot be used to opt proto3 files out of UTF-8 + // checks. optional bool java_string_check_utf8 = 27 [default = false]; - // Generated classes can be optimized for speed or code size. enum OptimizeMode { SPEED = 1; // Generate complete code for parsing, serialization, @@ -391,9 +480,6 @@ message FileOptions { // - Otherwise, the basename of the .proto file, without extension. optional string go_package = 11; - - - // Should generic services be generated in each language? "Generic" services // are not specific to any particular RPC system. They are generated by the // main code generators in each language (without additional plugins). @@ -407,7 +493,8 @@ message FileOptions { optional bool cc_generic_services = 16 [default = false]; optional bool java_generic_services = 17 [default = false]; optional bool py_generic_services = 18 [default = false]; - optional bool php_generic_services = 42 [default = false]; + reserved 42; // removed php_generic_services + reserved "php_generic_services"; // Is this file deprecated? // Depending on the target platform, this can emit Deprecated annotations @@ -419,7 +506,6 @@ message FileOptions { // only to generated classes for C++. optional bool cc_enable_arenas = 31 [default = true]; - // Sets the objective c class prefix which is prepended to all objective c // generated classes from this .proto. There is no default. optional string objc_class_prefix = 36; @@ -452,6 +538,8 @@ message FileOptions { // determining the ruby package. optional string ruby_package = 45; + // Any features defined in the specific edition. + optional FeatureSet features = 50; // The parser stores options it doesn't recognize here. // See the documentation for the "Options" section above. @@ -496,6 +584,8 @@ message MessageOptions { // this is a formalization for deprecating messages. optional bool deprecated = 3 [default = false]; + reserved 4, 5, 6; + // Whether the message is an automatically generated map entry type for the // maps field. // @@ -522,6 +612,20 @@ message MessageOptions { reserved 8; // javalite_serializable reserved 9; // javanano_as_lite + // Enable the legacy handling of JSON field name conflicts. This lowercases + // 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. + // + // 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 + // teams have had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 11 [deprecated = true]; + + // Any features defined in the specific edition. + optional FeatureSet features = 12; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -531,15 +635,24 @@ message MessageOptions { } message FieldOptions { + // NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead. // 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 not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - optional CType ctype = 1 [default = STRING]; + // 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. + // TODO: make ctype actually deprecated. + optional CType ctype = 1 [/*deprecated = true,*/ default = STRING]; enum CType { // Default mode. STRING = 0; + // 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 = 1; STRING_PIECE = 2; @@ -548,7 +661,9 @@ message 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. + // 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. optional bool packed = 2; // The jstype option determines the JavaScript type used for values of the @@ -591,19 +706,18 @@ message FieldOptions { // call from multiple threads concurrently, while non-const methods continue // to require exclusive access. // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outer message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. + // Note that lazy message fields are still eagerly verified to check + // ill-formed wireformat or missing required fields. Calling IsInitialized() + // on the outer message would fail if the inner message has missing required + // fields. Failed verification would result in parsing failure (except when + // uninitialized messages are acceptable). optional bool lazy = 5 [default = false]; + // unverified_lazy does no correctness checks on the byte stream. This should + // only be used where lazy with verification is prohibitive for performance + // reasons. + optional bool unverified_lazy = 15 [default = false]; + // Is this field deprecated? // Depending on the target platform, this can emit Deprecated annotations // for accessors, or it will be completely ignored; in the very least, this @@ -613,6 +727,67 @@ message FieldOptions { // For Google-internal migration only. Do not use. optional bool weak = 10 [default = false]; + // Indicate that the field value should not be printed out when using debug + // formats, e.g. when the field contains sensitive credentials. + optional bool debug_redact = 16 [default = false]; + + // If set to RETENTION_SOURCE, the option will be omitted from the binary. + enum OptionRetention { + RETENTION_UNKNOWN = 0; + RETENTION_RUNTIME = 1; + RETENTION_SOURCE = 2; + } + + optional OptionRetention retention = 17; + + // This indicates the types of entities that the field may apply to when used + // as an option. If it is unset, then the field may be freely used as an + // option on any kind of entity. + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0; + TARGET_TYPE_FILE = 1; + TARGET_TYPE_EXTENSION_RANGE = 2; + TARGET_TYPE_MESSAGE = 3; + TARGET_TYPE_FIELD = 4; + TARGET_TYPE_ONEOF = 5; + TARGET_TYPE_ENUM = 6; + TARGET_TYPE_ENUM_ENTRY = 7; + TARGET_TYPE_SERVICE = 8; + TARGET_TYPE_METHOD = 9; + } + + repeated OptionTargetType targets = 19; + + message EditionDefault { + optional Edition edition = 3; + optional string value = 2; // Textproto value. + } + repeated EditionDefault edition_defaults = 20; + + // Any features defined in the specific edition. + optional FeatureSet features = 21; + + // Information about the support window of a feature. + message FeatureSupport { + // The edition that this feature was first available in. In editions + // earlier than this one, the default assigned to EDITION_LEGACY will be + // used, and proto files will not be able to override it. + optional Edition edition_introduced = 1; + + // The edition this feature becomes deprecated in. Using this after this + // edition may trigger warnings. + optional Edition edition_deprecated = 2; + + // The deprecation warning text if this feature is used after the edition it + // was marked deprecated in. + optional string deprecation_warning = 3; + + // The edition this feature is no longer available in. In editions after + // this one, the last default assigned will be used, and proto files will + // not be able to override it. + optional Edition edition_removed = 4; + } + optional FeatureSupport feature_support = 22; // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -620,10 +795,14 @@ message FieldOptions { // Clients can define custom options in extensions of this message. See above. extensions 1000 to max; - reserved 4; // removed jtype + reserved 4; // removed jtype + reserved 18; // reserve target, target_obsolete_do_not_use } message OneofOptions { + // Any features defined in the specific edition. + optional FeatureSet features = 1; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -645,6 +824,17 @@ message EnumOptions { reserved 5; // javanano_as_lite + // Enable the legacy handling of JSON field name conflicts. This lowercases + // 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 + // had time to migrate. + optional bool deprecated_legacy_json_field_conflicts = 6 [deprecated = true]; + + // Any features defined in the specific edition. + optional FeatureSet features = 7; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -659,6 +849,17 @@ message EnumValueOptions { // this is a formalization for deprecating enum values. optional bool deprecated = 1 [default = false]; + // Any features defined in the specific edition. + optional FeatureSet features = 2; + + // 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. + optional bool debug_redact = 3 [default = false]; + + // Information about the support window of a feature value. + optional FieldOptions.FeatureSupport feature_support = 4; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -668,6 +869,9 @@ message EnumValueOptions { message ServiceOptions { + // Any features defined in the specific edition. + optional FeatureSet features = 34; + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC // framework. We apologize for hoarding these numbers to ourselves, but // we were already using them long before we decided to release Protocol @@ -710,6 +914,9 @@ message MethodOptions { optional IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN]; + // Any features defined in the specific edition. + optional FeatureSet features = 35; + // The parser stores options it doesn't recognize here. See above. repeated UninterpretedOption uninterpreted_option = 999; @@ -717,7 +924,6 @@ message MethodOptions { extensions 1000 to max; } - // A message representing a option the parser does not recognize. This only // appears in options protos created by the compiler::Parser class. // DescriptorPool resolves these when building Descriptor objects. Therefore, @@ -728,8 +934,8 @@ message UninterpretedOption { // The name of the uninterpreted option. Each string represents a segment in // a dot-separated name. is_extension is true iff a segment represents an // extension (denoted with parentheses in options specs in .proto files). - // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - // "foo.(bar.baz).qux". + // E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents + // "foo.(bar.baz).moo". message NamePart { required string name_part = 1; required bool is_extension = 2; @@ -746,6 +952,172 @@ message UninterpretedOption { optional string aggregate_value = 8; } +// =================================================================== +// Features + +// 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. +message FeatureSet { + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0; + EXPLICIT = 1; + IMPLICIT = 2; + LEGACY_REQUIRED = 3; + } + optional FieldPresence field_presence = 1 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "EXPLICIT" }, + edition_defaults = { edition: EDITION_PROTO3, value: "IMPLICIT" }, + edition_defaults = { edition: EDITION_2023, value: "EXPLICIT" } + ]; + + enum EnumType { + ENUM_TYPE_UNKNOWN = 0; + OPEN = 1; + CLOSED = 2; + } + optional EnumType enum_type = 2 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "CLOSED" }, + edition_defaults = { edition: EDITION_PROTO3, value: "OPEN" } + ]; + + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0; + PACKED = 1; + EXPANDED = 2; + } + optional RepeatedFieldEncoding repeated_field_encoding = 3 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "EXPANDED" }, + edition_defaults = { edition: EDITION_PROTO3, value: "PACKED" } + ]; + + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0; + VERIFY = 2; + NONE = 3; + reserved 1; + } + optional Utf8Validation utf8_validation = 4 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "NONE" }, + edition_defaults = { edition: EDITION_PROTO3, value: "VERIFY" } + ]; + + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0; + LENGTH_PREFIXED = 1; + DELIMITED = 2; + } + optional MessageEncoding message_encoding = 5 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_FIELD, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "LENGTH_PREFIXED" } + ]; + + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0; + ALLOW = 1; + LEGACY_BEST_EFFORT = 2; + } + optional JsonFormat json_format = 6 [ + retention = RETENTION_RUNTIME, + targets = TARGET_TYPE_MESSAGE, + targets = TARGET_TYPE_ENUM, + targets = TARGET_TYPE_FILE, + feature_support = { + edition_introduced: EDITION_2023, + }, + edition_defaults = { edition: EDITION_LEGACY, value: "LEGACY_BEST_EFFORT" }, + edition_defaults = { edition: EDITION_PROTO3, value: "ALLOW" } + ]; + + reserved 999; + + extensions 1000 to 9994 [ + declaration = { + number: 1000, + full_name: ".pb.cpp", + type: ".pb.CppFeatures" + }, + declaration = { + number: 1001, + full_name: ".pb.java", + type: ".pb.JavaFeatures" + }, + declaration = { number: 1002, full_name: ".pb.go", type: ".pb.GoFeatures" }, + declaration = { + number: 9990, + full_name: ".pb.proto1", + type: ".pb.Proto1Features" + } + ]; + + extensions 9995 to 9999; // For internal testing + extensions 10000; // for https://github.com/bufbuild/protobuf-es +} + +// 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. +message FeatureSetDefaults { + // 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. + message FeatureSetEditionDefault { + optional Edition edition = 3; + + // Defaults of features that can be overridden in this edition. + optional FeatureSet overridable_features = 4; + + // Defaults of features that can't be overridden in this edition. + optional FeatureSet fixed_features = 5; + + reserved 1, 2; + reserved "features"; + } + repeated FeatureSetEditionDefault defaults = 1; + + // The minimum supported edition (inclusive) when this was constructed. + // Editions before this will not have defaults. + optional Edition minimum_edition = 4; + + // The maximum known edition (inclusive) when this was constructed. Editions + // after this will not have reliable defaults. + optional Edition maximum_edition = 5; +} + // =================================================================== // Optional source code info @@ -801,8 +1173,8 @@ message SourceCodeInfo { // location. // // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: + // the root FileDescriptorProto to the place where the definition appears. + // For example, this path: // [ 4, 3, 2, 7, 1 ] // refers to: // file.message_type(3) // 4, 3 @@ -856,13 +1228,13 @@ message SourceCodeInfo { // // Comment attached to baz. // // Another line attached to baz. // - // // Comment attached to qux. + // // Comment attached to moo. // // - // // Another line attached to qux. - // optional double qux = 4; + // // Another line attached to moo. + // optional double moo = 4; // // // Detached comment for corge. This is not leading or trailing comments - // // to qux or corge because there are blank lines separating it from + // // to moo or corge because there are blank lines separating it from // // both. // // // Detached comment for corge paragraph 2. @@ -902,8 +1274,20 @@ message GeneratedCodeInfo { optional int32 begin = 3; // Identifies the ending offset in bytes in the generated code that - // relates to the identified offset. The end offset should be one past + // relates to the identified object. The end offset should be one past // the last relevant byte (so the length of the text = end - begin). optional int32 end = 4; + + // Represents the identified object's effect on the element in the original + // .proto file. + enum Semantic { + // There is no effect or the effect is indescribable. + NONE = 0; + // The element is set or otherwise mutated. + SET = 1; + // An alias to the element is returned. + ALIAS = 2; + } + optional Semantic semantic = 5; } -} +} \ No newline at end of file diff --git a/vendor/proto/google/protobuf/struct.proto b/vendor/proto/google/protobuf/struct.proto new file mode 100644 index 000000000..e07e34356 --- /dev/null +++ b/vendor/proto/google/protobuf/struct.proto @@ -0,0 +1,95 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/protobuf/types/known/structpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "StructProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +message Struct { + // Unordered map of dynamically typed values. + map fields = 1; +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of these +// variants. Absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +message Value { + // The kind of value. + oneof kind { + // Represents a null value. + NullValue null_value = 1; + // Represents a double value. + double number_value = 2; + // Represents a string value. + string string_value = 3; + // Represents a boolean value. + bool bool_value = 4; + // Represents a structured value. + Struct struct_value = 5; + // Represents a repeated `Value`. + ListValue list_value = 6; + } +} + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +enum NullValue { + // Null value. + NULL_VALUE = 0; +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +message ListValue { + // Repeated field of dynamically typed values. + repeated Value values = 1; +} \ No newline at end of file diff --git a/vendor/proto/protoc-gen-openapiv2/options/annotations.proto b/vendor/proto/protoc-gen-openapiv2/options/annotations.proto new file mode 100644 index 000000000..9d4f4c995 --- /dev/null +++ b/vendor/proto/protoc-gen-openapiv2/options/annotations.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; + +package grpc.gateway.protoc_gen_openapiv2.options; + +import "google/protobuf/descriptor.proto"; +import "protoc-gen-openapiv2/options/openapiv2.proto"; + +option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; + +extend google.protobuf.FileOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Swagger openapiv2_swagger = 1042; +} +extend google.protobuf.MethodOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Operation openapiv2_operation = 1042; +} +extend google.protobuf.MessageOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Schema openapiv2_schema = 1042; +} +extend google.protobuf.ServiceOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + Tag openapiv2_tag = 1042; +} +extend google.protobuf.FieldOptions { + // ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + JSONSchema openapiv2_field = 1042; +} \ No newline at end of file diff --git a/vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto b/vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto new file mode 100644 index 000000000..207fe57df --- /dev/null +++ b/vendor/proto/protoc-gen-openapiv2/options/openapiv2.proto @@ -0,0 +1,720 @@ +syntax = "proto3"; + +package grpc.gateway.protoc_gen_openapiv2.options; + +import "google/protobuf/struct.proto"; + +option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"; + +// Scheme describes the schemes supported by the OpenAPI Swagger +// and Operation objects. +enum Scheme { + UNKNOWN = 0; + HTTP = 1; + HTTPS = 2; + WS = 3; + WSS = 4; +} + +// `Swagger` is a representation of OpenAPI v2 specification's Swagger object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// schemes: HTTPS; +// consumes: "application/json"; +// produces: "application/json"; +// }; +// +message Swagger { + // Specifies the OpenAPI Specification version being used. It can be + // used by the OpenAPI UI and other clients to interpret the API listing. The + // value MUST be "2.0". + string swagger = 1; + // Provides metadata about the API. The metadata can be used by the + // clients if needed. + Info info = 2; + // The host (name or ip) serving the API. This MUST be the host only and does + // not include the scheme nor sub-paths. It MAY include a port. If the host is + // not included, the host serving the documentation is to be used (including + // the port). The host does not support path templating. + string host = 3; + // The base path on which the API is served, which is relative to the host. If + // it is not included, the API is served directly under the host. The value + // MUST start with a leading slash (/). The basePath does not support path + // templating. + // Note that using `base_path` does not change the endpoint paths that are + // generated in the resulting OpenAPI file. If you wish to use `base_path` + // with relatively generated OpenAPI paths, the `base_path` prefix must be + // manually removed from your `google.api.http` paths and your code changed to + // serve the API from the `base_path`. + string base_path = 4; + // The transfer protocol of the API. Values MUST be from the list: "http", + // "https", "ws", "wss". If the schemes is not included, the default scheme to + // be used is the one used to access the OpenAPI definition itself. + repeated Scheme schemes = 5; + // A list of MIME types the APIs can consume. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + repeated string consumes = 6; + // A list of MIME types the APIs can produce. This is global to all APIs but + // can be overridden on specific API calls. Value MUST be as described under + // Mime Types. + repeated string produces = 7; + // field 8 is reserved for 'paths'. + reserved 8; + // field 9 is reserved for 'definitions', which at this time are already + // exposed as and customizable as proto messages. + reserved 9; + // An object to hold responses that can be used across operations. This + // property does not define global responses for all operations. + map responses = 10; + // Security scheme definitions that can be used across the specification. + SecurityDefinitions security_definitions = 11; + // A declaration of which security schemes are applied for the API as a whole. + // The list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). + // Individual operations can override this definition. + repeated SecurityRequirement security = 12; + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + repeated Tag tags = 13; + // Additional external documentation. + ExternalDocumentation external_docs = 14; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 15; +} + +// `Operation` is a representation of OpenAPI v2 specification's Operation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject +// +// Example: +// +// service EchoService { +// rpc Echo(SimpleMessage) returns (SimpleMessage) { +// option (google.api.http) = { +// get: "/v1/example/echo/{id}" +// }; +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { +// summary: "Get a message."; +// operation_id: "getMessage"; +// tags: "echo"; +// responses: { +// key: "200" +// value: { +// description: "OK"; +// } +// } +// }; +// } +// } +message Operation { + // A list of tags for API documentation control. Tags can be used for logical + // grouping of operations by resources or any other qualifier. + repeated string tags = 1; + // A short summary of what the operation does. For maximum readability in the + // swagger-ui, this field SHOULD be less than 120 characters. + string summary = 2; + // A verbose explanation of the operation behavior. GFM syntax can be used for + // rich text representation. + string description = 3; + // Additional external documentation for this operation. + ExternalDocumentation external_docs = 4; + // Unique string used to identify the operation. The id MUST be unique among + // all operations described in the API. Tools and libraries MAY use the + // operationId to uniquely identify an operation, therefore, it is recommended + // to follow common programming naming conventions. + string operation_id = 5; + // A list of MIME types the operation can consume. This overrides the consumes + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + repeated string consumes = 6; + // A list of MIME types the operation can produce. This overrides the produces + // definition at the OpenAPI Object. An empty value MAY be used to clear the + // global definition. Value MUST be as described under Mime Types. + repeated string produces = 7; + // field 8 is reserved for 'parameters'. + reserved 8; + // The list of possible responses as they are returned from executing this + // operation. + map responses = 9; + // The transfer protocol for the operation. Values MUST be from the list: + // "http", "https", "ws", "wss". The value overrides the OpenAPI Object + // schemes definition. + repeated Scheme schemes = 10; + // Declares this operation to be deprecated. Usage of the declared operation + // should be refrained. Default value is false. + bool deprecated = 11; + // A declaration of which security schemes are applied for this operation. The + // list of values describes alternative security schemes that can be used + // (that is, there is a logical OR between the security requirements). This + // definition overrides any declared top-level security. To remove a top-level + // security declaration, an empty array can be used. + repeated SecurityRequirement security = 12; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 13; + // Custom parameters such as HTTP request headers. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/ + // and https://swagger.io/specification/v2/#parameter-object. + Parameters parameters = 14; +} + +// `Parameters` is a representation of OpenAPI v2 specification's parameters object. +// Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only +// allow header parameters to be set here since we do not want users specifying custom non-header +// parameters beyond those inferred from the Protobuf schema. +// See: https://swagger.io/specification/v2/#parameter-object +message Parameters { + // `Headers` is one or more HTTP header parameter. + // See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters + repeated HeaderParameter headers = 1; +} + +// `HeaderParameter` a HTTP header parameter. +// See: https://swagger.io/specification/v2/#parameter-object +message HeaderParameter { + // `Type` is a supported HTTP header type. + // See https://swagger.io/specification/v2/#parameterType. + enum Type { + UNKNOWN = 0; + STRING = 1; + NUMBER = 2; + INTEGER = 3; + BOOLEAN = 4; + } + + // `Name` is the header name. + string name = 1; + // `Description` is a short description of the header. + string description = 2; + // `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + // See: https://swagger.io/specification/v2/#parameterType. + Type type = 3; + // `Format` The extending format for the previously mentioned type. + string format = 4; + // `Required` indicates if the header is optional + bool required = 5; + // field 6 is reserved for 'items', but in OpenAPI-specific way. + reserved 6; + // field 7 is reserved `Collection Format`. Determines the format of the array if type array is used. + reserved 7; +} + +// `Header` is a representation of OpenAPI v2 specification's Header object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject +// +message Header { + // `Description` is a short description of the header. + string description = 1; + // The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported. + string type = 2; + // `Format` The extending format for the previously mentioned type. + string format = 3; + // field 4 is reserved for 'items', but in OpenAPI-specific way. + reserved 4; + // field 5 is reserved `Collection Format` Determines the format of the array if type array is used. + reserved 5; + // `Default` Declares the value of the header that the server will use if none is provided. + // See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. + // Unlike JSON Schema this value MUST conform to the defined type for the header. + string default = 6; + // field 7 is reserved for 'maximum'. + reserved 7; + // field 8 is reserved for 'exclusiveMaximum'. + reserved 8; + // field 9 is reserved for 'minimum'. + reserved 9; + // field 10 is reserved for 'exclusiveMinimum'. + reserved 10; + // field 11 is reserved for 'maxLength'. + reserved 11; + // field 12 is reserved for 'minLength'. + reserved 12; + // 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. + string pattern = 13; + // field 14 is reserved for 'maxItems'. + reserved 14; + // field 15 is reserved for 'minItems'. + reserved 15; + // field 16 is reserved for 'uniqueItems'. + reserved 16; + // field 17 is reserved for 'enum'. + reserved 17; + // field 18 is reserved for 'multipleOf'. + reserved 18; +} + +// `Response` is a representation of OpenAPI v2 specification's Response object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject +// +message Response { + // `Description` is a short description of the response. + // GFM syntax can be used for rich text representation. + string description = 1; + // `Schema` optionally defines the structure of the response. + // If `Schema` is not provided, it means there is no content to the response. + Schema schema = 2; + // `Headers` A list of headers that are sent with the response. + // `Header` name is expected to be a string in the canonical format of the MIME header key + // See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey + map headers = 3; + // `Examples` gives per-mimetype response examples. + // See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object + map examples = 4; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 5; +} + +// `Info` is a representation of OpenAPI v2 specification's Info object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// title: "Echo API"; +// version: "1.0"; +// description: ""; +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// }; +// ... +// }; +// +message Info { + // The title of the application. + string title = 1; + // A short description of the application. GFM syntax can be used for rich + // text representation. + string description = 2; + // The Terms of Service for the API. + string terms_of_service = 3; + // The contact information for the exposed API. + Contact contact = 4; + // The license information for the exposed API. + License license = 5; + // Provides the version of the application API (not to be confused + // with the specification version). + string version = 6; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 7; +} + +// `Contact` is a representation of OpenAPI v2 specification's Contact object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// contact: { +// name: "gRPC-Gateway project"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// email: "none@example.com"; +// }; +// ... +// }; +// ... +// }; +// +message Contact { + // The identifying name of the contact person/organization. + string name = 1; + // The URL pointing to the contact information. MUST be in the format of a + // URL. + string url = 2; + // The email address of the contact person/organization. MUST be in the format + // of an email address. + string email = 3; +} + +// `License` is a representation of OpenAPI v2 specification's License object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// info: { +// ... +// license: { +// name: "BSD 3-Clause License"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE"; +// }; +// ... +// }; +// ... +// }; +// +message License { + // The license name used for the API. + string name = 1; + // A URL to the license used for the API. MUST be in the format of a URL. + string url = 2; +} + +// `ExternalDocumentation` is a representation of OpenAPI v2 specification's +// ExternalDocumentation object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject +// +// Example: +// +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +// ... +// external_docs: { +// description: "More about gRPC-Gateway"; +// url: "https://github.com/grpc-ecosystem/grpc-gateway"; +// } +// ... +// }; +// +message ExternalDocumentation { + // A short description of the target documentation. GFM syntax can be used for + // rich text representation. + string description = 1; + // The URL for the target documentation. Value MUST be in the format + // of a URL. + string url = 2; +} + +// `Schema` is a representation of OpenAPI v2 specification's Schema object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +message Schema { + JSONSchema json_schema = 1; + // Adds support for polymorphism. The discriminator is the schema property + // name that is used to differentiate between other schema that inherit this + // schema. The property name used MUST be defined at this schema and it MUST + // be in the required property list. When used, the value MUST be the name of + // this schema or any schema that inherits it. + string discriminator = 2; + // Relevant only for Schema "properties" definitions. Declares the property as + // "read only". This means that it MAY be sent as part of a response but MUST + // NOT be sent as part of the request. Properties marked as readOnly being + // true SHOULD NOT be in the required list of the defined schema. Default + // value is false. + bool read_only = 3; + // field 4 is reserved for 'xml'. + reserved 4; + // Additional external documentation for this schema. + ExternalDocumentation external_docs = 5; + // A free-form property to include an example of an instance for this schema in JSON. + // This is copied verbatim to the output. + string example = 6; +} + +// `JSONSchema` represents properties from JSON Schema taken, and as used, in +// the OpenAPI v2 spec. +// +// This includes changes made by OpenAPI v2. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject +// +// See also: https://cswr.github.io/JsonSchema/spec/basic_types/, +// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json +// +// Example: +// +// message SimpleMessage { +// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = { +// json_schema: { +// title: "SimpleMessage" +// description: "A simple message." +// required: ["id"] +// } +// }; +// +// // Id represents the message identifier. +// string id = 1; [ +// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { +// description: "The unique identifier of the simple message." +// }]; +// } +// +message JSONSchema { + // field 1 is reserved for '$id', omitted from OpenAPI v2. + reserved 1; + // field 2 is reserved for '$schema', omitted from OpenAPI v2. + reserved 2; + // Ref is used to define an external reference to include in the message. + // This could be a fully qualified proto message reference, and that type must + // be imported into the protofile. If no message is identified, the Ref will + // be used verbatim in the output. + // For example: + // `ref: ".google.protobuf.Timestamp"`. + string ref = 3; + // field 4 is reserved for '$comment', omitted from OpenAPI v2. + reserved 4; + // The title of the schema. + string title = 5; + // A short description of the schema. + string description = 6; + string default = 7; + bool read_only = 8; + // A free-form property to include a JSON example of this field. This is copied + // verbatim to the output swagger.json. Quotes must be escaped. + // This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject + string example = 9; + double multiple_of = 10; + // Maximum represents an inclusive upper limit for a numeric instance. The + // value of MUST be a number, + double maximum = 11; + bool exclusive_maximum = 12; + // minimum represents an inclusive lower limit for a numeric instance. The + // value of MUST be a number, + double minimum = 13; + bool exclusive_minimum = 14; + uint64 max_length = 15; + uint64 min_length = 16; + string pattern = 17; + // field 18 is reserved for 'additionalItems', omitted from OpenAPI v2. + reserved 18; + // field 19 is reserved for 'items', but in OpenAPI-specific way. + // TODO(ivucica): add 'items'? + reserved 19; + uint64 max_items = 20; + uint64 min_items = 21; + bool unique_items = 22; + // field 23 is reserved for 'contains', omitted from OpenAPI v2. + reserved 23; + uint64 max_properties = 24; + uint64 min_properties = 25; + repeated string required = 26; + // field 27 is reserved for 'additionalProperties', but in OpenAPI-specific + // way. TODO(ivucica): add 'additionalProperties'? + reserved 27; + // field 28 is reserved for 'definitions', omitted from OpenAPI v2. + reserved 28; + // field 29 is reserved for 'properties', but in OpenAPI-specific way. + // TODO(ivucica): add 'additionalProperties'? + reserved 29; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: + // patternProperties, dependencies, propertyNames, const + reserved 30 to 33; + // Items in 'array' must be unique. + repeated string array = 34; + + enum JSONSchemaSimpleTypes { + UNKNOWN = 0; + ARRAY = 1; + BOOLEAN = 2; + INTEGER = 3; + NULL = 4; + NUMBER = 5; + OBJECT = 6; + STRING = 7; + } + + repeated JSONSchemaSimpleTypes type = 35; + // `Format` + string format = 36; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: contentMediaType, contentEncoding, if, then, else + reserved 37 to 41; + // field 42 is reserved for 'allOf', but in OpenAPI-specific way. + // TODO(ivucica): add 'allOf'? + reserved 42; + // following fields are reserved, as the properties have been omitted from + // OpenAPI v2: + // anyOf, oneOf, not + reserved 43 to 45; + // Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1 + repeated string enum = 46; + + // Additional field level properties used when generating the OpenAPI v2 file. + FieldConfiguration field_configuration = 1001; + + // 'FieldConfiguration' provides additional field level properties used when generating the OpenAPI v2 file. + // These properties are not defined by OpenAPIv2, but they are used to control the generation. + message FieldConfiguration { + // Alternative parameter name when used as path parameter. If set, this will + // be used as the complete parameter name when this field is used as a path + // parameter. Use this to avoid having auto generated path parameter names + // for overlapping paths. + string path_param_name = 47; + } + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 48; +} + +// `Tag` is a representation of OpenAPI v2 specification's Tag object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject +// +message Tag { + // The name of the tag. Use it to allow override of the name of a + // global Tag object, then use that name to reference the tag throughout the + // OpenAPI file. + string name = 1; + // A short description for the tag. GFM syntax can be used for rich text + // representation. + string description = 2; + // Additional external documentation for this tag. + ExternalDocumentation external_docs = 3; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 4; +} + +// `SecurityDefinitions` is a representation of OpenAPI v2 specification's +// Security Definitions object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject +// +// A declaration of the security schemes available to be used in the +// specification. This does not enforce the security schemes on the operations +// and only serves to provide the relevant details for each scheme. +message SecurityDefinitions { + // A single security scheme definition, mapping a "name" to the scheme it + // defines. + map security = 1; +} + +// `SecurityScheme` is a representation of OpenAPI v2 specification's +// Security Scheme object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject +// +// Allows the definition of a security scheme that can be used by the +// operations. Supported schemes are basic authentication, an API key (either as +// a header or as a query parameter) and OAuth2's common flows (implicit, +// password, application and access code). +message SecurityScheme { + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + enum Type { + TYPE_INVALID = 0; + TYPE_BASIC = 1; + TYPE_API_KEY = 2; + TYPE_OAUTH2 = 3; + } + + // The location of the API key. Valid values are "query" or "header". + enum In { + IN_INVALID = 0; + IN_QUERY = 1; + IN_HEADER = 2; + } + + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + enum Flow { + FLOW_INVALID = 0; + FLOW_IMPLICIT = 1; + FLOW_PASSWORD = 2; + FLOW_APPLICATION = 3; + FLOW_ACCESS_CODE = 4; + } + + // The type of the security scheme. Valid values are "basic", + // "apiKey" or "oauth2". + Type type = 1; + // A short description for security scheme. + string description = 2; + // The name of the header or query parameter to be used. + // Valid for apiKey. + string name = 3; + // The location of the API key. Valid values are "query" or + // "header". + // Valid for apiKey. + In in = 4; + // The flow used by the OAuth2 security scheme. Valid values are + // "implicit", "password", "application" or "accessCode". + // Valid for oauth2. + Flow flow = 5; + // The authorization URL to be used for this flow. This SHOULD be in + // the form of a URL. + // Valid for oauth2/implicit and oauth2/accessCode. + string authorization_url = 6; + // The token URL to be used for this flow. This SHOULD be in the + // form of a URL. + // Valid for oauth2/password, oauth2/application and oauth2/accessCode. + string token_url = 7; + // The available scopes for the OAuth2 security scheme. + // Valid for oauth2. + Scopes scopes = 8; + // Custom properties that start with "x-" such as "x-foo" used to describe + // extra functionality that is not covered by the standard OpenAPI Specification. + // See: https://swagger.io/docs/specification/2-0/swagger-extensions/ + map extensions = 9; +} + +// `SecurityRequirement` is a representation of OpenAPI v2 specification's +// Security Requirement object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject +// +// Lists the required security schemes to execute this operation. The object can +// have multiple security schemes declared in it which are all required (that +// is, there is a logical AND between the schemes). +// +// The name used for each property MUST correspond to a security scheme +// declared in the Security Definitions. +message SecurityRequirement { + // If the security scheme is of type "oauth2", then the value is a list of + // scope names required for the execution. For other security scheme types, + // the array MUST be empty. + message SecurityRequirementValue { + repeated string scope = 1; + } + // Each name must correspond to a security scheme which is declared in + // the Security Definitions. If the security scheme is of type "oauth2", + // then the value is a list of scope names required for the execution. + // For other security scheme types, the array MUST be empty. + map security_requirement = 1; +} + +// `Scopes` is a representation of OpenAPI v2 specification's Scopes object. +// +// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject +// +// Lists the available scopes for an OAuth2 security scheme. +message Scopes { + // Maps between a name of a scope to a short description of it (as the value + // of the property). + map scope = 1; +} \ No newline at end of file