77 lines
2.2 KiB
Plaintext
77 lines
2.2 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(ProfileBaseRequest) returns (response);
|
|
|
|
@handler AddressDefaultHandler
|
|
post /api/info/address/default(AddressIdRequest) returns (response);
|
|
|
|
@handler AddressAddHandler
|
|
post /api/info/address/add(AddressRequest) returns (response);
|
|
|
|
@handler AddressUpdateHandler
|
|
post /api/info/address/update(AddressRequest) returns (response);
|
|
|
|
@handler AddressDeleteHandler
|
|
post /api/info/address/delete(AddressIdRequest) returns (response);
|
|
|
|
@handler AddressListHandler
|
|
get /api/info/address/list(request) returns (response);
|
|
}
|
|
|
|
type (
|
|
UserInfoRequest {
|
|
Module []string `json:"module"`
|
|
}
|
|
|
|
AddressObjectRequest {
|
|
AddressId int64 `json:"address_id"` // 地址id
|
|
AddressName string `json:"address_name"` // 地址
|
|
}
|
|
|
|
AddressIdRequest {
|
|
AddressId int64 `json:"address_id"` // 地址id
|
|
}
|
|
|
|
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"` //州
|
|
}
|
|
|
|
ProfileBaseRequest {
|
|
FirstName *string `json:"first_name,optional,omitempty"` // 首名
|
|
LastName *string `json:"last_name,optional,omitempty"` // 后名
|
|
UserName *string `json:"user_name,optional,omitempty"` // 用户名
|
|
Mobile *string `json:"mobile,optional,omitempty"` // 电话
|
|
Resetaurant *string `json:"resetaurant,optional,omitempty"` // 不知道干什么
|
|
Company *string `json:"company,optional,omitempty"` // 公司
|
|
}
|
|
|
|
QueryProfileRequest {
|
|
TopKey string `json:"top_key"` // 首名
|
|
}
|
|
) |