@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,37 @@
|
|
|
1
|
+
# AIModelPricingConfig
|
|
2
|
+
|
|
3
|
+
AIModelPricingConfig 统一的模型价格配置 - aligns with db.AIModelPricing Unified model pricing configuration
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**currency_code** | **string** | currency_code 货币代码,例如 \"USD\", \"CNY\" Currency code, e.g., \"USD\", \"CNY\" | [optional] [default to undefined]
|
|
10
|
+
**pricing_name** | **string** | pricing_name 价格配置名称,例如 \"Standard Pricing\", \"Premium Tier\" Pricing configuration name | [optional] [default to undefined]
|
|
11
|
+
**pricing_type** | **string** | pricing_type 价格类型: \"standard\", \"batch\", \"cached\", \"fine_tuned\" Pricing type | [optional] [default to undefined]
|
|
12
|
+
**priority** | **number** | priority 优先级,数值越大优先级越高 Priority, higher value means higher priority | [optional] [default to undefined]
|
|
13
|
+
**pricing_rules** | [**PricingRules**](PricingRules.md) | pricing_rules 价格规则配置 Pricing rules configuration | [optional] [default to undefined]
|
|
14
|
+
**pricing_conditions** | [**PricingConditions**](PricingConditions.md) | pricing_conditions 价格生效条件(可选) Pricing conditions (optional) | [optional] [default to undefined]
|
|
15
|
+
**pricing_status** | **number** | pricing_status 价格状态: 0=未激活, 1=激活中 Pricing status: 0=inactive, 1=active | [optional] [default to undefined]
|
|
16
|
+
**effective_from** | **string** | effective_from 生效开始时间戳(Unix时间,0表示立即生效) Effective from timestamp (Unix time, 0 means immediately) | [optional] [default to undefined]
|
|
17
|
+
**effective_until** | **string** | effective_until 生效结束时间戳(Unix时间,0表示永久有效) Effective until timestamp (Unix time, 0 means永久) | [optional] [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { AIModelPricingConfig } from '@cherryin/api-client';
|
|
23
|
+
|
|
24
|
+
const instance: AIModelPricingConfig = {
|
|
25
|
+
currency_code,
|
|
26
|
+
pricing_name,
|
|
27
|
+
pricing_type,
|
|
28
|
+
priority,
|
|
29
|
+
pricing_rules,
|
|
30
|
+
pricing_conditions,
|
|
31
|
+
pricing_status,
|
|
32
|
+
effective_from,
|
|
33
|
+
effective_until,
|
|
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,29 @@
|
|
|
1
|
+
# AIModelProviderConfigItem
|
|
2
|
+
|
|
3
|
+
AIModelProviderConfigItem 代表创建/更新 AIModel 时的 Provider 配置项 Represents a provider configuration item when creating/updating AIModel
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**provider_id** | **string** | provider_id 关联的 Provider ID Associated Provider ID | [optional] [default to undefined]
|
|
10
|
+
**provider_model_id** | **string** | provider_model_id 关联的 ProviderModel ID Associated ProviderModel ID | [optional] [default to undefined]
|
|
11
|
+
**priority** | **string** | priority 优先级,数值越小优先级越高 Priority, lower value means higher priority | [optional] [default to undefined]
|
|
12
|
+
**traffic_permille** | **string** | traffic_permille 流量千分比 (0-1000) Traffic permille (0-1000) | [optional] [default to undefined]
|
|
13
|
+
**endpoint_mapping** | **{ [key: string]: string; }** | endpoint_mapping 端点映射配置 Endpoint mapping configuration key: ai model endpoint id (e.g., \"openai:chat/completions\") value: provider api endpoint id (e.g., \"anthropic:messages\") | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { AIModelProviderConfigItem } from '@cherryin/api-client';
|
|
19
|
+
|
|
20
|
+
const instance: AIModelProviderConfigItem = {
|
|
21
|
+
provider_id,
|
|
22
|
+
provider_model_id,
|
|
23
|
+
priority,
|
|
24
|
+
traffic_permille,
|
|
25
|
+
endpoint_mapping,
|
|
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,21 @@
|
|
|
1
|
+
# AIModelPublishRequest
|
|
2
|
+
|
|
3
|
+
AIModelPublishRequest 发布 AIModel 的请求 Request message for publishing an AI model
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | id 要发布的 AIModel 的唯一标识符 Unique identifier of the AI model to publish @gotags: form:\"id\" binding:\"required\" | [optional] [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { AIModelPublishRequest } from '@cherryin/api-client';
|
|
15
|
+
|
|
16
|
+
const instance: AIModelPublishRequest = {
|
|
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,25 @@
|
|
|
1
|
+
# AIModelPublishResponse
|
|
2
|
+
|
|
3
|
+
AIModelPublishResponse 发布 AIModel 的响应 Response message for AI model publish
|
|
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** | [**AIModel**](AIModel.md) | data 发布后的 AIModel 信息 Published AI model information | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AIModelPublishResponse } from '@cherryin/api-client';
|
|
17
|
+
|
|
18
|
+
const instance: AIModelPublishResponse = {
|
|
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,37 @@
|
|
|
1
|
+
# AIModelUpdateRequest
|
|
2
|
+
|
|
3
|
+
AIModelUpdateRequest 更新 AIModel 的请求 Request message for updating an existing AI model
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | id AIModel 的唯一标识符 Unique identifier of the AI model to update | [optional] [default to undefined]
|
|
10
|
+
**name** | **string** | name 模型的唯一名称标识 Unique name identifier for the model | [optional] [default to undefined]
|
|
11
|
+
**display_name** | **string** | display_name 模型的显示名称 Display name for the model | [optional] [default to undefined]
|
|
12
|
+
**group** | **string** | group 模型分组 Model group | [optional] [default to undefined]
|
|
13
|
+
**description** | **string** | description 模型描述 Model description | [optional] [default to undefined]
|
|
14
|
+
**meta** | [**AIModelMeta**](AIModelMeta.md) | meta 元数据 Metadata | [optional] [default to undefined]
|
|
15
|
+
**pricing_configs** | [**Array<AIModelPricingConfig>**](AIModelPricingConfig.md) | pricing_configs 价格配置列表 Pricing configurations | [optional] [default to undefined]
|
|
16
|
+
**provider_configs** | [**Array<AIModelProviderConfigItem>**](AIModelProviderConfigItem.md) | provider_configs Provider 配置列表 Provider configuration list | [optional] [default to undefined]
|
|
17
|
+
**discount_config** | [**AIModelDiscountConfig**](AIModelDiscountConfig.md) | discount_config 折扣配置 | [optional] [default to undefined]
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { AIModelUpdateRequest } from '@cherryin/api-client';
|
|
23
|
+
|
|
24
|
+
const instance: AIModelUpdateRequest = {
|
|
25
|
+
id,
|
|
26
|
+
name,
|
|
27
|
+
display_name,
|
|
28
|
+
group,
|
|
29
|
+
description,
|
|
30
|
+
meta,
|
|
31
|
+
pricing_configs,
|
|
32
|
+
provider_configs,
|
|
33
|
+
discount_config,
|
|
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,25 @@
|
|
|
1
|
+
# AIModelUpdateResponse
|
|
2
|
+
|
|
3
|
+
AIModelUpdateResponse 更新 AIModel 的响应 Response message for AI model update
|
|
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** | [**AIModel**](AIModel.md) | data 更新后的 AIModel 信息 Updated AI model information | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AIModelUpdateResponse } from '@cherryin/api-client';
|
|
17
|
+
|
|
18
|
+
const instance: AIModelUpdateResponse = {
|
|
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)
|
package/docs/AWSAuth.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# AWSAuth
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**region** | **string** | region AWS 区域,例如 \"us-east1\" | [optional] [default to undefined]
|
|
9
|
+
**ak** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**sk** | **string** | | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AWSAuth } from '@cherryin/api-client';
|
|
16
|
+
|
|
17
|
+
const instance: AWSAuth = {
|
|
18
|
+
region,
|
|
19
|
+
ak,
|
|
20
|
+
sk,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[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,24 @@
|
|
|
1
|
+
# AdminAuthFlowInitResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**code** | **string** | | [optional] [default to undefined]
|
|
9
|
+
**message** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**auth_result** | [**AuthFlowResult**](AuthFlowResult.md) | 对于部分流程(例如邮箱密码登录),只需要 init 即可完成授权登录态,则会直接返回 AuthData 否则需要继续走完后续流程和调用相关接口. | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AdminAuthFlowInitResponse } from '@cherryin/api-client';
|
|
16
|
+
|
|
17
|
+
const instance: AdminAuthFlowInitResponse = {
|
|
18
|
+
code,
|
|
19
|
+
message,
|
|
20
|
+
auth_result,
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
[[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,81 @@
|
|
|
1
|
+
# AdminAuthServiceApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**adminAuthServiceAdminAuthFlowInit**](#adminauthserviceadminauthflowinit) | **POST** /admin/auth/init | |
|
|
8
|
+
|
|
9
|
+
# **adminAuthServiceAdminAuthFlowInit**
|
|
10
|
+
> AdminAuthFlowInitResponse adminAuthServiceAdminAuthFlowInit()
|
|
11
|
+
|
|
12
|
+
管理员登录
|
|
13
|
+
|
|
14
|
+
### Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import {
|
|
18
|
+
AdminAuthServiceApi,
|
|
19
|
+
Configuration
|
|
20
|
+
} from '@cherryin/api-client';
|
|
21
|
+
|
|
22
|
+
const configuration = new Configuration();
|
|
23
|
+
const apiInstance = new AdminAuthServiceApi(configuration);
|
|
24
|
+
|
|
25
|
+
let authType: number; // (optional) (default to undefined)
|
|
26
|
+
let authAction: number; // (optional) (default to undefined)
|
|
27
|
+
let payloadEmailPayloadUserEmail: string; // (optional) (default to undefined)
|
|
28
|
+
let payloadEmailPayloadUserPasswordEncrypt: string; // (optional) (default to undefined)
|
|
29
|
+
let authAt: string; // (optional) (default to undefined)
|
|
30
|
+
let nonce: string; // (optional) (default to undefined)
|
|
31
|
+
let signature: string; //加密方式: step1: 拼接一个字符串: s = \"cherryin_admin:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform ) (optional) (default to undefined)
|
|
32
|
+
let sessionType: string; //enum string: - tenant_admin - sys_admin (optional) (default to undefined)
|
|
33
|
+
|
|
34
|
+
const { status, data } = await apiInstance.adminAuthServiceAdminAuthFlowInit(
|
|
35
|
+
authType,
|
|
36
|
+
authAction,
|
|
37
|
+
payloadEmailPayloadUserEmail,
|
|
38
|
+
payloadEmailPayloadUserPasswordEncrypt,
|
|
39
|
+
authAt,
|
|
40
|
+
nonce,
|
|
41
|
+
signature,
|
|
42
|
+
sessionType
|
|
43
|
+
);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Parameters
|
|
47
|
+
|
|
48
|
+
|Name | Type | Description | Notes|
|
|
49
|
+
|------------- | ------------- | ------------- | -------------|
|
|
50
|
+
| **authType** | [**number**] | | (optional) defaults to undefined|
|
|
51
|
+
| **authAction** | [**number**] | | (optional) defaults to undefined|
|
|
52
|
+
| **payloadEmailPayloadUserEmail** | [**string**] | | (optional) defaults to undefined|
|
|
53
|
+
| **payloadEmailPayloadUserPasswordEncrypt** | [**string**] | | (optional) defaults to undefined|
|
|
54
|
+
| **authAt** | [**string**] | | (optional) defaults to undefined|
|
|
55
|
+
| **nonce** | [**string**] | | (optional) defaults to undefined|
|
|
56
|
+
| **signature** | [**string**] | 加密方式: step1: 拼接一个字符串: s = \"cherryin_admin:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform ) | (optional) defaults to undefined|
|
|
57
|
+
| **sessionType** | [**string**] | enum string: - tenant_admin - sys_admin | (optional) defaults to undefined|
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Return type
|
|
61
|
+
|
|
62
|
+
**AdminAuthFlowInitResponse**
|
|
63
|
+
|
|
64
|
+
### Authorization
|
|
65
|
+
|
|
66
|
+
No authorization required
|
|
67
|
+
|
|
68
|
+
### HTTP request headers
|
|
69
|
+
|
|
70
|
+
- **Content-Type**: Not defined
|
|
71
|
+
- **Accept**: application/json
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### HTTP response details
|
|
75
|
+
| Status code | Description | Response headers |
|
|
76
|
+
|-------------|-------------|------------------|
|
|
77
|
+
|**200** | OK | - |
|
|
78
|
+
|**0** | Default error response | - |
|
|
79
|
+
|
|
80
|
+
[[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)
|
|
81
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# AudioPricing
|
|
2
|
+
|
|
3
|
+
AudioPricing 音频计费 Audio pricing
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | id 价格配置ID Price configuration ID | [optional] [default to undefined]
|
|
10
|
+
**mode** | **string** | mode 计费模式: \"per_second\", \"per_token\" Pricing mode | [optional] [default to undefined]
|
|
11
|
+
**input_per_token** | **string** | input_per_token 输入每Token费用 Input fee per token | [optional] [default to undefined]
|
|
12
|
+
**output_per_token** | **string** | output_per_token 输出每Token费用 Output fee per token | [optional] [default to undefined]
|
|
13
|
+
**input_per_second** | **string** | input_per_second 输入每秒费用 Input fee per second | [optional] [default to undefined]
|
|
14
|
+
**output_per_second** | **string** | output_per_second 输出每秒费用 Output fee per second | [optional] [default to undefined]
|
|
15
|
+
**extra** | **{ [key: string]: string; }** | extra 扩展计算 Extra calculation options | [optional] [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { AudioPricing } from '@cherryin/api-client';
|
|
21
|
+
|
|
22
|
+
const instance: AudioPricing = {
|
|
23
|
+
id,
|
|
24
|
+
mode,
|
|
25
|
+
input_per_token,
|
|
26
|
+
output_per_token,
|
|
27
|
+
input_per_second,
|
|
28
|
+
output_per_second,
|
|
29
|
+
extra,
|
|
30
|
+
};
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[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
|
+
# AuthFlowResult
|
|
2
|
+
|
|
3
|
+
AuthFlowResult 授权登录态获取成功后的数据
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**is_authed** | **boolean** | | [optional] [default to undefined]
|
|
10
|
+
**auth_tokens** | [**AuthTokenPair**](AuthTokenPair.md) | | [optional] [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { AuthFlowResult } from '@cherryin/api-client';
|
|
16
|
+
|
|
17
|
+
const instance: AuthFlowResult = {
|
|
18
|
+
is_authed,
|
|
19
|
+
auth_tokens,
|
|
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,27 @@
|
|
|
1
|
+
# AuthTokenPair
|
|
2
|
+
|
|
3
|
+
AuthTokenPair 登录态授权 AT + RT
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**access_token** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**access_expires_at** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**refresh_token** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**refresh_expires_at** | **string** | | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { AuthTokenPair } from '@cherryin/api-client';
|
|
18
|
+
|
|
19
|
+
const instance: AuthTokenPair = {
|
|
20
|
+
access_token,
|
|
21
|
+
access_expires_at,
|
|
22
|
+
refresh_token,
|
|
23
|
+
refresh_expires_at,
|
|
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,281 @@
|
|
|
1
|
+
# DiscountAdminServiceApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
|Method | HTTP request | Description|
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
|[**discountAdminServiceDiscountCreate**](#discountadminservicediscountcreate) | **POST** /admin/discount/create | |
|
|
8
|
+
|[**discountAdminServiceDiscountDelete**](#discountadminservicediscountdelete) | **DELETE** /admin/discount/delete | |
|
|
9
|
+
|[**discountAdminServiceDiscountGet**](#discountadminservicediscountget) | **GET** /admin/discount/get | |
|
|
10
|
+
|[**discountAdminServiceDiscountList**](#discountadminservicediscountlist) | **GET** /admin/discount/list | |
|
|
11
|
+
|[**discountAdminServiceDiscountUpdate**](#discountadminservicediscountupdate) | **POST** /admin/discount/update | |
|
|
12
|
+
|
|
13
|
+
# **discountAdminServiceDiscountCreate**
|
|
14
|
+
> DiscountCreateRequest discountAdminServiceDiscountCreate(discountCreateRequest)
|
|
15
|
+
|
|
16
|
+
DiscountCreate 创建折扣接口
|
|
17
|
+
|
|
18
|
+
### Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import {
|
|
22
|
+
DiscountAdminServiceApi,
|
|
23
|
+
Configuration,
|
|
24
|
+
DiscountCreateRequest
|
|
25
|
+
} from '@cherryin/api-client';
|
|
26
|
+
|
|
27
|
+
const configuration = new Configuration();
|
|
28
|
+
const apiInstance = new DiscountAdminServiceApi(configuration);
|
|
29
|
+
|
|
30
|
+
let discountCreateRequest: DiscountCreateRequest; //
|
|
31
|
+
|
|
32
|
+
const { status, data } = await apiInstance.discountAdminServiceDiscountCreate(
|
|
33
|
+
discountCreateRequest
|
|
34
|
+
);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Parameters
|
|
38
|
+
|
|
39
|
+
|Name | Type | Description | Notes|
|
|
40
|
+
|------------- | ------------- | ------------- | -------------|
|
|
41
|
+
| **discountCreateRequest** | **DiscountCreateRequest**| | |
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Return type
|
|
45
|
+
|
|
46
|
+
**DiscountCreateRequest**
|
|
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
|
+
# **discountAdminServiceDiscountDelete**
|
|
67
|
+
> DiscountDeleteResponse discountAdminServiceDiscountDelete(discountDeleteRequest)
|
|
68
|
+
|
|
69
|
+
DiscountDelete 删除折扣接口
|
|
70
|
+
|
|
71
|
+
### Example
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
import {
|
|
75
|
+
DiscountAdminServiceApi,
|
|
76
|
+
Configuration,
|
|
77
|
+
DiscountDeleteRequest
|
|
78
|
+
} from '@cherryin/api-client';
|
|
79
|
+
|
|
80
|
+
const configuration = new Configuration();
|
|
81
|
+
const apiInstance = new DiscountAdminServiceApi(configuration);
|
|
82
|
+
|
|
83
|
+
let discountDeleteRequest: DiscountDeleteRequest; //
|
|
84
|
+
|
|
85
|
+
const { status, data } = await apiInstance.discountAdminServiceDiscountDelete(
|
|
86
|
+
discountDeleteRequest
|
|
87
|
+
);
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Parameters
|
|
91
|
+
|
|
92
|
+
|Name | Type | Description | Notes|
|
|
93
|
+
|------------- | ------------- | ------------- | -------------|
|
|
94
|
+
| **discountDeleteRequest** | **DiscountDeleteRequest**| | |
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Return type
|
|
98
|
+
|
|
99
|
+
**DiscountDeleteResponse**
|
|
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
|
+
# **discountAdminServiceDiscountGet**
|
|
120
|
+
> DiscountGetResponse discountAdminServiceDiscountGet()
|
|
121
|
+
|
|
122
|
+
DiscountGet 获取折扣接口
|
|
123
|
+
|
|
124
|
+
### Example
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import {
|
|
128
|
+
DiscountAdminServiceApi,
|
|
129
|
+
Configuration
|
|
130
|
+
} from '@cherryin/api-client';
|
|
131
|
+
|
|
132
|
+
const configuration = new Configuration();
|
|
133
|
+
const apiInstance = new DiscountAdminServiceApi(configuration);
|
|
134
|
+
|
|
135
|
+
let id: string; //@gotags: form:\"id\" (optional) (default to undefined)
|
|
136
|
+
|
|
137
|
+
const { status, data } = await apiInstance.discountAdminServiceDiscountGet(
|
|
138
|
+
id
|
|
139
|
+
);
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Parameters
|
|
143
|
+
|
|
144
|
+
|Name | Type | Description | Notes|
|
|
145
|
+
|------------- | ------------- | ------------- | -------------|
|
|
146
|
+
| **id** | [**string**] | @gotags: form:\"id\" | (optional) defaults to undefined|
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
### Return type
|
|
150
|
+
|
|
151
|
+
**DiscountGetResponse**
|
|
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
|
+
# **discountAdminServiceDiscountList**
|
|
172
|
+
> DiscountListResponse discountAdminServiceDiscountList()
|
|
173
|
+
|
|
174
|
+
DiscountList 折扣列表接口
|
|
175
|
+
|
|
176
|
+
### Example
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
import {
|
|
180
|
+
DiscountAdminServiceApi,
|
|
181
|
+
Configuration
|
|
182
|
+
} from '@cherryin/api-client';
|
|
183
|
+
|
|
184
|
+
const configuration = new Configuration();
|
|
185
|
+
const apiInstance = new DiscountAdminServiceApi(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 namePrefix: string; //name_prefix 按名称前缀过滤(可选) @gotags: form:\"name_prefix\" (optional) (default to undefined)
|
|
190
|
+
|
|
191
|
+
const { status, data } = await apiInstance.discountAdminServiceDiscountList(
|
|
192
|
+
page,
|
|
193
|
+
pageSize,
|
|
194
|
+
namePrefix
|
|
195
|
+
);
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Parameters
|
|
199
|
+
|
|
200
|
+
|Name | Type | Description | Notes|
|
|
201
|
+
|------------- | ------------- | ------------- | -------------|
|
|
202
|
+
| **page** | [**number**] | page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\" | (optional) defaults to undefined|
|
|
203
|
+
| **pageSize** | [**number**] | page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\" | (optional) defaults to undefined|
|
|
204
|
+
| **namePrefix** | [**string**] | name_prefix 按名称前缀过滤(可选) @gotags: form:\"name_prefix\" | (optional) defaults to undefined|
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
### Return type
|
|
208
|
+
|
|
209
|
+
**DiscountListResponse**
|
|
210
|
+
|
|
211
|
+
### Authorization
|
|
212
|
+
|
|
213
|
+
No authorization required
|
|
214
|
+
|
|
215
|
+
### HTTP request headers
|
|
216
|
+
|
|
217
|
+
- **Content-Type**: Not defined
|
|
218
|
+
- **Accept**: application/json
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
### HTTP response details
|
|
222
|
+
| Status code | Description | Response headers |
|
|
223
|
+
|-------------|-------------|------------------|
|
|
224
|
+
|**200** | OK | - |
|
|
225
|
+
|**0** | Default error response | - |
|
|
226
|
+
|
|
227
|
+
[[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)
|
|
228
|
+
|
|
229
|
+
# **discountAdminServiceDiscountUpdate**
|
|
230
|
+
> DiscountUpdateResponse discountAdminServiceDiscountUpdate(discountUpdateRequest)
|
|
231
|
+
|
|
232
|
+
DiscountUpdate 更新折扣接口
|
|
233
|
+
|
|
234
|
+
### Example
|
|
235
|
+
|
|
236
|
+
```typescript
|
|
237
|
+
import {
|
|
238
|
+
DiscountAdminServiceApi,
|
|
239
|
+
Configuration,
|
|
240
|
+
DiscountUpdateRequest
|
|
241
|
+
} from '@cherryin/api-client';
|
|
242
|
+
|
|
243
|
+
const configuration = new Configuration();
|
|
244
|
+
const apiInstance = new DiscountAdminServiceApi(configuration);
|
|
245
|
+
|
|
246
|
+
let discountUpdateRequest: DiscountUpdateRequest; //
|
|
247
|
+
|
|
248
|
+
const { status, data } = await apiInstance.discountAdminServiceDiscountUpdate(
|
|
249
|
+
discountUpdateRequest
|
|
250
|
+
);
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Parameters
|
|
254
|
+
|
|
255
|
+
|Name | Type | Description | Notes|
|
|
256
|
+
|------------- | ------------- | ------------- | -------------|
|
|
257
|
+
| **discountUpdateRequest** | **DiscountUpdateRequest**| | |
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
### Return type
|
|
261
|
+
|
|
262
|
+
**DiscountUpdateResponse**
|
|
263
|
+
|
|
264
|
+
### Authorization
|
|
265
|
+
|
|
266
|
+
No authorization required
|
|
267
|
+
|
|
268
|
+
### HTTP request headers
|
|
269
|
+
|
|
270
|
+
- **Content-Type**: application/json
|
|
271
|
+
- **Accept**: application/json
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
### HTTP response details
|
|
275
|
+
| Status code | Description | Response headers |
|
|
276
|
+
|-------------|-------------|------------------|
|
|
277
|
+
|**200** | OK | - |
|
|
278
|
+
|**0** | Default error response | - |
|
|
279
|
+
|
|
280
|
+
[[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)
|
|
281
|
+
|