@cherryin/aigw-api-client 0.1.24 → 0.1.26
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 +6 -3
- package/README.md +8 -5
- package/api.ts +60 -74
- package/dist/api.d.ts +52 -51
- package/dist/api.js +15 -42
- package/dist/esm/api.d.ts +52 -51
- package/dist/esm/api.js +15 -42
- package/docs/AigwpbUserPortalDashboard.md +8 -6
- package/docs/DailyUsage.md +26 -0
- package/docs/DashboardOverview.md +30 -0
- package/docs/TokenBreakdown.md +26 -0
- package/docs/{UserModelHourlyUsages.md → TokenUsage.md} +7 -5
- package/docs/UsageInsights.md +28 -0
- package/docs/UserPayServiceApi.md +7 -18
- package/docs/UserPayStripeCheckoutRequest.md +28 -0
- package/package.json +1 -1
- package/docs/UserModelActivitySummary.md +0 -30
- package/docs/UserModelHourActivity.md +0 -28
package/.openapi-generator/FILES
CHANGED
|
@@ -62,6 +62,8 @@ docs/AudioPricing.md
|
|
|
62
62
|
docs/BatchUpdateSessionsRequest.md
|
|
63
63
|
docs/BatchUpdateSessionsResponse.md
|
|
64
64
|
docs/CodeExecutionPricing.md
|
|
65
|
+
docs/DailyUsage.md
|
|
66
|
+
docs/DashboardOverview.md
|
|
65
67
|
docs/DiscountAdminServiceApi.md
|
|
66
68
|
docs/DiscountCreateRequest.md
|
|
67
69
|
docs/DiscountDeleteResponse.md
|
|
@@ -128,9 +130,12 @@ docs/Status.md
|
|
|
128
130
|
docs/TextTokenInputPricing.md
|
|
129
131
|
docs/TextTokenOutputPricing.md
|
|
130
132
|
docs/TextTokenPricing.md
|
|
133
|
+
docs/TokenBreakdown.md
|
|
131
134
|
docs/TokenTier.md
|
|
135
|
+
docs/TokenUsage.md
|
|
132
136
|
docs/UpdateUserInfoRequest.md
|
|
133
137
|
docs/UpdateUserInfoResponse.md
|
|
138
|
+
docs/UsageInsights.md
|
|
134
139
|
docs/UserAPIKey.md
|
|
135
140
|
docs/UserAPIKeyCreateRequest.md
|
|
136
141
|
docs/UserAPIKeyCreateResponse.md
|
|
@@ -163,13 +168,11 @@ docs/UserManageItem.md
|
|
|
163
168
|
docs/UserManageSession.md
|
|
164
169
|
docs/UserManageSettings.md
|
|
165
170
|
docs/UserMeInfoResponse.md
|
|
166
|
-
docs/UserModelActivitySummary.md
|
|
167
|
-
docs/UserModelHourActivity.md
|
|
168
|
-
docs/UserModelHourlyUsages.md
|
|
169
171
|
docs/UserModelServiceApi.md
|
|
170
172
|
docs/UserPayOrder.md
|
|
171
173
|
docs/UserPayOrderListResponse.md
|
|
172
174
|
docs/UserPayServiceApi.md
|
|
175
|
+
docs/UserPayStripeCheckoutRequest.md
|
|
173
176
|
docs/UserPayStripeCheckoutResponse.md
|
|
174
177
|
docs/UserPortalDashboardResponse.md
|
|
175
178
|
docs/UserPortalServiceApi.md
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @cherryin/aigw-api-client@0.1.
|
|
1
|
+
## @cherryin/aigw-api-client@0.1.26
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @cherryin/aigw-api-client@0.1.
|
|
39
|
+
npm install @cherryin/aigw-api-client@0.1.26 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -181,6 +181,8 @@ Class | Method | HTTP request | Description
|
|
|
181
181
|
- [BatchUpdateSessionsRequest](docs/BatchUpdateSessionsRequest.md)
|
|
182
182
|
- [BatchUpdateSessionsResponse](docs/BatchUpdateSessionsResponse.md)
|
|
183
183
|
- [CodeExecutionPricing](docs/CodeExecutionPricing.md)
|
|
184
|
+
- [DailyUsage](docs/DailyUsage.md)
|
|
185
|
+
- [DashboardOverview](docs/DashboardOverview.md)
|
|
184
186
|
- [DiscountCreateRequest](docs/DiscountCreateRequest.md)
|
|
185
187
|
- [DiscountDeleteResponse](docs/DiscountDeleteResponse.md)
|
|
186
188
|
- [DiscountGetResponse](docs/DiscountGetResponse.md)
|
|
@@ -243,9 +245,12 @@ Class | Method | HTTP request | Description
|
|
|
243
245
|
- [TextTokenInputPricing](docs/TextTokenInputPricing.md)
|
|
244
246
|
- [TextTokenOutputPricing](docs/TextTokenOutputPricing.md)
|
|
245
247
|
- [TextTokenPricing](docs/TextTokenPricing.md)
|
|
248
|
+
- [TokenBreakdown](docs/TokenBreakdown.md)
|
|
246
249
|
- [TokenTier](docs/TokenTier.md)
|
|
250
|
+
- [TokenUsage](docs/TokenUsage.md)
|
|
247
251
|
- [UpdateUserInfoRequest](docs/UpdateUserInfoRequest.md)
|
|
248
252
|
- [UpdateUserInfoResponse](docs/UpdateUserInfoResponse.md)
|
|
253
|
+
- [UsageInsights](docs/UsageInsights.md)
|
|
249
254
|
- [UserAPIKey](docs/UserAPIKey.md)
|
|
250
255
|
- [UserAPIKeyCreateRequest](docs/UserAPIKeyCreateRequest.md)
|
|
251
256
|
- [UserAPIKeyCreateResponse](docs/UserAPIKeyCreateResponse.md)
|
|
@@ -274,11 +279,9 @@ Class | Method | HTTP request | Description
|
|
|
274
279
|
- [UserManageSession](docs/UserManageSession.md)
|
|
275
280
|
- [UserManageSettings](docs/UserManageSettings.md)
|
|
276
281
|
- [UserMeInfoResponse](docs/UserMeInfoResponse.md)
|
|
277
|
-
- [UserModelActivitySummary](docs/UserModelActivitySummary.md)
|
|
278
|
-
- [UserModelHourActivity](docs/UserModelHourActivity.md)
|
|
279
|
-
- [UserModelHourlyUsages](docs/UserModelHourlyUsages.md)
|
|
280
282
|
- [UserPayOrder](docs/UserPayOrder.md)
|
|
281
283
|
- [UserPayOrderListResponse](docs/UserPayOrderListResponse.md)
|
|
284
|
+
- [UserPayStripeCheckoutRequest](docs/UserPayStripeCheckoutRequest.md)
|
|
282
285
|
- [UserPayStripeCheckoutResponse](docs/UserPayStripeCheckoutResponse.md)
|
|
283
286
|
- [UserPortalDashboardResponse](docs/UserPortalDashboardResponse.md)
|
|
284
287
|
- [UserSettings](docs/UserSettings.md)
|
package/api.ts
CHANGED
|
@@ -412,9 +412,10 @@ export interface AigwpbUserPayStripeCheckout {
|
|
|
412
412
|
'checkout_url'?: string;
|
|
413
413
|
}
|
|
414
414
|
export interface AigwpbUserPortalDashboard {
|
|
415
|
-
'
|
|
416
|
-
'
|
|
417
|
-
'
|
|
415
|
+
'overview'?: DashboardOverview;
|
|
416
|
+
'token_breakdown'?: TokenBreakdown;
|
|
417
|
+
'insights'?: UsageInsights;
|
|
418
|
+
'daily_usages'?: Array<DailyUsage>;
|
|
418
419
|
}
|
|
419
420
|
export interface Any {
|
|
420
421
|
[key: string]: object | any;
|
|
@@ -447,6 +448,20 @@ export interface CodeExecutionPricing {
|
|
|
447
448
|
'per_hour'?: string;
|
|
448
449
|
'free_hours_daily'?: string;
|
|
449
450
|
}
|
|
451
|
+
export interface DailyUsage {
|
|
452
|
+
'day_at'?: string;
|
|
453
|
+
'total_cost'?: string;
|
|
454
|
+
'total_tokens'?: string;
|
|
455
|
+
'total_requests'?: string;
|
|
456
|
+
}
|
|
457
|
+
export interface DashboardOverview {
|
|
458
|
+
'total_spent'?: string;
|
|
459
|
+
'avg_daily_spent'?: string;
|
|
460
|
+
'total_tokens'?: string;
|
|
461
|
+
'avg_daily_tokens'?: string;
|
|
462
|
+
'days_active'?: number;
|
|
463
|
+
'total_requests'?: string;
|
|
464
|
+
}
|
|
450
465
|
export interface DiscountCreateRequest {
|
|
451
466
|
'name'?: string;
|
|
452
467
|
'description'?: string;
|
|
@@ -941,11 +956,21 @@ export interface TextTokenPricing {
|
|
|
941
956
|
'input'?: TextTokenInputPricing;
|
|
942
957
|
'output'?: TextTokenOutputPricing;
|
|
943
958
|
}
|
|
959
|
+
export interface TokenBreakdown {
|
|
960
|
+
'input_tokens'?: TokenUsage;
|
|
961
|
+
'output_tokens'?: TokenUsage;
|
|
962
|
+
'cache_read_tokens'?: TokenUsage;
|
|
963
|
+
'cache_creation_tokens'?: TokenUsage;
|
|
964
|
+
}
|
|
944
965
|
export interface TokenTier {
|
|
945
966
|
'min_tokens'?: string;
|
|
946
967
|
'max_tokens'?: string;
|
|
947
968
|
'per_token_price'?: string;
|
|
948
969
|
}
|
|
970
|
+
export interface TokenUsage {
|
|
971
|
+
'count'?: string;
|
|
972
|
+
'cost'?: string;
|
|
973
|
+
}
|
|
949
974
|
export interface UpdateUserInfoRequest {
|
|
950
975
|
'uid'?: string;
|
|
951
976
|
'display_name'?: string;
|
|
@@ -957,6 +982,13 @@ export interface UpdateUserInfoResponse {
|
|
|
957
982
|
'message'?: string;
|
|
958
983
|
'success'?: boolean;
|
|
959
984
|
}
|
|
985
|
+
export interface UsageInsights {
|
|
986
|
+
'most_expensive_day_at'?: string;
|
|
987
|
+
'most_expensive_day_cost'?: string;
|
|
988
|
+
'avg_daily_cost'?: string;
|
|
989
|
+
'total_days_tracked'?: number;
|
|
990
|
+
'last_updated_at'?: string;
|
|
991
|
+
}
|
|
960
992
|
export interface UserAPIKey {
|
|
961
993
|
'id'?: string;
|
|
962
994
|
'created_at'?: string;
|
|
@@ -1167,24 +1199,6 @@ export interface UserMeInfoResponse {
|
|
|
1167
1199
|
'message'?: string;
|
|
1168
1200
|
'data'?: AigwpbUserMeInfo;
|
|
1169
1201
|
}
|
|
1170
|
-
export interface UserModelActivitySummary {
|
|
1171
|
-
'total_model_request_count'?: string;
|
|
1172
|
-
'total_model_request_tokens'?: string;
|
|
1173
|
-
'stat_model_request_count'?: string;
|
|
1174
|
-
'stat_model_request_tokens'?: string;
|
|
1175
|
-
'stat_model_rpm_avg'?: string;
|
|
1176
|
-
'stat_model_tpm_avg'?: string;
|
|
1177
|
-
}
|
|
1178
|
-
export interface UserModelHourActivity {
|
|
1179
|
-
'hour_at'?: string;
|
|
1180
|
-
'model_id'?: string;
|
|
1181
|
-
'total_request_count'?: string;
|
|
1182
|
-
'total_request_tokens'?: string;
|
|
1183
|
-
'total_cost'?: string;
|
|
1184
|
-
}
|
|
1185
|
-
export interface UserModelHourlyUsages {
|
|
1186
|
-
'hour_activities'?: Array<UserModelHourActivity>;
|
|
1187
|
-
}
|
|
1188
1202
|
export interface UserPayOrder {
|
|
1189
1203
|
'order_no'?: string;
|
|
1190
1204
|
'balance_code'?: string;
|
|
@@ -1200,6 +1214,13 @@ export interface UserPayOrderListResponse {
|
|
|
1200
1214
|
'list'?: Array<UserPayOrder>;
|
|
1201
1215
|
'total'?: string;
|
|
1202
1216
|
}
|
|
1217
|
+
export interface UserPayStripeCheckoutRequest {
|
|
1218
|
+
'currency_code'?: string;
|
|
1219
|
+
'charge_amount'?: string;
|
|
1220
|
+
'redirect'?: boolean;
|
|
1221
|
+
'success_url'?: string;
|
|
1222
|
+
'cancel_url'?: string;
|
|
1223
|
+
}
|
|
1203
1224
|
export interface UserPayStripeCheckoutResponse {
|
|
1204
1225
|
'code'?: string;
|
|
1205
1226
|
'message'?: string;
|
|
@@ -7807,15 +7828,13 @@ export const UserPayServiceApiAxiosParamCreator = function (configuration?: Conf
|
|
|
7807
7828
|
},
|
|
7808
7829
|
/**
|
|
7809
7830
|
*
|
|
7810
|
-
* @param {
|
|
7811
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
7812
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
7813
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
7814
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
7831
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
7815
7832
|
* @param {*} [options] Override http request option.
|
|
7816
7833
|
* @throws {RequiredError}
|
|
7817
7834
|
*/
|
|
7818
|
-
userPayServiceUserPayStripeCheckout: async (
|
|
7835
|
+
userPayServiceUserPayStripeCheckout: async (body: UserPayStripeCheckoutRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
7836
|
+
// verify required parameter 'body' is not null or undefined
|
|
7837
|
+
assertParamExists('userPayServiceUserPayStripeCheckout', 'body', body)
|
|
7819
7838
|
const localVarPath = `/api/v1/user/pay/stripe/checkout`;
|
|
7820
7839
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
7821
7840
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -7828,31 +7847,14 @@ export const UserPayServiceApiAxiosParamCreator = function (configuration?: Conf
|
|
|
7828
7847
|
const localVarHeaderParameter = {} as any;
|
|
7829
7848
|
const localVarQueryParameter = {} as any;
|
|
7830
7849
|
|
|
7831
|
-
if (currencyCode !== undefined) {
|
|
7832
|
-
localVarQueryParameter['currency_code'] = currencyCode;
|
|
7833
|
-
}
|
|
7834
|
-
|
|
7835
|
-
if (chargeAmount !== undefined) {
|
|
7836
|
-
localVarQueryParameter['charge_amount'] = chargeAmount;
|
|
7837
|
-
}
|
|
7838
|
-
|
|
7839
|
-
if (redirect !== undefined) {
|
|
7840
|
-
localVarQueryParameter['redirect'] = redirect;
|
|
7841
|
-
}
|
|
7842
|
-
|
|
7843
|
-
if (successUrl !== undefined) {
|
|
7844
|
-
localVarQueryParameter['success_url'] = successUrl;
|
|
7845
|
-
}
|
|
7846
|
-
|
|
7847
|
-
if (cancelUrl !== undefined) {
|
|
7848
|
-
localVarQueryParameter['cancel_url'] = cancelUrl;
|
|
7849
|
-
}
|
|
7850
|
-
|
|
7851
7850
|
|
|
7852
7851
|
|
|
7852
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
7853
|
+
|
|
7853
7854
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
7854
7855
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
7855
7856
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
7857
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
|
|
7856
7858
|
|
|
7857
7859
|
return {
|
|
7858
7860
|
url: toPathString(localVarUrlObj),
|
|
@@ -7883,16 +7885,12 @@ export const UserPayServiceApiFp = function(configuration?: Configuration) {
|
|
|
7883
7885
|
},
|
|
7884
7886
|
/**
|
|
7885
7887
|
*
|
|
7886
|
-
* @param {
|
|
7887
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
7888
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
7889
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
7890
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
7888
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
7891
7889
|
* @param {*} [options] Override http request option.
|
|
7892
7890
|
* @throws {RequiredError}
|
|
7893
7891
|
*/
|
|
7894
|
-
async userPayServiceUserPayStripeCheckout(
|
|
7895
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.userPayServiceUserPayStripeCheckout(
|
|
7892
|
+
async userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPayStripeCheckoutResponse>> {
|
|
7893
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.userPayServiceUserPayStripeCheckout(body, options);
|
|
7896
7894
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
7897
7895
|
const localVarOperationServerBasePath = operationServerMap['UserPayServiceApi.userPayServiceUserPayStripeCheckout']?.[localVarOperationServerIndex]?.url;
|
|
7898
7896
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -7918,16 +7916,12 @@ export const UserPayServiceApiFactory = function (configuration?: Configuration,
|
|
|
7918
7916
|
},
|
|
7919
7917
|
/**
|
|
7920
7918
|
*
|
|
7921
|
-
* @param {
|
|
7922
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
7923
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
7924
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
7925
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
7919
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
7926
7920
|
* @param {*} [options] Override http request option.
|
|
7927
7921
|
* @throws {RequiredError}
|
|
7928
7922
|
*/
|
|
7929
|
-
userPayServiceUserPayStripeCheckout(
|
|
7930
|
-
return localVarFp.userPayServiceUserPayStripeCheckout(
|
|
7923
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserPayStripeCheckoutResponse> {
|
|
7924
|
+
return localVarFp.userPayServiceUserPayStripeCheckout(body, options).then((request) => request(axios, basePath));
|
|
7931
7925
|
},
|
|
7932
7926
|
};
|
|
7933
7927
|
};
|
|
@@ -7947,15 +7941,11 @@ export interface UserPayServiceApiInterface {
|
|
|
7947
7941
|
|
|
7948
7942
|
/**
|
|
7949
7943
|
*
|
|
7950
|
-
* @param {
|
|
7951
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
7952
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
7953
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
7954
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
7944
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
7955
7945
|
* @param {*} [options] Override http request option.
|
|
7956
7946
|
* @throws {RequiredError}
|
|
7957
7947
|
*/
|
|
7958
|
-
userPayServiceUserPayStripeCheckout(
|
|
7948
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserPayStripeCheckoutResponse>;
|
|
7959
7949
|
|
|
7960
7950
|
}
|
|
7961
7951
|
|
|
@@ -7976,16 +7966,12 @@ export class UserPayServiceApi extends BaseAPI implements UserPayServiceApiInter
|
|
|
7976
7966
|
|
|
7977
7967
|
/**
|
|
7978
7968
|
*
|
|
7979
|
-
* @param {
|
|
7980
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
7981
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
7982
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
7983
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
7969
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
7984
7970
|
* @param {*} [options] Override http request option.
|
|
7985
7971
|
* @throws {RequiredError}
|
|
7986
7972
|
*/
|
|
7987
|
-
public userPayServiceUserPayStripeCheckout(
|
|
7988
|
-
return UserPayServiceApiFp(this.configuration).userPayServiceUserPayStripeCheckout(
|
|
7973
|
+
public userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig) {
|
|
7974
|
+
return UserPayServiceApiFp(this.configuration).userPayServiceUserPayStripeCheckout(body, options).then((request) => request(this.axios, this.basePath));
|
|
7989
7975
|
}
|
|
7990
7976
|
}
|
|
7991
7977
|
|
package/dist/api.d.ts
CHANGED
|
@@ -404,9 +404,10 @@ export interface AigwpbUserPayStripeCheckout {
|
|
|
404
404
|
'checkout_url'?: string;
|
|
405
405
|
}
|
|
406
406
|
export interface AigwpbUserPortalDashboard {
|
|
407
|
-
'
|
|
408
|
-
'
|
|
409
|
-
'
|
|
407
|
+
'overview'?: DashboardOverview;
|
|
408
|
+
'token_breakdown'?: TokenBreakdown;
|
|
409
|
+
'insights'?: UsageInsights;
|
|
410
|
+
'daily_usages'?: Array<DailyUsage>;
|
|
410
411
|
}
|
|
411
412
|
export interface Any {
|
|
412
413
|
[key: string]: object | any;
|
|
@@ -438,6 +439,20 @@ export interface CodeExecutionPricing {
|
|
|
438
439
|
'per_hour'?: string;
|
|
439
440
|
'free_hours_daily'?: string;
|
|
440
441
|
}
|
|
442
|
+
export interface DailyUsage {
|
|
443
|
+
'day_at'?: string;
|
|
444
|
+
'total_cost'?: string;
|
|
445
|
+
'total_tokens'?: string;
|
|
446
|
+
'total_requests'?: string;
|
|
447
|
+
}
|
|
448
|
+
export interface DashboardOverview {
|
|
449
|
+
'total_spent'?: string;
|
|
450
|
+
'avg_daily_spent'?: string;
|
|
451
|
+
'total_tokens'?: string;
|
|
452
|
+
'avg_daily_tokens'?: string;
|
|
453
|
+
'days_active'?: number;
|
|
454
|
+
'total_requests'?: string;
|
|
455
|
+
}
|
|
441
456
|
export interface DiscountCreateRequest {
|
|
442
457
|
'name'?: string;
|
|
443
458
|
'description'?: string;
|
|
@@ -936,11 +951,21 @@ export interface TextTokenPricing {
|
|
|
936
951
|
'input'?: TextTokenInputPricing;
|
|
937
952
|
'output'?: TextTokenOutputPricing;
|
|
938
953
|
}
|
|
954
|
+
export interface TokenBreakdown {
|
|
955
|
+
'input_tokens'?: TokenUsage;
|
|
956
|
+
'output_tokens'?: TokenUsage;
|
|
957
|
+
'cache_read_tokens'?: TokenUsage;
|
|
958
|
+
'cache_creation_tokens'?: TokenUsage;
|
|
959
|
+
}
|
|
939
960
|
export interface TokenTier {
|
|
940
961
|
'min_tokens'?: string;
|
|
941
962
|
'max_tokens'?: string;
|
|
942
963
|
'per_token_price'?: string;
|
|
943
964
|
}
|
|
965
|
+
export interface TokenUsage {
|
|
966
|
+
'count'?: string;
|
|
967
|
+
'cost'?: string;
|
|
968
|
+
}
|
|
944
969
|
export interface UpdateUserInfoRequest {
|
|
945
970
|
'uid'?: string;
|
|
946
971
|
'display_name'?: string;
|
|
@@ -952,6 +977,13 @@ export interface UpdateUserInfoResponse {
|
|
|
952
977
|
'message'?: string;
|
|
953
978
|
'success'?: boolean;
|
|
954
979
|
}
|
|
980
|
+
export interface UsageInsights {
|
|
981
|
+
'most_expensive_day_at'?: string;
|
|
982
|
+
'most_expensive_day_cost'?: string;
|
|
983
|
+
'avg_daily_cost'?: string;
|
|
984
|
+
'total_days_tracked'?: number;
|
|
985
|
+
'last_updated_at'?: string;
|
|
986
|
+
}
|
|
955
987
|
export interface UserAPIKey {
|
|
956
988
|
'id'?: string;
|
|
957
989
|
'created_at'?: string;
|
|
@@ -1162,24 +1194,6 @@ export interface UserMeInfoResponse {
|
|
|
1162
1194
|
'message'?: string;
|
|
1163
1195
|
'data'?: AigwpbUserMeInfo;
|
|
1164
1196
|
}
|
|
1165
|
-
export interface UserModelActivitySummary {
|
|
1166
|
-
'total_model_request_count'?: string;
|
|
1167
|
-
'total_model_request_tokens'?: string;
|
|
1168
|
-
'stat_model_request_count'?: string;
|
|
1169
|
-
'stat_model_request_tokens'?: string;
|
|
1170
|
-
'stat_model_rpm_avg'?: string;
|
|
1171
|
-
'stat_model_tpm_avg'?: string;
|
|
1172
|
-
}
|
|
1173
|
-
export interface UserModelHourActivity {
|
|
1174
|
-
'hour_at'?: string;
|
|
1175
|
-
'model_id'?: string;
|
|
1176
|
-
'total_request_count'?: string;
|
|
1177
|
-
'total_request_tokens'?: string;
|
|
1178
|
-
'total_cost'?: string;
|
|
1179
|
-
}
|
|
1180
|
-
export interface UserModelHourlyUsages {
|
|
1181
|
-
'hour_activities'?: Array<UserModelHourActivity>;
|
|
1182
|
-
}
|
|
1183
1197
|
export interface UserPayOrder {
|
|
1184
1198
|
'order_no'?: string;
|
|
1185
1199
|
'balance_code'?: string;
|
|
@@ -1195,6 +1209,13 @@ export interface UserPayOrderListResponse {
|
|
|
1195
1209
|
'list'?: Array<UserPayOrder>;
|
|
1196
1210
|
'total'?: string;
|
|
1197
1211
|
}
|
|
1212
|
+
export interface UserPayStripeCheckoutRequest {
|
|
1213
|
+
'currency_code'?: string;
|
|
1214
|
+
'charge_amount'?: string;
|
|
1215
|
+
'redirect'?: boolean;
|
|
1216
|
+
'success_url'?: string;
|
|
1217
|
+
'cancel_url'?: string;
|
|
1218
|
+
}
|
|
1198
1219
|
export interface UserPayStripeCheckoutResponse {
|
|
1199
1220
|
'code'?: string;
|
|
1200
1221
|
'message'?: string;
|
|
@@ -4640,15 +4661,11 @@ export declare const UserPayServiceApiAxiosParamCreator: (configuration?: Config
|
|
|
4640
4661
|
userPayServiceUserPayOrderList: (page?: number, pageSize?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4641
4662
|
/**
|
|
4642
4663
|
*
|
|
4643
|
-
* @param {
|
|
4644
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4645
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4646
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4647
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4664
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4648
4665
|
* @param {*} [options] Override http request option.
|
|
4649
4666
|
* @throws {RequiredError}
|
|
4650
4667
|
*/
|
|
4651
|
-
userPayServiceUserPayStripeCheckout: (
|
|
4668
|
+
userPayServiceUserPayStripeCheckout: (body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4652
4669
|
};
|
|
4653
4670
|
/**
|
|
4654
4671
|
* UserPayServiceApi - functional programming interface
|
|
@@ -4664,15 +4681,11 @@ export declare const UserPayServiceApiFp: (configuration?: Configuration) => {
|
|
|
4664
4681
|
userPayServiceUserPayOrderList(page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPayOrderListResponse>>;
|
|
4665
4682
|
/**
|
|
4666
4683
|
*
|
|
4667
|
-
* @param {
|
|
4668
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4669
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4670
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4671
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4684
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4672
4685
|
* @param {*} [options] Override http request option.
|
|
4673
4686
|
* @throws {RequiredError}
|
|
4674
4687
|
*/
|
|
4675
|
-
userPayServiceUserPayStripeCheckout(
|
|
4688
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPayStripeCheckoutResponse>>;
|
|
4676
4689
|
};
|
|
4677
4690
|
/**
|
|
4678
4691
|
* UserPayServiceApi - factory interface
|
|
@@ -4688,15 +4701,11 @@ export declare const UserPayServiceApiFactory: (configuration?: Configuration, b
|
|
|
4688
4701
|
userPayServiceUserPayOrderList(page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<UserPayOrderListResponse>;
|
|
4689
4702
|
/**
|
|
4690
4703
|
*
|
|
4691
|
-
* @param {
|
|
4692
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4693
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4694
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4695
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4704
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4696
4705
|
* @param {*} [options] Override http request option.
|
|
4697
4706
|
* @throws {RequiredError}
|
|
4698
4707
|
*/
|
|
4699
|
-
userPayServiceUserPayStripeCheckout(
|
|
4708
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserPayStripeCheckoutResponse>;
|
|
4700
4709
|
};
|
|
4701
4710
|
/**
|
|
4702
4711
|
* UserPayServiceApi - interface
|
|
@@ -4712,15 +4721,11 @@ export interface UserPayServiceApiInterface {
|
|
|
4712
4721
|
userPayServiceUserPayOrderList(page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<UserPayOrderListResponse>;
|
|
4713
4722
|
/**
|
|
4714
4723
|
*
|
|
4715
|
-
* @param {
|
|
4716
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4717
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4718
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4719
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4724
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4720
4725
|
* @param {*} [options] Override http request option.
|
|
4721
4726
|
* @throws {RequiredError}
|
|
4722
4727
|
*/
|
|
4723
|
-
userPayServiceUserPayStripeCheckout(
|
|
4728
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserPayStripeCheckoutResponse>;
|
|
4724
4729
|
}
|
|
4725
4730
|
/**
|
|
4726
4731
|
* UserPayServiceApi - object-oriented interface
|
|
@@ -4736,15 +4741,11 @@ export declare class UserPayServiceApi extends BaseAPI implements UserPayService
|
|
|
4736
4741
|
userPayServiceUserPayOrderList(page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserPayOrderListResponse, any, {}>>;
|
|
4737
4742
|
/**
|
|
4738
4743
|
*
|
|
4739
|
-
* @param {
|
|
4740
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4741
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4742
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4743
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4744
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4744
4745
|
* @param {*} [options] Override http request option.
|
|
4745
4746
|
* @throws {RequiredError}
|
|
4746
4747
|
*/
|
|
4747
|
-
userPayServiceUserPayStripeCheckout(
|
|
4748
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserPayStripeCheckoutResponse, any, {}>>;
|
|
4748
4749
|
}
|
|
4749
4750
|
/**
|
|
4750
4751
|
* UserPortalServiceApi - axios parameter creator
|
package/dist/api.js
CHANGED
|
@@ -5475,15 +5475,13 @@ const UserPayServiceApiAxiosParamCreator = function (configuration) {
|
|
|
5475
5475
|
}),
|
|
5476
5476
|
/**
|
|
5477
5477
|
*
|
|
5478
|
-
* @param {
|
|
5479
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
5480
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
5481
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
5482
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
5478
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
5483
5479
|
* @param {*} [options] Override http request option.
|
|
5484
5480
|
* @throws {RequiredError}
|
|
5485
5481
|
*/
|
|
5486
|
-
userPayServiceUserPayStripeCheckout: (
|
|
5482
|
+
userPayServiceUserPayStripeCheckout: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
5483
|
+
// verify required parameter 'body' is not null or undefined
|
|
5484
|
+
(0, common_1.assertParamExists)('userPayServiceUserPayStripeCheckout', 'body', body);
|
|
5487
5485
|
const localVarPath = `/api/v1/user/pay/stripe/checkout`;
|
|
5488
5486
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5489
5487
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -5494,24 +5492,11 @@ const UserPayServiceApiAxiosParamCreator = function (configuration) {
|
|
|
5494
5492
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
5495
5493
|
const localVarHeaderParameter = {};
|
|
5496
5494
|
const localVarQueryParameter = {};
|
|
5497
|
-
|
|
5498
|
-
localVarQueryParameter['currency_code'] = currencyCode;
|
|
5499
|
-
}
|
|
5500
|
-
if (chargeAmount !== undefined) {
|
|
5501
|
-
localVarQueryParameter['charge_amount'] = chargeAmount;
|
|
5502
|
-
}
|
|
5503
|
-
if (redirect !== undefined) {
|
|
5504
|
-
localVarQueryParameter['redirect'] = redirect;
|
|
5505
|
-
}
|
|
5506
|
-
if (successUrl !== undefined) {
|
|
5507
|
-
localVarQueryParameter['success_url'] = successUrl;
|
|
5508
|
-
}
|
|
5509
|
-
if (cancelUrl !== undefined) {
|
|
5510
|
-
localVarQueryParameter['cancel_url'] = cancelUrl;
|
|
5511
|
-
}
|
|
5495
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5512
5496
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
5513
5497
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5514
5498
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5499
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
5515
5500
|
return {
|
|
5516
5501
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
5517
5502
|
options: localVarRequestOptions,
|
|
@@ -5544,18 +5529,14 @@ const UserPayServiceApiFp = function (configuration) {
|
|
|
5544
5529
|
},
|
|
5545
5530
|
/**
|
|
5546
5531
|
*
|
|
5547
|
-
* @param {
|
|
5548
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
5549
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
5550
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
5551
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
5532
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
5552
5533
|
* @param {*} [options] Override http request option.
|
|
5553
5534
|
* @throws {RequiredError}
|
|
5554
5535
|
*/
|
|
5555
|
-
userPayServiceUserPayStripeCheckout(
|
|
5536
|
+
userPayServiceUserPayStripeCheckout(body, options) {
|
|
5556
5537
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5557
5538
|
var _a, _b, _c;
|
|
5558
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.userPayServiceUserPayStripeCheckout(
|
|
5539
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.userPayServiceUserPayStripeCheckout(body, options);
|
|
5559
5540
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
5560
5541
|
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['UserPayServiceApi.userPayServiceUserPayStripeCheckout']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5561
5542
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -5582,16 +5563,12 @@ const UserPayServiceApiFactory = function (configuration, basePath, axios) {
|
|
|
5582
5563
|
},
|
|
5583
5564
|
/**
|
|
5584
5565
|
*
|
|
5585
|
-
* @param {
|
|
5586
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
5587
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
5588
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
5589
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
5566
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
5590
5567
|
* @param {*} [options] Override http request option.
|
|
5591
5568
|
* @throws {RequiredError}
|
|
5592
5569
|
*/
|
|
5593
|
-
userPayServiceUserPayStripeCheckout(
|
|
5594
|
-
return localVarFp.userPayServiceUserPayStripeCheckout(
|
|
5570
|
+
userPayServiceUserPayStripeCheckout(body, options) {
|
|
5571
|
+
return localVarFp.userPayServiceUserPayStripeCheckout(body, options).then((request) => request(axios, basePath));
|
|
5595
5572
|
},
|
|
5596
5573
|
};
|
|
5597
5574
|
};
|
|
@@ -5612,16 +5589,12 @@ class UserPayServiceApi extends base_1.BaseAPI {
|
|
|
5612
5589
|
}
|
|
5613
5590
|
/**
|
|
5614
5591
|
*
|
|
5615
|
-
* @param {
|
|
5616
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
5617
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
5618
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
5619
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
5592
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
5620
5593
|
* @param {*} [options] Override http request option.
|
|
5621
5594
|
* @throws {RequiredError}
|
|
5622
5595
|
*/
|
|
5623
|
-
userPayServiceUserPayStripeCheckout(
|
|
5624
|
-
return (0, exports.UserPayServiceApiFp)(this.configuration).userPayServiceUserPayStripeCheckout(
|
|
5596
|
+
userPayServiceUserPayStripeCheckout(body, options) {
|
|
5597
|
+
return (0, exports.UserPayServiceApiFp)(this.configuration).userPayServiceUserPayStripeCheckout(body, options).then((request) => request(this.axios, this.basePath));
|
|
5625
5598
|
}
|
|
5626
5599
|
}
|
|
5627
5600
|
exports.UserPayServiceApi = UserPayServiceApi;
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -404,9 +404,10 @@ export interface AigwpbUserPayStripeCheckout {
|
|
|
404
404
|
'checkout_url'?: string;
|
|
405
405
|
}
|
|
406
406
|
export interface AigwpbUserPortalDashboard {
|
|
407
|
-
'
|
|
408
|
-
'
|
|
409
|
-
'
|
|
407
|
+
'overview'?: DashboardOverview;
|
|
408
|
+
'token_breakdown'?: TokenBreakdown;
|
|
409
|
+
'insights'?: UsageInsights;
|
|
410
|
+
'daily_usages'?: Array<DailyUsage>;
|
|
410
411
|
}
|
|
411
412
|
export interface Any {
|
|
412
413
|
[key: string]: object | any;
|
|
@@ -438,6 +439,20 @@ export interface CodeExecutionPricing {
|
|
|
438
439
|
'per_hour'?: string;
|
|
439
440
|
'free_hours_daily'?: string;
|
|
440
441
|
}
|
|
442
|
+
export interface DailyUsage {
|
|
443
|
+
'day_at'?: string;
|
|
444
|
+
'total_cost'?: string;
|
|
445
|
+
'total_tokens'?: string;
|
|
446
|
+
'total_requests'?: string;
|
|
447
|
+
}
|
|
448
|
+
export interface DashboardOverview {
|
|
449
|
+
'total_spent'?: string;
|
|
450
|
+
'avg_daily_spent'?: string;
|
|
451
|
+
'total_tokens'?: string;
|
|
452
|
+
'avg_daily_tokens'?: string;
|
|
453
|
+
'days_active'?: number;
|
|
454
|
+
'total_requests'?: string;
|
|
455
|
+
}
|
|
441
456
|
export interface DiscountCreateRequest {
|
|
442
457
|
'name'?: string;
|
|
443
458
|
'description'?: string;
|
|
@@ -936,11 +951,21 @@ export interface TextTokenPricing {
|
|
|
936
951
|
'input'?: TextTokenInputPricing;
|
|
937
952
|
'output'?: TextTokenOutputPricing;
|
|
938
953
|
}
|
|
954
|
+
export interface TokenBreakdown {
|
|
955
|
+
'input_tokens'?: TokenUsage;
|
|
956
|
+
'output_tokens'?: TokenUsage;
|
|
957
|
+
'cache_read_tokens'?: TokenUsage;
|
|
958
|
+
'cache_creation_tokens'?: TokenUsage;
|
|
959
|
+
}
|
|
939
960
|
export interface TokenTier {
|
|
940
961
|
'min_tokens'?: string;
|
|
941
962
|
'max_tokens'?: string;
|
|
942
963
|
'per_token_price'?: string;
|
|
943
964
|
}
|
|
965
|
+
export interface TokenUsage {
|
|
966
|
+
'count'?: string;
|
|
967
|
+
'cost'?: string;
|
|
968
|
+
}
|
|
944
969
|
export interface UpdateUserInfoRequest {
|
|
945
970
|
'uid'?: string;
|
|
946
971
|
'display_name'?: string;
|
|
@@ -952,6 +977,13 @@ export interface UpdateUserInfoResponse {
|
|
|
952
977
|
'message'?: string;
|
|
953
978
|
'success'?: boolean;
|
|
954
979
|
}
|
|
980
|
+
export interface UsageInsights {
|
|
981
|
+
'most_expensive_day_at'?: string;
|
|
982
|
+
'most_expensive_day_cost'?: string;
|
|
983
|
+
'avg_daily_cost'?: string;
|
|
984
|
+
'total_days_tracked'?: number;
|
|
985
|
+
'last_updated_at'?: string;
|
|
986
|
+
}
|
|
955
987
|
export interface UserAPIKey {
|
|
956
988
|
'id'?: string;
|
|
957
989
|
'created_at'?: string;
|
|
@@ -1162,24 +1194,6 @@ export interface UserMeInfoResponse {
|
|
|
1162
1194
|
'message'?: string;
|
|
1163
1195
|
'data'?: AigwpbUserMeInfo;
|
|
1164
1196
|
}
|
|
1165
|
-
export interface UserModelActivitySummary {
|
|
1166
|
-
'total_model_request_count'?: string;
|
|
1167
|
-
'total_model_request_tokens'?: string;
|
|
1168
|
-
'stat_model_request_count'?: string;
|
|
1169
|
-
'stat_model_request_tokens'?: string;
|
|
1170
|
-
'stat_model_rpm_avg'?: string;
|
|
1171
|
-
'stat_model_tpm_avg'?: string;
|
|
1172
|
-
}
|
|
1173
|
-
export interface UserModelHourActivity {
|
|
1174
|
-
'hour_at'?: string;
|
|
1175
|
-
'model_id'?: string;
|
|
1176
|
-
'total_request_count'?: string;
|
|
1177
|
-
'total_request_tokens'?: string;
|
|
1178
|
-
'total_cost'?: string;
|
|
1179
|
-
}
|
|
1180
|
-
export interface UserModelHourlyUsages {
|
|
1181
|
-
'hour_activities'?: Array<UserModelHourActivity>;
|
|
1182
|
-
}
|
|
1183
1197
|
export interface UserPayOrder {
|
|
1184
1198
|
'order_no'?: string;
|
|
1185
1199
|
'balance_code'?: string;
|
|
@@ -1195,6 +1209,13 @@ export interface UserPayOrderListResponse {
|
|
|
1195
1209
|
'list'?: Array<UserPayOrder>;
|
|
1196
1210
|
'total'?: string;
|
|
1197
1211
|
}
|
|
1212
|
+
export interface UserPayStripeCheckoutRequest {
|
|
1213
|
+
'currency_code'?: string;
|
|
1214
|
+
'charge_amount'?: string;
|
|
1215
|
+
'redirect'?: boolean;
|
|
1216
|
+
'success_url'?: string;
|
|
1217
|
+
'cancel_url'?: string;
|
|
1218
|
+
}
|
|
1198
1219
|
export interface UserPayStripeCheckoutResponse {
|
|
1199
1220
|
'code'?: string;
|
|
1200
1221
|
'message'?: string;
|
|
@@ -4640,15 +4661,11 @@ export declare const UserPayServiceApiAxiosParamCreator: (configuration?: Config
|
|
|
4640
4661
|
userPayServiceUserPayOrderList: (page?: number, pageSize?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4641
4662
|
/**
|
|
4642
4663
|
*
|
|
4643
|
-
* @param {
|
|
4644
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4645
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4646
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4647
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4664
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4648
4665
|
* @param {*} [options] Override http request option.
|
|
4649
4666
|
* @throws {RequiredError}
|
|
4650
4667
|
*/
|
|
4651
|
-
userPayServiceUserPayStripeCheckout: (
|
|
4668
|
+
userPayServiceUserPayStripeCheckout: (body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4652
4669
|
};
|
|
4653
4670
|
/**
|
|
4654
4671
|
* UserPayServiceApi - functional programming interface
|
|
@@ -4664,15 +4681,11 @@ export declare const UserPayServiceApiFp: (configuration?: Configuration) => {
|
|
|
4664
4681
|
userPayServiceUserPayOrderList(page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPayOrderListResponse>>;
|
|
4665
4682
|
/**
|
|
4666
4683
|
*
|
|
4667
|
-
* @param {
|
|
4668
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4669
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4670
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4671
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4684
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4672
4685
|
* @param {*} [options] Override http request option.
|
|
4673
4686
|
* @throws {RequiredError}
|
|
4674
4687
|
*/
|
|
4675
|
-
userPayServiceUserPayStripeCheckout(
|
|
4688
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPayStripeCheckoutResponse>>;
|
|
4676
4689
|
};
|
|
4677
4690
|
/**
|
|
4678
4691
|
* UserPayServiceApi - factory interface
|
|
@@ -4688,15 +4701,11 @@ export declare const UserPayServiceApiFactory: (configuration?: Configuration, b
|
|
|
4688
4701
|
userPayServiceUserPayOrderList(page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<UserPayOrderListResponse>;
|
|
4689
4702
|
/**
|
|
4690
4703
|
*
|
|
4691
|
-
* @param {
|
|
4692
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4693
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4694
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4695
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4704
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4696
4705
|
* @param {*} [options] Override http request option.
|
|
4697
4706
|
* @throws {RequiredError}
|
|
4698
4707
|
*/
|
|
4699
|
-
userPayServiceUserPayStripeCheckout(
|
|
4708
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserPayStripeCheckoutResponse>;
|
|
4700
4709
|
};
|
|
4701
4710
|
/**
|
|
4702
4711
|
* UserPayServiceApi - interface
|
|
@@ -4712,15 +4721,11 @@ export interface UserPayServiceApiInterface {
|
|
|
4712
4721
|
userPayServiceUserPayOrderList(page?: number, pageSize?: number, options?: RawAxiosRequestConfig): AxiosPromise<UserPayOrderListResponse>;
|
|
4713
4722
|
/**
|
|
4714
4723
|
*
|
|
4715
|
-
* @param {
|
|
4716
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4717
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4718
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4719
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4724
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4720
4725
|
* @param {*} [options] Override http request option.
|
|
4721
4726
|
* @throws {RequiredError}
|
|
4722
4727
|
*/
|
|
4723
|
-
userPayServiceUserPayStripeCheckout(
|
|
4728
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<UserPayStripeCheckoutResponse>;
|
|
4724
4729
|
}
|
|
4725
4730
|
/**
|
|
4726
4731
|
* UserPayServiceApi - object-oriented interface
|
|
@@ -4736,15 +4741,11 @@ export declare class UserPayServiceApi extends BaseAPI implements UserPayService
|
|
|
4736
4741
|
userPayServiceUserPayOrderList(page?: number, pageSize?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserPayOrderListResponse, any, {}>>;
|
|
4737
4742
|
/**
|
|
4738
4743
|
*
|
|
4739
|
-
* @param {
|
|
4740
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
4741
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
4742
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
4743
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
4744
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
4744
4745
|
* @param {*} [options] Override http request option.
|
|
4745
4746
|
* @throws {RequiredError}
|
|
4746
4747
|
*/
|
|
4747
|
-
userPayServiceUserPayStripeCheckout(
|
|
4748
|
+
userPayServiceUserPayStripeCheckout(body: UserPayStripeCheckoutRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<UserPayStripeCheckoutResponse, any, {}>>;
|
|
4748
4749
|
}
|
|
4749
4750
|
/**
|
|
4750
4751
|
* UserPortalServiceApi - axios parameter creator
|
package/dist/esm/api.js
CHANGED
|
@@ -5427,15 +5427,13 @@ export const UserPayServiceApiAxiosParamCreator = function (configuration) {
|
|
|
5427
5427
|
}),
|
|
5428
5428
|
/**
|
|
5429
5429
|
*
|
|
5430
|
-
* @param {
|
|
5431
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
5432
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
5433
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
5434
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
5430
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
5435
5431
|
* @param {*} [options] Override http request option.
|
|
5436
5432
|
* @throws {RequiredError}
|
|
5437
5433
|
*/
|
|
5438
|
-
userPayServiceUserPayStripeCheckout: (
|
|
5434
|
+
userPayServiceUserPayStripeCheckout: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
|
|
5435
|
+
// verify required parameter 'body' is not null or undefined
|
|
5436
|
+
assertParamExists('userPayServiceUserPayStripeCheckout', 'body', body);
|
|
5439
5437
|
const localVarPath = `/api/v1/user/pay/stripe/checkout`;
|
|
5440
5438
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5441
5439
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -5446,24 +5444,11 @@ export const UserPayServiceApiAxiosParamCreator = function (configuration) {
|
|
|
5446
5444
|
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
5447
5445
|
const localVarHeaderParameter = {};
|
|
5448
5446
|
const localVarQueryParameter = {};
|
|
5449
|
-
|
|
5450
|
-
localVarQueryParameter['currency_code'] = currencyCode;
|
|
5451
|
-
}
|
|
5452
|
-
if (chargeAmount !== undefined) {
|
|
5453
|
-
localVarQueryParameter['charge_amount'] = chargeAmount;
|
|
5454
|
-
}
|
|
5455
|
-
if (redirect !== undefined) {
|
|
5456
|
-
localVarQueryParameter['redirect'] = redirect;
|
|
5457
|
-
}
|
|
5458
|
-
if (successUrl !== undefined) {
|
|
5459
|
-
localVarQueryParameter['success_url'] = successUrl;
|
|
5460
|
-
}
|
|
5461
|
-
if (cancelUrl !== undefined) {
|
|
5462
|
-
localVarQueryParameter['cancel_url'] = cancelUrl;
|
|
5463
|
-
}
|
|
5447
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5464
5448
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5465
5449
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5466
5450
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
5451
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
5467
5452
|
return {
|
|
5468
5453
|
url: toPathString(localVarUrlObj),
|
|
5469
5454
|
options: localVarRequestOptions,
|
|
@@ -5495,18 +5480,14 @@ export const UserPayServiceApiFp = function (configuration) {
|
|
|
5495
5480
|
},
|
|
5496
5481
|
/**
|
|
5497
5482
|
*
|
|
5498
|
-
* @param {
|
|
5499
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
5500
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
5501
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
5502
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
5483
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
5503
5484
|
* @param {*} [options] Override http request option.
|
|
5504
5485
|
* @throws {RequiredError}
|
|
5505
5486
|
*/
|
|
5506
|
-
userPayServiceUserPayStripeCheckout(
|
|
5487
|
+
userPayServiceUserPayStripeCheckout(body, options) {
|
|
5507
5488
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5508
5489
|
var _a, _b, _c;
|
|
5509
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.userPayServiceUserPayStripeCheckout(
|
|
5490
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.userPayServiceUserPayStripeCheckout(body, options);
|
|
5510
5491
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
5511
5492
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserPayServiceApi.userPayServiceUserPayStripeCheckout']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
5512
5493
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -5532,16 +5513,12 @@ export const UserPayServiceApiFactory = function (configuration, basePath, axios
|
|
|
5532
5513
|
},
|
|
5533
5514
|
/**
|
|
5534
5515
|
*
|
|
5535
|
-
* @param {
|
|
5536
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
5537
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
5538
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
5539
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
5516
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
5540
5517
|
* @param {*} [options] Override http request option.
|
|
5541
5518
|
* @throws {RequiredError}
|
|
5542
5519
|
*/
|
|
5543
|
-
userPayServiceUserPayStripeCheckout(
|
|
5544
|
-
return localVarFp.userPayServiceUserPayStripeCheckout(
|
|
5520
|
+
userPayServiceUserPayStripeCheckout(body, options) {
|
|
5521
|
+
return localVarFp.userPayServiceUserPayStripeCheckout(body, options).then((request) => request(axios, basePath));
|
|
5545
5522
|
},
|
|
5546
5523
|
};
|
|
5547
5524
|
};
|
|
@@ -5561,16 +5538,12 @@ export class UserPayServiceApi extends BaseAPI {
|
|
|
5561
5538
|
}
|
|
5562
5539
|
/**
|
|
5563
5540
|
*
|
|
5564
|
-
* @param {
|
|
5565
|
-
* @param {string} [chargeAmount] 充值金额(必须整数,10)
|
|
5566
|
-
* @param {boolean} [redirect] 是否跳转到支付页面,true-跳转,false-不跳转
|
|
5567
|
-
* @param {string} [successUrl] 支付成功跳转地址
|
|
5568
|
-
* @param {string} [cancelUrl] 支付取消跳转地址
|
|
5541
|
+
* @param {UserPayStripeCheckoutRequest} body
|
|
5569
5542
|
* @param {*} [options] Override http request option.
|
|
5570
5543
|
* @throws {RequiredError}
|
|
5571
5544
|
*/
|
|
5572
|
-
userPayServiceUserPayStripeCheckout(
|
|
5573
|
-
return UserPayServiceApiFp(this.configuration).userPayServiceUserPayStripeCheckout(
|
|
5545
|
+
userPayServiceUserPayStripeCheckout(body, options) {
|
|
5546
|
+
return UserPayServiceApiFp(this.configuration).userPayServiceUserPayStripeCheckout(body, options).then((request) => request(this.axios, this.basePath));
|
|
5574
5547
|
}
|
|
5575
5548
|
}
|
|
5576
5549
|
/**
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**
|
|
9
|
-
**
|
|
10
|
-
**
|
|
8
|
+
**overview** | [**DashboardOverview**](DashboardOverview.md) | | [optional] [default to undefined]
|
|
9
|
+
**token_breakdown** | [**TokenBreakdown**](TokenBreakdown.md) | | [optional] [default to undefined]
|
|
10
|
+
**insights** | [**UsageInsights**](UsageInsights.md) | | [optional] [default to undefined]
|
|
11
|
+
**daily_usages** | [**Array<DailyUsage>**](DailyUsage.md) | | [optional] [default to undefined]
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -15,9 +16,10 @@ Name | Type | Description | Notes
|
|
|
15
16
|
import { AigwpbUserPortalDashboard } from '@cherryin/aigw-api-client';
|
|
16
17
|
|
|
17
18
|
const instance: AigwpbUserPortalDashboard = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
overview,
|
|
20
|
+
token_breakdown,
|
|
21
|
+
insights,
|
|
22
|
+
daily_usages,
|
|
21
23
|
};
|
|
22
24
|
```
|
|
23
25
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# DailyUsage
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**day_at** | **string** | | [optional] [default to undefined]
|
|
9
|
+
**total_cost** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**total_tokens** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**total_requests** | **string** | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { DailyUsage } from '@cherryin/aigw-api-client';
|
|
17
|
+
|
|
18
|
+
const instance: DailyUsage = {
|
|
19
|
+
day_at,
|
|
20
|
+
total_cost,
|
|
21
|
+
total_tokens,
|
|
22
|
+
total_requests,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[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,30 @@
|
|
|
1
|
+
# DashboardOverview
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**total_spent** | **string** | | [optional] [default to undefined]
|
|
9
|
+
**avg_daily_spent** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**total_tokens** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**avg_daily_tokens** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**days_active** | **number** | | [optional] [default to undefined]
|
|
13
|
+
**total_requests** | **string** | | [optional] [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { DashboardOverview } from '@cherryin/aigw-api-client';
|
|
19
|
+
|
|
20
|
+
const instance: DashboardOverview = {
|
|
21
|
+
total_spent,
|
|
22
|
+
avg_daily_spent,
|
|
23
|
+
total_tokens,
|
|
24
|
+
avg_daily_tokens,
|
|
25
|
+
days_active,
|
|
26
|
+
total_requests,
|
|
27
|
+
};
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
[[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,26 @@
|
|
|
1
|
+
# TokenBreakdown
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**input_tokens** | [**TokenUsage**](TokenUsage.md) | | [optional] [default to undefined]
|
|
9
|
+
**output_tokens** | [**TokenUsage**](TokenUsage.md) | | [optional] [default to undefined]
|
|
10
|
+
**cache_read_tokens** | [**TokenUsage**](TokenUsage.md) | | [optional] [default to undefined]
|
|
11
|
+
**cache_creation_tokens** | [**TokenUsage**](TokenUsage.md) | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { TokenBreakdown } from '@cherryin/aigw-api-client';
|
|
17
|
+
|
|
18
|
+
const instance: TokenBreakdown = {
|
|
19
|
+
input_tokens,
|
|
20
|
+
output_tokens,
|
|
21
|
+
cache_read_tokens,
|
|
22
|
+
cache_creation_tokens,
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TokenUsage
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Properties
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**
|
|
8
|
+
**count** | **string** | | [optional] [default to undefined]
|
|
9
|
+
**cost** | **string** | | [optional] [default to undefined]
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
12
13
|
```typescript
|
|
13
|
-
import {
|
|
14
|
+
import { TokenUsage } from '@cherryin/aigw-api-client';
|
|
14
15
|
|
|
15
|
-
const instance:
|
|
16
|
-
|
|
16
|
+
const instance: TokenUsage = {
|
|
17
|
+
count,
|
|
18
|
+
cost,
|
|
17
19
|
};
|
|
18
20
|
```
|
|
19
21
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# UsageInsights
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**most_expensive_day_at** | **string** | | [optional] [default to undefined]
|
|
9
|
+
**most_expensive_day_cost** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**avg_daily_cost** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**total_days_tracked** | **number** | | [optional] [default to undefined]
|
|
12
|
+
**last_updated_at** | **string** | | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { UsageInsights } from '@cherryin/aigw-api-client';
|
|
18
|
+
|
|
19
|
+
const instance: UsageInsights = {
|
|
20
|
+
most_expensive_day_at,
|
|
21
|
+
most_expensive_day_cost,
|
|
22
|
+
avg_daily_cost,
|
|
23
|
+
total_days_tracked,
|
|
24
|
+
last_updated_at,
|
|
25
|
+
};
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -62,7 +62,7 @@ No authorization required
|
|
|
62
62
|
[[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)
|
|
63
63
|
|
|
64
64
|
# **userPayServiceUserPayStripeCheckout**
|
|
65
|
-
> UserPayStripeCheckoutResponse userPayServiceUserPayStripeCheckout()
|
|
65
|
+
> UserPayStripeCheckoutResponse userPayServiceUserPayStripeCheckout(body)
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
### Example
|
|
@@ -70,24 +70,17 @@ No authorization required
|
|
|
70
70
|
```typescript
|
|
71
71
|
import {
|
|
72
72
|
UserPayServiceApi,
|
|
73
|
-
Configuration
|
|
73
|
+
Configuration,
|
|
74
|
+
UserPayStripeCheckoutRequest
|
|
74
75
|
} from '@cherryin/aigw-api-client';
|
|
75
76
|
|
|
76
77
|
const configuration = new Configuration();
|
|
77
78
|
const apiInstance = new UserPayServiceApi(configuration);
|
|
78
79
|
|
|
79
|
-
let
|
|
80
|
-
let chargeAmount: string; //充值金额(必须整数,10) (optional) (default to undefined)
|
|
81
|
-
let redirect: boolean; //是否跳转到支付页面,true-跳转,false-不跳转 (optional) (default to undefined)
|
|
82
|
-
let successUrl: string; //支付成功跳转地址 (optional) (default to undefined)
|
|
83
|
-
let cancelUrl: string; //支付取消跳转地址 (optional) (default to undefined)
|
|
80
|
+
let body: UserPayStripeCheckoutRequest; //
|
|
84
81
|
|
|
85
82
|
const { status, data } = await apiInstance.userPayServiceUserPayStripeCheckout(
|
|
86
|
-
|
|
87
|
-
chargeAmount,
|
|
88
|
-
redirect,
|
|
89
|
-
successUrl,
|
|
90
|
-
cancelUrl
|
|
83
|
+
body
|
|
91
84
|
);
|
|
92
85
|
```
|
|
93
86
|
|
|
@@ -95,11 +88,7 @@ const { status, data } = await apiInstance.userPayServiceUserPayStripeCheckout(
|
|
|
95
88
|
|
|
96
89
|
|Name | Type | Description | Notes|
|
|
97
90
|
|------------- | ------------- | ------------- | -------------|
|
|
98
|
-
| **
|
|
99
|
-
| **chargeAmount** | [**string**] | 充值金额(必须整数,10) | (optional) defaults to undefined|
|
|
100
|
-
| **redirect** | [**boolean**] | 是否跳转到支付页面,true-跳转,false-不跳转 | (optional) defaults to undefined|
|
|
101
|
-
| **successUrl** | [**string**] | 支付成功跳转地址 | (optional) defaults to undefined|
|
|
102
|
-
| **cancelUrl** | [**string**] | 支付取消跳转地址 | (optional) defaults to undefined|
|
|
91
|
+
| **body** | **UserPayStripeCheckoutRequest**| | |
|
|
103
92
|
|
|
104
93
|
|
|
105
94
|
### Return type
|
|
@@ -112,7 +101,7 @@ No authorization required
|
|
|
112
101
|
|
|
113
102
|
### HTTP request headers
|
|
114
103
|
|
|
115
|
-
- **Content-Type**:
|
|
104
|
+
- **Content-Type**: application/json
|
|
116
105
|
- **Accept**: application/json
|
|
117
106
|
|
|
118
107
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# UserPayStripeCheckoutRequest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**currency_code** | **string** | | [optional] [default to undefined]
|
|
9
|
+
**charge_amount** | **string** | | [optional] [default to undefined]
|
|
10
|
+
**redirect** | **boolean** | | [optional] [default to undefined]
|
|
11
|
+
**success_url** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**cancel_url** | **string** | | [optional] [default to undefined]
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { UserPayStripeCheckoutRequest } from '@cherryin/aigw-api-client';
|
|
18
|
+
|
|
19
|
+
const instance: UserPayStripeCheckoutRequest = {
|
|
20
|
+
currency_code,
|
|
21
|
+
charge_amount,
|
|
22
|
+
redirect,
|
|
23
|
+
success_url,
|
|
24
|
+
cancel_url,
|
|
25
|
+
};
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
[[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/package.json
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# UserModelActivitySummary
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
Name | Type | Description | Notes
|
|
7
|
-
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**total_model_request_count** | **string** | | [optional] [default to undefined]
|
|
9
|
-
**total_model_request_tokens** | **string** | | [optional] [default to undefined]
|
|
10
|
-
**stat_model_request_count** | **string** | | [optional] [default to undefined]
|
|
11
|
-
**stat_model_request_tokens** | **string** | | [optional] [default to undefined]
|
|
12
|
-
**stat_model_rpm_avg** | **string** | | [optional] [default to undefined]
|
|
13
|
-
**stat_model_tpm_avg** | **string** | | [optional] [default to undefined]
|
|
14
|
-
|
|
15
|
-
## Example
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import { UserModelActivitySummary } from '@cherryin/aigw-api-client';
|
|
19
|
-
|
|
20
|
-
const instance: UserModelActivitySummary = {
|
|
21
|
-
total_model_request_count,
|
|
22
|
-
total_model_request_tokens,
|
|
23
|
-
stat_model_request_count,
|
|
24
|
-
stat_model_request_tokens,
|
|
25
|
-
stat_model_rpm_avg,
|
|
26
|
-
stat_model_tpm_avg,
|
|
27
|
-
};
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# UserModelHourActivity
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Properties
|
|
5
|
-
|
|
6
|
-
Name | Type | Description | Notes
|
|
7
|
-
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**hour_at** | **string** | | [optional] [default to undefined]
|
|
9
|
-
**model_id** | **string** | | [optional] [default to undefined]
|
|
10
|
-
**total_request_count** | **string** | | [optional] [default to undefined]
|
|
11
|
-
**total_request_tokens** | **string** | | [optional] [default to undefined]
|
|
12
|
-
**total_cost** | **string** | | [optional] [default to undefined]
|
|
13
|
-
|
|
14
|
-
## Example
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
import { UserModelHourActivity } from '@cherryin/aigw-api-client';
|
|
18
|
-
|
|
19
|
-
const instance: UserModelHourActivity = {
|
|
20
|
-
hour_at,
|
|
21
|
-
model_id,
|
|
22
|
-
total_request_count,
|
|
23
|
-
total_request_tokens,
|
|
24
|
-
total_cost,
|
|
25
|
-
};
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|