Protocol Documentation

Table of Contents

cash.proto

Top

CashLogItem

FieldTypeLabelDescription
date_created string

created_by string

amount int32

kind string

GetBalanceRequest

GetBalanceResponse

ListRequest

FieldTypeLabelDescription
from string

till string

ListResponse

FieldTypeLabelDescription
log CashLogItem repeated

PurchaseRequest

PurchaseResponse

TransactionRequest

FieldTypeLabelDescription
created_by string

amount int32

TransactionResponse

Cash

Method NameRequest TypeResponse TypeDescription
Purchase PurchaseRequest PurchaseResponse

Transaction TransactionRequest TransactionResponse

List ListRequest ListResponse

GetBalance GetBalanceRequest GetBalanceResponse

customer.proto

Top

AddUserRequest

FieldTypeLabelDescription
customer_id string

user_id string

AddUserResponse

FieldTypeLabelDescription
customer CustomerObj

Address

FieldTypeLabelDescription
zip string

location string

address string

CreateNewRequest

FieldTypeLabelDescription
name string

email string

phone string

tax_number string

zip string

location string

address string

created_by string

CreateNewResponse

FieldTypeLabelDescription
customer CustomerObj

CustomerObj

FieldTypeLabelDescription
id string

name string

email string

phone string

tax_number string

address Address

has_user bool

users string repeated

date_created string

created_by string

next = 11;;

CustomerUpdateObj

FieldTypeLabelDescription
id string

name string

address Address

email string

phone string

tax_number string

GetAllResponse

FieldTypeLabelDescription
customers CustomerObj repeated

GetByIdRequest

FieldTypeLabelDescription
customer_id string

GetByIdResponse

FieldTypeLabelDescription
customer CustomerObj

RemoveUserRequest

FieldTypeLabelDescription
customer_id string

user_id string

RemoveUserResponse

FieldTypeLabelDescription
customer CustomerObj

UpdateByIdRequest

FieldTypeLabelDescription
customer_id string

customer CustomerUpdateObj

UpdateByIdResponse

FieldTypeLabelDescription
customer CustomerObj

Customer

Method NameRequest TypeResponse TypeDescription
CreateNew CreateNewRequest CreateNewResponse

GetAll .google.protobuf.Empty GetAllResponse

GetById GetByIdRequest GetByIdResponse

UpdateById UpdateByIdRequest UpdateByIdResponse

AddUser AddUserRequest AddUserResponse

RemoveUser RemoveUserRequest RemoveUserResponse

email.proto

Top

EmailRequest

FieldTypeLabelDescription
to string

subject string

body string

Email

Method NameRequest TypeResponse TypeDescription
SendEmail EmailRequest .google.protobuf.Empty

prelude.proto

Top

DateTime

FieldTypeLabelDescription
rfc_3399 string

FloatValue

FieldTypeLabelDescription
value float

UserId

FieldTypeLabelDescription
userid string

product.proto

Top

CreateNewRequest

FieldTypeLabelDescription
name string

quantity string

unit string

created_by string

CreateNewResponse

FieldTypeLabelDescription
product ProductObj

GetAllResponse

FieldTypeLabelDescription
products ProductObj repeated

GetByIdRequest

FieldTypeLabelDescription
sku string

GetByIdResponse

FieldTypeLabelDescription
product ProductObj

IsSkuRequest

FieldTypeLabelDescription
sku string

IsSkuResponse

FieldTypeLabelDescription
sku_exist bool

ProductObj

FieldTypeLabelDescription
sku string

name string

quantity string

unit string

impl Into<String> for Unit {} & from_str()

created_by string

Maybe UserId? And impl From<..> for it?

created_at string

ProductUpdateObj

FieldTypeLabelDescription
sku string

name string

quantity string

unit string

SKU

FieldTypeLabelDescription
sku string

UpdateByIdRequest

FieldTypeLabelDescription
product ProductUpdateObj

UpdateByIdResponse

FieldTypeLabelDescription
product ProductObj

Product Object After an update call, it will return the updated object for validation

Product

Product Service

All the methods related to manage Product

Method NameRequest TypeResponse TypeDescription
CreateNew CreateNewRequest CreateNewResponse

