@cherryin/api-client 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +135 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +219 -0
- package/api.ts +6364 -0
- package/base.ts +62 -0
- package/common.ts +113 -0
- package/configuration.ts +121 -0
- package/dist/api.d.ts +4175 -0
- package/dist/api.js +3694 -0
- package/dist/base.d.ts +42 -0
- package/dist/base.js +46 -0
- package/dist/common.d.ts +28 -0
- package/dist/common.js +124 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +4175 -0
- package/dist/esm/api.js +3643 -0
- package/dist/esm/base.d.ts +42 -0
- package/dist/esm/base.js +41 -0
- package/dist/esm/common.d.ts +28 -0
- package/dist/esm/common.js +112 -0
- package/dist/esm/configuration.d.ts +98 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/docs/AIModel.md +45 -0
- package/docs/AIModelAdminServiceApi.md +398 -0
- package/docs/AIModelArchitecture.md +25 -0
- package/docs/AIModelCreateRequest.md +35 -0
- package/docs/AIModelCreateResponse.md +25 -0
- package/docs/AIModelDeleteRequest.md +21 -0
- package/docs/AIModelDeleteResponse.md +23 -0
- package/docs/AIModelDisableRequest.md +21 -0
- package/docs/AIModelDisableResponse.md +25 -0
- package/docs/AIModelDiscountConfig.md +21 -0
- package/docs/AIModelGetResponse.md +25 -0
- package/docs/AIModelListResponse.md +27 -0
- package/docs/AIModelMeta.md +25 -0
- package/docs/AIModelPricingConfig.md +37 -0
- package/docs/AIModelProviderConfigItem.md +29 -0
- package/docs/AIModelPublishRequest.md +21 -0
- package/docs/AIModelPublishResponse.md +25 -0
- package/docs/AIModelUpdateRequest.md +37 -0
- package/docs/AIModelUpdateResponse.md +25 -0
- package/docs/AWSAuth.md +24 -0
- package/docs/AdminAuthFlowInitResponse.md +24 -0
- package/docs/AdminAuthServiceApi.md +81 -0
- package/docs/AudioPricing.md +33 -0
- package/docs/AuthFlowResult.md +23 -0
- package/docs/AuthTokenPair.md +27 -0
- package/docs/DiscountAdminServiceApi.md +281 -0
- package/docs/DiscountCreateRequest.md +36 -0
- package/docs/DiscountDeleteRequest.md +20 -0
- package/docs/DiscountDeleteResponse.md +22 -0
- package/docs/DiscountGetResponse.md +24 -0
- package/docs/DiscountInfo.md +42 -0
- package/docs/DiscountListResponse.md +26 -0
- package/docs/DiscountUpdateRequest.md +38 -0
- package/docs/DiscountUpdateResponse.md +24 -0
- package/docs/FeatureCostPricing.md +27 -0
- package/docs/FrontAIModel.md +45 -0
- package/docs/GCPAuth.md +27 -0
- package/docs/GoogleProtobufAny.md +21 -0
- package/docs/ImagePricing.md +31 -0
- package/docs/Label.md +28 -0
- package/docs/LabelCreateRequest.md +22 -0
- package/docs/LabelCreateResponse.md +24 -0
- package/docs/LabelDeleteRequest.md +20 -0
- package/docs/LabelDeleteResponse.md +22 -0
- package/docs/LabelListRequest.md +24 -0
- package/docs/LabelListResponse.md +26 -0
- package/docs/LabelUpdateRequest.md +24 -0
- package/docs/LabelUpdateResponse.md +24 -0
- package/docs/MultimodalPricing.md +25 -0
- package/docs/PricingConditions.md +31 -0
- package/docs/PricingRules.md +29 -0
- package/docs/Provider.md +37 -0
- package/docs/ProviderAdminServiceApi.md +284 -0
- package/docs/ProviderAuth.md +29 -0
- package/docs/ProviderCreateRequest.md +29 -0
- package/docs/ProviderCreateResponse.md +25 -0
- package/docs/ProviderDeleteRequest.md +21 -0
- package/docs/ProviderDeleteResponse.md +23 -0
- package/docs/ProviderGetResponse.md +25 -0
- package/docs/ProviderListResponse.md +27 -0
- package/docs/ProviderModel.md +37 -0
- package/docs/ProviderModelAdminServiceApi.md +287 -0
- package/docs/ProviderModelCreateRequest.md +29 -0
- package/docs/ProviderModelCreateResponse.md +25 -0
- package/docs/ProviderModelDeleteRequest.md +21 -0
- package/docs/ProviderModelDeleteResponse.md +23 -0
- package/docs/ProviderModelGetResponse.md +25 -0
- package/docs/ProviderModelListResponse.md +27 -0
- package/docs/ProviderModelPayload.md +23 -0
- package/docs/ProviderModelUpdateRequest.md +31 -0
- package/docs/ProviderModelUpdateResponse.md +25 -0
- package/docs/ProviderPayload.md +21 -0
- package/docs/ProviderUpdateRequest.md +31 -0
- package/docs/ProviderUpdateResponse.md +25 -0
- package/docs/RequestPricing.md +23 -0
- package/docs/Status.md +25 -0
- package/docs/TextTokenInputPricing.md +27 -0
- package/docs/TextTokenOutputPricing.md +25 -0
- package/docs/TextTokenPricing.md +23 -0
- package/docs/TokenTier.md +25 -0
- package/docs/UserAPIKey.md +47 -0
- package/docs/UserAPIKeyCreateRequest.md +37 -0
- package/docs/UserAPIKeyCreateResponse.md +25 -0
- package/docs/UserAPIKeyDeleteRequest.md +21 -0
- package/docs/UserAPIKeyDeleteResponse.md +23 -0
- package/docs/UserAPIKeyGetResponse.md +25 -0
- package/docs/UserAPIKeyListResponse.md +27 -0
- package/docs/UserAPIKeyServiceApi.md +290 -0
- package/docs/UserAPIKeyUpdateRequest.md +33 -0
- package/docs/UserAPIKeyUpdateResponse.md +25 -0
- package/docs/UserAuthFlowCodeResponse.md +26 -0
- package/docs/UserAuthFlowInitResponse.md +28 -0
- package/docs/UserAuthFlowInitResponseOAuthResult.md +20 -0
- package/docs/UserAuthFlowOAuthCallbackRequest.md +24 -0
- package/docs/UserAuthFlowOAuthCallbackResponse.md +26 -0
- package/docs/UserAuthInfo.md +20 -0
- package/docs/UserAuthServiceApi.md +279 -0
- package/docs/UserBalance.md +42 -0
- package/docs/UserBalanceBrief.md +32 -0
- package/docs/UserBalanceChangeResponse.md +24 -0
- package/docs/UserBalanceEditResponse.md +24 -0
- package/docs/UserBalanceListResponse.md +26 -0
- package/docs/UserBalanceServiceApi.md +226 -0
- package/docs/UserInfo.md +26 -0
- package/docs/UserLabelItem.md +22 -0
- package/docs/UserLabelListResponse.md +26 -0
- package/docs/UserLabelPair.md +22 -0
- package/docs/UserLabelPairChangeAction.md +22 -0
- package/docs/UserLabelPairChangeRequest.md +20 -0
- package/docs/UserLabelPairChangeResponse.md +22 -0
- package/docs/UserLabelServiceApi.md +386 -0
- package/docs/UserMeInfo.md +24 -0
- package/docs/UserMeInfoResponse.md +24 -0
- package/docs/UserModelListResponse.md +33 -0
- package/docs/UserModelServiceApi.md +71 -0
- package/docs/UserPayServiceApi.md +62 -0
- package/docs/UserPayStripeCheckout.md +20 -0
- package/docs/UserPayStripeCheckoutResponse.md +24 -0
- package/docs/UserPoralServiceApi.md +52 -0
- package/docs/UserSettings.md +20 -0
- package/docs/VersionedAPISchema.md +31 -0
- package/docs/VideoPricing.md +33 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +36 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +18 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# PricingConditions
|
|
2
|
+
|
|
3
|
+
PricingConditions 价格生效条件 Pricing conditions
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**user_tiers** | **Array<string>** | user_tiers 用户层级:standard, premium, enterprise User tiers | [optional] [default to undefined]
|
|
10
|
+
**api_versions** | **Array<string>** | api_versions API版本:v1, v2 API versions | [optional] [default to undefined]
|
|
11
|
+
**regions** | **Array<string>** | regions 区域:us, eu, asia Regions | [optional] [default to undefined]
|
|
12
|
+
**min_balance** | **string** | min_balance 最低余额要求 Minimum balance requirement | [optional] [default to undefined]
|
|
13
|
+
**max_daily_usage** | **string** | max_daily_usage 每日使用上限 Maximum daily usage | [optional] [default to undefined]
|
|
14
|
+
**extra** | **{ [key: string]: string; }** | extra 扩展条件 Extra conditions | [optional] [default to undefined]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { PricingConditions } from '@cherryin/api-client';
|
|
20
|
+
|
|
21
|
+
const instance: PricingConditions = {
|
|
22
|
+
user_tiers,
|
|
23
|
+
api_versions,
|
|
24
|
+
regions,
|
|
25
|
+
min_balance,
|
|
26
|
+
max_daily_usage,
|
|
27
|
+
extra,
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# PricingRules
|
|
2
|
+
|
|
3
|
+
PricingRules 价格规则配置 Pricing rules configuration
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**text_token_pricing** | [**TextTokenPricing**](TextTokenPricing.md) | text_token_pricing Text Token计费规则 Text token pricing rules | [optional] [default to undefined]
|
|
10
|
+
**request_pricing** | [**RequestPricing**](RequestPricing.md) | request_pricing 请求级别计费 Request-level pricing | [optional] [default to undefined]
|
|
11
|
+
**multimodal_pricing** | [**MultimodalPricing**](MultimodalPricing.md) | multimodal_pricing 多模态计费 Multimodal pricing | [optional] [default to undefined]
|
|
12
|
+
**feature_cost_pricing** | [**Array<FeatureCostPricing>**](FeatureCostPricing.md) | feature_cost_pricing 特殊功能计费(新版) Feature cost pricing (new version) | [optional] [default to undefined]
|
|
13
|
+
**extra** | **{ [key: string]: string; }** | extra 扩展字段,支持自定义规则 Extra field for custom rules | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { PricingRules } from '@cherryin/api-client';
|
|
19
|
+
|
|
20
|
+
const instance: PricingRules = {
|
|
21
|
+
text_token_pricing,
|
|
22
|
+
request_pricing,
|
|
23
|
+
multimodal_pricing,
|
|
24
|
+
feature_cost_pricing,
|
|
25
|
+
extra,
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/Provider.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Provider
|
|
2
|
+
|
|
3
|
+
Provider 代表第三方 AI 模型提供商(例如 OpenAI、Anthropic、Google) Provider represents a third-party AI model provider (e.g., OpenAI, Anthropic, Google)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | id Provider 的唯一标识符 Unique identifier for the provider | [optional] [default to undefined]
|
|
10
|
+
**created_at** | **string** | created_at 创建时间戳(Unix 时间戳) Creation timestamp (Unix timestamp) | [optional] [default to undefined]
|
|
11
|
+
**updated_at** | **string** | updated_at 更新时间戳(Unix 时间戳) Last update timestamp (Unix timestamp) | [optional] [default to undefined]
|
|
12
|
+
**deleted_at** | **string** | deleted_at 软删除时间戳,0 表示未删除 Soft deletion timestamp, 0 means not deleted | [optional] [default to undefined]
|
|
13
|
+
**name** | **string** | name Provider 的唯一名称标识,例如 \"openai-prod-1\" Unique name identifier for the provider, e.g., \"openai-prod-1\" 用于系统内部引用,必须唯一 Used for internal system reference, must be unique | [optional] [default to undefined]
|
|
14
|
+
**display_name** | **string** | display_name Provider 的显示名称,例如 \"OpenAI Production\" Display name for the provider, e.g., \"OpenAI Production\" 用于用户界面显示 Used for UI display | [optional] [default to undefined]
|
|
15
|
+
**provider_type** | **string** | provider_type Provider 类型,例如 \"openai\", \"anthropic\", \"google\" Provider type, e.g., \"openai\", \"anthropic\", \"google\" 可选值: \"openai\", \"anthropic\", \"google\" Available values: \"openai\", \"anthropic\", \"google\" | [optional] [default to undefined]
|
|
16
|
+
**provider_status** | **number** | provider_status Provider 状态 Provider status 1: 启用 (Active) 2: 禁用 (Disabled) | [optional] [default to undefined]
|
|
17
|
+
**payload** | [**ProviderPayload**](ProviderPayload.md) | payload Provider 的认证和配置详情 Authentication and configuration details for the provider | [optional] [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { Provider } from '@cherryin/api-client';
|
|
23
|
+
|
|
24
|
+
const instance: Provider = {
|
|
25
|
+
id,
|
|
26
|
+
created_at,
|
|
27
|
+
updated_at,
|
|
28
|
+
deleted_at,
|
|
29
|
+
name,
|
|
30
|
+
display_name,
|
|
31
|
+
provider_type,
|
|
32
|
+
provider_status,
|
|
33
|
+
payload,
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
# ProviderAdminServiceApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**providerAdminServiceProviderCreate**](#provideradminserviceprovidercreate) | **POST** /admin/provider/create | |
|
|
8
|
+
|[**providerAdminServiceProviderDelete**](#provideradminserviceproviderdelete) | **POST** /admin/provider/delete | |
|
|
9
|
+
|[**providerAdminServiceProviderGet**](#provideradminserviceproviderget) | **GET** /admin/provider/get | |
|
|
10
|
+
|[**providerAdminServiceProviderList**](#provideradminserviceproviderlist) | **GET** /admin/provider/list | |
|
|
11
|
+
|[**providerAdminServiceProviderUpdate**](#provideradminserviceproviderupdate) | **POST** /admin/provider/update | |
|
|
12
|
+
|
|
13
|
+
# **providerAdminServiceProviderCreate**
|
|
14
|
+
> ProviderCreateResponse providerAdminServiceProviderCreate(providerCreateRequest)
|
|
15
|
+
|
|
16
|
+
ProviderCreate 创建新的 Provider Create a new AI model provider 请求路径: POST /admin/provider/create Request path: POST /admin/provider/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
|
|
17
|
+
|
|
18
|
+
### Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import {
|
|
22
|
+
ProviderAdminServiceApi,
|
|
23
|
+
Configuration,
|
|
24
|
+
ProviderCreateRequest
|
|
25
|
+
} from '@cherryin/api-client';
|
|
26
|
+
|
|
27
|
+
const configuration = new Configuration();
|
|
28
|
+
const apiInstance = new ProviderAdminServiceApi(configuration);
|
|
29
|
+
|
|
30
|
+
let providerCreateRequest: ProviderCreateRequest; //
|
|
31
|
+
|
|
32
|
+
const { status, data } = await apiInstance.providerAdminServiceProviderCreate(
|
|
33
|
+
providerCreateRequest
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Parameters
|
|
38
|
+
|
|
39
|
+
|Name | Type | Description | Notes|
|
|
40
|
+
|------------- | ------------- | ------------- | -------------|
|
|
41
|
+
| **providerCreateRequest** | **ProviderCreateRequest**| | |
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Return type
|
|
45
|
+
|
|
46
|
+
**ProviderCreateResponse**
|
|
47
|
+
|
|
48
|
+
### Authorization
|
|
49
|
+
|
|
50
|
+
No authorization required
|
|
51
|
+
|
|
52
|
+
### HTTP request headers
|
|
53
|
+
|
|
54
|
+
- **Content-Type**: application/json
|
|
55
|
+
- **Accept**: application/json
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### HTTP response details
|
|
59
|
+
| Status code | Description | Response headers |
|
|
60
|
+
|-------------|-------------|------------------|
|
|
61
|
+
|**200** | OK | - |
|
|
62
|
+
|**0** | Default error response | - |
|
|
63
|
+
|
|
64
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
65
|
+
|
|
66
|
+
# **providerAdminServiceProviderDelete**
|
|
67
|
+
> ProviderDeleteResponse providerAdminServiceProviderDelete(providerDeleteRequest)
|
|
68
|
+
|
|
69
|
+
ProviderDelete 删除 Provider(软删除) Delete a provider (soft delete) 请求路径: POST /admin/provider/delete Request path: POST /admin/provider/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
|
|
70
|
+
|
|
71
|
+
### Example
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import {
|
|
75
|
+
ProviderAdminServiceApi,
|
|
76
|
+
Configuration,
|
|
77
|
+
ProviderDeleteRequest
|
|
78
|
+
} from '@cherryin/api-client';
|
|
79
|
+
|
|
80
|
+
const configuration = new Configuration();
|
|
81
|
+
const apiInstance = new ProviderAdminServiceApi(configuration);
|
|
82
|
+
|
|
83
|
+
let providerDeleteRequest: ProviderDeleteRequest; //
|
|
84
|
+
|
|
85
|
+
const { status, data } = await apiInstance.providerAdminServiceProviderDelete(
|
|
86
|
+
providerDeleteRequest
|
|
87
|
+
);
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Parameters
|
|
91
|
+
|
|
92
|
+
|Name | Type | Description | Notes|
|
|
93
|
+
|------------- | ------------- | ------------- | -------------|
|
|
94
|
+
| **providerDeleteRequest** | **ProviderDeleteRequest**| | |
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Return type
|
|
98
|
+
|
|
99
|
+
**ProviderDeleteResponse**
|
|
100
|
+
|
|
101
|
+
### Authorization
|
|
102
|
+
|
|
103
|
+
No authorization required
|
|
104
|
+
|
|
105
|
+
### HTTP request headers
|
|
106
|
+
|
|
107
|
+
- **Content-Type**: application/json
|
|
108
|
+
- **Accept**: application/json
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### HTTP response details
|
|
112
|
+
| Status code | Description | Response headers |
|
|
113
|
+
|-------------|-------------|------------------|
|
|
114
|
+
|**200** | OK | - |
|
|
115
|
+
|**0** | Default error response | - |
|
|
116
|
+
|
|
117
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
118
|
+
|
|
119
|
+
# **providerAdminServiceProviderGet**
|
|
120
|
+
> ProviderGetResponse providerAdminServiceProviderGet()
|
|
121
|
+
|
|
122
|
+
ProviderGet 根据 ID 获取单个 Provider Retrieve a single provider by ID 请求路径: GET /admin/provider/get?id={id} Request path: GET /admin/provider/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
|
|
123
|
+
|
|
124
|
+
### Example
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import {
|
|
128
|
+
ProviderAdminServiceApi,
|
|
129
|
+
Configuration
|
|
130
|
+
} from '@cherryin/api-client';
|
|
131
|
+
|
|
132
|
+
const configuration = new Configuration();
|
|
133
|
+
const apiInstance = new ProviderAdminServiceApi(configuration);
|
|
134
|
+
|
|
135
|
+
let id: string; //id 要获取的 Provider 的唯一标识符 Unique identifier of the provider to retrieve @gotags: form:\"id\" binding:\"required\" (optional) (default to undefined)
|
|
136
|
+
|
|
137
|
+
const { status, data } = await apiInstance.providerAdminServiceProviderGet(
|
|
138
|
+
id
|
|
139
|
+
);
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Parameters
|
|
143
|
+
|
|
144
|
+
|Name | Type | Description | Notes|
|
|
145
|
+
|------------- | ------------- | ------------- | -------------|
|
|
146
|
+
| **id** | [**string**] | id 要获取的 Provider 的唯一标识符 Unique identifier of the provider to retrieve @gotags: form:\"id\" binding:\"required\" | (optional) defaults to undefined|
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Return type
|
|
150
|
+
|
|
151
|
+
**ProviderGetResponse**
|
|
152
|
+
|
|
153
|
+
### Authorization
|
|
154
|
+
|
|
155
|
+
No authorization required
|
|
156
|
+
|
|
157
|
+
### HTTP request headers
|
|
158
|
+
|
|
159
|
+
- **Content-Type**: Not defined
|
|
160
|
+
- **Accept**: application/json
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### HTTP response details
|
|
164
|
+
| Status code | Description | Response headers |
|
|
165
|
+
|-------------|-------------|------------------|
|
|
166
|
+
|**200** | OK | - |
|
|
167
|
+
|**0** | Default error response | - |
|
|
168
|
+
|
|
169
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
170
|
+
|
|
171
|
+
# **providerAdminServiceProviderList**
|
|
172
|
+
> ProviderListResponse providerAdminServiceProviderList()
|
|
173
|
+
|
|
174
|
+
ProviderList 分页查询 Provider 列表,支持按状态和名称前缀过滤 List providers with pagination, supports filtering by status and name prefix 请求路径: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} Request path: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
|
|
175
|
+
|
|
176
|
+
### Example
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
import {
|
|
180
|
+
ProviderAdminServiceApi,
|
|
181
|
+
Configuration
|
|
182
|
+
} from '@cherryin/api-client';
|
|
183
|
+
|
|
184
|
+
const configuration = new Configuration();
|
|
185
|
+
const apiInstance = new ProviderAdminServiceApi(configuration);
|
|
186
|
+
|
|
187
|
+
let page: number; //page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\" (optional) (default to undefined)
|
|
188
|
+
let pageSize: number; //page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\" (optional) (default to undefined)
|
|
189
|
+
let providerStatus: number; //provider_status 按状态过滤(可选) Filter by provider status (optional) 0: 返回所有状态 1: 仅返回启用的 Provider 2: 仅返回禁用的 Provider 0: return all statuses 1: return only active providers 2: return only disabled providers @gotags: form:\"provider_status\" (optional) (default to undefined)
|
|
190
|
+
let namePrefix: string; //name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"openai\" 会匹配 \"openai-prod-1\", \"openai-dev-1\" 等 Example: \"openai\" matches \"openai-prod-1\", \"openai-dev-1\", etc. @gotags: form:\"name_prefix\" (optional) (default to undefined)
|
|
191
|
+
|
|
192
|
+
const { status, data } = await apiInstance.providerAdminServiceProviderList(
|
|
193
|
+
page,
|
|
194
|
+
pageSize,
|
|
195
|
+
providerStatus,
|
|
196
|
+
namePrefix
|
|
197
|
+
);
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Parameters
|
|
201
|
+
|
|
202
|
+
|Name | Type | Description | Notes|
|
|
203
|
+
|------------- | ------------- | ------------- | -------------|
|
|
204
|
+
| **page** | [**number**] | page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\" | (optional) defaults to undefined|
|
|
205
|
+
| **pageSize** | [**number**] | page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\" | (optional) defaults to undefined|
|
|
206
|
+
| **providerStatus** | [**number**] | provider_status 按状态过滤(可选) Filter by provider status (optional) 0: 返回所有状态 1: 仅返回启用的 Provider 2: 仅返回禁用的 Provider 0: return all statuses 1: return only active providers 2: return only disabled providers @gotags: form:\"provider_status\" | (optional) defaults to undefined|
|
|
207
|
+
| **namePrefix** | [**string**] | name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"openai\" 会匹配 \"openai-prod-1\", \"openai-dev-1\" 等 Example: \"openai\" matches \"openai-prod-1\", \"openai-dev-1\", etc. @gotags: form:\"name_prefix\" | (optional) defaults to undefined|
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
### Return type
|
|
211
|
+
|
|
212
|
+
**ProviderListResponse**
|
|
213
|
+
|
|
214
|
+
### Authorization
|
|
215
|
+
|
|
216
|
+
No authorization required
|
|
217
|
+
|
|
218
|
+
### HTTP request headers
|
|
219
|
+
|
|
220
|
+
- **Content-Type**: Not defined
|
|
221
|
+
- **Accept**: application/json
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### HTTP response details
|
|
225
|
+
| Status code | Description | Response headers |
|
|
226
|
+
|-------------|-------------|------------------|
|
|
227
|
+
|**200** | OK | - |
|
|
228
|
+
|**0** | Default error response | - |
|
|
229
|
+
|
|
230
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
231
|
+
|
|
232
|
+
# **providerAdminServiceProviderUpdate**
|
|
233
|
+
> ProviderUpdateResponse providerAdminServiceProviderUpdate(providerUpdateRequest)
|
|
234
|
+
|
|
235
|
+
ProviderUpdate 更新现有的 Provider Update an existing AI model provider 请求路径: POST /admin/provider/update Request path: POST /admin/provider/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
|
|
236
|
+
|
|
237
|
+
### Example
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
import {
|
|
241
|
+
ProviderAdminServiceApi,
|
|
242
|
+
Configuration,
|
|
243
|
+
ProviderUpdateRequest
|
|
244
|
+
} from '@cherryin/api-client';
|
|
245
|
+
|
|
246
|
+
const configuration = new Configuration();
|
|
247
|
+
const apiInstance = new ProviderAdminServiceApi(configuration);
|
|
248
|
+
|
|
249
|
+
let providerUpdateRequest: ProviderUpdateRequest; //
|
|
250
|
+
|
|
251
|
+
const { status, data } = await apiInstance.providerAdminServiceProviderUpdate(
|
|
252
|
+
providerUpdateRequest
|
|
253
|
+
);
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Parameters
|
|
257
|
+
|
|
258
|
+
|Name | Type | Description | Notes|
|
|
259
|
+
|------------- | ------------- | ------------- | -------------|
|
|
260
|
+
| **providerUpdateRequest** | **ProviderUpdateRequest**| | |
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
### Return type
|
|
264
|
+
|
|
265
|
+
**ProviderUpdateResponse**
|
|
266
|
+
|
|
267
|
+
### Authorization
|
|
268
|
+
|
|
269
|
+
No authorization required
|
|
270
|
+
|
|
271
|
+
### HTTP request headers
|
|
272
|
+
|
|
273
|
+
- **Content-Type**: application/json
|
|
274
|
+
- **Accept**: application/json
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
### HTTP response details
|
|
278
|
+
| Status code | Description | Response headers |
|
|
279
|
+
|-------------|-------------|------------------|
|
|
280
|
+
|**200** | OK | - |
|
|
281
|
+
|**0** | Default error response | - |
|
|
282
|
+
|
|
283
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
284
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ProviderAuth
|
|
2
|
+
|
|
3
|
+
ProviderAuth 包含 Provider 的认证详情,支持多种认证方式 Provider authentication details, supports multiple authentication methods
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**auth_type** | **string** | auth_type 认证类型,例如 \"apikey\" 或 \"google\" Authentication type, e.g., \"apikey\" or \"google\" 可选值: \"apikey\", \"google\" Available values: \"apikey\", \"google\" | [optional] [default to undefined]
|
|
10
|
+
**base_url** | **string** | base_url Provider 的基础 URL 地址 Base URL for the provider\'s API endpoint | [optional] [default to undefined]
|
|
11
|
+
**api_keys** | **Array<string>** | api_keys API Key 列表,用于 API Key 认证方式 List of API keys for API key-based authentication 支持配置多个 API Key 用于负载均衡和容错 Supports multiple API keys for load balancing and failover | [optional] [default to undefined]
|
|
12
|
+
**gcp_auth_list** | [**Array<GCPAuth>**](GCPAuth.md) | gcp_auth_list GCP 认证配置列表,用于 Google Cloud Platform 认证 List of GCP authentication configurations for Google Cloud Platform 支持配置多个 GCP 认证用于负载均衡和容错 Supports multiple GCP auth configs for load balancing and failover | [optional] [default to undefined]
|
|
13
|
+
**aws_auth_list** | [**Array<AWSAuth>**](AWSAuth.md) | aws_auth_list AWS 认证配置列表,用于 Amazon Web Services 认证 | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { ProviderAuth } from '@cherryin/api-client';
|
|
19
|
+
|
|
20
|
+
const instance: ProviderAuth = {
|
|
21
|
+
auth_type,
|
|
22
|
+
base_url,
|
|
23
|
+
api_keys,
|
|
24
|
+
gcp_auth_list,
|
|
25
|
+
aws_auth_list,
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# ProviderCreateRequest
|
|
2
|
+
|
|
3
|
+
ProviderCreateRequest 创建 Provider 的请求 Request message for creating a new provider
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**name** | **string** | name Provider 的唯一名称标识,例如 \"openai-prod-1\" Unique name identifier for the provider, e.g., \"openai-prod-1\" 必须唯一,用于系统内部引用 Must be unique, used for internal system reference | [optional] [default to undefined]
|
|
10
|
+
**display_name** | **string** | display_name Provider 的显示名称,例如 \"OpenAI Production\" Display name for the provider, e.g., \"OpenAI Production\" 用于用户界面显示 Used for UI display | [optional] [default to undefined]
|
|
11
|
+
**provider_type** | **string** | provider_type Provider 类型 Provider type 可选值: \"openai\", \"anthropic\", \"google\" Available values: \"openai\", \"anthropic\", \"google\" | [optional] [default to undefined]
|
|
12
|
+
**provider_status** | **number** | provider_status Provider 状态 Provider status 1: 启用 (Active) 2: 禁用 (Disabled) | [optional] [default to undefined]
|
|
13
|
+
**payload** | [**ProviderPayload**](ProviderPayload.md) | payload Provider 的认证和配置详情 Authentication and configuration details for the provider | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { ProviderCreateRequest } from '@cherryin/api-client';
|
|
19
|
+
|
|
20
|
+
const instance: ProviderCreateRequest = {
|
|
21
|
+
name,
|
|
22
|
+
display_name,
|
|
23
|
+
provider_type,
|
|
24
|
+
provider_status,
|
|
25
|
+
payload,
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ProviderCreateResponse
|
|
2
|
+
|
|
3
|
+
ProviderCreateResponse 创建 Provider 的响应 Response message for provider creation
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**code** | **string** | code 响应状态码,0 表示成功 Response code, 0 indicates success | [optional] [default to undefined]
|
|
10
|
+
**message** | **string** | message 响应消息 Response message | [optional] [default to undefined]
|
|
11
|
+
**data** | [**Provider**](Provider.md) | data 创建成功后返回的 Provider 信息 Provider information returned after successful creation | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { ProviderCreateResponse } from '@cherryin/api-client';
|
|
17
|
+
|
|
18
|
+
const instance: ProviderCreateResponse = {
|
|
19
|
+
code,
|
|
20
|
+
message,
|
|
21
|
+
data,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ProviderDeleteRequest
|
|
2
|
+
|
|
3
|
+
ProviderDeleteRequest 删除 Provider 的请求 Request message for deleting a provider
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | id 要删除的 Provider 的唯一标识符 Unique identifier of the provider to delete @gotags: form:\"id\" binding:\"required\" | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { ProviderDeleteRequest } from '@cherryin/api-client';
|
|
15
|
+
|
|
16
|
+
const instance: ProviderDeleteRequest = {
|
|
17
|
+
id,
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ProviderDeleteResponse
|
|
2
|
+
|
|
3
|
+
ProviderDeleteResponse 删除 Provider 的响应 Response message for provider deletion
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**code** | **string** | code 响应状态码,0 表示成功 Response code, 0 indicates success | [optional] [default to undefined]
|
|
10
|
+
**message** | **string** | message 响应消息 Response message | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { ProviderDeleteResponse } from '@cherryin/api-client';
|
|
16
|
+
|
|
17
|
+
const instance: ProviderDeleteResponse = {
|
|
18
|
+
code,
|
|
19
|
+
message,
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ProviderGetResponse
|
|
2
|
+
|
|
3
|
+
ProviderGetResponse 获取单个 Provider 的响应 Response message for provider retrieval
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**code** | **string** | code 响应状态码,0 表示成功 Response code, 0 indicates success | [optional] [default to undefined]
|
|
10
|
+
**message** | **string** | message 响应消息 Response message | [optional] [default to undefined]
|
|
11
|
+
**data** | [**Provider**](Provider.md) | data Provider 信息 Provider information | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { ProviderGetResponse } from '@cherryin/api-client';
|
|
17
|
+
|
|
18
|
+
const instance: ProviderGetResponse = {
|
|
19
|
+
code,
|
|
20
|
+
message,
|
|
21
|
+
data,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# ProviderListResponse
|
|
2
|
+
|
|
3
|
+
ProviderListResponse 分页查询 Provider 列表的响应 Response message for provider listing
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**code** | **string** | code 响应状态码,0 表示成功 Response code, 0 indicates success | [optional] [default to undefined]
|
|
10
|
+
**message** | **string** | message 响应消息 Response message | [optional] [default to undefined]
|
|
11
|
+
**list** | [**Array<Provider>**](Provider.md) | list Provider 列表 List of providers | [optional] [default to undefined]
|
|
12
|
+
**total** | **string** | total 符合条件的 Provider 总数 Total number of providers matching the filter criteria | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { ProviderListResponse } from '@cherryin/api-client';
|
|
18
|
+
|
|
19
|
+
const instance: ProviderListResponse = {
|
|
20
|
+
code,
|
|
21
|
+
message,
|
|
22
|
+
list,
|
|
23
|
+
total,
|
|
24
|
+
};
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# ProviderModel
|
|
2
|
+
|
|
3
|
+
ProviderModel represents a specific model offered by a provider (e.g., gpt-4-turbo, claude-3-opus) ProviderModel 代表供应商提供的特定模型(例如 gpt-4-turbo、claude-3-opus)
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | id ProviderModel 的唯一标识符 Unique identifier for the provider model | [optional] [default to undefined]
|
|
10
|
+
**created_at** | **string** | created_at 创建时间戳(Unix 时间戳) Creation timestamp (Unix timestamp) | [optional] [default to undefined]
|
|
11
|
+
**updated_at** | **string** | updated_at 更新时间戳(Unix 时间戳) Last update timestamp (Unix timestamp) | [optional] [default to undefined]
|
|
12
|
+
**deleted_at** | **string** | deleted_at 软删除时间戳,0 表示未删除 Soft deletion timestamp, 0 means not deleted | [optional] [default to undefined]
|
|
13
|
+
**provider_id** | **string** | provider_id 关联的 Provider ID Associated Provider ID | [optional] [default to undefined]
|
|
14
|
+
**name** | **string** | name 模型的唯一名称标识,例如 \"gpt-4-turbo\", \"claude-3-opus\" Unique name identifier for the model, e.g., \"gpt-4-turbo\", \"claude-3-opus\" | [optional] [default to undefined]
|
|
15
|
+
**display_name** | **string** | display_name 模型的显示名称,例如 \"GPT-4 Turbo\", \"Claude 3 Opus\" Display name for the model, e.g., \"GPT-4 Turbo\", \"Claude 3 Opus\" | [optional] [default to undefined]
|
|
16
|
+
**status** | **number** | status 模型状态 Model status 1: 草稿 (Draft) 2: 启用 (Active) 3: 禁用 (Disabled) | [optional] [default to undefined]
|
|
17
|
+
**payload** | [**ProviderModelPayload**](ProviderModelPayload.md) | payload 模型的配置详情 Configuration details for the model | [optional] [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { ProviderModel } from '@cherryin/api-client';
|
|
23
|
+
|
|
24
|
+
const instance: ProviderModel = {
|
|
25
|
+
id,
|
|
26
|
+
created_at,
|
|
27
|
+
updated_at,
|
|
28
|
+
deleted_at,
|
|
29
|
+
provider_id,
|
|
30
|
+
name,
|
|
31
|
+
display_name,
|
|
32
|
+
status,
|
|
33
|
+
payload,
|
|
34
|
+
};
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|