fusenapi/server_api/info.api
2023-09-26 10:45:53 +08:00

63 lines
1.6 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 AddressDefaultHandler
post /api/info/address/default(AddressIdRequest) returns (response);
@handler AddressAddHandler
post /api/info/address/add(AddressNameRequest) returns (response);
@handler AddressUpdateHandler
post /api/info/address/update(AddressObjectRequest) 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
}
AddressNameRequest {
AddressName string `json:"address_name"` // 地址
}
AddressRequest {
AddressId int64 `json:"address_id,omitempty"`
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"` //州
}
)