GetAll .google.protobuf.Empty GetAllResponse

GetById GetByIdRequest GetByIdResponse

UpdateById UpdateByIdRequest UpdateByIdResponse

isSku IsSkuRequest IsSkuResponse

source.proto

Top

PriceHistory

FieldTypeLabelDescription
sku string

items PriceHistoryItem repeated

next:

PriceHistoryItem

FieldTypeLabelDescription
date string

created_by string

net_wholesale_price uint32

comment string

kind string

next:

Todo

Source

Method NameRequest TypeResponse TypeDescription
NewSource Todo Todo

Create new source

GetSourceById Todo Todo

Get source by id

GetAllSources Todo Todo

Get list of sources

UpdateSourceById Todo Todo stream

Update source by id

AddNewSkuToSource Todo Todo

Add new sku to source

GetPriceBySku Todo Todo

Get price by SKU

GetPriceHistoryBySku Todo Todo

Get price history by SKU

upl.proto

Top

CreateNewRequest

FieldTypeLabelDescription
id uint32

sku string

..

created_by string

date_created string

CreateNewResponse

FieldTypeLabelDescription
upl Upl

GetUplRequest

FieldTypeLabelDescription
upl_id uint32

GetUplResponse

FieldTypeLabelDescription
upl Upl

MoveRequest

FieldTypeLabelDescription
from_type string

e.g. stock

from_id string

e.g. 324324

to_type string

e.g. cart

to_id string

e.g. 4367

MoveResponse

FieldTypeLabelDescription
todo string

todo2 string

Upl

FieldTypeLabelDescription
id uint64

sku string

location_history UplHistoryItem repeated

...

created_by string

date_created string

UplByPlaceRequest

UplHistoryItem

FieldTypeLabelDescription
location string

id string

date_created string

created_by string

UplStore

Method NameRequest TypeResponse TypeDescription
CreateNew CreateNewRequest CreateNewResponse

GetById GetUplRequest GetUplResponse

Move MoveRequest MoveResponse

GetByPlace UplByPlaceRequest Upl stream

user.proto

Top

AllUserRequest

CreateNewRequest

FieldTypeLabelDescription
id string

email string

name string

phone string

created_by string

CreateNewResponse

FieldTypeLabelDescription
user UserObj

GetAllResponse

FieldTypeLabelDescription
users UserObj repeated

GetByIdRequest

FieldTypeLabelDescription
userid string

GetByIdResponse

FieldTypeLabelDescription
user UserObj

IsUserRequest

FieldTypeLabelDescription
userid string

IsUserResponse

FieldTypeLabelDescription
user_exist bool

LoginRequest

FieldTypeLabelDescription
username string

password string

LoginResponse

FieldTypeLabelDescription
is_valid bool

user UserObj

NewPasswordRequest

FieldTypeLabelDescription
userid string

new_password string

NewPasswordResponse

ResetPasswordRequest

FieldTypeLabelDescription
email string

ResetPasswordResponse

UpdateByIdRequest

FieldTypeLabelDescription
user UserObj

UpdateByIdResponse

FieldTypeLabelDescription
user UserObj

UserObj

FieldTypeLabelDescription
id string

name string

email string

phone string

customers string repeated

This will be Vec<String>

created_by string

created_at string

maybe datetime type?

User

Method NameRequest TypeResponse TypeDescription
CreateNew CreateNewRequest CreateNewResponse

CreateNewUser CreateNewRequest -> CreateNewResponse

GetAll .google.protobuf.Empty UserObj stream

Get all users AllUserRequest -> GerAllResponse

GetById GetByIdRequest GetByIdResponse

Get User By Id GetByIdRequest -> UserByIdResponse

UpdateById UpdateByIdRequest UpdateByIdResponse

Update User By ID UpdateByIdRequest -> UpdateUserReply

IsUser IsUserRequest IsUserResponse

rpc CheckUserExist(google.protobuf.Empty) returns (google.protobuf.Empty);

ResetPassword ResetPasswordRequest ResetPasswordResponse

ResetPassword -> Email::send(!)

SetNewPassword NewPasswordRequest NewPasswordResponse

Set new password

ValidateLogin LoginRequest LoginResponse

Validate login request

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)