2023-08-31 08:17:32 +00:00
|
|
|
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);
|
2023-09-26 02:45:53 +00:00
|
|
|
|
2023-09-26 09:16:10 +00:00
|
|
|
@handler UserGetProfileHandler
|
2023-09-26 09:20:44 +00:00
|
|
|
post /api/info/user/profile(QueryProfileRequest) returns (response);
|
2023-09-26 09:16:10 +00:00
|
|
|
|
2023-09-26 09:45:07 +00:00
|
|
|
@handler UpdateProfileBaseHandler
|
2023-09-26 09:57:54 +00:00
|
|
|
post /api/info/user/profile/base/update(ProfileBaseRequest) returns (response);
|
2023-09-26 07:02:09 +00:00
|
|
|
|
2023-09-25 07:58:33 +00:00
|
|
|
@handler AddressDefaultHandler
|
|
|
|
post /api/info/address/default(AddressIdRequest) returns (response);
|
2023-09-26 02:45:53 +00:00
|
|
|
|
2023-09-25 07:58:33 +00:00
|
|
|
@handler AddressAddHandler
|
2023-09-26 04:08:51 +00:00
|
|
|
post /api/info/address/add(AddressRequest) returns (response);
|
2023-09-26 02:45:53 +00:00
|
|
|
|
2023-09-25 07:58:33 +00:00
|
|
|
@handler AddressUpdateHandler
|
2023-09-26 04:24:09 +00:00
|
|
|
post /api/info/address/update(AddressRequest) returns (response);
|
2023-09-26 02:45:53 +00:00
|
|
|
|
2023-09-25 07:58:33 +00:00
|
|
|
@handler AddressDeleteHandler
|
|
|
|
post /api/info/address/delete(AddressIdRequest) returns (response);
|
2023-09-26 02:45:53 +00:00
|
|
|
|
|
|
|
@handler AddressListHandler
|
|
|
|
get /api/info/address/list(request) returns (response);
|
2023-08-31 08:17:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type (
|
|
|
|
UserInfoRequest {
|
|
|
|
Module []string `json:"module"`
|
|
|
|
}
|
2023-09-25 07:58:33 +00:00
|
|
|
|
|
|
|
AddressObjectRequest {
|
2023-09-25 10:42:45 +00:00
|
|
|
AddressId int64 `json:"address_id"` // 地址id
|
|
|
|
AddressName string `json:"address_name"` // 地址
|
2023-09-25 07:58:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
AddressIdRequest {
|
|
|
|
AddressId int64 `json:"address_id"` // 地址id
|
|
|
|
}
|
|
|
|
|
|
|
|
AddressNameRequest {
|
2023-09-25 08:01:28 +00:00
|
|
|
AddressName string `json:"address_name"` // 地址
|
2023-09-25 07:58:33 +00:00
|
|
|
}
|
2023-09-25 10:42:45 +00:00
|
|
|
|
|
|
|
AddressRequest {
|
2023-09-26 04:08:51 +00:00
|
|
|
AddressId int64 `json:"address_id,optional"`
|
2023-09-25 10:42:45 +00:00
|
|
|
IsDefault int64 `json:"is_default"` //是否默认
|
|
|
|
AddressName string `json:"address_name"` //收货人
|
|
|
|
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"` //州
|
|
|
|
}
|
2023-09-26 07:02:09 +00:00
|
|
|
|
2023-09-26 09:45:07 +00:00
|
|
|
ProfileBaseRequest {
|
2023-09-26 07:02:09 +00:00
|
|
|
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"` // 公司
|
|
|
|
}
|
2023-09-26 09:16:10 +00:00
|
|
|
|
|
|
|
QueryProfileRequest {
|
|
|
|
TopKey string `json:"top_key"` // 首名
|
|
|
|
}
|
2023-08-31 08:17:32 +00:00
|
|
|
)
|