Migrate new service (#1)
This commit is contained in:
1 parent
f13ca37d63
commit
28da0263dc
109 files changed
+1160
-1053
No files matched your search
@@ -0,0 +1,87 @@
|
||||
import { IService } from './service';
|
||||
|
||||
export interface IForm {
|
||||
queries?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
headers?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
body?: {
|
||||
[key: string]: string | object | boolean | number | object[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface ISchema {
|
||||
properties?: {
|
||||
[key: string]: ISchema;
|
||||
};
|
||||
items?: ISchema[];
|
||||
enum?: (string | number)[];
|
||||
type: 'object' | 'array' | 'string' | 'number' | 'boolean';
|
||||
title: string;
|
||||
optional?: boolean;
|
||||
example?: string | number;
|
||||
}
|
||||
|
||||
export interface IRequest {
|
||||
id: string;
|
||||
body: ISchema;
|
||||
headers: ISchema;
|
||||
queries: ISchema;
|
||||
params: ISchema;
|
||||
method: 'GET' | 'POST' | 'HEAD' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
|
||||
}
|
||||
|
||||
export interface IResponse {
|
||||
id: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
example?: string;
|
||||
is_success: boolean;
|
||||
error_code?: string;
|
||||
status_code: number;
|
||||
body: ISchema;
|
||||
headers: ISchema;
|
||||
}
|
||||
|
||||
export interface IPackage {
|
||||
id: string;
|
||||
amount: number;
|
||||
price: number;
|
||||
}
|
||||
|
||||
export enum IApiUnit {
|
||||
COUNT = 'Count'
|
||||
}
|
||||
|
||||
export interface IApiPrice {
|
||||
data: any[];
|
||||
spans: [number, number, number, number][];
|
||||
columns: {
|
||||
key: string;
|
||||
label: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface IApi {
|
||||
id: string;
|
||||
name?: string;
|
||||
title?: string;
|
||||
definition?: any;
|
||||
introduction?: string;
|
||||
price?: IApiPrice;
|
||||
tags?: string[];
|
||||
service?: IService;
|
||||
service_id?: string;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
stage?: string;
|
||||
}
|
||||
|
||||
export interface IApiListResponse {
|
||||
count: number;
|
||||
items: IApi[];
|
||||
}
|
||||
|
||||
export type IApiDetailResponse = IApi;
|
||||
Reference in new issue
Block a user