chore: format all frontend files (#430)
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { createAPI as apiFactory } from '@coze-arch/idl2ts-runtime';
|
||||
import { type IMeta } from '@coze-arch/idl2ts-runtime';
|
||||
import { axiosInstance } from '@coze-arch/bot-http';
|
||||
|
||||
@@ -15,32 +15,32 @@
|
||||
*/
|
||||
|
||||
export interface TrafficEnv {
|
||||
Open: boolean,
|
||||
Env: string,
|
||||
Open: boolean;
|
||||
Env: string;
|
||||
}
|
||||
export interface Base {
|
||||
LogID: string,
|
||||
Caller: string,
|
||||
Addr: string,
|
||||
Client: string,
|
||||
TrafficEnv?: TrafficEnv,
|
||||
LogID: string;
|
||||
Caller: string;
|
||||
Addr: string;
|
||||
Client: string;
|
||||
TrafficEnv?: TrafficEnv;
|
||||
Extra?: {
|
||||
[key: string | number]: string
|
||||
},
|
||||
[key: string | number]: string;
|
||||
};
|
||||
}
|
||||
export interface BaseResp {
|
||||
StatusMessage: string,
|
||||
StatusCode: number,
|
||||
StatusMessage: string;
|
||||
StatusCode: number;
|
||||
Extra?: {
|
||||
[key: string | number]: string
|
||||
},
|
||||
[key: string | number]: string;
|
||||
};
|
||||
}
|
||||
export interface EmptyReq {}
|
||||
export interface EmptyData {}
|
||||
export interface EmptyResp {
|
||||
code: number,
|
||||
msg: string,
|
||||
data: EmptyData,
|
||||
code: number;
|
||||
msg: string;
|
||||
data: EmptyData;
|
||||
}
|
||||
export interface EmptyRpcReq {}
|
||||
export interface EmptyRpcResp {}
|
||||
export interface EmptyRpcResp {}
|
||||
|
||||
@@ -74,7 +74,7 @@ export enum ProductPaidType {
|
||||
Paid = 1,
|
||||
}
|
||||
export interface CommercialSetting {
|
||||
commercial_type: ProductPaidType
|
||||
commercial_type: ProductPaidType;
|
||||
}
|
||||
export enum ProductStatus {
|
||||
/** 从未上架 */
|
||||
@@ -84,23 +84,23 @@ export enum ProductStatus {
|
||||
Banned = 3,
|
||||
}
|
||||
export interface UserLabel {
|
||||
label_id: string,
|
||||
label_name: string,
|
||||
icon_uri: string,
|
||||
icon_url: string,
|
||||
jump_link: string,
|
||||
label_id: string;
|
||||
label_name: string;
|
||||
icon_uri: string;
|
||||
icon_url: string;
|
||||
jump_link: string;
|
||||
}
|
||||
export interface UserInfo {
|
||||
user_id: string,
|
||||
user_name: string,
|
||||
name: string,
|
||||
avatar_url: string,
|
||||
user_label?: UserLabel,
|
||||
follow_type?: marketplace_common.FollowType,
|
||||
user_id: string;
|
||||
user_name: string;
|
||||
name: string;
|
||||
avatar_url: string;
|
||||
user_label?: UserLabel;
|
||||
follow_type?: marketplace_common.FollowType;
|
||||
}
|
||||
export interface ImageInfo {
|
||||
uri: string,
|
||||
url: string,
|
||||
uri: string;
|
||||
url: string;
|
||||
}
|
||||
export enum ProductDraftStatus {
|
||||
/** 默认 */
|
||||
@@ -117,7 +117,7 @@ export enum ProductDraftStatus {
|
||||
export type AuditStatus = ProductDraftStatus;
|
||||
export interface OpeningDialog {
|
||||
/** Bot开场白 */
|
||||
content: string
|
||||
content: string;
|
||||
}
|
||||
export enum InputType {
|
||||
String = 1,
|
||||
@@ -163,51 +163,51 @@ export enum UIPreviewType {
|
||||
/**
|
||||
* UI 预览类型,定义对齐 UI Builder,目前用于 Project
|
||||
* 网页端
|
||||
*/
|
||||
*/
|
||||
Web = 1,
|
||||
/** 移动端 */
|
||||
Client = 2,
|
||||
}
|
||||
export interface ChargeSKUExtra {
|
||||
quantity: string,
|
||||
is_self_define: boolean,
|
||||
quantity: string;
|
||||
is_self_define: boolean;
|
||||
}
|
||||
export enum FavoriteListSource {
|
||||
/** 用户自己创建的 */
|
||||
CreatedByMe = 1,
|
||||
}
|
||||
export interface FavoriteEntity {
|
||||
entity_id: string,
|
||||
entity_type: ProductEntityType,
|
||||
name: string,
|
||||
icon_url: string,
|
||||
description: string,
|
||||
entity_id: string;
|
||||
entity_type: ProductEntityType;
|
||||
name: string;
|
||||
icon_url: string;
|
||||
description: string;
|
||||
/** 废弃,使用UserInfo */
|
||||
seller: SellerInfo,
|
||||
seller: SellerInfo;
|
||||
/** 用于跳转到Bot编辑页 */
|
||||
space_id: string,
|
||||
space_id: string;
|
||||
/** 用户是否有该实体所在Space的权限 */
|
||||
has_space_permission: boolean,
|
||||
has_space_permission: boolean;
|
||||
/** 收藏时间 */
|
||||
favorite_at: string,
|
||||
product_extra?: FavoriteProductExtra,
|
||||
user_info: UserInfo,
|
||||
plugin_extra?: FavoritePluginExtra,
|
||||
favorite_at: string;
|
||||
product_extra?: FavoriteProductExtra;
|
||||
user_info: UserInfo;
|
||||
plugin_extra?: FavoritePluginExtra;
|
||||
}
|
||||
export interface SellerInfo {
|
||||
user_id: string,
|
||||
user_name: string,
|
||||
avatar_url: string,
|
||||
user_id: string;
|
||||
user_name: string;
|
||||
avatar_url: string;
|
||||
}
|
||||
export interface FavoriteProductExtra {
|
||||
product_id: string,
|
||||
product_status: ProductStatus,
|
||||
product_id: string;
|
||||
product_status: ProductStatus;
|
||||
}
|
||||
export interface FavoritePluginExtra {
|
||||
tools: PluginTool[]
|
||||
tools: PluginTool[];
|
||||
}
|
||||
export interface PluginTool {
|
||||
id: string,
|
||||
name: string,
|
||||
description: string,
|
||||
}
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,11 +18,11 @@ import * as base from './../../base';
|
||||
export { base };
|
||||
export interface Price {
|
||||
/** 金额 */
|
||||
amount: string,
|
||||
amount: string;
|
||||
/** 币种,如USD、CNY */
|
||||
currency: string,
|
||||
currency: string;
|
||||
/** 小数位数 */
|
||||
decimal_num: number,
|
||||
decimal_num: number;
|
||||
}
|
||||
export enum FollowType {
|
||||
/** 无关系 */
|
||||
@@ -33,4 +33,4 @@ export enum FollowType {
|
||||
Follower = 2,
|
||||
/** 互相关注 */
|
||||
MutualFollow = 3,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,165 +16,186 @@
|
||||
|
||||
import { createAPI } from './../../api/config';
|
||||
export interface AppUserInfo {
|
||||
user_unique_name: string
|
||||
user_unique_name: string;
|
||||
}
|
||||
export interface User {
|
||||
/** 与原接口字段名对齐 */
|
||||
user_id_str: string,
|
||||
name: string,
|
||||
user_unique_name: string,
|
||||
email: string,
|
||||
description: string,
|
||||
avatar_url: string,
|
||||
screen_name?: string,
|
||||
app_user_info?: AppUserInfo,
|
||||
locale?: string,
|
||||
user_id_str: string;
|
||||
name: string;
|
||||
user_unique_name: string;
|
||||
email: string;
|
||||
description: string;
|
||||
avatar_url: string;
|
||||
screen_name?: string;
|
||||
app_user_info?: AppUserInfo;
|
||||
locale?: string;
|
||||
/** unix timestamp in seconds */
|
||||
user_create_time: number,
|
||||
user_create_time: number;
|
||||
}
|
||||
export interface PassportWebEmailRegisterV2PostRequest {
|
||||
password: string,
|
||||
email: string,
|
||||
password: string;
|
||||
email: string;
|
||||
}
|
||||
export interface PassportWebEmailRegisterV2PostResponse {
|
||||
data: User,
|
||||
code: number,
|
||||
msg: string,
|
||||
data: User;
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
export interface PassportWebLogoutGetRequest {}
|
||||
export interface PassportWebLogoutGetResponse {
|
||||
redirect_url: string,
|
||||
code: number,
|
||||
msg: string,
|
||||
redirect_url: string;
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
export interface PassportWebEmailLoginPostRequest {
|
||||
email: string,
|
||||
password: string,
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
export interface PassportWebEmailLoginPostResponse {
|
||||
data: User,
|
||||
code: number,
|
||||
msg: string,
|
||||
data: User;
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
export interface PassportWebEmailPasswordResetGetRequest {
|
||||
password: string,
|
||||
code: string,
|
||||
email: string,
|
||||
password: string;
|
||||
code: string;
|
||||
email: string;
|
||||
}
|
||||
export interface PassportWebEmailPasswordResetGetResponse {
|
||||
code: number,
|
||||
msg: string,
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
export interface PassportAccountInfoV2Request {}
|
||||
export interface PassportAccountInfoV2Response {
|
||||
data: User,
|
||||
code: number,
|
||||
msg: string,
|
||||
data: User;
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
export interface UserUpdateAvatarRequest {
|
||||
avatar: Blob
|
||||
avatar: Blob;
|
||||
}
|
||||
export interface UserUpdateAvatarResponseData {
|
||||
web_uri: string
|
||||
web_uri: string;
|
||||
}
|
||||
export interface UserUpdateAvatarResponse {
|
||||
data: UserUpdateAvatarResponseData,
|
||||
code: number,
|
||||
msg: string,
|
||||
data: UserUpdateAvatarResponseData;
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
export interface UserUpdateProfileRequest {
|
||||
name?: string,
|
||||
user_unique_name?: string,
|
||||
description?: string,
|
||||
locale?: string,
|
||||
name?: string;
|
||||
user_unique_name?: string;
|
||||
description?: string;
|
||||
locale?: string;
|
||||
}
|
||||
export interface UserUpdateProfileResponse {
|
||||
code: number,
|
||||
msg: string,
|
||||
code: number;
|
||||
msg: string;
|
||||
}
|
||||
/** 邮箱密码注册 */
|
||||
export const PassportWebEmailRegisterV2Post = /*#__PURE__*/createAPI<PassportWebEmailRegisterV2PostRequest, PassportWebEmailRegisterV2PostResponse>({
|
||||
"url": "/api/passport/web/email/register/v2/",
|
||||
"method": "POST",
|
||||
"name": "PassportWebEmailRegisterV2Post",
|
||||
"reqType": "PassportWebEmailRegisterV2PostRequest",
|
||||
"reqMapping": {
|
||||
"body": ["password", "email"]
|
||||
export const PassportWebEmailRegisterV2Post = /*#__PURE__*/ createAPI<
|
||||
PassportWebEmailRegisterV2PostRequest,
|
||||
PassportWebEmailRegisterV2PostResponse
|
||||
>({
|
||||
url: '/api/passport/web/email/register/v2/',
|
||||
method: 'POST',
|
||||
name: 'PassportWebEmailRegisterV2Post',
|
||||
reqType: 'PassportWebEmailRegisterV2PostRequest',
|
||||
reqMapping: {
|
||||
body: ['password', 'email'],
|
||||
},
|
||||
"resType": "PassportWebEmailRegisterV2PostResponse",
|
||||
"schemaRoot": "api://schemas/idl_passport_passport",
|
||||
"service": "passport"
|
||||
resType: 'PassportWebEmailRegisterV2PostResponse',
|
||||
schemaRoot: 'api://schemas/idl_passport_passport',
|
||||
service: 'passport',
|
||||
});
|
||||
/** 退出登录 */
|
||||
export const PassportWebLogoutGet = /*#__PURE__*/createAPI<PassportWebLogoutGetRequest, PassportWebLogoutGetResponse>({
|
||||
"url": "/api/passport/web/logout/",
|
||||
"method": "GET",
|
||||
"name": "PassportWebLogoutGet",
|
||||
"reqType": "PassportWebLogoutGetRequest",
|
||||
"reqMapping": {},
|
||||
"resType": "PassportWebLogoutGetResponse",
|
||||
"schemaRoot": "api://schemas/idl_passport_passport",
|
||||
"service": "passport"
|
||||
export const PassportWebLogoutGet = /*#__PURE__*/ createAPI<
|
||||
PassportWebLogoutGetRequest,
|
||||
PassportWebLogoutGetResponse
|
||||
>({
|
||||
url: '/api/passport/web/logout/',
|
||||
method: 'GET',
|
||||
name: 'PassportWebLogoutGet',
|
||||
reqType: 'PassportWebLogoutGetRequest',
|
||||
reqMapping: {},
|
||||
resType: 'PassportWebLogoutGetResponse',
|
||||
schemaRoot: 'api://schemas/idl_passport_passport',
|
||||
service: 'passport',
|
||||
});
|
||||
/** 邮箱帐密登录 */
|
||||
export const PassportWebEmailLoginPost = /*#__PURE__*/createAPI<PassportWebEmailLoginPostRequest, PassportWebEmailLoginPostResponse>({
|
||||
"url": "/api/passport/web/email/login/",
|
||||
"method": "POST",
|
||||
"name": "PassportWebEmailLoginPost",
|
||||
"reqType": "PassportWebEmailLoginPostRequest",
|
||||
"reqMapping": {
|
||||
"body": ["email", "password"]
|
||||
export const PassportWebEmailLoginPost = /*#__PURE__*/ createAPI<
|
||||
PassportWebEmailLoginPostRequest,
|
||||
PassportWebEmailLoginPostResponse
|
||||
>({
|
||||
url: '/api/passport/web/email/login/',
|
||||
method: 'POST',
|
||||
name: 'PassportWebEmailLoginPost',
|
||||
reqType: 'PassportWebEmailLoginPostRequest',
|
||||
reqMapping: {
|
||||
body: ['email', 'password'],
|
||||
},
|
||||
"resType": "PassportWebEmailLoginPostResponse",
|
||||
"schemaRoot": "api://schemas/idl_passport_passport",
|
||||
"service": "passport"
|
||||
resType: 'PassportWebEmailLoginPostResponse',
|
||||
schemaRoot: 'api://schemas/idl_passport_passport',
|
||||
service: 'passport',
|
||||
});
|
||||
/** 通过邮箱重置密码 */
|
||||
export const PassportWebEmailPasswordResetGet = /*#__PURE__*/createAPI<PassportWebEmailPasswordResetGetRequest, PassportWebEmailPasswordResetGetResponse>({
|
||||
"url": "/api/passport/web/email/password/reset/",
|
||||
"method": "GET",
|
||||
"name": "PassportWebEmailPasswordResetGet",
|
||||
"reqType": "PassportWebEmailPasswordResetGetRequest",
|
||||
"reqMapping": {
|
||||
"query": ["password", "code", "email"]
|
||||
export const PassportWebEmailPasswordResetGet = /*#__PURE__*/ createAPI<
|
||||
PassportWebEmailPasswordResetGetRequest,
|
||||
PassportWebEmailPasswordResetGetResponse
|
||||
>({
|
||||
url: '/api/passport/web/email/password/reset/',
|
||||
method: 'GET',
|
||||
name: 'PassportWebEmailPasswordResetGet',
|
||||
reqType: 'PassportWebEmailPasswordResetGetRequest',
|
||||
reqMapping: {
|
||||
query: ['password', 'code', 'email'],
|
||||
},
|
||||
"resType": "PassportWebEmailPasswordResetGetResponse",
|
||||
"schemaRoot": "api://schemas/idl_passport_passport",
|
||||
"service": "passport"
|
||||
resType: 'PassportWebEmailPasswordResetGetResponse',
|
||||
schemaRoot: 'api://schemas/idl_passport_passport',
|
||||
service: 'passport',
|
||||
});
|
||||
/** 账号信息 */
|
||||
export const PassportAccountInfoV2 = /*#__PURE__*/createAPI<PassportAccountInfoV2Request, PassportAccountInfoV2Response>({
|
||||
"url": "/api/passport/account/info/v2/",
|
||||
"method": "POST",
|
||||
"name": "PassportAccountInfoV2",
|
||||
"reqType": "PassportAccountInfoV2Request",
|
||||
"reqMapping": {},
|
||||
"resType": "PassportAccountInfoV2Response",
|
||||
"schemaRoot": "api://schemas/idl_passport_passport",
|
||||
"service": "passport"
|
||||
export const PassportAccountInfoV2 = /*#__PURE__*/ createAPI<
|
||||
PassportAccountInfoV2Request,
|
||||
PassportAccountInfoV2Response
|
||||
>({
|
||||
url: '/api/passport/account/info/v2/',
|
||||
method: 'POST',
|
||||
name: 'PassportAccountInfoV2',
|
||||
reqType: 'PassportAccountInfoV2Request',
|
||||
reqMapping: {},
|
||||
resType: 'PassportAccountInfoV2Response',
|
||||
schemaRoot: 'api://schemas/idl_passport_passport',
|
||||
service: 'passport',
|
||||
});
|
||||
export const UserUpdateAvatar = /*#__PURE__*/createAPI<UserUpdateAvatarRequest, UserUpdateAvatarResponse>({
|
||||
"url": "/api/web/user/update/upload_avatar/",
|
||||
"method": "POST",
|
||||
"name": "UserUpdateAvatar",
|
||||
"reqType": "UserUpdateAvatarRequest",
|
||||
"reqMapping": {
|
||||
"body": ["avatar"]
|
||||
export const UserUpdateAvatar = /*#__PURE__*/ createAPI<
|
||||
UserUpdateAvatarRequest,
|
||||
UserUpdateAvatarResponse
|
||||
>({
|
||||
url: '/api/web/user/update/upload_avatar/',
|
||||
method: 'POST',
|
||||
name: 'UserUpdateAvatar',
|
||||
reqType: 'UserUpdateAvatarRequest',
|
||||
reqMapping: {
|
||||
body: ['avatar'],
|
||||
},
|
||||
"resType": "UserUpdateAvatarResponse",
|
||||
"schemaRoot": "api://schemas/idl_passport_passport",
|
||||
"service": "passport",
|
||||
"serializer": "form"
|
||||
resType: 'UserUpdateAvatarResponse',
|
||||
schemaRoot: 'api://schemas/idl_passport_passport',
|
||||
service: 'passport',
|
||||
serializer: 'form',
|
||||
});
|
||||
export const UserUpdateProfile = /*#__PURE__*/createAPI<UserUpdateProfileRequest, UserUpdateProfileResponse>({
|
||||
"url": "/api/user/update_profile",
|
||||
"method": "POST",
|
||||
"name": "UserUpdateProfile",
|
||||
"reqType": "UserUpdateProfileRequest",
|
||||
"reqMapping": {
|
||||
"body": ["name", "user_unique_name", "description", "locale"]
|
||||
export const UserUpdateProfile = /*#__PURE__*/ createAPI<
|
||||
UserUpdateProfileRequest,
|
||||
UserUpdateProfileResponse
|
||||
>({
|
||||
url: '/api/user/update_profile',
|
||||
method: 'POST',
|
||||
name: 'UserUpdateProfile',
|
||||
reqType: 'UserUpdateProfileRequest',
|
||||
reqMapping: {
|
||||
body: ['name', 'user_unique_name', 'description', 'locale'],
|
||||
},
|
||||
"resType": "UserUpdateProfileResponse",
|
||||
"schemaRoot": "api://schemas/idl_passport_passport",
|
||||
"service": "passport"
|
||||
});
|
||||
resType: 'UserUpdateProfileResponse',
|
||||
schemaRoot: 'api://schemas/idl_passport_passport',
|
||||
service: 'passport',
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
import { defineConfig } from '@coze-arch/vitest-config';
|
||||
|
||||
export default defineConfig({
|
||||
|
||||
Reference in New Issue
Block a user