syntax = "proto2";

package maps_adv.geosmb.tuner.proto.permissions;


enum PermissionFlag {
    READ_REQUESTS = 1;
}

message Permission {
    required uint64 biz_id = 1;
    required uint64 passport_uid = 2;
    repeated PermissionFlag flags = 10;
}

message FetchPermissionsInput {
    required uint64 biz_id = 1;
}

message FetchPermissionsOutput {
    repeated Permission permissions = 1;
}

message CheckPermissionInput {
    required uint64 biz_id = 1;
    required uint64 passport_uid = 2;
    required PermissionFlag flag = 3;
}

message CheckPermissionOutput {
    required bool has_permission = 1;
}

message UpdatePermissionInput {
    required uint64 biz_id = 1;
    required uint64 passport_uid = 2;
    repeated PermissionFlag flags = 10;
}

message UpdatePermissionOutput {
    required uint64 biz_id = 1;
    required uint64 passport_uid = 2;
    repeated PermissionFlag flags = 10;
}
