138 lines
4.1 KiB
Plaintext
138 lines
4.1 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: // TODO: add title
|
|
desc: // TODO: add description
|
|
author: ""
|
|
email: ""
|
|
)
|
|
|
|
import "basic.api"
|
|
|
|
service info {
|
|
@handler InfoHandler
|
|
post /api/info/user(UserInfoRequest) returns (response);
|
|
|
|
@handler UserGetProfileHandler
|
|
post /api/info/user/profile(QueryProfileRequest) returns (response);
|
|
|
|
@handler UpdateProfileBaseHandler
|
|
post /api/info/user/profile/base/update(ProfileRequest) returns (response);
|
|
|
|
@handler AddressDefaultHandler
|
|
post /api/info/address/default(AddressDefaultRequest) returns (response);
|
|
|
|
@handler AddressAddHandler
|
|
post /api/info/address/add(AddressRequest) returns (response);
|
|
|
|
@handler AddressUpdateHandler
|
|
post /api/info/address/update(AddressRequest) returns (response);
|
|
|
|
@handler AddressUsedUpdateHandler
|
|
post /api/info/address/update/used(AddressIdRequest) returns (response);
|
|
|
|
@handler AddressDeleteHandler
|
|
post /api/info/address/delete(AddressIdRequest) returns (response);
|
|
|
|
@handler AddressListHandler
|
|
get /api/info/address/list(request) returns (response);
|
|
|
|
@handler RestaurantListHandler
|
|
get /api/info/restaurant/list(request) returns (response);
|
|
|
|
// 搜索建议
|
|
@handler PreLogoSearchSuggestionsHandler
|
|
post /api/info/prelogo/search/suggestions(PreLogoSearchSuggestionsRequest) returns (response);
|
|
|
|
// 搜索
|
|
@handler PreLogoSearchHandler
|
|
post /api/info/prelogo/search(PreLogoSearchRequest) returns (response);
|
|
|
|
@handler ContactUsHandler
|
|
post /api/info/contact/us(ContactUsRequest) returns (response);
|
|
}
|
|
|
|
type (
|
|
ContactUsRequest {
|
|
Name string `json:"name"`
|
|
Email string `json:"email"`
|
|
Phone string `json:"phone"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
PreLogoSearchSuggestionsRequest {
|
|
Keywords string `json:"keywords"` // 关键字
|
|
}
|
|
|
|
PreLogoSearchRequest {
|
|
ZipCode string `json:"zip_code"` // 邮编
|
|
Keywords string `json:"keywords"` // 关键字
|
|
}
|
|
|
|
UserInfoRequest {
|
|
Module []string `json:"module"`
|
|
}
|
|
|
|
AddressObjectRequest {
|
|
AddressId int64 `json:"address_id"` // 地址id
|
|
AddressName string `json:"address_name"` // 地址
|
|
}
|
|
|
|
AddressIdRequest {
|
|
AddressId int64 `json:"address_id"` // 地址id
|
|
}
|
|
|
|
AddressDefaultRequest {
|
|
AddressId int64 `json:"address_id"` // 地址id
|
|
IsDefault int64 `json:"is_default"` // 是否默认
|
|
}
|
|
|
|
AddressRequest {
|
|
AddressId int64 `json:"address_id,optional"`
|
|
IsDefault int64 `json:"is_default"` //是否默认
|
|
FirstName string `json:"first_name"` //first_name
|
|
LastName string `json:"last_name"` //last_name
|
|
Mobile string `json:"mobile"` //手机
|
|
ZipCode string `json:"zip_code"` //邮编
|
|
Street string `json:"street"` //街道
|
|
Suite string `json:"suite"` //房号
|
|
City string `json:"city"` //城市
|
|
State string `json:"state"` //州
|
|
}
|
|
|
|
ProfileRequest {
|
|
ProfileBase *ProfileBase `json:"base,optional,omitempty"` // 基础的个人消息, 姓名 公司等
|
|
SubscriptionStatus *SubscriptionStatus `json:"sub_status,optional,omitempty"` // 订阅的通知状态
|
|
|
|
}
|
|
|
|
ProfileBase {
|
|
FirstName *string `json:"first_name,optional,omitempty"` // 首名
|
|
LastName *string `json:"last_name,optional,omitempty"` // 后名
|
|
// UserName *string `json:"user_name,optional,omitempty"` // 用户名
|
|
Email *string `json:"email,optional,omitempty"` // email
|
|
Mobile *string `json:"mobile,optional,omitempty"` // 电话
|
|
Resetaurant *string `json:"resetaurant,optional,omitempty"` // 不知道干什么
|
|
Company *string `json:"company,optional,omitempty"` // 公司
|
|
|
|
}
|
|
|
|
SubscriptionStatus {
|
|
NotificationEmail NotificationEmail `json:"notification_email,optional,omitempty"`
|
|
NotificationPhone NotificationPhone `json:"notification_phone,optional,omitempty"`
|
|
} // 订阅的通知状态
|
|
|
|
NotificationEmail {
|
|
OrderUpdate bool `json:"order_update,optional,omitempty"`
|
|
Newseleter bool `json:"newseleter,optional,omitempty"`
|
|
} // 邮件通知设置
|
|
|
|
NotificationPhone {
|
|
OrderUpdate bool `json:"order_update,optional,omitempty"`
|
|
Newseleter bool `json:"newseleter,optional,omitempty"`
|
|
} // 电话通知设置
|
|
|
|
QueryProfileRequest {
|
|
TopKey string `json:"top_key"` // 首名
|
|
}
|
|
) |