Skip to content
Snippets Groups Projects
Select Git revision
  • 0c2b3d167430d281e2ffc63708fbe2f6732cdce0
  • master default protected
  • feature/PRXS-3383-CollectionsRankSort
  • feature/3149-LocaleCodeAsID
  • refactor/PRXS-3053-RefactorFiles
  • feature/3146-UpdateItemStorageInterface
  • feature/3180-RemoveOldHugo
  • feature/3264-FixExtracTranslationsArrays
  • feature/3274-ObjectIndexesFixes
  • feature/2931-AllowPartialDecode
  • feature/3055-ItemsRestAPI
  • feature/3082-gitlab-triage
  • feature/3055-LogsRestAPI
  • feature/2985-add-preset-settings
  • feature/2929-MultiInvitationFix
  • feature/2929-MultiInvitation
  • docs/2889-HugoModules
  • docs/2954-CheckResource
  • docs/3012-SplitBuild
  • docs/3024-PerxisWebStatic
  • feature/2911-GetArchive
  • v0.27.0
  • v0.21.0
  • v0.19.0
  • v0.20.0
25 results

notification.proto

Blame
  • notification.proto 1.82 KiB
    syntax = "proto3";
    
    import "google/protobuf/empty.proto";
    import "common/common.proto";
    import "google/protobuf/timestamp.proto";
    
    option go_package = "git.perx.ru/perxis/perxis-go/proto/notifications;notifications";
    
    package notifications;
    
    // Сообщение для уведомления
    message Notification {
      string id = 1; // Уникальный идентификатор уведомления
      string recipients = 2; // Идентификатор пользователя или сервиса получателя
      string title = 3; // Заголовок уведомления
      string message = 4; // Текст уведомления
      google.protobuf.Timestamp created_at = 5; // Время создания
      bool is_read = 6; // Статус прочтения
    }
    
    // Отправить уведомление
    message SendRequest {
      Notification notification = 1;
    }
    
    // Запрос на получение уведомлений
    message FindRequest {
      string recipient = 1;
      common.FindOptions opts = 2;
    }
    
    // Ответ на получение уведомлений
    message FindResponse {
      repeated Notification notifications = 1;
    }
    
    // Пометка уведомлений как прочитанных
    message MarkAsReadRequest {
      string recipient = 1;
      repeated string notification_ids = 2;
    }
    
    // Сервис уведомлений
    service Notifications {
    
      // Отправка уведомления
      rpc Send(SendRequest) returns(google.protobuf.Empty) {};
    
      // Получение уведомлений, поле recipients в Notification всегда содержит только получателя из запроса
      rpc List(FindRequest) returns (FindResponse);
    
      // Пометка уведомлений как прочитанных
      rpc MarkAsRead(MarkAsReadRequest) returns(google.protobuf.Empty) {};
    }