This commit is contained in:
parent
0068d9a0e9
commit
2b771db5dd
157
api/swagger.yaml
157
api/swagger.yaml
@ -263,6 +263,25 @@ definitions:
|
|||||||
user_id:
|
user_id:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
page.PagedResult-schema_AssistantPublic:
|
||||||
|
properties:
|
||||||
|
data:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/schema.AssistantPublic'
|
||||||
|
type: array
|
||||||
|
page:
|
||||||
|
description: 当前页码
|
||||||
|
type: integer
|
||||||
|
page_size:
|
||||||
|
description: 每页大小
|
||||||
|
type: integer
|
||||||
|
total_count:
|
||||||
|
description: 数据总条数
|
||||||
|
type: integer
|
||||||
|
total_pages:
|
||||||
|
description: 总页数
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
schema.AddPublicChatMessageRequest:
|
schema.AddPublicChatMessageRequest:
|
||||||
properties:
|
properties:
|
||||||
assistant_key:
|
assistant_key:
|
||||||
@ -325,6 +344,15 @@ definitions:
|
|||||||
required:
|
required:
|
||||||
- library_id
|
- library_id
|
||||||
type: object
|
type: object
|
||||||
|
schema.AssistantPublic:
|
||||||
|
properties:
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
schema.AssistantUpdateRequest:
|
schema.AssistantUpdateRequest:
|
||||||
properties:
|
properties:
|
||||||
description:
|
description:
|
||||||
@ -353,6 +381,11 @@ definitions:
|
|||||||
prompt:
|
prompt:
|
||||||
maxLength: 512
|
maxLength: 512
|
||||||
type: string
|
type: string
|
||||||
|
public:
|
||||||
|
enum:
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
type: boolean
|
||||||
temperature:
|
temperature:
|
||||||
enum:
|
enum:
|
||||||
- 0.1
|
- 0.1
|
||||||
@ -590,6 +623,13 @@ definitions:
|
|||||||
success:
|
success:
|
||||||
type: boolean
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
|
schema.SiteUsageResponse:
|
||||||
|
properties:
|
||||||
|
month_tokens:
|
||||||
|
type: integer
|
||||||
|
month_tool_calls:
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
schema.TokenUsage:
|
schema.TokenUsage:
|
||||||
properties:
|
properties:
|
||||||
completion_tokens:
|
completion_tokens:
|
||||||
@ -1125,10 +1165,14 @@ paths:
|
|||||||
summary: 绑定 Tool
|
summary: 绑定 Tool
|
||||||
tags:
|
tags:
|
||||||
- assistant
|
- assistant
|
||||||
/api/v1/assistants/public:
|
/api/v1/assistants/favorites:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: page
|
||||||
|
type: integer
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
@ -1139,9 +1183,36 @@ paths:
|
|||||||
- $ref: '#/definitions/schema.ResponseBody'
|
- $ref: '#/definitions/schema.ResponseBody'
|
||||||
- properties:
|
- properties:
|
||||||
data:
|
data:
|
||||||
items:
|
$ref: '#/definitions/page.PagedResult-schema_AssistantPublic'
|
||||||
$ref: '#/definitions/entity.Assistant'
|
type: object
|
||||||
type: array
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.ResponseBody'
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: 收藏的助理列表
|
||||||
|
tags:
|
||||||
|
- assistant
|
||||||
|
/api/v1/assistants/public:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: page
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/schema.ResponseBody'
|
||||||
|
- properties:
|
||||||
|
data:
|
||||||
|
$ref: '#/definitions/page.PagedResult-schema_AssistantPublic'
|
||||||
type: object
|
type: object
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
@ -1152,6 +1223,65 @@ paths:
|
|||||||
summary: 获取公开的助理列表
|
summary: 获取公开的助理列表
|
||||||
tags:
|
tags:
|
||||||
- assistant
|
- assistant
|
||||||
|
/api/v1/assistants/public/{id}:
|
||||||
|
delete:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/schema.ResponseBody'
|
||||||
|
- properties:
|
||||||
|
data:
|
||||||
|
$ref: '#/definitions/schema.AssistantPublic'
|
||||||
|
type: object
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.ResponseBody'
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: 取消收藏助理
|
||||||
|
tags:
|
||||||
|
- assistant
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/schema.ResponseBody'
|
||||||
|
- properties:
|
||||||
|
data:
|
||||||
|
$ref: '#/definitions/schema.AssistantPublic'
|
||||||
|
type: object
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/schema.ResponseBody'
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: 收藏助理
|
||||||
|
tags:
|
||||||
|
- assistant
|
||||||
/api/v1/chat_public:
|
/api/v1/chat_public:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
@ -2347,6 +2477,25 @@ paths:
|
|||||||
summary: 校验 Discovery 语法
|
summary: 校验 Discovery 语法
|
||||||
tags:
|
tags:
|
||||||
- tool
|
- tool
|
||||||
|
/api/v1/usage:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/schema.ResponseBody'
|
||||||
|
- properties:
|
||||||
|
data:
|
||||||
|
$ref: '#/definitions/schema.SiteUsageResponse'
|
||||||
|
type: object
|
||||||
|
summary: 获取站点 Usage
|
||||||
|
tags:
|
||||||
|
- usage
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
ApiKeyAuth:
|
ApiKeyAuth:
|
||||||
in: header
|
in: header
|
||||||
|
520
src/api/api.ts
520
src/api/api.ts
@ -23,6 +23,37 @@ import type { RequestArgs } from './base';
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface ApiV1AssistantsFavoritesGet200Response
|
||||||
|
*/
|
||||||
|
export interface ApiV1AssistantsFavoritesGet200Response {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {PagePagedResultSchemaAssistantPublic}
|
||||||
|
* @memberof ApiV1AssistantsFavoritesGet200Response
|
||||||
|
*/
|
||||||
|
'data'?: PagePagedResultSchemaAssistantPublic;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ApiV1AssistantsFavoritesGet200Response
|
||||||
|
*/
|
||||||
|
'error'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ApiV1AssistantsFavoritesGet200Response
|
||||||
|
*/
|
||||||
|
'message'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof ApiV1AssistantsFavoritesGet200Response
|
||||||
|
*/
|
||||||
|
'success'?: boolean;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -209,6 +240,37 @@ export interface ApiV1AssistantsPost200Response {
|
|||||||
*/
|
*/
|
||||||
'success'?: boolean;
|
'success'?: boolean;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface ApiV1AssistantsPublicIdPost200Response
|
||||||
|
*/
|
||||||
|
export interface ApiV1AssistantsPublicIdPost200Response {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {SchemaAssistantPublic}
|
||||||
|
* @memberof ApiV1AssistantsPublicIdPost200Response
|
||||||
|
*/
|
||||||
|
'data'?: SchemaAssistantPublic;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ApiV1AssistantsPublicIdPost200Response
|
||||||
|
*/
|
||||||
|
'error'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ApiV1AssistantsPublicIdPost200Response
|
||||||
|
*/
|
||||||
|
'message'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof ApiV1AssistantsPublicIdPost200Response
|
||||||
|
*/
|
||||||
|
'success'?: boolean;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -631,6 +693,37 @@ export interface ApiV1ToolsPost200Response {
|
|||||||
*/
|
*/
|
||||||
'success'?: boolean;
|
'success'?: boolean;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface ApiV1UsageGet200Response
|
||||||
|
*/
|
||||||
|
export interface ApiV1UsageGet200Response {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {SchemaSiteUsageResponse}
|
||||||
|
* @memberof ApiV1UsageGet200Response
|
||||||
|
*/
|
||||||
|
'data'?: SchemaSiteUsageResponse;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ApiV1UsageGet200Response
|
||||||
|
*/
|
||||||
|
'error'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ApiV1UsageGet200Response
|
||||||
|
*/
|
||||||
|
'message'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof ApiV1UsageGet200Response
|
||||||
|
*/
|
||||||
|
'success'?: boolean;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -1333,6 +1426,43 @@ export interface EntityTool {
|
|||||||
*/
|
*/
|
||||||
'user_id'?: string;
|
'user_id'?: string;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface PagePagedResultSchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
export interface PagePagedResultSchemaAssistantPublic {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {Array<SchemaAssistantPublic>}
|
||||||
|
* @memberof PagePagedResultSchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
'data'?: Array<SchemaAssistantPublic>;
|
||||||
|
/**
|
||||||
|
* 当前页码
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PagePagedResultSchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
'page'?: number;
|
||||||
|
/**
|
||||||
|
* 每页大小
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PagePagedResultSchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
'page_size'?: number;
|
||||||
|
/**
|
||||||
|
* 数据总条数
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PagePagedResultSchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
'total_count'?: number;
|
||||||
|
/**
|
||||||
|
* 总页数
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PagePagedResultSchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
'total_pages'?: number;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -1425,6 +1555,31 @@ export interface SchemaAssistantLibraryRequest {
|
|||||||
*/
|
*/
|
||||||
'library_id': number;
|
'library_id': number;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface SchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
export interface SchemaAssistantPublic {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
'description'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
'id'?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SchemaAssistantPublic
|
||||||
|
*/
|
||||||
|
'name'?: string;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -1473,6 +1628,12 @@ export interface SchemaAssistantUpdateRequest {
|
|||||||
* @memberof SchemaAssistantUpdateRequest
|
* @memberof SchemaAssistantUpdateRequest
|
||||||
*/
|
*/
|
||||||
'prompt'?: string;
|
'prompt'?: string;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof SchemaAssistantUpdateRequest
|
||||||
|
*/
|
||||||
|
'public'?: boolean;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @type {number}
|
* @type {number}
|
||||||
@ -1973,6 +2134,25 @@ export interface SchemaResponseBody {
|
|||||||
*/
|
*/
|
||||||
'success'?: boolean;
|
'success'?: boolean;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface SchemaSiteUsageResponse
|
||||||
|
*/
|
||||||
|
export interface SchemaSiteUsageResponse {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SchemaSiteUsageResponse
|
||||||
|
*/
|
||||||
|
'month_tokens'?: number;
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SchemaSiteUsageResponse
|
||||||
|
*/
|
||||||
|
'month_tool_calls'?: number;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @export
|
* @export
|
||||||
@ -2179,6 +2359,44 @@ export interface SchemaToolDiscoveryOutputFunctions {
|
|||||||
*/
|
*/
|
||||||
export const AssistantApiAxiosParamCreator = function (configuration?: Configuration) {
|
export const AssistantApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 收藏的助理列表
|
||||||
|
* @param {number} [page]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1AssistantsFavoritesGet: async (page?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/v1/assistants/favorites`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication ApiKeyAuth required
|
||||||
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
||||||
|
|
||||||
|
if (page !== undefined) {
|
||||||
|
localVarQueryParameter['page'] = page;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取 Assistant 列表
|
* @summary 获取 Assistant 列表
|
||||||
@ -2685,10 +2903,11 @@ export const AssistantApiAxiosParamCreator = function (configuration?: Configura
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取公开的助理列表
|
* @summary 获取公开的助理列表
|
||||||
|
* @param {number} [page]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
apiV1AssistantsPublicGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
apiV1AssistantsPublicGet: async (page?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
const localVarPath = `/api/v1/assistants/public`;
|
const localVarPath = `/api/v1/assistants/public`;
|
||||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
@ -2704,6 +2923,84 @@ export const AssistantApiAxiosParamCreator = function (configuration?: Configura
|
|||||||
// authentication ApiKeyAuth required
|
// authentication ApiKeyAuth required
|
||||||
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
||||||
|
|
||||||
|
if (page !== undefined) {
|
||||||
|
localVarQueryParameter['page'] = page;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 取消收藏助理
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1AssistantsPublicIdDelete: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('apiV1AssistantsPublicIdDelete', 'id', id)
|
||||||
|
const localVarPath = `/api/v1/assistants/public/{id}`
|
||||||
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication ApiKeyAuth required
|
||||||
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: toPathString(localVarUrlObj),
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 收藏助理
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1AssistantsPublicIdPost: async (id: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
assertParamExists('apiV1AssistantsPublicIdPost', 'id', id)
|
||||||
|
const localVarPath = `/api/v1/assistants/public/{id}`
|
||||||
|
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication ApiKeyAuth required
|
||||||
|
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||||
@ -2725,6 +3022,19 @@ export const AssistantApiAxiosParamCreator = function (configuration?: Configura
|
|||||||
export const AssistantApiFp = function(configuration?: Configuration) {
|
export const AssistantApiFp = function(configuration?: Configuration) {
|
||||||
const localVarAxiosParamCreator = AssistantApiAxiosParamCreator(configuration)
|
const localVarAxiosParamCreator = AssistantApiAxiosParamCreator(configuration)
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 收藏的助理列表
|
||||||
|
* @param {number} [page]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiV1AssistantsFavoritesGet(page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsFavoritesGet200Response>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsFavoritesGet(page, options);
|
||||||
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
|
const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsFavoritesGet']?.[localVarOperationServerIndex]?.url;
|
||||||
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取 Assistant 列表
|
* @summary 获取 Assistant 列表
|
||||||
@ -2901,15 +3211,42 @@ export const AssistantApiFp = function(configuration?: Configuration) {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取公开的助理列表
|
* @summary 获取公开的助理列表
|
||||||
|
* @param {number} [page]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
async apiV1AssistantsPublicGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsGet200Response>> {
|
async apiV1AssistantsPublicGet(page?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsFavoritesGet200Response>> {
|
||||||
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsPublicGet(options);
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsPublicGet(page, options);
|
||||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsPublicGet']?.[localVarOperationServerIndex]?.url;
|
const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsPublicGet']?.[localVarOperationServerIndex]?.url;
|
||||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 取消收藏助理
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiV1AssistantsPublicIdDelete(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsPublicIdPost200Response>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsPublicIdDelete(id, options);
|
||||||
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
|
const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsPublicIdDelete']?.[localVarOperationServerIndex]?.url;
|
||||||
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 收藏助理
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiV1AssistantsPublicIdPost(id: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiV1AssistantsPublicIdPost200Response>> {
|
||||||
|
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1AssistantsPublicIdPost(id, options);
|
||||||
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||||
|
const localVarOperationServerBasePath = operationServerMap['AssistantApi.apiV1AssistantsPublicIdPost']?.[localVarOperationServerIndex]?.url;
|
||||||
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2920,6 +3257,16 @@ export const AssistantApiFp = function(configuration?: Configuration) {
|
|||||||
export const AssistantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
export const AssistantApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
const localVarFp = AssistantApiFp(configuration)
|
const localVarFp = AssistantApiFp(configuration)
|
||||||
return {
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 收藏的助理列表
|
||||||
|
* @param {number} [page]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1AssistantsFavoritesGet(page?: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsFavoritesGet200Response> {
|
||||||
|
return localVarFp.apiV1AssistantsFavoritesGet(page, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取 Assistant 列表
|
* @summary 获取 Assistant 列表
|
||||||
@ -3057,11 +3404,32 @@ export const AssistantApiFactory = function (configuration?: Configuration, base
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取公开的助理列表
|
* @summary 获取公开的助理列表
|
||||||
|
* @param {number} [page]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
apiV1AssistantsPublicGet(options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsGet200Response> {
|
apiV1AssistantsPublicGet(page?: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsFavoritesGet200Response> {
|
||||||
return localVarFp.apiV1AssistantsPublicGet(options).then((request) => request(axios, basePath));
|
return localVarFp.apiV1AssistantsPublicGet(page, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 取消收藏助理
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1AssistantsPublicIdDelete(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsPublicIdPost200Response> {
|
||||||
|
return localVarFp.apiV1AssistantsPublicIdDelete(id, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 收藏助理
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiV1AssistantsPublicIdPost(id: number, options?: RawAxiosRequestConfig): AxiosPromise<ApiV1AssistantsPublicIdPost200Response> {
|
||||||
|
return localVarFp.apiV1AssistantsPublicIdPost(id, options).then((request) => request(axios, basePath));
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -3073,6 +3441,18 @@ export const AssistantApiFactory = function (configuration?: Configuration, base
|
|||||||
* @extends {BaseAPI}
|
* @extends {BaseAPI}
|
||||||
*/
|
*/
|
||||||
export class AssistantApi extends BaseAPI {
|
export class AssistantApi extends BaseAPI {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 收藏的助理列表
|
||||||
|
* @param {number} [page]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof AssistantApi
|
||||||
|
*/
|
||||||
|
public apiV1AssistantsFavoritesGet(page?: number, options?: RawAxiosRequestConfig) {
|
||||||
|
return AssistantApiFp(this.configuration).apiV1AssistantsFavoritesGet(page, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取 Assistant 列表
|
* @summary 获取 Assistant 列表
|
||||||
@ -3236,12 +3616,37 @@ export class AssistantApi extends BaseAPI {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary 获取公开的助理列表
|
* @summary 获取公开的助理列表
|
||||||
|
* @param {number} [page]
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof AssistantApi
|
* @memberof AssistantApi
|
||||||
*/
|
*/
|
||||||
public apiV1AssistantsPublicGet(options?: RawAxiosRequestConfig) {
|
public apiV1AssistantsPublicGet(page?: number, options?: RawAxiosRequestConfig) {
|
||||||
return AssistantApiFp(this.configuration).apiV1AssistantsPublicGet(options).then((request) => request(this.axios, this.basePath));
|
return AssistantApiFp(this.configuration).apiV1AssistantsPublicGet(page, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 取消收藏助理
|
||||||
|
* @param {number} id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|