{
  "files": [
    {
      "name": "keyapis/omnichat/v1/keyapis_omnichat_credentials_v1.proto",
      "description": "Сервис реализует функционал получения реквизитов для авторизации в омничате",
      "package": "keyapis.omnichat.v1",
      "hasEnums": false,
      "hasExtensions": false,
      "hasMessages": true,
      "hasServices": true,
      "enums": [],
      "extensions": [],
      "messages": [
        {
          "name": "ClientMetadata",
          "longName": "ClientMetadata",
          "fullName": "keyapis.omnichat.v1.ClientMetadata",
          "description": "Метаданные клиента",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "app_version",
              "description": "Версия приложения.\n# Диапазон: 1..128",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "os_version",
              "description": "Версия операционной системы.\n# Диапазон: 1..128",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 2
            },
            {
              "name": "device_model",
              "description": "Модель устройства.\n# Диапазон: 1..128",
              "label": "",
              "type": "StringValue",
              "longType": "google.protobuf.StringValue",
              "fullType": "google.protobuf.StringValue",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "number": 3
            },
            {
              "name": "app_name",
              "description": "Название приложения.\nДля разных приложений мы можем использовать разные tenantId и channel_id, сопоставление хранится в конфиге сервиса",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 4
            }
          ]
        },
        {
          "name": "Credentials",
          "longName": "Credentials",
          "fullName": "keyapis.omnichat.v1.Credentials",
          "description": "Реквезиты для авторизации в omnichat",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "payload",
              "description": "Закодированные в base64 клиентские данные.\nСостав: appVersion, os, deviceModel, tenantId, login, phone, email, group_id, address, лицевые счета",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "hash",
              "description": "HMAC-подпись от payload (клиентских данных)",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 2
            },
            {
              "name": "channel_id",
              "description": "Идентификатор канала в omnichat.\nОпределяется исходя из типа приложения",
              "label": "",
              "type": "int32",
              "longType": "int32",
              "fullType": "int32",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 3
            }
          ]
        },
        {
          "name": "PostCredentialsRequest",
          "longName": "PostCredentialsRequest",
          "fullName": "keyapis.omnichat.v1.PostCredentialsRequest",
          "description": "Запрос реквезитов для авторизации в Omnichat",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "client_metadata",
              "description": "Метаданные клиента",
              "label": "",
              "type": "ClientMetadata",
              "longType": "ClientMetadata",
              "fullType": "keyapis.omnichat.v1.ClientMetadata",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            }
          ]
        },
        {
          "name": "PostCredentialsResponse",
          "longName": "PostCredentialsResponse",
          "fullName": "keyapis.omnichat.v1.PostCredentialsResponse",
          "description": "Ответ на запрос реквезитов для авторизации в Omnichat",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "data",
              "description": "Реквизиты",
              "label": "",
              "type": "Credentials",
              "longType": "Credentials",
              "fullType": "keyapis.omnichat.v1.Credentials",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "error",
              "description": "Ошибка",
              "label": "",
              "type": "Error",
              "longType": "PostCredentialsResponse.Error",
              "fullType": "keyapis.omnichat.v1.PostCredentialsResponse.Error",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "type",
              "defaultValue": "",
              "number": 2
            }
          ]
        },
        {
          "name": "Error",
          "longName": "PostCredentialsResponse.Error",
          "fullName": "keyapis.omnichat.v1.PostCredentialsResponse.Error",
          "description": "Ошибка запроса получения хешированной информации о пользователе",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": true,
          "extensions": [],
          "fields": [
            {
              "name": "validation",
              "description": "Ошибка валидации",
              "label": "",
              "type": "ValidationError",
              "longType": "ValidationError",
              "fullType": "keyapis.omnichat.v1.ValidationError",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 1
            },
            {
              "name": "app_name_unsupported",
              "description": "Переданное название приложения не поддерживается",
              "label": "",
              "type": "AppNameUnsupported",
              "longType": "PostCredentialsResponse.Error.AppNameUnsupported",
              "fullType": "keyapis.omnichat.v1.PostCredentialsResponse.Error.AppNameUnsupported",
              "ismap": false,
              "isoneof": true,
              "oneofdecl": "reason",
              "defaultValue": "",
              "number": 2
            }
          ]
        },
        {
          "name": "AppNameUnsupported",
          "longName": "PostCredentialsResponse.Error.AppNameUnsupported",
          "fullName": "keyapis.omnichat.v1.PostCredentialsResponse.Error.AppNameUnsupported",
          "description": "Переданное название приложения не поддерживается",
          "hasExtensions": false,
          "hasFields": false,
          "hasOneofs": false,
          "extensions": [],
          "fields": []
        },
        {
          "name": "ValidationError",
          "longName": "ValidationError",
          "fullName": "keyapis.omnichat.v1.ValidationError",
          "description": "Ошибки валидации.\nЭти проверки выполняются до обращения в базу данных",
          "hasExtensions": false,
          "hasFields": true,
          "hasOneofs": false,
          "extensions": [],
          "fields": [
            {
              "name": "path",
              "description": "Путь к полю в формате наименования прото",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 1
            },
            {
              "name": "message",
              "description": "Валидационное сообщение",
              "label": "",
              "type": "string",
              "longType": "string",
              "fullType": "string",
              "ismap": false,
              "isoneof": false,
              "oneofdecl": "",
              "defaultValue": "",
              "options": {
                "google.api.field_behavior": {
                  "options": [
                    "REQUIRED"
                  ]
                }
              },
              "number": 2
            }
          ]
        }
      ],
      "services": [
        {
          "name": "CredentialsService",
          "longName": "CredentialsService",
          "fullName": "keyapis.omnichat.v1.CredentialsService",
          "description": "Сервис для авторизации в омничате",
          "methods": [
            {
              "name": "PostCredentials",
              "description": "Метод получение реквизитов для авторизации в Omnichat.\nМетод доступен для: master, employee, owner",
              "requestType": "PostCredentialsRequest",
              "requestLongType": "PostCredentialsRequest",
              "requestFullType": "keyapis.omnichat.v1.PostCredentialsRequest",
              "requestStreaming": false,
              "responseType": "PostCredentialsResponse",
              "responseLongType": "PostCredentialsResponse",
              "responseFullType": "keyapis.omnichat.v1.PostCredentialsResponse",
              "responseStreaming": false,
              "options": {
                "google.api.http": {
                  "rules": [
                    {
                      "method": "POST",
                      "pattern": "/omnichat/api/v1/credentials",
                      "body": "*"
                    }
                  ]
                }
              }
            }
          ]
        }
      ],
      "syntax": "proto3"
    }
  ],
  "scalarValueTypes": [
    {
      "protoType": "double",
      "notes": "",
      "cppType": "double",
      "csType": "double",
      "goType": "float64",
      "javaType": "double",
      "phpType": "float",
      "pythonType": "float",
      "rubyType": "Float"
    },
    {
      "protoType": "float",
      "notes": "",
      "cppType": "float",
      "csType": "float",
      "goType": "float32",
      "javaType": "float",
      "phpType": "float",
      "pythonType": "float",
      "rubyType": "Float"
    },
    {
      "protoType": "int32",
      "notes": "Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "int64",
      "notes": "Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "uint32",
      "notes": "Uses variable-length encoding.",
      "cppType": "uint32",
      "csType": "uint",
      "goType": "uint32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int/long",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "uint64",
      "notes": "Uses variable-length encoding.",
      "cppType": "uint64",
      "csType": "ulong",
      "goType": "uint64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sint32",
      "notes": "Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sint64",
      "notes": "Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "fixed32",
      "notes": "Always four bytes. More efficient than uint32 if values are often greater than 2^28.",
      "cppType": "uint32",
      "csType": "uint",
      "goType": "uint32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "fixed64",
      "notes": "Always eight bytes. More efficient than uint64 if values are often greater than 2^56.",
      "cppType": "uint64",
      "csType": "ulong",
      "goType": "uint64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "sfixed32",
      "notes": "Always four bytes.",
      "cppType": "int32",
      "csType": "int",
      "goType": "int32",
      "javaType": "int",
      "phpType": "integer",
      "pythonType": "int",
      "rubyType": "Bignum or Fixnum (as required)"
    },
    {
      "protoType": "sfixed64",
      "notes": "Always eight bytes.",
      "cppType": "int64",
      "csType": "long",
      "goType": "int64",
      "javaType": "long",
      "phpType": "integer/string",
      "pythonType": "int/long",
      "rubyType": "Bignum"
    },
    {
      "protoType": "bool",
      "notes": "",
      "cppType": "bool",
      "csType": "bool",
      "goType": "bool",
      "javaType": "boolean",
      "phpType": "boolean",
      "pythonType": "boolean",
      "rubyType": "TrueClass/FalseClass"
    },
    {
      "protoType": "string",
      "notes": "A string must always contain UTF-8 encoded or 7-bit ASCII text.",
      "cppType": "string",
      "csType": "string",
      "goType": "string",
      "javaType": "String",
      "phpType": "string",
      "pythonType": "str/unicode",
      "rubyType": "String (UTF-8)"
    },
    {
      "protoType": "bytes",
      "notes": "May contain any arbitrary sequence of bytes.",
      "cppType": "string",
      "csType": "ByteString",
      "goType": "[]byte",
      "javaType": "ByteString",
      "phpType": "string",
      "pythonType": "str",
      "rubyType": "String (ASCII-8BIT)"
    }
  ]
}