| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- // @ts-ignore
- /* eslint-disable */
- import request from '@repo/api-client'
- /** 检查存储引擎连通性 POST /api/ai/storage-provider/check */
- export async function postStorageProviderCheck(
- body: {
- provider: string
- config: {
- access_key_id: string
- bucket_name: string
- endpoint: string
- mode: string
- path_prefix: string
- provider: string
- secret_access_key: string
- use_ssl: boolean
- }
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/storage-provider/check',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 获取配置信息 POST /api/ai/storage-provider/config */
- export async function postStorageProviderConfig(
- body: {
- name: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{
- isSuccess: boolean
- code: number
- result: {
- access_key_id: string
- mode: string
- endpoint: string
- provider: string
- use_ssl: boolean
- bucket_name: string
- secret_access_key: string
- path_prefix: string
- }
- isAuthorized: boolean
- }>('/api/ai/storage-provider/config', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 获取默认存储厂商 POST /api/ai/storage-provider/default-provider */
- export async function postStorageProviderDefaultProvider(
- body: {},
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean; result?: string }>(
- '/api/ai/storage-provider/default-provider',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 获取支持的引擎列表 POST /api/ai/storage-provider/engines */
- export async function postStorageProviderEngines(body: {}, options?: { [key: string]: any }) {
- return request<{
- isSuccess: boolean
- code: number
- result: { allowed: boolean; available: boolean; description: string; name: string }[]
- isAuthorized: boolean
- }>('/api/ai/storage-provider/engines', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- })
- }
- /** 初始化存储厂商信息 POST /api/ai/storage-provider/initStorageProvider */
- export async function postStorageProviderInitStorageProvider(
- body: {},
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/storage-provider/initStorageProvider',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 更新配置信息 POST /api/ai/storage-provider/update */
- export async function postStorageProviderUpdate(
- body: {
- default_provider: string
- cos: {
- app_id: string
- bucket_name: string
- path_prefix: string
- provider: string
- region: string
- secret_id: string
- secret_key: string
- }
- local: { path_prefix: string; provider: string }
- minio: {
- access_key_id: string
- bucket_name: string
- endpoint: string
- mode: string
- path_prefix: string
- provider: string
- secret_access_key: string
- use_ssl: boolean
- }
- oss: {
- access_key: string
- bucket_name: string
- endpoint: string
- path_prefix: string
- provider: string
- region: string
- secret_key: string
- temp_bucket_name: string
- temp_region: string
- use_temp_bucket: boolean
- }
- s3: {
- access_key: string
- bucket_name: string
- endpoint: string
- path_prefix: string
- provider: string
- region: string
- secret_key: string
- }
- tos: {
- access_key: string
- bucket_name: string
- endpoint: string
- path_prefix: string
- provider: string
- region: string
- secret_key: string
- }
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/storage-provider/update',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
- /** 更新默认存储厂商 POST /api/ai/storage-provider/updateDefaultProvider */
- export async function postStorageProviderUpdateDefaultProvider(
- body: {
- provider: string
- },
- options?: { [key: string]: any }
- ) {
- return request<{ isSuccess: boolean; code: number; isAuthorized: boolean }>(
- '/api/ai/storage-provider/updateDefaultProvider',
- {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- data: body,
- ...(options || {})
- }
- )
- }
|