2023-12-28 23:45:50 +00:00
|
|
|
// Copyright (C) 2023 The Licensing Authors
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2023-12-28 22:50:20 +00:00
|
|
|
//
|
|
|
|
// This file attempts to follow common styles and design patterns described by
|
|
|
|
// Google Cloud based on their extensive use of protocol buffers.
|
|
|
|
//
|
|
|
|
// - See here for more: https://cloud.google.com/apis/design/design_patterns
|
|
|
|
//
|
2023-12-28 23:45:50 +00:00
|
|
|
|
2023-12-28 22:50:20 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2023-12-28 23:45:50 +00:00
|
|
|
package users.v1;
|
2023-12-28 22:50:20 +00:00
|
|
|
|
2023-12-29 20:01:47 +00:00
|
|
|
import "google/api/annotations.proto";
|
|
|
|
|
2023-12-31 19:41:06 +00:00
|
|
|
message SignupRequest {
|
|
|
|
string email = 1;
|
|
|
|
string password = 2;
|
|
|
|
}
|
|
|
|
|
2023-12-28 22:50:20 +00:00
|
|
|
message SignupResponse {}
|
|
|
|
|
2023-12-28 22:55:41 +00:00
|
|
|
message CurrentRequest {}
|
2023-12-31 19:41:06 +00:00
|
|
|
|
2024-01-01 22:05:13 +00:00
|
|
|
message CurrentResponse {
|
|
|
|
string subject = 1;
|
|
|
|
string name = 2;
|
|
|
|
string given_name = 3;
|
|
|
|
string family_name = 4;
|
|
|
|
string middle_name = 5;
|
|
|
|
string nickname = 6;
|
|
|
|
string preferred_username = 7;
|
|
|
|
string profile = 8;
|
|
|
|
string picture = 9;
|
|
|
|
string website = 10;
|
|
|
|
string email = 11;
|
|
|
|
bool email_verified = 12;
|
|
|
|
string gender = 13;
|
|
|
|
string birthdate = 14;
|
|
|
|
string zoneinfo = 15;
|
|
|
|
string locale = 16;
|
|
|
|
string phone_number = 17;
|
|
|
|
bool phone_number_verified = 18;
|
|
|
|
int32 updated_at = 19;
|
|
|
|
}
|
2023-12-28 22:50:20 +00:00
|
|
|
|
|
|
|
service UserService {
|
2023-12-29 20:01:47 +00:00
|
|
|
rpc Signup(SignupRequest) returns (SignupResponse) {
|
|
|
|
option (google.api.http) = {
|
|
|
|
post: "/v1/users"
|
|
|
|
body: "*"
|
|
|
|
};
|
2024-01-01 22:05:13 +00:00
|
|
|
}
|
2023-12-29 20:01:47 +00:00
|
|
|
|
|
|
|
rpc Current(CurrentRequest) returns (CurrentResponse) {
|
2024-01-01 22:05:13 +00:00
|
|
|
option (google.api.http) = {get: "/v1/users/current"};
|
|
|
|
}
|
|
|
|
}
|