@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,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from './configuration';
|
|
13
|
+
import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
export declare const COLLECTION_FORMATS: {
|
|
16
|
+
csv: string;
|
|
17
|
+
ssv: string;
|
|
18
|
+
tsv: string;
|
|
19
|
+
pipes: string;
|
|
20
|
+
};
|
|
21
|
+
export interface RequestArgs {
|
|
22
|
+
url: string;
|
|
23
|
+
options: RawAxiosRequestConfig;
|
|
24
|
+
}
|
|
25
|
+
export declare class BaseAPI {
|
|
26
|
+
protected basePath: string;
|
|
27
|
+
protected axios: AxiosInstance;
|
|
28
|
+
protected configuration: Configuration | undefined;
|
|
29
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
30
|
+
}
|
|
31
|
+
export declare class RequiredError extends Error {
|
|
32
|
+
field: string;
|
|
33
|
+
constructor(field: string, msg?: string);
|
|
34
|
+
}
|
|
35
|
+
interface ServerMap {
|
|
36
|
+
[key: string]: {
|
|
37
|
+
url: string;
|
|
38
|
+
description: string;
|
|
39
|
+
}[];
|
|
40
|
+
}
|
|
41
|
+
export declare const operationServerMap: ServerMap;
|
|
42
|
+
export {};
|
package/dist/esm/base.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios from 'axios';
|
|
15
|
+
export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
|
|
16
|
+
export const COLLECTION_FORMATS = {
|
|
17
|
+
csv: ",",
|
|
18
|
+
ssv: " ",
|
|
19
|
+
tsv: "\t",
|
|
20
|
+
pipes: "|",
|
|
21
|
+
};
|
|
22
|
+
export class BaseAPI {
|
|
23
|
+
constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
|
|
24
|
+
var _a;
|
|
25
|
+
this.basePath = basePath;
|
|
26
|
+
this.axios = axios;
|
|
27
|
+
if (configuration) {
|
|
28
|
+
this.configuration = configuration;
|
|
29
|
+
this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
;
|
|
34
|
+
export class RequiredError extends Error {
|
|
35
|
+
constructor(field, msg) {
|
|
36
|
+
super(msg);
|
|
37
|
+
this.field = field;
|
|
38
|
+
this.name = "RequiredError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export const operationServerMap = {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { Configuration } from "./configuration";
|
|
13
|
+
import type { RequestArgs } from "./base";
|
|
14
|
+
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
+
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @throws {RequiredError}
|
|
19
|
+
*/
|
|
20
|
+
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
21
|
+
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
22
|
+
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
23
|
+
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
24
|
+
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
25
|
+
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
26
|
+
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
27
|
+
export declare const toPathString: (url: URL) => string;
|
|
28
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import { RequiredError } from "./base";
|
|
24
|
+
export const DUMMY_BASE_URL = 'https://example.com';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @throws {RequiredError}
|
|
28
|
+
*/
|
|
29
|
+
export const assertParamExists = function (functionName, paramName, paramValue) {
|
|
30
|
+
if (paramValue === null || paramValue === undefined) {
|
|
31
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export const setApiKeyToObject = function (object, keyParamName, configuration) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
if (configuration && configuration.apiKey) {
|
|
37
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
38
|
+
? yield configuration.apiKey(keyParamName)
|
|
39
|
+
: yield configuration.apiKey;
|
|
40
|
+
object[keyParamName] = localVarApiKeyValue;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
export const setBasicAuthToObject = function (object, configuration) {
|
|
45
|
+
if (configuration && (configuration.username || configuration.password)) {
|
|
46
|
+
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export const setBearerAuthToObject = function (object, configuration) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
if (configuration && configuration.accessToken) {
|
|
52
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
53
|
+
? yield configuration.accessToken()
|
|
54
|
+
: yield configuration.accessToken;
|
|
55
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
export const setOAuthToObject = function (object, name, scopes, configuration) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
if (configuration && configuration.accessToken) {
|
|
62
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
63
|
+
? yield configuration.accessToken(name, scopes)
|
|
64
|
+
: yield configuration.accessToken;
|
|
65
|
+
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
70
|
+
if (parameter == null)
|
|
71
|
+
return;
|
|
72
|
+
if (typeof parameter === "object") {
|
|
73
|
+
if (Array.isArray(parameter)) {
|
|
74
|
+
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
if (urlSearchParams.has(key)) {
|
|
82
|
+
urlSearchParams.append(key, parameter);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
urlSearchParams.set(key, parameter);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export const setSearchParams = function (url, ...objects) {
|
|
90
|
+
const searchParams = new URLSearchParams(url.search);
|
|
91
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
92
|
+
url.search = searchParams.toString();
|
|
93
|
+
};
|
|
94
|
+
export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
95
|
+
const nonString = typeof value !== 'string';
|
|
96
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
97
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
98
|
+
: nonString;
|
|
99
|
+
return needsSerialization
|
|
100
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
101
|
+
: (value || "");
|
|
102
|
+
};
|
|
103
|
+
export const toPathString = function (url) {
|
|
104
|
+
return url.pathname + url.search + url.hash;
|
|
105
|
+
};
|
|
106
|
+
export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
107
|
+
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
108
|
+
var _a;
|
|
109
|
+
const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url });
|
|
110
|
+
return axios.request(axiosRequestArgs);
|
|
111
|
+
};
|
|
112
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
interface AWSv4Configuration {
|
|
13
|
+
options?: {
|
|
14
|
+
region?: string;
|
|
15
|
+
service?: string;
|
|
16
|
+
};
|
|
17
|
+
credentials?: {
|
|
18
|
+
accessKeyId?: string;
|
|
19
|
+
secretAccessKey?: string;
|
|
20
|
+
sessionToken?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface ConfigurationParameters {
|
|
24
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
25
|
+
username?: string;
|
|
26
|
+
password?: string;
|
|
27
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
28
|
+
awsv4?: AWSv4Configuration;
|
|
29
|
+
basePath?: string;
|
|
30
|
+
serverIndex?: number;
|
|
31
|
+
baseOptions?: any;
|
|
32
|
+
formDataCtor?: new () => any;
|
|
33
|
+
}
|
|
34
|
+
export declare class Configuration {
|
|
35
|
+
/**
|
|
36
|
+
* parameter for apiKey security
|
|
37
|
+
* @param name security name
|
|
38
|
+
*/
|
|
39
|
+
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
40
|
+
/**
|
|
41
|
+
* parameter for basic security
|
|
42
|
+
*/
|
|
43
|
+
username?: string;
|
|
44
|
+
/**
|
|
45
|
+
* parameter for basic security
|
|
46
|
+
*/
|
|
47
|
+
password?: string;
|
|
48
|
+
/**
|
|
49
|
+
* parameter for oauth2 security
|
|
50
|
+
* @param name security name
|
|
51
|
+
* @param scopes oauth2 scope
|
|
52
|
+
*/
|
|
53
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
54
|
+
/**
|
|
55
|
+
* parameter for aws4 signature security
|
|
56
|
+
* @param {Object} AWS4Signature - AWS4 Signature security
|
|
57
|
+
* @param {string} options.region - aws region
|
|
58
|
+
* @param {string} options.service - name of the service.
|
|
59
|
+
* @param {string} credentials.accessKeyId - aws access key id
|
|
60
|
+
* @param {string} credentials.secretAccessKey - aws access key
|
|
61
|
+
* @param {string} credentials.sessionToken - aws session token
|
|
62
|
+
* @memberof Configuration
|
|
63
|
+
*/
|
|
64
|
+
awsv4?: AWSv4Configuration;
|
|
65
|
+
/**
|
|
66
|
+
* override base path
|
|
67
|
+
*/
|
|
68
|
+
basePath?: string;
|
|
69
|
+
/**
|
|
70
|
+
* override server index
|
|
71
|
+
*/
|
|
72
|
+
serverIndex?: number;
|
|
73
|
+
/**
|
|
74
|
+
* base options for axios calls
|
|
75
|
+
*/
|
|
76
|
+
baseOptions?: any;
|
|
77
|
+
/**
|
|
78
|
+
* The FormData constructor that will be used to create multipart form data
|
|
79
|
+
* requests. You can inject this here so that execution environments that
|
|
80
|
+
* do not support the FormData class can still run the generated client.
|
|
81
|
+
*
|
|
82
|
+
* @type {new () => FormData}
|
|
83
|
+
*/
|
|
84
|
+
formDataCtor?: new () => any;
|
|
85
|
+
constructor(param?: ConfigurationParameters);
|
|
86
|
+
/**
|
|
87
|
+
* Check if the given MIME is a JSON MIME.
|
|
88
|
+
* JSON MIME examples:
|
|
89
|
+
* application/json
|
|
90
|
+
* application/json; charset=UTF8
|
|
91
|
+
* APPLICATION/JSON
|
|
92
|
+
* application/vnd.company+json
|
|
93
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
94
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
95
|
+
*/
|
|
96
|
+
isJsonMime(mime: string): boolean;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
*
|
|
6
|
+
* The version of the OpenAPI document: 0.0.1
|
|
7
|
+
*
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
10
|
+
* https://openapi-generator.tech
|
|
11
|
+
* Do not edit the class manually.
|
|
12
|
+
*/
|
|
13
|
+
export class Configuration {
|
|
14
|
+
constructor(param = {}) {
|
|
15
|
+
var _a;
|
|
16
|
+
this.apiKey = param.apiKey;
|
|
17
|
+
this.username = param.username;
|
|
18
|
+
this.password = param.password;
|
|
19
|
+
this.accessToken = param.accessToken;
|
|
20
|
+
this.awsv4 = param.awsv4;
|
|
21
|
+
this.basePath = param.basePath;
|
|
22
|
+
this.serverIndex = param.serverIndex;
|
|
23
|
+
this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
|
|
24
|
+
this.formDataCtor = param.formDataCtor;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if the given MIME is a JSON MIME.
|
|
28
|
+
* JSON MIME examples:
|
|
29
|
+
* application/json
|
|
30
|
+
* application/json; charset=UTF8
|
|
31
|
+
* APPLICATION/JSON
|
|
32
|
+
* application/vnd.company+json
|
|
33
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
34
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
35
|
+
*/
|
|
36
|
+
isJsonMime(mime) {
|
|
37
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
38
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export * from "./api";
|
|
13
|
+
export * from "./configuration";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.0.1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
export * from "./api";
|
|
15
|
+
export * from "./configuration";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.0.1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
export * from "./api";
|
|
13
|
+
export * from "./configuration";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api"), exports);
|
|
31
|
+
__exportStar(require("./configuration"), exports);
|
package/docs/AIModel.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# AIModel
|
|
2
|
+
|
|
3
|
+
AIModel 代表面向终端用户的 AI 模型配置 - 内部统一定义,提供给用户的是裁剪信息后的 FrontAIModel AIModel represents an AI model configuration exposed to end users
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**id** | **string** | id AIModel 的唯一标识符 Unique identifier for the AI model | [optional] [default to undefined]
|
|
10
|
+
**created_at** | **string** | created_at 创建时间戳(Unix 时间戳) Creation timestamp (Unix timestamp) | [optional] [default to undefined]
|
|
11
|
+
**updated_at** | **string** | updated_at 更新时间戳(Unix 时间戳) Last update timestamp (Unix timestamp) | [optional] [default to undefined]
|
|
12
|
+
**deleted_at** | **string** | deleted_at 软删除时间戳,0 表示未删除 Soft deletion timestamp, 0 means not deleted | [optional] [default to undefined]
|
|
13
|
+
**name** | **string** | name 模型的唯一名称标识,例如 \"gpt-4\", \"claude-3-opus\" Unique name identifier for the model, e.g., \"gpt-4\", \"claude-3-opus\" | [optional] [default to undefined]
|
|
14
|
+
**display_name** | **string** | display_name 模型的显示名称,例如 \"GPT-4\", \"Claude 3 Opus\" Display name for the model, e.g., \"GPT-4\", \"Claude 3 Opus\" | [optional] [default to undefined]
|
|
15
|
+
**group** | **string** | group 模型分组,例如 \"gpt-4\", \"claude-3\" Model group, e.g., \"gpt-4\", \"claude-3\" | [optional] [default to undefined]
|
|
16
|
+
**description** | **string** | description 模型描述 Model description | [optional] [default to undefined]
|
|
17
|
+
**status** | **number** | status 模型状态 Model status 1: 草稿 (Draft) 2: 已发布 (Published) 3: 已禁用 (Disabled) | [optional] [default to undefined]
|
|
18
|
+
**meta** | [**AIModelMeta**](AIModelMeta.md) | meta 元数据 Metadata | [optional] [default to undefined]
|
|
19
|
+
**provider_configs** | [**Array<AIModelProviderConfigItem>**](AIModelProviderConfigItem.md) | provider_configs Provider 配置列表 Provider configuration list | [optional] [default to undefined]
|
|
20
|
+
**pricing_configs** | [**Array<AIModelPricingConfig>**](AIModelPricingConfig.md) | pricing_configs 价格配置列表 (NEW) Pricing configurations | [optional] [default to undefined]
|
|
21
|
+
**discount_config** | [**AIModelDiscountConfig**](AIModelDiscountConfig.md) | discount_config 折扣配置 | [optional] [default to undefined]
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { AIModel } from '@cherryin/api-client';
|
|
27
|
+
|
|
28
|
+
const instance: AIModel = {
|
|
29
|
+
id,
|
|
30
|
+
created_at,
|
|
31
|
+
updated_at,
|
|
32
|
+
deleted_at,
|
|
33
|
+
name,
|
|
34
|
+
display_name,
|
|
35
|
+
group,
|
|
36
|
+
description,
|
|
37
|
+
status,
|
|
38
|
+
meta,
|
|
39
|
+
provider_configs,
|
|
40
|
+
pricing_configs,
|
|
41
|
+
discount_config,
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|