From 73ec057fcddb04e1d650f38283cd831732c12b66 Mon Sep 17 00:00:00 2001 From: mya Date: Mon, 1 Jan 2024 16:05:13 -0600 Subject: [PATCH] feat: add fields to current user response --- swagger.json | 60 ++++++++++++++++++++++++++++++++++++++++++ users/v1/service.proto | 32 +++++++++++++++++----- 2 files changed, 85 insertions(+), 7 deletions(-) diff --git a/swagger.json b/swagger.json index 411baad..a2884b0 100644 --- a/swagger.json +++ b/swagger.json @@ -250,6 +250,66 @@ "type": "object" }, "v1CurrentResponse": { + "properties": { + "birthdate": { + "type": "string" + }, + "email": { + "type": "string" + }, + "emailVerified": { + "type": "boolean" + }, + "familyName": { + "type": "string" + }, + "gender": { + "type": "string" + }, + "givenName": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "middleName": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "phoneNumberVerified": { + "type": "boolean" + }, + "picture": { + "type": "string" + }, + "preferredUsername": { + "type": "string" + }, + "profile": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "updatedAt": { + "format": "int32", + "type": "integer" + }, + "website": { + "type": "string" + }, + "zoneinfo": { + "type": "string" + } + }, "type": "object" }, "v1InviteResponse": { diff --git a/users/v1/service.proto b/users/v1/service.proto index 2aa4156..38f99b0 100644 --- a/users/v1/service.proto +++ b/users/v1/service.proto @@ -23,7 +23,27 @@ message SignupResponse {} message CurrentRequest {} -message CurrentResponse {} +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; +} service UserService { rpc Signup(SignupRequest) returns (SignupResponse) { @@ -31,11 +51,9 @@ service UserService { post: "/v1/users" body: "*" }; - }; + } rpc Current(CurrentRequest) returns (CurrentResponse) { - option (google.api.http) = { - get: "/v1/users/current" - }; - }; -} + option (google.api.http) = {get: "/v1/users/current"}; + } +} \ No newline at end of file