Protocol Documentation

Table of Contents

etu.proto

Top

ApiKey

API Key message

FieldTypeLabelDescription
id string

name string

key_prefix string

created_at google.protobuf.Timestamp

last_used google.protobuf.Timestamp optional

AudioUpload

AudioUpload message for uploading audio files (client -> server)

FieldTypeLabelDescription
data bytes

mime_type string

AuthenticateRequest

FieldTypeLabelDescription
email string

password string

AuthenticateResponse

FieldTypeLabelDescription
success bool

user User optional

CreateApiKeyRequest

FieldTypeLabelDescription
user_id string

name string

CreateApiKeyResponse

FieldTypeLabelDescription
api_key ApiKey

raw_key string

CreateNoteRequest

FieldTypeLabelDescription
user_id string

Required for auth context

content string

tags string repeated

images ImageUpload repeated

audios AudioUpload repeated

CreateNoteResponse

FieldTypeLabelDescription
note Note

DeleteApiKeyRequest

FieldTypeLabelDescription
user_id string

key_id string

DeleteApiKeyResponse

FieldTypeLabelDescription
success bool

DeleteNoteRequest

FieldTypeLabelDescription
user_id string

Required for auth context

id string

DeleteNoteResponse

FieldTypeLabelDescription
success bool

GetNoteRequest

FieldTypeLabelDescription
user_id string

Required for auth context

id string

GetNoteResponse

FieldTypeLabelDescription
note Note

GetRandomNotesRequest

FieldTypeLabelDescription
user_id string

Required for auth context

count int32

Number of random notes to return (default: 5)

GetRandomNotesResponse

FieldTypeLabelDescription
notes Note repeated

GetUserByStripeCustomerIdRequest

FieldTypeLabelDescription
stripe_customer_id string

GetUserByStripeCustomerIdResponse

FieldTypeLabelDescription
user User optional

GetUserRequest

FieldTypeLabelDescription
user_id string

GetUserResponse

FieldTypeLabelDescription
user User

GetUserSettingsRequest

FieldTypeLabelDescription
user_id string

GetUserSettingsResponse

FieldTypeLabelDescription
user User

ImageUpload

ImageUpload message for uploading images (client -> server)

FieldTypeLabelDescription
data bytes

mime_type string

ListApiKeysRequest

FieldTypeLabelDescription
user_id string

ListApiKeysResponse

FieldTypeLabelDescription
api_keys ApiKey repeated

ListNotesRequest

FieldTypeLabelDescription
user_id string

Required for auth context

search string

tags string repeated

start_date string

ISO 8601 format

end_date string

ISO 8601 format

limit int32

offset int32

ListNotesResponse

FieldTypeLabelDescription
notes Note repeated

total int32

limit int32

offset int32

ListTagsRequest

FieldTypeLabelDescription
user_id string

Required for auth context

ListTagsResponse

FieldTypeLabelDescription
tags Tag repeated

Note

Note message

FieldTypeLabelDescription
id string

content string

tags string repeated

created_at google.protobuf.Timestamp

updated_at google.protobuf.Timestamp

images NoteImage repeated

audios NoteAudio repeated

NoteAudio

NoteAudio message for audio files attached to notes (server -> client)

FieldTypeLabelDescription
id string

url string

transcribed_text string

mime_type string

created_at google.protobuf.Timestamp

NoteImage

NoteImage message for images attached to notes (server -> client)

FieldTypeLabelDescription
id string

url string

extracted_text string

mime_type string

created_at google.protobuf.Timestamp

RegisterRequest

FieldTypeLabelDescription
email string

password string

RegisterResponse

FieldTypeLabelDescription
user User

Tag

Tag message

FieldTypeLabelDescription
id string

name string

count int32

created_at google.protobuf.Timestamp

UpdateNoteRequest

FieldTypeLabelDescription
user_id string

Required for auth context

id string

content string optional

tags string repeated

update_tags bool

Flag to indicate if tags should be updated

add_images ImageUpload repeated

add_audios AudioUpload repeated

UpdateNoteResponse

FieldTypeLabelDescription
note Note

UpdateUserSettingsRequest

FieldTypeLabelDescription
user_id string

notion_key string optional

name string optional

image string optional

password string optional

UpdateUserSettingsResponse

FieldTypeLabelDescription
user User

UpdateUserSubscriptionRequest

FieldTypeLabelDescription
user_id string

subscription_status string

stripe_customer_id string optional

subscription_end google.protobuf.Timestamp optional

UpdateUserSubscriptionResponse

FieldTypeLabelDescription
user User

User

User message

FieldTypeLabelDescription
id string

email string

name string optional

image string optional

subscription_status string

subscription_end google.protobuf.Timestamp optional

created_at google.protobuf.Timestamp

stripe_customer_id string optional

notion_key string optional

updated_at google.protobuf.Timestamp

VerifyApiKeyRequest

FieldTypeLabelDescription
raw_key string

VerifyApiKeyResponse

FieldTypeLabelDescription
valid bool

user_id string optional

ApiKeysService

Method NameRequest TypeResponse TypeDescription
CreateApiKey CreateApiKeyRequest CreateApiKeyResponse

ListApiKeys ListApiKeysRequest ListApiKeysResponse

DeleteApiKey DeleteApiKeyRequest DeleteApiKeyResponse

VerifyApiKey VerifyApiKeyRequest VerifyApiKeyResponse

AuthService

Method NameRequest TypeResponse TypeDescription
Register RegisterRequest RegisterResponse

Authenticate AuthenticateRequest AuthenticateResponse

GetUser GetUserRequest GetUserResponse

GetUserByStripeCustomerId GetUserByStripeCustomerIdRequest GetUserByStripeCustomerIdResponse

UpdateUserSubscription UpdateUserSubscriptionRequest UpdateUserSubscriptionResponse

NotesService

Method NameRequest TypeResponse TypeDescription
ListNotes ListNotesRequest ListNotesResponse

CreateNote CreateNoteRequest CreateNoteResponse

GetNote GetNoteRequest GetNoteResponse

UpdateNote UpdateNoteRequest UpdateNoteResponse

DeleteNote DeleteNoteRequest DeleteNoteResponse

GetRandomNotes GetRandomNotesRequest GetRandomNotesResponse

TagsService

Method NameRequest TypeResponse TypeDescription
ListTags ListTagsRequest ListTagsResponse

UserSettingsService

Method NameRequest TypeResponse TypeDescription
GetUserSettings GetUserSettingsRequest GetUserSettingsResponse

UpdateUserSettings UpdateUserSettingsRequest UpdateUserSettingsResponse

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)