From b7015496e5f2b2a142ede584257b83a6b938b7a1 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 11 Jun 2026 13:31:26 +0200 Subject: [PATCH] Start migrating to connect-web Signed-off-by: Nikolai Rodionov --- README.md | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++- buf.gen.yaml | 11 +++- 2 files changed, 172 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bceed27..bd3b637 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,26 @@ - [accounts/v1/accounts_v1.proto](#accounts_v1_accounts_v1-proto) - [AccountData](#accounts-v1-AccountData) - [AccountPassword](#accounts-v1-AccountPassword) + - [IsEmailUsedRequest](#accounts-v1-IsEmailUsedRequest) + - [IsEmailUsedResponse](#accounts-v1-IsEmailUsedResponse) - [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest) - [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse) - [NewPasswordRequest](#accounts-v1-NewPasswordRequest) - [PersonalData](#accounts-v1-PersonalData) + - [RefreshSessionRequest](#accounts-v1-RefreshSessionRequest) + - [RefreshSessionResponse](#accounts-v1-RefreshSessionResponse) - [RefreshTokenRequest](#accounts-v1-RefreshTokenRequest) + - [RemoveSessionRequest](#accounts-v1-RemoveSessionRequest) - [ResetPasswordRequest](#accounts-v1-ResetPasswordRequest) - [SignInRequest](#accounts-v1-SignInRequest) + - [SignInResponse](#accounts-v1-SignInResponse) - [SignUpRequest](#accounts-v1-SignUpRequest) + - [SignUpResponse](#accounts-v1-SignUpResponse) + - [TokenPair](#accounts-v1-TokenPair) - [AccountsService](#accounts-v1-AccountsService) - [PublicAccountsService](#accounts-v1-PublicAccountsService) + - [RefreshSessionService](#accounts-v1-RefreshSessionService) - [projects/v1/projects_v1.proto](#projects_v1_projects_v1-proto) - [CreateProjectRequest](#projects-v1-CreateProjectRequest) @@ -106,6 +115,36 @@ Protobuf definitions for the accounts service. + + +### IsEmailUsedRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| email | [string](#string) | | | + + + + + + + + +### IsEmailUsedResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| used | [bool](#bool) | | | + + + + + + ### IsEmailVerifiedRequest @@ -169,6 +208,36 @@ Protobuf definitions for the accounts service. + + +### RefreshSessionRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| refresh_token | [string](#string) | | | + + + + + + + + +### RefreshSessionResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| token_pair | [TokenPair](#accounts-v1-TokenPair) | | | + + + + + + ### RefreshTokenRequest @@ -184,6 +253,21 @@ Protobuf definitions for the accounts service. + + +### RemoveSessionRequest + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| refresh_token | [string](#string) | | | + + + + + + ### ResetPasswordRequest @@ -215,6 +299,21 @@ Protobuf definitions for the accounts service. + + +### SignInResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| token_pair | [TokenPair](#accounts-v1-TokenPair) | | | + + + + + + ### SignUpRequest @@ -231,6 +330,37 @@ Protobuf definitions for the accounts service. + + + +### SignUpResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| token_pair | [TokenPair](#accounts-v1-TokenPair) | | | + + + + + + + + +### TokenPair + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| access_token | [string](#string) | | | +| refresh_token | [string](#string) | | | + + + + + @@ -246,8 +376,8 @@ Protobuf definitions for the accounts service. | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| | IsEmailVerified | [IsEmailVerifiedRequest](#accounts-v1-IsEmailVerifiedRequest) | [IsEmailVerifiedResponse](#accounts-v1-IsEmailVerifiedResponse) | Is email for the current account verified | -| RefreshSession | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | | | TokenAuthorization | [.google.protobuf.Empty](#google-protobuf-Empty) | [.google.protobuf.Empty](#google-protobuf-Empty) | Authorize using long living tokens | +| RemoveSession | [RemoveSessionRequest](#accounts-v1-RemoveSessionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Remove a session that is associated with a refresh token, should be used for logging out | @@ -257,8 +387,19 @@ Service for handling accounts that do not require authentication | Method Name | Request Type | Response Type | Description | | ----------- | ------------ | ------------- | ------------| -| SignIn | [SignInRequest](#accounts-v1-SignInRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Sing in into an existing account | -| SignUp | [SignUpRequest](#accounts-v1-SignUpRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | Create a new account | +| SignIn | [SignInRequest](#accounts-v1-SignInRequest) | [SignInResponse](#accounts-v1-SignInResponse) | Sing in into an existing account | +| SignUp | [SignUpRequest](#accounts-v1-SignUpRequest) | [SignUpResponse](#accounts-v1-SignUpResponse) | Create a new account | +| IsEmailUsed | [IsEmailUsedRequest](#accounts-v1-IsEmailUsedRequest) | [IsEmailUsedResponse](#accounts-v1-IsEmailUsedResponse) | Check whether a email is already in use | + + + + +### RefreshSessionService +Use as a separate service to make it easier to avoid interceptors on the client + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| RefreshSession | [RefreshSessionRequest](#accounts-v1-RefreshSessionRequest) | [RefreshSessionResponse](#accounts-v1-RefreshSessionResponse) | | @@ -274,8 +415,15 @@ Protobuf definitions for the accounts service. ### CreateProjectRequest +Create a new project +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| slug | [string](#string) | | | +| name | [string](#string) | | | +| description | [string](#string) | | | + @@ -287,6 +435,11 @@ Protobuf definitions for the accounts service. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | + + @@ -327,6 +480,13 @@ Protobuf definitions for the accounts service. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| id | [string](#string) | | | +| slug | [string](#string) | | | +| name | [string](#string) | | | + + diff --git a/buf.gen.yaml b/buf.gen.yaml index 62b5a22..127c30e 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -9,6 +9,10 @@ plugins: out: gen/go opt: - paths=source_relative + - remote: buf.build/connectrpc/go + out: gen/go + opt: + - paths=source_relative - remote: buf.build/grpc/go out: gen/go @@ -16,12 +20,15 @@ plugins: - paths=source_relative - require_unimplemented_servers=false - - remote: buf.build/community/pseudomuto-doc:v1.5.1 + - remote: buf.build/community/pseudomuto-doc out: . opt: - markdown,README.md - - remote: buf.build/protocolbuffers/dart:v25.0.0 + - remote: buf.build/connectrpc/dart:v1.0.0 + out: gen/dart/lib + + - remote: buf.build/protocolbuffers/dart:v22.4.0 out: gen/dart/lib opt: - grpc