@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.
Files changed (155) hide show
  1. package/.openapi-generator/FILES +135 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +219 -0
  5. package/api.ts +6364 -0
  6. package/base.ts +62 -0
  7. package/common.ts +113 -0
  8. package/configuration.ts +121 -0
  9. package/dist/api.d.ts +4175 -0
  10. package/dist/api.js +3694 -0
  11. package/dist/base.d.ts +42 -0
  12. package/dist/base.js +46 -0
  13. package/dist/common.d.ts +28 -0
  14. package/dist/common.js +124 -0
  15. package/dist/configuration.d.ts +98 -0
  16. package/dist/configuration.js +44 -0
  17. package/dist/esm/api.d.ts +4175 -0
  18. package/dist/esm/api.js +3643 -0
  19. package/dist/esm/base.d.ts +42 -0
  20. package/dist/esm/base.js +41 -0
  21. package/dist/esm/common.d.ts +28 -0
  22. package/dist/esm/common.js +112 -0
  23. package/dist/esm/configuration.d.ts +98 -0
  24. package/dist/esm/configuration.js +40 -0
  25. package/dist/esm/index.d.ts +13 -0
  26. package/dist/esm/index.js +15 -0
  27. package/dist/index.d.ts +13 -0
  28. package/dist/index.js +31 -0
  29. package/docs/AIModel.md +45 -0
  30. package/docs/AIModelAdminServiceApi.md +398 -0
  31. package/docs/AIModelArchitecture.md +25 -0
  32. package/docs/AIModelCreateRequest.md +35 -0
  33. package/docs/AIModelCreateResponse.md +25 -0
  34. package/docs/AIModelDeleteRequest.md +21 -0
  35. package/docs/AIModelDeleteResponse.md +23 -0
  36. package/docs/AIModelDisableRequest.md +21 -0
  37. package/docs/AIModelDisableResponse.md +25 -0
  38. package/docs/AIModelDiscountConfig.md +21 -0
  39. package/docs/AIModelGetResponse.md +25 -0
  40. package/docs/AIModelListResponse.md +27 -0
  41. package/docs/AIModelMeta.md +25 -0
  42. package/docs/AIModelPricingConfig.md +37 -0
  43. package/docs/AIModelProviderConfigItem.md +29 -0
  44. package/docs/AIModelPublishRequest.md +21 -0
  45. package/docs/AIModelPublishResponse.md +25 -0
  46. package/docs/AIModelUpdateRequest.md +37 -0
  47. package/docs/AIModelUpdateResponse.md +25 -0
  48. package/docs/AWSAuth.md +24 -0
  49. package/docs/AdminAuthFlowInitResponse.md +24 -0
  50. package/docs/AdminAuthServiceApi.md +81 -0
  51. package/docs/AudioPricing.md +33 -0
  52. package/docs/AuthFlowResult.md +23 -0
  53. package/docs/AuthTokenPair.md +27 -0
  54. package/docs/DiscountAdminServiceApi.md +281 -0
  55. package/docs/DiscountCreateRequest.md +36 -0
  56. package/docs/DiscountDeleteRequest.md +20 -0
  57. package/docs/DiscountDeleteResponse.md +22 -0
  58. package/docs/DiscountGetResponse.md +24 -0
  59. package/docs/DiscountInfo.md +42 -0
  60. package/docs/DiscountListResponse.md +26 -0
  61. package/docs/DiscountUpdateRequest.md +38 -0
  62. package/docs/DiscountUpdateResponse.md +24 -0
  63. package/docs/FeatureCostPricing.md +27 -0
  64. package/docs/FrontAIModel.md +45 -0
  65. package/docs/GCPAuth.md +27 -0
  66. package/docs/GoogleProtobufAny.md +21 -0
  67. package/docs/ImagePricing.md +31 -0
  68. package/docs/Label.md +28 -0
  69. package/docs/LabelCreateRequest.md +22 -0
  70. package/docs/LabelCreateResponse.md +24 -0
  71. package/docs/LabelDeleteRequest.md +20 -0
  72. package/docs/LabelDeleteResponse.md +22 -0
  73. package/docs/LabelListRequest.md +24 -0
  74. package/docs/LabelListResponse.md +26 -0
  75. package/docs/LabelUpdateRequest.md +24 -0
  76. package/docs/LabelUpdateResponse.md +24 -0
  77. package/docs/MultimodalPricing.md +25 -0
  78. package/docs/PricingConditions.md +31 -0
  79. package/docs/PricingRules.md +29 -0
  80. package/docs/Provider.md +37 -0
  81. package/docs/ProviderAdminServiceApi.md +284 -0
  82. package/docs/ProviderAuth.md +29 -0
  83. package/docs/ProviderCreateRequest.md +29 -0
  84. package/docs/ProviderCreateResponse.md +25 -0
  85. package/docs/ProviderDeleteRequest.md +21 -0
  86. package/docs/ProviderDeleteResponse.md +23 -0
  87. package/docs/ProviderGetResponse.md +25 -0
  88. package/docs/ProviderListResponse.md +27 -0
  89. package/docs/ProviderModel.md +37 -0
  90. package/docs/ProviderModelAdminServiceApi.md +287 -0
  91. package/docs/ProviderModelCreateRequest.md +29 -0
  92. package/docs/ProviderModelCreateResponse.md +25 -0
  93. package/docs/ProviderModelDeleteRequest.md +21 -0
  94. package/docs/ProviderModelDeleteResponse.md +23 -0
  95. package/docs/ProviderModelGetResponse.md +25 -0
  96. package/docs/ProviderModelListResponse.md +27 -0
  97. package/docs/ProviderModelPayload.md +23 -0
  98. package/docs/ProviderModelUpdateRequest.md +31 -0
  99. package/docs/ProviderModelUpdateResponse.md +25 -0
  100. package/docs/ProviderPayload.md +21 -0
  101. package/docs/ProviderUpdateRequest.md +31 -0
  102. package/docs/ProviderUpdateResponse.md +25 -0
  103. package/docs/RequestPricing.md +23 -0
  104. package/docs/Status.md +25 -0
  105. package/docs/TextTokenInputPricing.md +27 -0
  106. package/docs/TextTokenOutputPricing.md +25 -0
  107. package/docs/TextTokenPricing.md +23 -0
  108. package/docs/TokenTier.md +25 -0
  109. package/docs/UserAPIKey.md +47 -0
  110. package/docs/UserAPIKeyCreateRequest.md +37 -0
  111. package/docs/UserAPIKeyCreateResponse.md +25 -0
  112. package/docs/UserAPIKeyDeleteRequest.md +21 -0
  113. package/docs/UserAPIKeyDeleteResponse.md +23 -0
  114. package/docs/UserAPIKeyGetResponse.md +25 -0
  115. package/docs/UserAPIKeyListResponse.md +27 -0
  116. package/docs/UserAPIKeyServiceApi.md +290 -0
  117. package/docs/UserAPIKeyUpdateRequest.md +33 -0
  118. package/docs/UserAPIKeyUpdateResponse.md +25 -0
  119. package/docs/UserAuthFlowCodeResponse.md +26 -0
  120. package/docs/UserAuthFlowInitResponse.md +28 -0
  121. package/docs/UserAuthFlowInitResponseOAuthResult.md +20 -0
  122. package/docs/UserAuthFlowOAuthCallbackRequest.md +24 -0
  123. package/docs/UserAuthFlowOAuthCallbackResponse.md +26 -0
  124. package/docs/UserAuthInfo.md +20 -0
  125. package/docs/UserAuthServiceApi.md +279 -0
  126. package/docs/UserBalance.md +42 -0
  127. package/docs/UserBalanceBrief.md +32 -0
  128. package/docs/UserBalanceChangeResponse.md +24 -0
  129. package/docs/UserBalanceEditResponse.md +24 -0
  130. package/docs/UserBalanceListResponse.md +26 -0
  131. package/docs/UserBalanceServiceApi.md +226 -0
  132. package/docs/UserInfo.md +26 -0
  133. package/docs/UserLabelItem.md +22 -0
  134. package/docs/UserLabelListResponse.md +26 -0
  135. package/docs/UserLabelPair.md +22 -0
  136. package/docs/UserLabelPairChangeAction.md +22 -0
  137. package/docs/UserLabelPairChangeRequest.md +20 -0
  138. package/docs/UserLabelPairChangeResponse.md +22 -0
  139. package/docs/UserLabelServiceApi.md +386 -0
  140. package/docs/UserMeInfo.md +24 -0
  141. package/docs/UserMeInfoResponse.md +24 -0
  142. package/docs/UserModelListResponse.md +33 -0
  143. package/docs/UserModelServiceApi.md +71 -0
  144. package/docs/UserPayServiceApi.md +62 -0
  145. package/docs/UserPayStripeCheckout.md +20 -0
  146. package/docs/UserPayStripeCheckoutResponse.md +24 -0
  147. package/docs/UserPoralServiceApi.md +52 -0
  148. package/docs/UserSettings.md +20 -0
  149. package/docs/VersionedAPISchema.md +31 -0
  150. package/docs/VideoPricing.md +33 -0
  151. package/git_push.sh +57 -0
  152. package/index.ts +18 -0
  153. package/package.json +36 -0
  154. package/tsconfig.esm.json +7 -0
  155. package/tsconfig.json +18 -0
@@ -0,0 +1,3643 @@
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 globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
+ /**
30
+ * AIModelAdminServiceApi - axios parameter creator
31
+ */
32
+ export const AIModelAdminServiceApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * AIModelCreate 创建新的 AIModel(草稿状态) Create a new AI model (draft status) 请求路径: POST /admin/ai-model/create Request path: POST /admin/ai-model/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
36
+ * @param {AIModelCreateRequest} aIModelCreateRequest
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ aIModelAdminServiceAIModelCreate: (aIModelCreateRequest_1, ...args_1) => __awaiter(this, [aIModelCreateRequest_1, ...args_1], void 0, function* (aIModelCreateRequest, options = {}) {
41
+ // verify required parameter 'aIModelCreateRequest' is not null or undefined
42
+ assertParamExists('aIModelAdminServiceAIModelCreate', 'aIModelCreateRequest', aIModelCreateRequest);
43
+ const localVarPath = `/admin/ai-model/create`;
44
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
45
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
46
+ let baseOptions;
47
+ if (configuration) {
48
+ baseOptions = configuration.baseOptions;
49
+ }
50
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
51
+ const localVarHeaderParameter = {};
52
+ const localVarQueryParameter = {};
53
+ localVarHeaderParameter['Content-Type'] = 'application/json';
54
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
55
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
56
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
57
+ localVarRequestOptions.data = serializeDataIfNeeded(aIModelCreateRequest, localVarRequestOptions, configuration);
58
+ return {
59
+ url: toPathString(localVarUrlObj),
60
+ options: localVarRequestOptions,
61
+ };
62
+ }),
63
+ /**
64
+ * AIModelDelete 删除 AIModel(软删除) Delete an AI model (soft delete) 请求路径: POST /admin/ai-model/delete Request path: POST /admin/ai-model/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
65
+ * @param {AIModelDeleteRequest} aIModelDeleteRequest
66
+ * @param {*} [options] Override http request option.
67
+ * @throws {RequiredError}
68
+ */
69
+ aIModelAdminServiceAIModelDelete: (aIModelDeleteRequest_1, ...args_1) => __awaiter(this, [aIModelDeleteRequest_1, ...args_1], void 0, function* (aIModelDeleteRequest, options = {}) {
70
+ // verify required parameter 'aIModelDeleteRequest' is not null or undefined
71
+ assertParamExists('aIModelAdminServiceAIModelDelete', 'aIModelDeleteRequest', aIModelDeleteRequest);
72
+ const localVarPath = `/admin/ai-model/delete`;
73
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
74
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
75
+ let baseOptions;
76
+ if (configuration) {
77
+ baseOptions = configuration.baseOptions;
78
+ }
79
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
80
+ const localVarHeaderParameter = {};
81
+ const localVarQueryParameter = {};
82
+ localVarHeaderParameter['Content-Type'] = 'application/json';
83
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
84
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
85
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
86
+ localVarRequestOptions.data = serializeDataIfNeeded(aIModelDeleteRequest, localVarRequestOptions, configuration);
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ }),
92
+ /**
93
+ * AIModelDisable 禁用 AIModel,状态变更为已禁用 Disable AI model, status changes to disabled 请求路径: POST /admin/ai-model/disable Request path: POST /admin/ai-model/disable 权限要求: 需要管理员权限 Permission: Requires admin authentication
94
+ * @param {AIModelDisableRequest} aIModelDisableRequest
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ aIModelAdminServiceAIModelDisable: (aIModelDisableRequest_1, ...args_1) => __awaiter(this, [aIModelDisableRequest_1, ...args_1], void 0, function* (aIModelDisableRequest, options = {}) {
99
+ // verify required parameter 'aIModelDisableRequest' is not null or undefined
100
+ assertParamExists('aIModelAdminServiceAIModelDisable', 'aIModelDisableRequest', aIModelDisableRequest);
101
+ const localVarPath = `/admin/ai-model/disable`;
102
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
103
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
104
+ let baseOptions;
105
+ if (configuration) {
106
+ baseOptions = configuration.baseOptions;
107
+ }
108
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
109
+ const localVarHeaderParameter = {};
110
+ const localVarQueryParameter = {};
111
+ localVarHeaderParameter['Content-Type'] = 'application/json';
112
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
113
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
114
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
115
+ localVarRequestOptions.data = serializeDataIfNeeded(aIModelDisableRequest, localVarRequestOptions, configuration);
116
+ return {
117
+ url: toPathString(localVarUrlObj),
118
+ options: localVarRequestOptions,
119
+ };
120
+ }),
121
+ /**
122
+ * AIModelGet 根据 ID 或名称获取单个 AIModel Retrieve a single AI model by ID or name 请求路径: GET /admin/ai-model/get?id={id} 或 GET /admin/ai-model/get?name={name} Request path: GET /admin/ai-model/get?id={id} or GET /admin/ai-model/get?name={name} 权限要求: 需要管理员权限 Permission: Requires admin authentication
123
+ * @param {string} [id] id 要获取的 AIModel 的唯一标识符 Unique identifier of the AI model to retrieve @gotags: form:\"id\"
124
+ * @param {string} [name] name 要获取的 AIModel 的名称 Name of the AI model to retrieve 如果同时提供 id 和 name,以 id 为准 If both id and name are provided, id takes precedence @gotags: form:\"name\"
125
+ * @param {*} [options] Override http request option.
126
+ * @throws {RequiredError}
127
+ */
128
+ aIModelAdminServiceAIModelGet: (id_1, name_1, ...args_1) => __awaiter(this, [id_1, name_1, ...args_1], void 0, function* (id, name, options = {}) {
129
+ const localVarPath = `/admin/ai-model/get`;
130
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
131
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
132
+ let baseOptions;
133
+ if (configuration) {
134
+ baseOptions = configuration.baseOptions;
135
+ }
136
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
137
+ const localVarHeaderParameter = {};
138
+ const localVarQueryParameter = {};
139
+ if (id !== undefined) {
140
+ localVarQueryParameter['id'] = id;
141
+ }
142
+ if (name !== undefined) {
143
+ localVarQueryParameter['name'] = name;
144
+ }
145
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
146
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
147
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
148
+ return {
149
+ url: toPathString(localVarUrlObj),
150
+ options: localVarRequestOptions,
151
+ };
152
+ }),
153
+ /**
154
+ * AIModelList 分页查询 AIModel 列表,支持按状态、名称前缀和分组过滤 List AI models with pagination, supports filtering by status, name prefix and group 请求路径: GET /admin/ai-model/list?page={page}&page_size={page_size}&status={status}&name_prefix={prefix}&group={group} Request path: GET /admin/ai-model/list?page={page}&page_size={page_size}&status={status}&name_prefix={prefix}&group={group} 权限要求: 需要管理员权限 Permission: Requires admin authentication
155
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
156
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
157
+ * @param {number} [status] status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回草稿状态 2: 仅返回已发布状态 3: 仅返回已禁用状态 0: return all statuses 1: return draft models only 2: return published models only 3: return disabled models only @gotags: form:\"status\"
158
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"gpt-4\" 会匹配 \"gpt-4\", \"gpt-4-turbo\" 等 Example: \"gpt-4\" matches \"gpt-4\", \"gpt-4-turbo\", etc. @gotags: form:\"name_prefix\"
159
+ * @param {string} [group] group 按分组过滤(可选) Filter by group (optional) 例如: \"gpt-4\" 会匹配该分组下的所有模型 Example: \"gpt-4\" matches all models in this group @gotags: form:\"group\"
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ */
163
+ aIModelAdminServiceAIModelList: (page_1, pageSize_1, status_1, namePrefix_1, group_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, status_1, namePrefix_1, group_1, ...args_1], void 0, function* (page, pageSize, status, namePrefix, group, options = {}) {
164
+ const localVarPath = `/admin/ai-model/list`;
165
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
166
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
167
+ let baseOptions;
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ }
171
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
172
+ const localVarHeaderParameter = {};
173
+ const localVarQueryParameter = {};
174
+ if (page !== undefined) {
175
+ localVarQueryParameter['page'] = page;
176
+ }
177
+ if (pageSize !== undefined) {
178
+ localVarQueryParameter['page_size'] = pageSize;
179
+ }
180
+ if (status !== undefined) {
181
+ localVarQueryParameter['status'] = status;
182
+ }
183
+ if (namePrefix !== undefined) {
184
+ localVarQueryParameter['name_prefix'] = namePrefix;
185
+ }
186
+ if (group !== undefined) {
187
+ localVarQueryParameter['group'] = group;
188
+ }
189
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
190
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
192
+ return {
193
+ url: toPathString(localVarUrlObj),
194
+ options: localVarRequestOptions,
195
+ };
196
+ }),
197
+ /**
198
+ * AIModelPublish 发布 AIModel,状态变更为已发布 Publish AI model, status changes to published 请求路径: POST /admin/ai-model/publish Request path: POST /admin/ai-model/publish 权限要求: 需要管理员权限 Permission: Requires admin authentication
199
+ * @param {AIModelPublishRequest} aIModelPublishRequest
200
+ * @param {*} [options] Override http request option.
201
+ * @throws {RequiredError}
202
+ */
203
+ aIModelAdminServiceAIModelPublish: (aIModelPublishRequest_1, ...args_1) => __awaiter(this, [aIModelPublishRequest_1, ...args_1], void 0, function* (aIModelPublishRequest, options = {}) {
204
+ // verify required parameter 'aIModelPublishRequest' is not null or undefined
205
+ assertParamExists('aIModelAdminServiceAIModelPublish', 'aIModelPublishRequest', aIModelPublishRequest);
206
+ const localVarPath = `/admin/ai-model/publish`;
207
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
208
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
209
+ let baseOptions;
210
+ if (configuration) {
211
+ baseOptions = configuration.baseOptions;
212
+ }
213
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
214
+ const localVarHeaderParameter = {};
215
+ const localVarQueryParameter = {};
216
+ localVarHeaderParameter['Content-Type'] = 'application/json';
217
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
218
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
219
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
220
+ localVarRequestOptions.data = serializeDataIfNeeded(aIModelPublishRequest, localVarRequestOptions, configuration);
221
+ return {
222
+ url: toPathString(localVarUrlObj),
223
+ options: localVarRequestOptions,
224
+ };
225
+ }),
226
+ /**
227
+ * AIModelUpdate 更新现有的 AIModel Update an existing AI model 请求路径: POST /admin/ai-model/update Request path: POST /admin/ai-model/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
228
+ * @param {AIModelUpdateRequest} aIModelUpdateRequest
229
+ * @param {*} [options] Override http request option.
230
+ * @throws {RequiredError}
231
+ */
232
+ aIModelAdminServiceAIModelUpdate: (aIModelUpdateRequest_1, ...args_1) => __awaiter(this, [aIModelUpdateRequest_1, ...args_1], void 0, function* (aIModelUpdateRequest, options = {}) {
233
+ // verify required parameter 'aIModelUpdateRequest' is not null or undefined
234
+ assertParamExists('aIModelAdminServiceAIModelUpdate', 'aIModelUpdateRequest', aIModelUpdateRequest);
235
+ const localVarPath = `/admin/ai-model/update`;
236
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
237
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
238
+ let baseOptions;
239
+ if (configuration) {
240
+ baseOptions = configuration.baseOptions;
241
+ }
242
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
243
+ const localVarHeaderParameter = {};
244
+ const localVarQueryParameter = {};
245
+ localVarHeaderParameter['Content-Type'] = 'application/json';
246
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
247
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
248
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
249
+ localVarRequestOptions.data = serializeDataIfNeeded(aIModelUpdateRequest, localVarRequestOptions, configuration);
250
+ return {
251
+ url: toPathString(localVarUrlObj),
252
+ options: localVarRequestOptions,
253
+ };
254
+ }),
255
+ };
256
+ };
257
+ /**
258
+ * AIModelAdminServiceApi - functional programming interface
259
+ */
260
+ export const AIModelAdminServiceApiFp = function (configuration) {
261
+ const localVarAxiosParamCreator = AIModelAdminServiceApiAxiosParamCreator(configuration);
262
+ return {
263
+ /**
264
+ * AIModelCreate 创建新的 AIModel(草稿状态) Create a new AI model (draft status) 请求路径: POST /admin/ai-model/create Request path: POST /admin/ai-model/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
265
+ * @param {AIModelCreateRequest} aIModelCreateRequest
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ aIModelAdminServiceAIModelCreate(aIModelCreateRequest, options) {
270
+ return __awaiter(this, void 0, void 0, function* () {
271
+ var _a, _b, _c;
272
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.aIModelAdminServiceAIModelCreate(aIModelCreateRequest, options);
273
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
274
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelAdminServiceApi.aIModelAdminServiceAIModelCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
275
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
276
+ });
277
+ },
278
+ /**
279
+ * AIModelDelete 删除 AIModel(软删除) Delete an AI model (soft delete) 请求路径: POST /admin/ai-model/delete Request path: POST /admin/ai-model/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
280
+ * @param {AIModelDeleteRequest} aIModelDeleteRequest
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ aIModelAdminServiceAIModelDelete(aIModelDeleteRequest, options) {
285
+ return __awaiter(this, void 0, void 0, function* () {
286
+ var _a, _b, _c;
287
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.aIModelAdminServiceAIModelDelete(aIModelDeleteRequest, options);
288
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
289
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelAdminServiceApi.aIModelAdminServiceAIModelDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
290
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
291
+ });
292
+ },
293
+ /**
294
+ * AIModelDisable 禁用 AIModel,状态变更为已禁用 Disable AI model, status changes to disabled 请求路径: POST /admin/ai-model/disable Request path: POST /admin/ai-model/disable 权限要求: 需要管理员权限 Permission: Requires admin authentication
295
+ * @param {AIModelDisableRequest} aIModelDisableRequest
296
+ * @param {*} [options] Override http request option.
297
+ * @throws {RequiredError}
298
+ */
299
+ aIModelAdminServiceAIModelDisable(aIModelDisableRequest, options) {
300
+ return __awaiter(this, void 0, void 0, function* () {
301
+ var _a, _b, _c;
302
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.aIModelAdminServiceAIModelDisable(aIModelDisableRequest, options);
303
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
304
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelAdminServiceApi.aIModelAdminServiceAIModelDisable']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
305
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
306
+ });
307
+ },
308
+ /**
309
+ * AIModelGet 根据 ID 或名称获取单个 AIModel Retrieve a single AI model by ID or name 请求路径: GET /admin/ai-model/get?id={id} 或 GET /admin/ai-model/get?name={name} Request path: GET /admin/ai-model/get?id={id} or GET /admin/ai-model/get?name={name} 权限要求: 需要管理员权限 Permission: Requires admin authentication
310
+ * @param {string} [id] id 要获取的 AIModel 的唯一标识符 Unique identifier of the AI model to retrieve @gotags: form:\"id\"
311
+ * @param {string} [name] name 要获取的 AIModel 的名称 Name of the AI model to retrieve 如果同时提供 id 和 name,以 id 为准 If both id and name are provided, id takes precedence @gotags: form:\"name\"
312
+ * @param {*} [options] Override http request option.
313
+ * @throws {RequiredError}
314
+ */
315
+ aIModelAdminServiceAIModelGet(id, name, options) {
316
+ return __awaiter(this, void 0, void 0, function* () {
317
+ var _a, _b, _c;
318
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.aIModelAdminServiceAIModelGet(id, name, options);
319
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
320
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelAdminServiceApi.aIModelAdminServiceAIModelGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
321
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
322
+ });
323
+ },
324
+ /**
325
+ * AIModelList 分页查询 AIModel 列表,支持按状态、名称前缀和分组过滤 List AI models with pagination, supports filtering by status, name prefix and group 请求路径: GET /admin/ai-model/list?page={page}&page_size={page_size}&status={status}&name_prefix={prefix}&group={group} Request path: GET /admin/ai-model/list?page={page}&page_size={page_size}&status={status}&name_prefix={prefix}&group={group} 权限要求: 需要管理员权限 Permission: Requires admin authentication
326
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
327
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
328
+ * @param {number} [status] status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回草稿状态 2: 仅返回已发布状态 3: 仅返回已禁用状态 0: return all statuses 1: return draft models only 2: return published models only 3: return disabled models only @gotags: form:\"status\"
329
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"gpt-4\" 会匹配 \"gpt-4\", \"gpt-4-turbo\" 等 Example: \"gpt-4\" matches \"gpt-4\", \"gpt-4-turbo\", etc. @gotags: form:\"name_prefix\"
330
+ * @param {string} [group] group 按分组过滤(可选) Filter by group (optional) 例如: \"gpt-4\" 会匹配该分组下的所有模型 Example: \"gpt-4\" matches all models in this group @gotags: form:\"group\"
331
+ * @param {*} [options] Override http request option.
332
+ * @throws {RequiredError}
333
+ */
334
+ aIModelAdminServiceAIModelList(page, pageSize, status, namePrefix, group, options) {
335
+ return __awaiter(this, void 0, void 0, function* () {
336
+ var _a, _b, _c;
337
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.aIModelAdminServiceAIModelList(page, pageSize, status, namePrefix, group, options);
338
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
339
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelAdminServiceApi.aIModelAdminServiceAIModelList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
340
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
341
+ });
342
+ },
343
+ /**
344
+ * AIModelPublish 发布 AIModel,状态变更为已发布 Publish AI model, status changes to published 请求路径: POST /admin/ai-model/publish Request path: POST /admin/ai-model/publish 权限要求: 需要管理员权限 Permission: Requires admin authentication
345
+ * @param {AIModelPublishRequest} aIModelPublishRequest
346
+ * @param {*} [options] Override http request option.
347
+ * @throws {RequiredError}
348
+ */
349
+ aIModelAdminServiceAIModelPublish(aIModelPublishRequest, options) {
350
+ return __awaiter(this, void 0, void 0, function* () {
351
+ var _a, _b, _c;
352
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.aIModelAdminServiceAIModelPublish(aIModelPublishRequest, options);
353
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
354
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelAdminServiceApi.aIModelAdminServiceAIModelPublish']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
355
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
356
+ });
357
+ },
358
+ /**
359
+ * AIModelUpdate 更新现有的 AIModel Update an existing AI model 请求路径: POST /admin/ai-model/update Request path: POST /admin/ai-model/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
360
+ * @param {AIModelUpdateRequest} aIModelUpdateRequest
361
+ * @param {*} [options] Override http request option.
362
+ * @throws {RequiredError}
363
+ */
364
+ aIModelAdminServiceAIModelUpdate(aIModelUpdateRequest, options) {
365
+ return __awaiter(this, void 0, void 0, function* () {
366
+ var _a, _b, _c;
367
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.aIModelAdminServiceAIModelUpdate(aIModelUpdateRequest, options);
368
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
369
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AIModelAdminServiceApi.aIModelAdminServiceAIModelUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
370
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
371
+ });
372
+ },
373
+ };
374
+ };
375
+ /**
376
+ * AIModelAdminServiceApi - factory interface
377
+ */
378
+ export const AIModelAdminServiceApiFactory = function (configuration, basePath, axios) {
379
+ const localVarFp = AIModelAdminServiceApiFp(configuration);
380
+ return {
381
+ /**
382
+ * AIModelCreate 创建新的 AIModel(草稿状态) Create a new AI model (draft status) 请求路径: POST /admin/ai-model/create Request path: POST /admin/ai-model/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
383
+ * @param {AIModelCreateRequest} aIModelCreateRequest
384
+ * @param {*} [options] Override http request option.
385
+ * @throws {RequiredError}
386
+ */
387
+ aIModelAdminServiceAIModelCreate(aIModelCreateRequest, options) {
388
+ return localVarFp.aIModelAdminServiceAIModelCreate(aIModelCreateRequest, options).then((request) => request(axios, basePath));
389
+ },
390
+ /**
391
+ * AIModelDelete 删除 AIModel(软删除) Delete an AI model (soft delete) 请求路径: POST /admin/ai-model/delete Request path: POST /admin/ai-model/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
392
+ * @param {AIModelDeleteRequest} aIModelDeleteRequest
393
+ * @param {*} [options] Override http request option.
394
+ * @throws {RequiredError}
395
+ */
396
+ aIModelAdminServiceAIModelDelete(aIModelDeleteRequest, options) {
397
+ return localVarFp.aIModelAdminServiceAIModelDelete(aIModelDeleteRequest, options).then((request) => request(axios, basePath));
398
+ },
399
+ /**
400
+ * AIModelDisable 禁用 AIModel,状态变更为已禁用 Disable AI model, status changes to disabled 请求路径: POST /admin/ai-model/disable Request path: POST /admin/ai-model/disable 权限要求: 需要管理员权限 Permission: Requires admin authentication
401
+ * @param {AIModelDisableRequest} aIModelDisableRequest
402
+ * @param {*} [options] Override http request option.
403
+ * @throws {RequiredError}
404
+ */
405
+ aIModelAdminServiceAIModelDisable(aIModelDisableRequest, options) {
406
+ return localVarFp.aIModelAdminServiceAIModelDisable(aIModelDisableRequest, options).then((request) => request(axios, basePath));
407
+ },
408
+ /**
409
+ * AIModelGet 根据 ID 或名称获取单个 AIModel Retrieve a single AI model by ID or name 请求路径: GET /admin/ai-model/get?id={id} 或 GET /admin/ai-model/get?name={name} Request path: GET /admin/ai-model/get?id={id} or GET /admin/ai-model/get?name={name} 权限要求: 需要管理员权限 Permission: Requires admin authentication
410
+ * @param {string} [id] id 要获取的 AIModel 的唯一标识符 Unique identifier of the AI model to retrieve @gotags: form:\"id\"
411
+ * @param {string} [name] name 要获取的 AIModel 的名称 Name of the AI model to retrieve 如果同时提供 id 和 name,以 id 为准 If both id and name are provided, id takes precedence @gotags: form:\"name\"
412
+ * @param {*} [options] Override http request option.
413
+ * @throws {RequiredError}
414
+ */
415
+ aIModelAdminServiceAIModelGet(id, name, options) {
416
+ return localVarFp.aIModelAdminServiceAIModelGet(id, name, options).then((request) => request(axios, basePath));
417
+ },
418
+ /**
419
+ * AIModelList 分页查询 AIModel 列表,支持按状态、名称前缀和分组过滤 List AI models with pagination, supports filtering by status, name prefix and group 请求路径: GET /admin/ai-model/list?page={page}&page_size={page_size}&status={status}&name_prefix={prefix}&group={group} Request path: GET /admin/ai-model/list?page={page}&page_size={page_size}&status={status}&name_prefix={prefix}&group={group} 权限要求: 需要管理员权限 Permission: Requires admin authentication
420
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
421
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
422
+ * @param {number} [status] status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回草稿状态 2: 仅返回已发布状态 3: 仅返回已禁用状态 0: return all statuses 1: return draft models only 2: return published models only 3: return disabled models only @gotags: form:\"status\"
423
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"gpt-4\" 会匹配 \"gpt-4\", \"gpt-4-turbo\" 等 Example: \"gpt-4\" matches \"gpt-4\", \"gpt-4-turbo\", etc. @gotags: form:\"name_prefix\"
424
+ * @param {string} [group] group 按分组过滤(可选) Filter by group (optional) 例如: \"gpt-4\" 会匹配该分组下的所有模型 Example: \"gpt-4\" matches all models in this group @gotags: form:\"group\"
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ aIModelAdminServiceAIModelList(page, pageSize, status, namePrefix, group, options) {
429
+ return localVarFp.aIModelAdminServiceAIModelList(page, pageSize, status, namePrefix, group, options).then((request) => request(axios, basePath));
430
+ },
431
+ /**
432
+ * AIModelPublish 发布 AIModel,状态变更为已发布 Publish AI model, status changes to published 请求路径: POST /admin/ai-model/publish Request path: POST /admin/ai-model/publish 权限要求: 需要管理员权限 Permission: Requires admin authentication
433
+ * @param {AIModelPublishRequest} aIModelPublishRequest
434
+ * @param {*} [options] Override http request option.
435
+ * @throws {RequiredError}
436
+ */
437
+ aIModelAdminServiceAIModelPublish(aIModelPublishRequest, options) {
438
+ return localVarFp.aIModelAdminServiceAIModelPublish(aIModelPublishRequest, options).then((request) => request(axios, basePath));
439
+ },
440
+ /**
441
+ * AIModelUpdate 更新现有的 AIModel Update an existing AI model 请求路径: POST /admin/ai-model/update Request path: POST /admin/ai-model/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
442
+ * @param {AIModelUpdateRequest} aIModelUpdateRequest
443
+ * @param {*} [options] Override http request option.
444
+ * @throws {RequiredError}
445
+ */
446
+ aIModelAdminServiceAIModelUpdate(aIModelUpdateRequest, options) {
447
+ return localVarFp.aIModelAdminServiceAIModelUpdate(aIModelUpdateRequest, options).then((request) => request(axios, basePath));
448
+ },
449
+ };
450
+ };
451
+ /**
452
+ * AIModelAdminServiceApi - object-oriented interface
453
+ */
454
+ export class AIModelAdminServiceApi extends BaseAPI {
455
+ /**
456
+ * AIModelCreate 创建新的 AIModel(草稿状态) Create a new AI model (draft status) 请求路径: POST /admin/ai-model/create Request path: POST /admin/ai-model/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
457
+ * @param {AIModelCreateRequest} aIModelCreateRequest
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ */
461
+ aIModelAdminServiceAIModelCreate(aIModelCreateRequest, options) {
462
+ return AIModelAdminServiceApiFp(this.configuration).aIModelAdminServiceAIModelCreate(aIModelCreateRequest, options).then((request) => request(this.axios, this.basePath));
463
+ }
464
+ /**
465
+ * AIModelDelete 删除 AIModel(软删除) Delete an AI model (soft delete) 请求路径: POST /admin/ai-model/delete Request path: POST /admin/ai-model/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
466
+ * @param {AIModelDeleteRequest} aIModelDeleteRequest
467
+ * @param {*} [options] Override http request option.
468
+ * @throws {RequiredError}
469
+ */
470
+ aIModelAdminServiceAIModelDelete(aIModelDeleteRequest, options) {
471
+ return AIModelAdminServiceApiFp(this.configuration).aIModelAdminServiceAIModelDelete(aIModelDeleteRequest, options).then((request) => request(this.axios, this.basePath));
472
+ }
473
+ /**
474
+ * AIModelDisable 禁用 AIModel,状态变更为已禁用 Disable AI model, status changes to disabled 请求路径: POST /admin/ai-model/disable Request path: POST /admin/ai-model/disable 权限要求: 需要管理员权限 Permission: Requires admin authentication
475
+ * @param {AIModelDisableRequest} aIModelDisableRequest
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ aIModelAdminServiceAIModelDisable(aIModelDisableRequest, options) {
480
+ return AIModelAdminServiceApiFp(this.configuration).aIModelAdminServiceAIModelDisable(aIModelDisableRequest, options).then((request) => request(this.axios, this.basePath));
481
+ }
482
+ /**
483
+ * AIModelGet 根据 ID 或名称获取单个 AIModel Retrieve a single AI model by ID or name 请求路径: GET /admin/ai-model/get?id={id} 或 GET /admin/ai-model/get?name={name} Request path: GET /admin/ai-model/get?id={id} or GET /admin/ai-model/get?name={name} 权限要求: 需要管理员权限 Permission: Requires admin authentication
484
+ * @param {string} [id] id 要获取的 AIModel 的唯一标识符 Unique identifier of the AI model to retrieve @gotags: form:\"id\"
485
+ * @param {string} [name] name 要获取的 AIModel 的名称 Name of the AI model to retrieve 如果同时提供 id 和 name,以 id 为准 If both id and name are provided, id takes precedence @gotags: form:\"name\"
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ */
489
+ aIModelAdminServiceAIModelGet(id, name, options) {
490
+ return AIModelAdminServiceApiFp(this.configuration).aIModelAdminServiceAIModelGet(id, name, options).then((request) => request(this.axios, this.basePath));
491
+ }
492
+ /**
493
+ * AIModelList 分页查询 AIModel 列表,支持按状态、名称前缀和分组过滤 List AI models with pagination, supports filtering by status, name prefix and group 请求路径: GET /admin/ai-model/list?page={page}&page_size={page_size}&status={status}&name_prefix={prefix}&group={group} Request path: GET /admin/ai-model/list?page={page}&page_size={page_size}&status={status}&name_prefix={prefix}&group={group} 权限要求: 需要管理员权限 Permission: Requires admin authentication
494
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
495
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
496
+ * @param {number} [status] status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回草稿状态 2: 仅返回已发布状态 3: 仅返回已禁用状态 0: return all statuses 1: return draft models only 2: return published models only 3: return disabled models only @gotags: form:\"status\"
497
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"gpt-4\" 会匹配 \"gpt-4\", \"gpt-4-turbo\" 等 Example: \"gpt-4\" matches \"gpt-4\", \"gpt-4-turbo\", etc. @gotags: form:\"name_prefix\"
498
+ * @param {string} [group] group 按分组过滤(可选) Filter by group (optional) 例如: \"gpt-4\" 会匹配该分组下的所有模型 Example: \"gpt-4\" matches all models in this group @gotags: form:\"group\"
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ aIModelAdminServiceAIModelList(page, pageSize, status, namePrefix, group, options) {
503
+ return AIModelAdminServiceApiFp(this.configuration).aIModelAdminServiceAIModelList(page, pageSize, status, namePrefix, group, options).then((request) => request(this.axios, this.basePath));
504
+ }
505
+ /**
506
+ * AIModelPublish 发布 AIModel,状态变更为已发布 Publish AI model, status changes to published 请求路径: POST /admin/ai-model/publish Request path: POST /admin/ai-model/publish 权限要求: 需要管理员权限 Permission: Requires admin authentication
507
+ * @param {AIModelPublishRequest} aIModelPublishRequest
508
+ * @param {*} [options] Override http request option.
509
+ * @throws {RequiredError}
510
+ */
511
+ aIModelAdminServiceAIModelPublish(aIModelPublishRequest, options) {
512
+ return AIModelAdminServiceApiFp(this.configuration).aIModelAdminServiceAIModelPublish(aIModelPublishRequest, options).then((request) => request(this.axios, this.basePath));
513
+ }
514
+ /**
515
+ * AIModelUpdate 更新现有的 AIModel Update an existing AI model 请求路径: POST /admin/ai-model/update Request path: POST /admin/ai-model/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
516
+ * @param {AIModelUpdateRequest} aIModelUpdateRequest
517
+ * @param {*} [options] Override http request option.
518
+ * @throws {RequiredError}
519
+ */
520
+ aIModelAdminServiceAIModelUpdate(aIModelUpdateRequest, options) {
521
+ return AIModelAdminServiceApiFp(this.configuration).aIModelAdminServiceAIModelUpdate(aIModelUpdateRequest, options).then((request) => request(this.axios, this.basePath));
522
+ }
523
+ }
524
+ /**
525
+ * AdminAuthServiceApi - axios parameter creator
526
+ */
527
+ export const AdminAuthServiceApiAxiosParamCreator = function (configuration) {
528
+ return {
529
+ /**
530
+ * 管理员登录
531
+ * @param {number} [authType]
532
+ * @param {number} [authAction]
533
+ * @param {string} [payloadEmailPayloadUserEmail]
534
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
535
+ * @param {string} [authAt]
536
+ * @param {string} [nonce]
537
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_admin:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform )
538
+ * @param {string} [sessionType] enum string: - tenant_admin - sys_admin
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ */
542
+ adminAuthServiceAdminAuthFlowInit: (authType_1, authAction_1, payloadEmailPayloadUserEmail_1, payloadEmailPayloadUserPasswordEncrypt_1, authAt_1, nonce_1, signature_1, sessionType_1, ...args_1) => __awaiter(this, [authType_1, authAction_1, payloadEmailPayloadUserEmail_1, payloadEmailPayloadUserPasswordEncrypt_1, authAt_1, nonce_1, signature_1, sessionType_1, ...args_1], void 0, function* (authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, sessionType, options = {}) {
543
+ const localVarPath = `/admin/auth/init`;
544
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
545
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
546
+ let baseOptions;
547
+ if (configuration) {
548
+ baseOptions = configuration.baseOptions;
549
+ }
550
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
551
+ const localVarHeaderParameter = {};
552
+ const localVarQueryParameter = {};
553
+ if (authType !== undefined) {
554
+ localVarQueryParameter['auth_type'] = authType;
555
+ }
556
+ if (authAction !== undefined) {
557
+ localVarQueryParameter['auth_action'] = authAction;
558
+ }
559
+ if (payloadEmailPayloadUserEmail !== undefined) {
560
+ localVarQueryParameter['payload.email_payload.user_email'] = payloadEmailPayloadUserEmail;
561
+ }
562
+ if (payloadEmailPayloadUserPasswordEncrypt !== undefined) {
563
+ localVarQueryParameter['payload.email_payload.user_password_encrypt'] = payloadEmailPayloadUserPasswordEncrypt;
564
+ }
565
+ if (authAt !== undefined) {
566
+ localVarQueryParameter['auth_at'] = authAt;
567
+ }
568
+ if (nonce !== undefined) {
569
+ localVarQueryParameter['nonce'] = nonce;
570
+ }
571
+ if (signature !== undefined) {
572
+ localVarQueryParameter['signature'] = signature;
573
+ }
574
+ if (sessionType !== undefined) {
575
+ localVarQueryParameter['session_type'] = sessionType;
576
+ }
577
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
578
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
579
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
580
+ return {
581
+ url: toPathString(localVarUrlObj),
582
+ options: localVarRequestOptions,
583
+ };
584
+ }),
585
+ };
586
+ };
587
+ /**
588
+ * AdminAuthServiceApi - functional programming interface
589
+ */
590
+ export const AdminAuthServiceApiFp = function (configuration) {
591
+ const localVarAxiosParamCreator = AdminAuthServiceApiAxiosParamCreator(configuration);
592
+ return {
593
+ /**
594
+ * 管理员登录
595
+ * @param {number} [authType]
596
+ * @param {number} [authAction]
597
+ * @param {string} [payloadEmailPayloadUserEmail]
598
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
599
+ * @param {string} [authAt]
600
+ * @param {string} [nonce]
601
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_admin:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform )
602
+ * @param {string} [sessionType] enum string: - tenant_admin - sys_admin
603
+ * @param {*} [options] Override http request option.
604
+ * @throws {RequiredError}
605
+ */
606
+ adminAuthServiceAdminAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, sessionType, options) {
607
+ return __awaiter(this, void 0, void 0, function* () {
608
+ var _a, _b, _c;
609
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminAuthServiceAdminAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, sessionType, options);
610
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
611
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['AdminAuthServiceApi.adminAuthServiceAdminAuthFlowInit']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
612
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
613
+ });
614
+ },
615
+ };
616
+ };
617
+ /**
618
+ * AdminAuthServiceApi - factory interface
619
+ */
620
+ export const AdminAuthServiceApiFactory = function (configuration, basePath, axios) {
621
+ const localVarFp = AdminAuthServiceApiFp(configuration);
622
+ return {
623
+ /**
624
+ * 管理员登录
625
+ * @param {number} [authType]
626
+ * @param {number} [authAction]
627
+ * @param {string} [payloadEmailPayloadUserEmail]
628
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
629
+ * @param {string} [authAt]
630
+ * @param {string} [nonce]
631
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_admin:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform )
632
+ * @param {string} [sessionType] enum string: - tenant_admin - sys_admin
633
+ * @param {*} [options] Override http request option.
634
+ * @throws {RequiredError}
635
+ */
636
+ adminAuthServiceAdminAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, sessionType, options) {
637
+ return localVarFp.adminAuthServiceAdminAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, sessionType, options).then((request) => request(axios, basePath));
638
+ },
639
+ };
640
+ };
641
+ /**
642
+ * AdminAuthServiceApi - object-oriented interface
643
+ */
644
+ export class AdminAuthServiceApi extends BaseAPI {
645
+ /**
646
+ * 管理员登录
647
+ * @param {number} [authType]
648
+ * @param {number} [authAction]
649
+ * @param {string} [payloadEmailPayloadUserEmail]
650
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
651
+ * @param {string} [authAt]
652
+ * @param {string} [nonce]
653
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_admin:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform )
654
+ * @param {string} [sessionType] enum string: - tenant_admin - sys_admin
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ */
658
+ adminAuthServiceAdminAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, sessionType, options) {
659
+ return AdminAuthServiceApiFp(this.configuration).adminAuthServiceAdminAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, sessionType, options).then((request) => request(this.axios, this.basePath));
660
+ }
661
+ }
662
+ /**
663
+ * DiscountAdminServiceApi - axios parameter creator
664
+ */
665
+ export const DiscountAdminServiceApiAxiosParamCreator = function (configuration) {
666
+ return {
667
+ /**
668
+ * DiscountCreate 创建折扣接口
669
+ * @param {DiscountCreateRequest} discountCreateRequest
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ */
673
+ discountAdminServiceDiscountCreate: (discountCreateRequest_1, ...args_1) => __awaiter(this, [discountCreateRequest_1, ...args_1], void 0, function* (discountCreateRequest, options = {}) {
674
+ // verify required parameter 'discountCreateRequest' is not null or undefined
675
+ assertParamExists('discountAdminServiceDiscountCreate', 'discountCreateRequest', discountCreateRequest);
676
+ const localVarPath = `/admin/discount/create`;
677
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
678
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
679
+ let baseOptions;
680
+ if (configuration) {
681
+ baseOptions = configuration.baseOptions;
682
+ }
683
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
684
+ const localVarHeaderParameter = {};
685
+ const localVarQueryParameter = {};
686
+ localVarHeaderParameter['Content-Type'] = 'application/json';
687
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
688
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
689
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
690
+ localVarRequestOptions.data = serializeDataIfNeeded(discountCreateRequest, localVarRequestOptions, configuration);
691
+ return {
692
+ url: toPathString(localVarUrlObj),
693
+ options: localVarRequestOptions,
694
+ };
695
+ }),
696
+ /**
697
+ * DiscountDelete 删除折扣接口
698
+ * @param {DiscountDeleteRequest} discountDeleteRequest
699
+ * @param {*} [options] Override http request option.
700
+ * @throws {RequiredError}
701
+ */
702
+ discountAdminServiceDiscountDelete: (discountDeleteRequest_1, ...args_1) => __awaiter(this, [discountDeleteRequest_1, ...args_1], void 0, function* (discountDeleteRequest, options = {}) {
703
+ // verify required parameter 'discountDeleteRequest' is not null or undefined
704
+ assertParamExists('discountAdminServiceDiscountDelete', 'discountDeleteRequest', discountDeleteRequest);
705
+ const localVarPath = `/admin/discount/delete`;
706
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
707
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
708
+ let baseOptions;
709
+ if (configuration) {
710
+ baseOptions = configuration.baseOptions;
711
+ }
712
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
713
+ const localVarHeaderParameter = {};
714
+ const localVarQueryParameter = {};
715
+ localVarHeaderParameter['Content-Type'] = 'application/json';
716
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
717
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
718
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
719
+ localVarRequestOptions.data = serializeDataIfNeeded(discountDeleteRequest, localVarRequestOptions, configuration);
720
+ return {
721
+ url: toPathString(localVarUrlObj),
722
+ options: localVarRequestOptions,
723
+ };
724
+ }),
725
+ /**
726
+ * DiscountGet 获取折扣接口
727
+ * @param {string} [id] @gotags: form:\"id\"
728
+ * @param {*} [options] Override http request option.
729
+ * @throws {RequiredError}
730
+ */
731
+ discountAdminServiceDiscountGet: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
732
+ const localVarPath = `/admin/discount/get`;
733
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
734
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
735
+ let baseOptions;
736
+ if (configuration) {
737
+ baseOptions = configuration.baseOptions;
738
+ }
739
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
740
+ const localVarHeaderParameter = {};
741
+ const localVarQueryParameter = {};
742
+ if (id !== undefined) {
743
+ localVarQueryParameter['id'] = id;
744
+ }
745
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
746
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
747
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
748
+ return {
749
+ url: toPathString(localVarUrlObj),
750
+ options: localVarRequestOptions,
751
+ };
752
+ }),
753
+ /**
754
+ * DiscountList 折扣列表接口
755
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
756
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
757
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) @gotags: form:\"name_prefix\"
758
+ * @param {*} [options] Override http request option.
759
+ * @throws {RequiredError}
760
+ */
761
+ discountAdminServiceDiscountList: (page_1, pageSize_1, namePrefix_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, namePrefix_1, ...args_1], void 0, function* (page, pageSize, namePrefix, options = {}) {
762
+ const localVarPath = `/admin/discount/list`;
763
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
764
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
765
+ let baseOptions;
766
+ if (configuration) {
767
+ baseOptions = configuration.baseOptions;
768
+ }
769
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
770
+ const localVarHeaderParameter = {};
771
+ const localVarQueryParameter = {};
772
+ if (page !== undefined) {
773
+ localVarQueryParameter['page'] = page;
774
+ }
775
+ if (pageSize !== undefined) {
776
+ localVarQueryParameter['page_size'] = pageSize;
777
+ }
778
+ if (namePrefix !== undefined) {
779
+ localVarQueryParameter['name_prefix'] = namePrefix;
780
+ }
781
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
782
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
783
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
784
+ return {
785
+ url: toPathString(localVarUrlObj),
786
+ options: localVarRequestOptions,
787
+ };
788
+ }),
789
+ /**
790
+ * DiscountUpdate 更新折扣接口
791
+ * @param {DiscountUpdateRequest} discountUpdateRequest
792
+ * @param {*} [options] Override http request option.
793
+ * @throws {RequiredError}
794
+ */
795
+ discountAdminServiceDiscountUpdate: (discountUpdateRequest_1, ...args_1) => __awaiter(this, [discountUpdateRequest_1, ...args_1], void 0, function* (discountUpdateRequest, options = {}) {
796
+ // verify required parameter 'discountUpdateRequest' is not null or undefined
797
+ assertParamExists('discountAdminServiceDiscountUpdate', 'discountUpdateRequest', discountUpdateRequest);
798
+ const localVarPath = `/admin/discount/update`;
799
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
800
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
801
+ let baseOptions;
802
+ if (configuration) {
803
+ baseOptions = configuration.baseOptions;
804
+ }
805
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
806
+ const localVarHeaderParameter = {};
807
+ const localVarQueryParameter = {};
808
+ localVarHeaderParameter['Content-Type'] = 'application/json';
809
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
810
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
811
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
812
+ localVarRequestOptions.data = serializeDataIfNeeded(discountUpdateRequest, localVarRequestOptions, configuration);
813
+ return {
814
+ url: toPathString(localVarUrlObj),
815
+ options: localVarRequestOptions,
816
+ };
817
+ }),
818
+ };
819
+ };
820
+ /**
821
+ * DiscountAdminServiceApi - functional programming interface
822
+ */
823
+ export const DiscountAdminServiceApiFp = function (configuration) {
824
+ const localVarAxiosParamCreator = DiscountAdminServiceApiAxiosParamCreator(configuration);
825
+ return {
826
+ /**
827
+ * DiscountCreate 创建折扣接口
828
+ * @param {DiscountCreateRequest} discountCreateRequest
829
+ * @param {*} [options] Override http request option.
830
+ * @throws {RequiredError}
831
+ */
832
+ discountAdminServiceDiscountCreate(discountCreateRequest, options) {
833
+ return __awaiter(this, void 0, void 0, function* () {
834
+ var _a, _b, _c;
835
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.discountAdminServiceDiscountCreate(discountCreateRequest, options);
836
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
837
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DiscountAdminServiceApi.discountAdminServiceDiscountCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
838
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
839
+ });
840
+ },
841
+ /**
842
+ * DiscountDelete 删除折扣接口
843
+ * @param {DiscountDeleteRequest} discountDeleteRequest
844
+ * @param {*} [options] Override http request option.
845
+ * @throws {RequiredError}
846
+ */
847
+ discountAdminServiceDiscountDelete(discountDeleteRequest, options) {
848
+ return __awaiter(this, void 0, void 0, function* () {
849
+ var _a, _b, _c;
850
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.discountAdminServiceDiscountDelete(discountDeleteRequest, options);
851
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
852
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DiscountAdminServiceApi.discountAdminServiceDiscountDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
853
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
854
+ });
855
+ },
856
+ /**
857
+ * DiscountGet 获取折扣接口
858
+ * @param {string} [id] @gotags: form:\"id\"
859
+ * @param {*} [options] Override http request option.
860
+ * @throws {RequiredError}
861
+ */
862
+ discountAdminServiceDiscountGet(id, options) {
863
+ return __awaiter(this, void 0, void 0, function* () {
864
+ var _a, _b, _c;
865
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.discountAdminServiceDiscountGet(id, options);
866
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
867
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DiscountAdminServiceApi.discountAdminServiceDiscountGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
868
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
869
+ });
870
+ },
871
+ /**
872
+ * DiscountList 折扣列表接口
873
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
874
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
875
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) @gotags: form:\"name_prefix\"
876
+ * @param {*} [options] Override http request option.
877
+ * @throws {RequiredError}
878
+ */
879
+ discountAdminServiceDiscountList(page, pageSize, namePrefix, options) {
880
+ return __awaiter(this, void 0, void 0, function* () {
881
+ var _a, _b, _c;
882
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.discountAdminServiceDiscountList(page, pageSize, namePrefix, options);
883
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
884
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DiscountAdminServiceApi.discountAdminServiceDiscountList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
885
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
886
+ });
887
+ },
888
+ /**
889
+ * DiscountUpdate 更新折扣接口
890
+ * @param {DiscountUpdateRequest} discountUpdateRequest
891
+ * @param {*} [options] Override http request option.
892
+ * @throws {RequiredError}
893
+ */
894
+ discountAdminServiceDiscountUpdate(discountUpdateRequest, options) {
895
+ return __awaiter(this, void 0, void 0, function* () {
896
+ var _a, _b, _c;
897
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.discountAdminServiceDiscountUpdate(discountUpdateRequest, options);
898
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
899
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DiscountAdminServiceApi.discountAdminServiceDiscountUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
900
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
901
+ });
902
+ },
903
+ };
904
+ };
905
+ /**
906
+ * DiscountAdminServiceApi - factory interface
907
+ */
908
+ export const DiscountAdminServiceApiFactory = function (configuration, basePath, axios) {
909
+ const localVarFp = DiscountAdminServiceApiFp(configuration);
910
+ return {
911
+ /**
912
+ * DiscountCreate 创建折扣接口
913
+ * @param {DiscountCreateRequest} discountCreateRequest
914
+ * @param {*} [options] Override http request option.
915
+ * @throws {RequiredError}
916
+ */
917
+ discountAdminServiceDiscountCreate(discountCreateRequest, options) {
918
+ return localVarFp.discountAdminServiceDiscountCreate(discountCreateRequest, options).then((request) => request(axios, basePath));
919
+ },
920
+ /**
921
+ * DiscountDelete 删除折扣接口
922
+ * @param {DiscountDeleteRequest} discountDeleteRequest
923
+ * @param {*} [options] Override http request option.
924
+ * @throws {RequiredError}
925
+ */
926
+ discountAdminServiceDiscountDelete(discountDeleteRequest, options) {
927
+ return localVarFp.discountAdminServiceDiscountDelete(discountDeleteRequest, options).then((request) => request(axios, basePath));
928
+ },
929
+ /**
930
+ * DiscountGet 获取折扣接口
931
+ * @param {string} [id] @gotags: form:\"id\"
932
+ * @param {*} [options] Override http request option.
933
+ * @throws {RequiredError}
934
+ */
935
+ discountAdminServiceDiscountGet(id, options) {
936
+ return localVarFp.discountAdminServiceDiscountGet(id, options).then((request) => request(axios, basePath));
937
+ },
938
+ /**
939
+ * DiscountList 折扣列表接口
940
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
941
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
942
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) @gotags: form:\"name_prefix\"
943
+ * @param {*} [options] Override http request option.
944
+ * @throws {RequiredError}
945
+ */
946
+ discountAdminServiceDiscountList(page, pageSize, namePrefix, options) {
947
+ return localVarFp.discountAdminServiceDiscountList(page, pageSize, namePrefix, options).then((request) => request(axios, basePath));
948
+ },
949
+ /**
950
+ * DiscountUpdate 更新折扣接口
951
+ * @param {DiscountUpdateRequest} discountUpdateRequest
952
+ * @param {*} [options] Override http request option.
953
+ * @throws {RequiredError}
954
+ */
955
+ discountAdminServiceDiscountUpdate(discountUpdateRequest, options) {
956
+ return localVarFp.discountAdminServiceDiscountUpdate(discountUpdateRequest, options).then((request) => request(axios, basePath));
957
+ },
958
+ };
959
+ };
960
+ /**
961
+ * DiscountAdminServiceApi - object-oriented interface
962
+ */
963
+ export class DiscountAdminServiceApi extends BaseAPI {
964
+ /**
965
+ * DiscountCreate 创建折扣接口
966
+ * @param {DiscountCreateRequest} discountCreateRequest
967
+ * @param {*} [options] Override http request option.
968
+ * @throws {RequiredError}
969
+ */
970
+ discountAdminServiceDiscountCreate(discountCreateRequest, options) {
971
+ return DiscountAdminServiceApiFp(this.configuration).discountAdminServiceDiscountCreate(discountCreateRequest, options).then((request) => request(this.axios, this.basePath));
972
+ }
973
+ /**
974
+ * DiscountDelete 删除折扣接口
975
+ * @param {DiscountDeleteRequest} discountDeleteRequest
976
+ * @param {*} [options] Override http request option.
977
+ * @throws {RequiredError}
978
+ */
979
+ discountAdminServiceDiscountDelete(discountDeleteRequest, options) {
980
+ return DiscountAdminServiceApiFp(this.configuration).discountAdminServiceDiscountDelete(discountDeleteRequest, options).then((request) => request(this.axios, this.basePath));
981
+ }
982
+ /**
983
+ * DiscountGet 获取折扣接口
984
+ * @param {string} [id] @gotags: form:\"id\"
985
+ * @param {*} [options] Override http request option.
986
+ * @throws {RequiredError}
987
+ */
988
+ discountAdminServiceDiscountGet(id, options) {
989
+ return DiscountAdminServiceApiFp(this.configuration).discountAdminServiceDiscountGet(id, options).then((request) => request(this.axios, this.basePath));
990
+ }
991
+ /**
992
+ * DiscountList 折扣列表接口
993
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
994
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
995
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) @gotags: form:\"name_prefix\"
996
+ * @param {*} [options] Override http request option.
997
+ * @throws {RequiredError}
998
+ */
999
+ discountAdminServiceDiscountList(page, pageSize, namePrefix, options) {
1000
+ return DiscountAdminServiceApiFp(this.configuration).discountAdminServiceDiscountList(page, pageSize, namePrefix, options).then((request) => request(this.axios, this.basePath));
1001
+ }
1002
+ /**
1003
+ * DiscountUpdate 更新折扣接口
1004
+ * @param {DiscountUpdateRequest} discountUpdateRequest
1005
+ * @param {*} [options] Override http request option.
1006
+ * @throws {RequiredError}
1007
+ */
1008
+ discountAdminServiceDiscountUpdate(discountUpdateRequest, options) {
1009
+ return DiscountAdminServiceApiFp(this.configuration).discountAdminServiceDiscountUpdate(discountUpdateRequest, options).then((request) => request(this.axios, this.basePath));
1010
+ }
1011
+ }
1012
+ /**
1013
+ * ProviderAdminServiceApi - axios parameter creator
1014
+ */
1015
+ export const ProviderAdminServiceApiAxiosParamCreator = function (configuration) {
1016
+ return {
1017
+ /**
1018
+ * ProviderCreate 创建新的 Provider Create a new AI model provider 请求路径: POST /admin/provider/create Request path: POST /admin/provider/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
1019
+ * @param {ProviderCreateRequest} providerCreateRequest
1020
+ * @param {*} [options] Override http request option.
1021
+ * @throws {RequiredError}
1022
+ */
1023
+ providerAdminServiceProviderCreate: (providerCreateRequest_1, ...args_1) => __awaiter(this, [providerCreateRequest_1, ...args_1], void 0, function* (providerCreateRequest, options = {}) {
1024
+ // verify required parameter 'providerCreateRequest' is not null or undefined
1025
+ assertParamExists('providerAdminServiceProviderCreate', 'providerCreateRequest', providerCreateRequest);
1026
+ const localVarPath = `/admin/provider/create`;
1027
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1028
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1029
+ let baseOptions;
1030
+ if (configuration) {
1031
+ baseOptions = configuration.baseOptions;
1032
+ }
1033
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1034
+ const localVarHeaderParameter = {};
1035
+ const localVarQueryParameter = {};
1036
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1037
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1038
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1039
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1040
+ localVarRequestOptions.data = serializeDataIfNeeded(providerCreateRequest, localVarRequestOptions, configuration);
1041
+ return {
1042
+ url: toPathString(localVarUrlObj),
1043
+ options: localVarRequestOptions,
1044
+ };
1045
+ }),
1046
+ /**
1047
+ * ProviderDelete 删除 Provider(软删除) Delete a provider (soft delete) 请求路径: POST /admin/provider/delete Request path: POST /admin/provider/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
1048
+ * @param {ProviderDeleteRequest} providerDeleteRequest
1049
+ * @param {*} [options] Override http request option.
1050
+ * @throws {RequiredError}
1051
+ */
1052
+ providerAdminServiceProviderDelete: (providerDeleteRequest_1, ...args_1) => __awaiter(this, [providerDeleteRequest_1, ...args_1], void 0, function* (providerDeleteRequest, options = {}) {
1053
+ // verify required parameter 'providerDeleteRequest' is not null or undefined
1054
+ assertParamExists('providerAdminServiceProviderDelete', 'providerDeleteRequest', providerDeleteRequest);
1055
+ const localVarPath = `/admin/provider/delete`;
1056
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1057
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1058
+ let baseOptions;
1059
+ if (configuration) {
1060
+ baseOptions = configuration.baseOptions;
1061
+ }
1062
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1063
+ const localVarHeaderParameter = {};
1064
+ const localVarQueryParameter = {};
1065
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1066
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1067
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1068
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1069
+ localVarRequestOptions.data = serializeDataIfNeeded(providerDeleteRequest, localVarRequestOptions, configuration);
1070
+ return {
1071
+ url: toPathString(localVarUrlObj),
1072
+ options: localVarRequestOptions,
1073
+ };
1074
+ }),
1075
+ /**
1076
+ * ProviderGet 根据 ID 获取单个 Provider Retrieve a single provider by ID 请求路径: GET /admin/provider/get?id={id} Request path: GET /admin/provider/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1077
+ * @param {string} [id] id 要获取的 Provider 的唯一标识符 Unique identifier of the provider to retrieve @gotags: form:\"id\" binding:\"required\"
1078
+ * @param {*} [options] Override http request option.
1079
+ * @throws {RequiredError}
1080
+ */
1081
+ providerAdminServiceProviderGet: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1082
+ const localVarPath = `/admin/provider/get`;
1083
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1084
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1085
+ let baseOptions;
1086
+ if (configuration) {
1087
+ baseOptions = configuration.baseOptions;
1088
+ }
1089
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1090
+ const localVarHeaderParameter = {};
1091
+ const localVarQueryParameter = {};
1092
+ if (id !== undefined) {
1093
+ localVarQueryParameter['id'] = id;
1094
+ }
1095
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1096
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1097
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1098
+ return {
1099
+ url: toPathString(localVarUrlObj),
1100
+ options: localVarRequestOptions,
1101
+ };
1102
+ }),
1103
+ /**
1104
+ * ProviderList 分页查询 Provider 列表,支持按状态和名称前缀过滤 List providers with pagination, supports filtering by status and name prefix 请求路径: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} Request path: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1105
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1106
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1107
+ * @param {number} [providerStatus] provider_status 按状态过滤(可选) Filter by provider status (optional) 0: 返回所有状态 1: 仅返回启用的 Provider 2: 仅返回禁用的 Provider 0: return all statuses 1: return only active providers 2: return only disabled providers @gotags: form:\"provider_status\"
1108
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"openai\" 会匹配 \"openai-prod-1\", \"openai-dev-1\" 等 Example: \"openai\" matches \"openai-prod-1\", \"openai-dev-1\", etc. @gotags: form:\"name_prefix\"
1109
+ * @param {*} [options] Override http request option.
1110
+ * @throws {RequiredError}
1111
+ */
1112
+ providerAdminServiceProviderList: (page_1, pageSize_1, providerStatus_1, namePrefix_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, providerStatus_1, namePrefix_1, ...args_1], void 0, function* (page, pageSize, providerStatus, namePrefix, options = {}) {
1113
+ const localVarPath = `/admin/provider/list`;
1114
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1115
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1116
+ let baseOptions;
1117
+ if (configuration) {
1118
+ baseOptions = configuration.baseOptions;
1119
+ }
1120
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1121
+ const localVarHeaderParameter = {};
1122
+ const localVarQueryParameter = {};
1123
+ if (page !== undefined) {
1124
+ localVarQueryParameter['page'] = page;
1125
+ }
1126
+ if (pageSize !== undefined) {
1127
+ localVarQueryParameter['page_size'] = pageSize;
1128
+ }
1129
+ if (providerStatus !== undefined) {
1130
+ localVarQueryParameter['provider_status'] = providerStatus;
1131
+ }
1132
+ if (namePrefix !== undefined) {
1133
+ localVarQueryParameter['name_prefix'] = namePrefix;
1134
+ }
1135
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1136
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1137
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1138
+ return {
1139
+ url: toPathString(localVarUrlObj),
1140
+ options: localVarRequestOptions,
1141
+ };
1142
+ }),
1143
+ /**
1144
+ * ProviderUpdate 更新现有的 Provider Update an existing AI model provider 请求路径: POST /admin/provider/update Request path: POST /admin/provider/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
1145
+ * @param {ProviderUpdateRequest} providerUpdateRequest
1146
+ * @param {*} [options] Override http request option.
1147
+ * @throws {RequiredError}
1148
+ */
1149
+ providerAdminServiceProviderUpdate: (providerUpdateRequest_1, ...args_1) => __awaiter(this, [providerUpdateRequest_1, ...args_1], void 0, function* (providerUpdateRequest, options = {}) {
1150
+ // verify required parameter 'providerUpdateRequest' is not null or undefined
1151
+ assertParamExists('providerAdminServiceProviderUpdate', 'providerUpdateRequest', providerUpdateRequest);
1152
+ const localVarPath = `/admin/provider/update`;
1153
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1154
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1155
+ let baseOptions;
1156
+ if (configuration) {
1157
+ baseOptions = configuration.baseOptions;
1158
+ }
1159
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1160
+ const localVarHeaderParameter = {};
1161
+ const localVarQueryParameter = {};
1162
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1163
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1164
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1165
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1166
+ localVarRequestOptions.data = serializeDataIfNeeded(providerUpdateRequest, localVarRequestOptions, configuration);
1167
+ return {
1168
+ url: toPathString(localVarUrlObj),
1169
+ options: localVarRequestOptions,
1170
+ };
1171
+ }),
1172
+ };
1173
+ };
1174
+ /**
1175
+ * ProviderAdminServiceApi - functional programming interface
1176
+ */
1177
+ export const ProviderAdminServiceApiFp = function (configuration) {
1178
+ const localVarAxiosParamCreator = ProviderAdminServiceApiAxiosParamCreator(configuration);
1179
+ return {
1180
+ /**
1181
+ * ProviderCreate 创建新的 Provider Create a new AI model provider 请求路径: POST /admin/provider/create Request path: POST /admin/provider/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
1182
+ * @param {ProviderCreateRequest} providerCreateRequest
1183
+ * @param {*} [options] Override http request option.
1184
+ * @throws {RequiredError}
1185
+ */
1186
+ providerAdminServiceProviderCreate(providerCreateRequest, options) {
1187
+ return __awaiter(this, void 0, void 0, function* () {
1188
+ var _a, _b, _c;
1189
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerAdminServiceProviderCreate(providerCreateRequest, options);
1190
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1191
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderAdminServiceApi.providerAdminServiceProviderCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1192
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1193
+ });
1194
+ },
1195
+ /**
1196
+ * ProviderDelete 删除 Provider(软删除) Delete a provider (soft delete) 请求路径: POST /admin/provider/delete Request path: POST /admin/provider/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
1197
+ * @param {ProviderDeleteRequest} providerDeleteRequest
1198
+ * @param {*} [options] Override http request option.
1199
+ * @throws {RequiredError}
1200
+ */
1201
+ providerAdminServiceProviderDelete(providerDeleteRequest, options) {
1202
+ return __awaiter(this, void 0, void 0, function* () {
1203
+ var _a, _b, _c;
1204
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerAdminServiceProviderDelete(providerDeleteRequest, options);
1205
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1206
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderAdminServiceApi.providerAdminServiceProviderDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1207
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1208
+ });
1209
+ },
1210
+ /**
1211
+ * ProviderGet 根据 ID 获取单个 Provider Retrieve a single provider by ID 请求路径: GET /admin/provider/get?id={id} Request path: GET /admin/provider/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1212
+ * @param {string} [id] id 要获取的 Provider 的唯一标识符 Unique identifier of the provider to retrieve @gotags: form:\"id\" binding:\"required\"
1213
+ * @param {*} [options] Override http request option.
1214
+ * @throws {RequiredError}
1215
+ */
1216
+ providerAdminServiceProviderGet(id, options) {
1217
+ return __awaiter(this, void 0, void 0, function* () {
1218
+ var _a, _b, _c;
1219
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerAdminServiceProviderGet(id, options);
1220
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1221
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderAdminServiceApi.providerAdminServiceProviderGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1222
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1223
+ });
1224
+ },
1225
+ /**
1226
+ * ProviderList 分页查询 Provider 列表,支持按状态和名称前缀过滤 List providers with pagination, supports filtering by status and name prefix 请求路径: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} Request path: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1227
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1228
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1229
+ * @param {number} [providerStatus] provider_status 按状态过滤(可选) Filter by provider status (optional) 0: 返回所有状态 1: 仅返回启用的 Provider 2: 仅返回禁用的 Provider 0: return all statuses 1: return only active providers 2: return only disabled providers @gotags: form:\"provider_status\"
1230
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"openai\" 会匹配 \"openai-prod-1\", \"openai-dev-1\" 等 Example: \"openai\" matches \"openai-prod-1\", \"openai-dev-1\", etc. @gotags: form:\"name_prefix\"
1231
+ * @param {*} [options] Override http request option.
1232
+ * @throws {RequiredError}
1233
+ */
1234
+ providerAdminServiceProviderList(page, pageSize, providerStatus, namePrefix, options) {
1235
+ return __awaiter(this, void 0, void 0, function* () {
1236
+ var _a, _b, _c;
1237
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerAdminServiceProviderList(page, pageSize, providerStatus, namePrefix, options);
1238
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1239
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderAdminServiceApi.providerAdminServiceProviderList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1240
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1241
+ });
1242
+ },
1243
+ /**
1244
+ * ProviderUpdate 更新现有的 Provider Update an existing AI model provider 请求路径: POST /admin/provider/update Request path: POST /admin/provider/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
1245
+ * @param {ProviderUpdateRequest} providerUpdateRequest
1246
+ * @param {*} [options] Override http request option.
1247
+ * @throws {RequiredError}
1248
+ */
1249
+ providerAdminServiceProviderUpdate(providerUpdateRequest, options) {
1250
+ return __awaiter(this, void 0, void 0, function* () {
1251
+ var _a, _b, _c;
1252
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerAdminServiceProviderUpdate(providerUpdateRequest, options);
1253
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1254
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderAdminServiceApi.providerAdminServiceProviderUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1255
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1256
+ });
1257
+ },
1258
+ };
1259
+ };
1260
+ /**
1261
+ * ProviderAdminServiceApi - factory interface
1262
+ */
1263
+ export const ProviderAdminServiceApiFactory = function (configuration, basePath, axios) {
1264
+ const localVarFp = ProviderAdminServiceApiFp(configuration);
1265
+ return {
1266
+ /**
1267
+ * ProviderCreate 创建新的 Provider Create a new AI model provider 请求路径: POST /admin/provider/create Request path: POST /admin/provider/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
1268
+ * @param {ProviderCreateRequest} providerCreateRequest
1269
+ * @param {*} [options] Override http request option.
1270
+ * @throws {RequiredError}
1271
+ */
1272
+ providerAdminServiceProviderCreate(providerCreateRequest, options) {
1273
+ return localVarFp.providerAdminServiceProviderCreate(providerCreateRequest, options).then((request) => request(axios, basePath));
1274
+ },
1275
+ /**
1276
+ * ProviderDelete 删除 Provider(软删除) Delete a provider (soft delete) 请求路径: POST /admin/provider/delete Request path: POST /admin/provider/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
1277
+ * @param {ProviderDeleteRequest} providerDeleteRequest
1278
+ * @param {*} [options] Override http request option.
1279
+ * @throws {RequiredError}
1280
+ */
1281
+ providerAdminServiceProviderDelete(providerDeleteRequest, options) {
1282
+ return localVarFp.providerAdminServiceProviderDelete(providerDeleteRequest, options).then((request) => request(axios, basePath));
1283
+ },
1284
+ /**
1285
+ * ProviderGet 根据 ID 获取单个 Provider Retrieve a single provider by ID 请求路径: GET /admin/provider/get?id={id} Request path: GET /admin/provider/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1286
+ * @param {string} [id] id 要获取的 Provider 的唯一标识符 Unique identifier of the provider to retrieve @gotags: form:\"id\" binding:\"required\"
1287
+ * @param {*} [options] Override http request option.
1288
+ * @throws {RequiredError}
1289
+ */
1290
+ providerAdminServiceProviderGet(id, options) {
1291
+ return localVarFp.providerAdminServiceProviderGet(id, options).then((request) => request(axios, basePath));
1292
+ },
1293
+ /**
1294
+ * ProviderList 分页查询 Provider 列表,支持按状态和名称前缀过滤 List providers with pagination, supports filtering by status and name prefix 请求路径: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} Request path: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1295
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1296
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1297
+ * @param {number} [providerStatus] provider_status 按状态过滤(可选) Filter by provider status (optional) 0: 返回所有状态 1: 仅返回启用的 Provider 2: 仅返回禁用的 Provider 0: return all statuses 1: return only active providers 2: return only disabled providers @gotags: form:\"provider_status\"
1298
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"openai\" 会匹配 \"openai-prod-1\", \"openai-dev-1\" 等 Example: \"openai\" matches \"openai-prod-1\", \"openai-dev-1\", etc. @gotags: form:\"name_prefix\"
1299
+ * @param {*} [options] Override http request option.
1300
+ * @throws {RequiredError}
1301
+ */
1302
+ providerAdminServiceProviderList(page, pageSize, providerStatus, namePrefix, options) {
1303
+ return localVarFp.providerAdminServiceProviderList(page, pageSize, providerStatus, namePrefix, options).then((request) => request(axios, basePath));
1304
+ },
1305
+ /**
1306
+ * ProviderUpdate 更新现有的 Provider Update an existing AI model provider 请求路径: POST /admin/provider/update Request path: POST /admin/provider/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
1307
+ * @param {ProviderUpdateRequest} providerUpdateRequest
1308
+ * @param {*} [options] Override http request option.
1309
+ * @throws {RequiredError}
1310
+ */
1311
+ providerAdminServiceProviderUpdate(providerUpdateRequest, options) {
1312
+ return localVarFp.providerAdminServiceProviderUpdate(providerUpdateRequest, options).then((request) => request(axios, basePath));
1313
+ },
1314
+ };
1315
+ };
1316
+ /**
1317
+ * ProviderAdminServiceApi - object-oriented interface
1318
+ */
1319
+ export class ProviderAdminServiceApi extends BaseAPI {
1320
+ /**
1321
+ * ProviderCreate 创建新的 Provider Create a new AI model provider 请求路径: POST /admin/provider/create Request path: POST /admin/provider/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
1322
+ * @param {ProviderCreateRequest} providerCreateRequest
1323
+ * @param {*} [options] Override http request option.
1324
+ * @throws {RequiredError}
1325
+ */
1326
+ providerAdminServiceProviderCreate(providerCreateRequest, options) {
1327
+ return ProviderAdminServiceApiFp(this.configuration).providerAdminServiceProviderCreate(providerCreateRequest, options).then((request) => request(this.axios, this.basePath));
1328
+ }
1329
+ /**
1330
+ * ProviderDelete 删除 Provider(软删除) Delete a provider (soft delete) 请求路径: POST /admin/provider/delete Request path: POST /admin/provider/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
1331
+ * @param {ProviderDeleteRequest} providerDeleteRequest
1332
+ * @param {*} [options] Override http request option.
1333
+ * @throws {RequiredError}
1334
+ */
1335
+ providerAdminServiceProviderDelete(providerDeleteRequest, options) {
1336
+ return ProviderAdminServiceApiFp(this.configuration).providerAdminServiceProviderDelete(providerDeleteRequest, options).then((request) => request(this.axios, this.basePath));
1337
+ }
1338
+ /**
1339
+ * ProviderGet 根据 ID 获取单个 Provider Retrieve a single provider by ID 请求路径: GET /admin/provider/get?id={id} Request path: GET /admin/provider/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1340
+ * @param {string} [id] id 要获取的 Provider 的唯一标识符 Unique identifier of the provider to retrieve @gotags: form:\"id\" binding:\"required\"
1341
+ * @param {*} [options] Override http request option.
1342
+ * @throws {RequiredError}
1343
+ */
1344
+ providerAdminServiceProviderGet(id, options) {
1345
+ return ProviderAdminServiceApiFp(this.configuration).providerAdminServiceProviderGet(id, options).then((request) => request(this.axios, this.basePath));
1346
+ }
1347
+ /**
1348
+ * ProviderList 分页查询 Provider 列表,支持按状态和名称前缀过滤 List providers with pagination, supports filtering by status and name prefix 请求路径: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} Request path: GET /admin/provider/list?page={page}&page_size={page_size}&provider_status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1349
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1350
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1351
+ * @param {number} [providerStatus] provider_status 按状态过滤(可选) Filter by provider status (optional) 0: 返回所有状态 1: 仅返回启用的 Provider 2: 仅返回禁用的 Provider 0: return all statuses 1: return only active providers 2: return only disabled providers @gotags: form:\"provider_status\"
1352
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"openai\" 会匹配 \"openai-prod-1\", \"openai-dev-1\" 等 Example: \"openai\" matches \"openai-prod-1\", \"openai-dev-1\", etc. @gotags: form:\"name_prefix\"
1353
+ * @param {*} [options] Override http request option.
1354
+ * @throws {RequiredError}
1355
+ */
1356
+ providerAdminServiceProviderList(page, pageSize, providerStatus, namePrefix, options) {
1357
+ return ProviderAdminServiceApiFp(this.configuration).providerAdminServiceProviderList(page, pageSize, providerStatus, namePrefix, options).then((request) => request(this.axios, this.basePath));
1358
+ }
1359
+ /**
1360
+ * ProviderUpdate 更新现有的 Provider Update an existing AI model provider 请求路径: POST /admin/provider/update Request path: POST /admin/provider/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
1361
+ * @param {ProviderUpdateRequest} providerUpdateRequest
1362
+ * @param {*} [options] Override http request option.
1363
+ * @throws {RequiredError}
1364
+ */
1365
+ providerAdminServiceProviderUpdate(providerUpdateRequest, options) {
1366
+ return ProviderAdminServiceApiFp(this.configuration).providerAdminServiceProviderUpdate(providerUpdateRequest, options).then((request) => request(this.axios, this.basePath));
1367
+ }
1368
+ }
1369
+ /**
1370
+ * ProviderModelAdminServiceApi - axios parameter creator
1371
+ */
1372
+ export const ProviderModelAdminServiceApiAxiosParamCreator = function (configuration) {
1373
+ return {
1374
+ /**
1375
+ * ProviderModelCreate 创建新的 ProviderModel Create a new provider model 请求路径: POST /admin/provider-model/create Request path: POST /admin/provider-model/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
1376
+ * @param {ProviderModelCreateRequest} providerModelCreateRequest
1377
+ * @param {*} [options] Override http request option.
1378
+ * @throws {RequiredError}
1379
+ */
1380
+ providerModelAdminServiceProviderModelCreate: (providerModelCreateRequest_1, ...args_1) => __awaiter(this, [providerModelCreateRequest_1, ...args_1], void 0, function* (providerModelCreateRequest, options = {}) {
1381
+ // verify required parameter 'providerModelCreateRequest' is not null or undefined
1382
+ assertParamExists('providerModelAdminServiceProviderModelCreate', 'providerModelCreateRequest', providerModelCreateRequest);
1383
+ const localVarPath = `/admin/provider-model/create`;
1384
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1385
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1386
+ let baseOptions;
1387
+ if (configuration) {
1388
+ baseOptions = configuration.baseOptions;
1389
+ }
1390
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1391
+ const localVarHeaderParameter = {};
1392
+ const localVarQueryParameter = {};
1393
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1394
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1395
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1396
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1397
+ localVarRequestOptions.data = serializeDataIfNeeded(providerModelCreateRequest, localVarRequestOptions, configuration);
1398
+ return {
1399
+ url: toPathString(localVarUrlObj),
1400
+ options: localVarRequestOptions,
1401
+ };
1402
+ }),
1403
+ /**
1404
+ * ProviderModelDelete 删除 ProviderModel(软删除) Delete a provider model (soft delete) 请求路径: POST /admin/provider-model/delete Request path: POST /admin/provider-model/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
1405
+ * @param {ProviderModelDeleteRequest} providerModelDeleteRequest
1406
+ * @param {*} [options] Override http request option.
1407
+ * @throws {RequiredError}
1408
+ */
1409
+ providerModelAdminServiceProviderModelDelete: (providerModelDeleteRequest_1, ...args_1) => __awaiter(this, [providerModelDeleteRequest_1, ...args_1], void 0, function* (providerModelDeleteRequest, options = {}) {
1410
+ // verify required parameter 'providerModelDeleteRequest' is not null or undefined
1411
+ assertParamExists('providerModelAdminServiceProviderModelDelete', 'providerModelDeleteRequest', providerModelDeleteRequest);
1412
+ const localVarPath = `/admin/provider-model/delete`;
1413
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1414
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1415
+ let baseOptions;
1416
+ if (configuration) {
1417
+ baseOptions = configuration.baseOptions;
1418
+ }
1419
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1420
+ const localVarHeaderParameter = {};
1421
+ const localVarQueryParameter = {};
1422
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1423
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1424
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1425
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1426
+ localVarRequestOptions.data = serializeDataIfNeeded(providerModelDeleteRequest, localVarRequestOptions, configuration);
1427
+ return {
1428
+ url: toPathString(localVarUrlObj),
1429
+ options: localVarRequestOptions,
1430
+ };
1431
+ }),
1432
+ /**
1433
+ * ProviderModelGet 根据 ID 获取单个 ProviderModel Retrieve a single provider model by ID 请求路径: GET /admin/provider-model/get?id={id} Request path: GET /admin/provider-model/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1434
+ * @param {string} [id] id 要获取的 ProviderModel 的唯一标识符 Unique identifier of the provider model to retrieve @gotags: form:\"id\" binding:\"required\"
1435
+ * @param {*} [options] Override http request option.
1436
+ * @throws {RequiredError}
1437
+ */
1438
+ providerModelAdminServiceProviderModelGet: (id_1, ...args_1) => __awaiter(this, [id_1, ...args_1], void 0, function* (id, options = {}) {
1439
+ const localVarPath = `/admin/provider-model/get`;
1440
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1441
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1442
+ let baseOptions;
1443
+ if (configuration) {
1444
+ baseOptions = configuration.baseOptions;
1445
+ }
1446
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1447
+ const localVarHeaderParameter = {};
1448
+ const localVarQueryParameter = {};
1449
+ if (id !== undefined) {
1450
+ localVarQueryParameter['id'] = id;
1451
+ }
1452
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1453
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1454
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1455
+ return {
1456
+ url: toPathString(localVarUrlObj),
1457
+ options: localVarRequestOptions,
1458
+ };
1459
+ }),
1460
+ /**
1461
+ * ProviderModelList 分页查询 ProviderModel 列表,支持按 Provider、状态和名称前缀过滤 List provider models with pagination, supports filtering by provider, status and name prefix 请求路径: GET /admin/provider-model/list?page={page}&page_size={page_size}&provider_id={provider_id}&status={status}&name_prefix={prefix} Request path: GET /admin/provider-model/list?page={page}&page_size={page_size}&provider_id={provider_id}&status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1462
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1463
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1464
+ * @param {string} [providerId] provider_id 按 Provider ID 过滤(可选) Filter by Provider ID (optional) 0: 返回所有 Provider 的模型 > 0: 仅返回指定 Provider 的模型 0: return models from all providers > 0: return models from specific provider only @gotags: form:\"provider_id\"
1465
+ * @param {number} [status] status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回草稿状态 2: 仅返回启用状态 3: 仅返回禁用状态 0: return all statuses 1: return draft models only 2: return active models only 3: return disabled models only @gotags: form:\"status\"
1466
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"gpt-4\" 会匹配 \"gpt-4-turbo\", \"gpt-4-vision\" 等 Example: \"gpt-4\" matches \"gpt-4-turbo\", \"gpt-4-vision\", etc. @gotags: form:\"name_prefix\"
1467
+ * @param {*} [options] Override http request option.
1468
+ * @throws {RequiredError}
1469
+ */
1470
+ providerModelAdminServiceProviderModelList: (page_1, pageSize_1, providerId_1, status_1, namePrefix_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, providerId_1, status_1, namePrefix_1, ...args_1], void 0, function* (page, pageSize, providerId, status, namePrefix, options = {}) {
1471
+ const localVarPath = `/admin/provider-model/list`;
1472
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1473
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1474
+ let baseOptions;
1475
+ if (configuration) {
1476
+ baseOptions = configuration.baseOptions;
1477
+ }
1478
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1479
+ const localVarHeaderParameter = {};
1480
+ const localVarQueryParameter = {};
1481
+ if (page !== undefined) {
1482
+ localVarQueryParameter['page'] = page;
1483
+ }
1484
+ if (pageSize !== undefined) {
1485
+ localVarQueryParameter['page_size'] = pageSize;
1486
+ }
1487
+ if (providerId !== undefined) {
1488
+ localVarQueryParameter['provider_id'] = providerId;
1489
+ }
1490
+ if (status !== undefined) {
1491
+ localVarQueryParameter['status'] = status;
1492
+ }
1493
+ if (namePrefix !== undefined) {
1494
+ localVarQueryParameter['name_prefix'] = namePrefix;
1495
+ }
1496
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1497
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1498
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1499
+ return {
1500
+ url: toPathString(localVarUrlObj),
1501
+ options: localVarRequestOptions,
1502
+ };
1503
+ }),
1504
+ /**
1505
+ * ProviderModelUpdate 更新现有的 ProviderModel Update an existing provider model 请求路径: POST /admin/provider-model/update Request path: POST /admin/provider-model/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
1506
+ * @param {ProviderModelUpdateRequest} providerModelUpdateRequest
1507
+ * @param {*} [options] Override http request option.
1508
+ * @throws {RequiredError}
1509
+ */
1510
+ providerModelAdminServiceProviderModelUpdate: (providerModelUpdateRequest_1, ...args_1) => __awaiter(this, [providerModelUpdateRequest_1, ...args_1], void 0, function* (providerModelUpdateRequest, options = {}) {
1511
+ // verify required parameter 'providerModelUpdateRequest' is not null or undefined
1512
+ assertParamExists('providerModelAdminServiceProviderModelUpdate', 'providerModelUpdateRequest', providerModelUpdateRequest);
1513
+ const localVarPath = `/admin/provider-model/update`;
1514
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1515
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1516
+ let baseOptions;
1517
+ if (configuration) {
1518
+ baseOptions = configuration.baseOptions;
1519
+ }
1520
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1521
+ const localVarHeaderParameter = {};
1522
+ const localVarQueryParameter = {};
1523
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1524
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1525
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1526
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1527
+ localVarRequestOptions.data = serializeDataIfNeeded(providerModelUpdateRequest, localVarRequestOptions, configuration);
1528
+ return {
1529
+ url: toPathString(localVarUrlObj),
1530
+ options: localVarRequestOptions,
1531
+ };
1532
+ }),
1533
+ };
1534
+ };
1535
+ /**
1536
+ * ProviderModelAdminServiceApi - functional programming interface
1537
+ */
1538
+ export const ProviderModelAdminServiceApiFp = function (configuration) {
1539
+ const localVarAxiosParamCreator = ProviderModelAdminServiceApiAxiosParamCreator(configuration);
1540
+ return {
1541
+ /**
1542
+ * ProviderModelCreate 创建新的 ProviderModel Create a new provider model 请求路径: POST /admin/provider-model/create Request path: POST /admin/provider-model/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
1543
+ * @param {ProviderModelCreateRequest} providerModelCreateRequest
1544
+ * @param {*} [options] Override http request option.
1545
+ * @throws {RequiredError}
1546
+ */
1547
+ providerModelAdminServiceProviderModelCreate(providerModelCreateRequest, options) {
1548
+ return __awaiter(this, void 0, void 0, function* () {
1549
+ var _a, _b, _c;
1550
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerModelAdminServiceProviderModelCreate(providerModelCreateRequest, options);
1551
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1552
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderModelAdminServiceApi.providerModelAdminServiceProviderModelCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1553
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1554
+ });
1555
+ },
1556
+ /**
1557
+ * ProviderModelDelete 删除 ProviderModel(软删除) Delete a provider model (soft delete) 请求路径: POST /admin/provider-model/delete Request path: POST /admin/provider-model/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
1558
+ * @param {ProviderModelDeleteRequest} providerModelDeleteRequest
1559
+ * @param {*} [options] Override http request option.
1560
+ * @throws {RequiredError}
1561
+ */
1562
+ providerModelAdminServiceProviderModelDelete(providerModelDeleteRequest, options) {
1563
+ return __awaiter(this, void 0, void 0, function* () {
1564
+ var _a, _b, _c;
1565
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerModelAdminServiceProviderModelDelete(providerModelDeleteRequest, options);
1566
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1567
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderModelAdminServiceApi.providerModelAdminServiceProviderModelDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1568
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1569
+ });
1570
+ },
1571
+ /**
1572
+ * ProviderModelGet 根据 ID 获取单个 ProviderModel Retrieve a single provider model by ID 请求路径: GET /admin/provider-model/get?id={id} Request path: GET /admin/provider-model/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1573
+ * @param {string} [id] id 要获取的 ProviderModel 的唯一标识符 Unique identifier of the provider model to retrieve @gotags: form:\"id\" binding:\"required\"
1574
+ * @param {*} [options] Override http request option.
1575
+ * @throws {RequiredError}
1576
+ */
1577
+ providerModelAdminServiceProviderModelGet(id, options) {
1578
+ return __awaiter(this, void 0, void 0, function* () {
1579
+ var _a, _b, _c;
1580
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerModelAdminServiceProviderModelGet(id, options);
1581
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1582
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderModelAdminServiceApi.providerModelAdminServiceProviderModelGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1583
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1584
+ });
1585
+ },
1586
+ /**
1587
+ * ProviderModelList 分页查询 ProviderModel 列表,支持按 Provider、状态和名称前缀过滤 List provider models with pagination, supports filtering by provider, status and name prefix 请求路径: GET /admin/provider-model/list?page={page}&page_size={page_size}&provider_id={provider_id}&status={status}&name_prefix={prefix} Request path: GET /admin/provider-model/list?page={page}&page_size={page_size}&provider_id={provider_id}&status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1588
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1589
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1590
+ * @param {string} [providerId] provider_id 按 Provider ID 过滤(可选) Filter by Provider ID (optional) 0: 返回所有 Provider 的模型 > 0: 仅返回指定 Provider 的模型 0: return models from all providers > 0: return models from specific provider only @gotags: form:\"provider_id\"
1591
+ * @param {number} [status] status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回草稿状态 2: 仅返回启用状态 3: 仅返回禁用状态 0: return all statuses 1: return draft models only 2: return active models only 3: return disabled models only @gotags: form:\"status\"
1592
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"gpt-4\" 会匹配 \"gpt-4-turbo\", \"gpt-4-vision\" 等 Example: \"gpt-4\" matches \"gpt-4-turbo\", \"gpt-4-vision\", etc. @gotags: form:\"name_prefix\"
1593
+ * @param {*} [options] Override http request option.
1594
+ * @throws {RequiredError}
1595
+ */
1596
+ providerModelAdminServiceProviderModelList(page, pageSize, providerId, status, namePrefix, options) {
1597
+ return __awaiter(this, void 0, void 0, function* () {
1598
+ var _a, _b, _c;
1599
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerModelAdminServiceProviderModelList(page, pageSize, providerId, status, namePrefix, options);
1600
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1601
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderModelAdminServiceApi.providerModelAdminServiceProviderModelList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1602
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1603
+ });
1604
+ },
1605
+ /**
1606
+ * ProviderModelUpdate 更新现有的 ProviderModel Update an existing provider model 请求路径: POST /admin/provider-model/update Request path: POST /admin/provider-model/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
1607
+ * @param {ProviderModelUpdateRequest} providerModelUpdateRequest
1608
+ * @param {*} [options] Override http request option.
1609
+ * @throws {RequiredError}
1610
+ */
1611
+ providerModelAdminServiceProviderModelUpdate(providerModelUpdateRequest, options) {
1612
+ return __awaiter(this, void 0, void 0, function* () {
1613
+ var _a, _b, _c;
1614
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.providerModelAdminServiceProviderModelUpdate(providerModelUpdateRequest, options);
1615
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1616
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['ProviderModelAdminServiceApi.providerModelAdminServiceProviderModelUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1617
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1618
+ });
1619
+ },
1620
+ };
1621
+ };
1622
+ /**
1623
+ * ProviderModelAdminServiceApi - factory interface
1624
+ */
1625
+ export const ProviderModelAdminServiceApiFactory = function (configuration, basePath, axios) {
1626
+ const localVarFp = ProviderModelAdminServiceApiFp(configuration);
1627
+ return {
1628
+ /**
1629
+ * ProviderModelCreate 创建新的 ProviderModel Create a new provider model 请求路径: POST /admin/provider-model/create Request path: POST /admin/provider-model/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
1630
+ * @param {ProviderModelCreateRequest} providerModelCreateRequest
1631
+ * @param {*} [options] Override http request option.
1632
+ * @throws {RequiredError}
1633
+ */
1634
+ providerModelAdminServiceProviderModelCreate(providerModelCreateRequest, options) {
1635
+ return localVarFp.providerModelAdminServiceProviderModelCreate(providerModelCreateRequest, options).then((request) => request(axios, basePath));
1636
+ },
1637
+ /**
1638
+ * ProviderModelDelete 删除 ProviderModel(软删除) Delete a provider model (soft delete) 请求路径: POST /admin/provider-model/delete Request path: POST /admin/provider-model/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
1639
+ * @param {ProviderModelDeleteRequest} providerModelDeleteRequest
1640
+ * @param {*} [options] Override http request option.
1641
+ * @throws {RequiredError}
1642
+ */
1643
+ providerModelAdminServiceProviderModelDelete(providerModelDeleteRequest, options) {
1644
+ return localVarFp.providerModelAdminServiceProviderModelDelete(providerModelDeleteRequest, options).then((request) => request(axios, basePath));
1645
+ },
1646
+ /**
1647
+ * ProviderModelGet 根据 ID 获取单个 ProviderModel Retrieve a single provider model by ID 请求路径: GET /admin/provider-model/get?id={id} Request path: GET /admin/provider-model/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1648
+ * @param {string} [id] id 要获取的 ProviderModel 的唯一标识符 Unique identifier of the provider model to retrieve @gotags: form:\"id\" binding:\"required\"
1649
+ * @param {*} [options] Override http request option.
1650
+ * @throws {RequiredError}
1651
+ */
1652
+ providerModelAdminServiceProviderModelGet(id, options) {
1653
+ return localVarFp.providerModelAdminServiceProviderModelGet(id, options).then((request) => request(axios, basePath));
1654
+ },
1655
+ /**
1656
+ * ProviderModelList 分页查询 ProviderModel 列表,支持按 Provider、状态和名称前缀过滤 List provider models with pagination, supports filtering by provider, status and name prefix 请求路径: GET /admin/provider-model/list?page={page}&page_size={page_size}&provider_id={provider_id}&status={status}&name_prefix={prefix} Request path: GET /admin/provider-model/list?page={page}&page_size={page_size}&provider_id={provider_id}&status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1657
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1658
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1659
+ * @param {string} [providerId] provider_id 按 Provider ID 过滤(可选) Filter by Provider ID (optional) 0: 返回所有 Provider 的模型 > 0: 仅返回指定 Provider 的模型 0: return models from all providers > 0: return models from specific provider only @gotags: form:\"provider_id\"
1660
+ * @param {number} [status] status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回草稿状态 2: 仅返回启用状态 3: 仅返回禁用状态 0: return all statuses 1: return draft models only 2: return active models only 3: return disabled models only @gotags: form:\"status\"
1661
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"gpt-4\" 会匹配 \"gpt-4-turbo\", \"gpt-4-vision\" 等 Example: \"gpt-4\" matches \"gpt-4-turbo\", \"gpt-4-vision\", etc. @gotags: form:\"name_prefix\"
1662
+ * @param {*} [options] Override http request option.
1663
+ * @throws {RequiredError}
1664
+ */
1665
+ providerModelAdminServiceProviderModelList(page, pageSize, providerId, status, namePrefix, options) {
1666
+ return localVarFp.providerModelAdminServiceProviderModelList(page, pageSize, providerId, status, namePrefix, options).then((request) => request(axios, basePath));
1667
+ },
1668
+ /**
1669
+ * ProviderModelUpdate 更新现有的 ProviderModel Update an existing provider model 请求路径: POST /admin/provider-model/update Request path: POST /admin/provider-model/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
1670
+ * @param {ProviderModelUpdateRequest} providerModelUpdateRequest
1671
+ * @param {*} [options] Override http request option.
1672
+ * @throws {RequiredError}
1673
+ */
1674
+ providerModelAdminServiceProviderModelUpdate(providerModelUpdateRequest, options) {
1675
+ return localVarFp.providerModelAdminServiceProviderModelUpdate(providerModelUpdateRequest, options).then((request) => request(axios, basePath));
1676
+ },
1677
+ };
1678
+ };
1679
+ /**
1680
+ * ProviderModelAdminServiceApi - object-oriented interface
1681
+ */
1682
+ export class ProviderModelAdminServiceApi extends BaseAPI {
1683
+ /**
1684
+ * ProviderModelCreate 创建新的 ProviderModel Create a new provider model 请求路径: POST /admin/provider-model/create Request path: POST /admin/provider-model/create 权限要求: 需要管理员权限 Permission: Requires admin authentication
1685
+ * @param {ProviderModelCreateRequest} providerModelCreateRequest
1686
+ * @param {*} [options] Override http request option.
1687
+ * @throws {RequiredError}
1688
+ */
1689
+ providerModelAdminServiceProviderModelCreate(providerModelCreateRequest, options) {
1690
+ return ProviderModelAdminServiceApiFp(this.configuration).providerModelAdminServiceProviderModelCreate(providerModelCreateRequest, options).then((request) => request(this.axios, this.basePath));
1691
+ }
1692
+ /**
1693
+ * ProviderModelDelete 删除 ProviderModel(软删除) Delete a provider model (soft delete) 请求路径: POST /admin/provider-model/delete Request path: POST /admin/provider-model/delete 权限要求: 需要管理员权限 Permission: Requires admin authentication
1694
+ * @param {ProviderModelDeleteRequest} providerModelDeleteRequest
1695
+ * @param {*} [options] Override http request option.
1696
+ * @throws {RequiredError}
1697
+ */
1698
+ providerModelAdminServiceProviderModelDelete(providerModelDeleteRequest, options) {
1699
+ return ProviderModelAdminServiceApiFp(this.configuration).providerModelAdminServiceProviderModelDelete(providerModelDeleteRequest, options).then((request) => request(this.axios, this.basePath));
1700
+ }
1701
+ /**
1702
+ * ProviderModelGet 根据 ID 获取单个 ProviderModel Retrieve a single provider model by ID 请求路径: GET /admin/provider-model/get?id={id} Request path: GET /admin/provider-model/get?id={id} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1703
+ * @param {string} [id] id 要获取的 ProviderModel 的唯一标识符 Unique identifier of the provider model to retrieve @gotags: form:\"id\" binding:\"required\"
1704
+ * @param {*} [options] Override http request option.
1705
+ * @throws {RequiredError}
1706
+ */
1707
+ providerModelAdminServiceProviderModelGet(id, options) {
1708
+ return ProviderModelAdminServiceApiFp(this.configuration).providerModelAdminServiceProviderModelGet(id, options).then((request) => request(this.axios, this.basePath));
1709
+ }
1710
+ /**
1711
+ * ProviderModelList 分页查询 ProviderModel 列表,支持按 Provider、状态和名称前缀过滤 List provider models with pagination, supports filtering by provider, status and name prefix 请求路径: GET /admin/provider-model/list?page={page}&page_size={page_size}&provider_id={provider_id}&status={status}&name_prefix={prefix} Request path: GET /admin/provider-model/list?page={page}&page_size={page_size}&provider_id={provider_id}&status={status}&name_prefix={prefix} 权限要求: 需要管理员权限 Permission: Requires admin authentication
1712
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1713
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1714
+ * @param {string} [providerId] provider_id 按 Provider ID 过滤(可选) Filter by Provider ID (optional) 0: 返回所有 Provider 的模型 > 0: 仅返回指定 Provider 的模型 0: return models from all providers > 0: return models from specific provider only @gotags: form:\"provider_id\"
1715
+ * @param {number} [status] status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回草稿状态 2: 仅返回启用状态 3: 仅返回禁用状态 0: return all statuses 1: return draft models only 2: return active models only 3: return disabled models only @gotags: form:\"status\"
1716
+ * @param {string} [namePrefix] name_prefix 按名称前缀过滤(可选) Filter by name prefix (optional) 例如: \"gpt-4\" 会匹配 \"gpt-4-turbo\", \"gpt-4-vision\" 等 Example: \"gpt-4\" matches \"gpt-4-turbo\", \"gpt-4-vision\", etc. @gotags: form:\"name_prefix\"
1717
+ * @param {*} [options] Override http request option.
1718
+ * @throws {RequiredError}
1719
+ */
1720
+ providerModelAdminServiceProviderModelList(page, pageSize, providerId, status, namePrefix, options) {
1721
+ return ProviderModelAdminServiceApiFp(this.configuration).providerModelAdminServiceProviderModelList(page, pageSize, providerId, status, namePrefix, options).then((request) => request(this.axios, this.basePath));
1722
+ }
1723
+ /**
1724
+ * ProviderModelUpdate 更新现有的 ProviderModel Update an existing provider model 请求路径: POST /admin/provider-model/update Request path: POST /admin/provider-model/update 权限要求: 需要管理员权限 Permission: Requires admin authentication
1725
+ * @param {ProviderModelUpdateRequest} providerModelUpdateRequest
1726
+ * @param {*} [options] Override http request option.
1727
+ * @throws {RequiredError}
1728
+ */
1729
+ providerModelAdminServiceProviderModelUpdate(providerModelUpdateRequest, options) {
1730
+ return ProviderModelAdminServiceApiFp(this.configuration).providerModelAdminServiceProviderModelUpdate(providerModelUpdateRequest, options).then((request) => request(this.axios, this.basePath));
1731
+ }
1732
+ }
1733
+ /**
1734
+ * UserAPIKeyServiceApi - axios parameter creator
1735
+ */
1736
+ export const UserAPIKeyServiceApiAxiosParamCreator = function (configuration) {
1737
+ return {
1738
+ /**
1739
+ * UserAPIKeyCreate 创建新的 UserAPIKey Create a new UserAPIKey 请求路径: POST /api/user/api-key/create Request path: POST /api/user/api-key/create 权限要求: 需要用户认证 Permission: Requires user authentication
1740
+ * @param {UserAPIKeyCreateRequest} userAPIKeyCreateRequest
1741
+ * @param {*} [options] Override http request option.
1742
+ * @throws {RequiredError}
1743
+ */
1744
+ userAPIKeyServiceUserAPIKeyCreate: (userAPIKeyCreateRequest_1, ...args_1) => __awaiter(this, [userAPIKeyCreateRequest_1, ...args_1], void 0, function* (userAPIKeyCreateRequest, options = {}) {
1745
+ // verify required parameter 'userAPIKeyCreateRequest' is not null or undefined
1746
+ assertParamExists('userAPIKeyServiceUserAPIKeyCreate', 'userAPIKeyCreateRequest', userAPIKeyCreateRequest);
1747
+ const localVarPath = `/api/v1/user/api-key/create`;
1748
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1749
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1750
+ let baseOptions;
1751
+ if (configuration) {
1752
+ baseOptions = configuration.baseOptions;
1753
+ }
1754
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1755
+ const localVarHeaderParameter = {};
1756
+ const localVarQueryParameter = {};
1757
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1758
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1759
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1760
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1761
+ localVarRequestOptions.data = serializeDataIfNeeded(userAPIKeyCreateRequest, localVarRequestOptions, configuration);
1762
+ return {
1763
+ url: toPathString(localVarUrlObj),
1764
+ options: localVarRequestOptions,
1765
+ };
1766
+ }),
1767
+ /**
1768
+ * UserAPIKeyDelete 删除 UserAPIKey(软删除) Delete a UserAPIKey (soft delete) 请求路径: POST /api/user/api-key/delete Request path: POST /api/user/api-key/delete 权限要求: 需要用户认证 Permission: Requires user authentication
1769
+ * @param {UserAPIKeyDeleteRequest} userAPIKeyDeleteRequest
1770
+ * @param {*} [options] Override http request option.
1771
+ * @throws {RequiredError}
1772
+ */
1773
+ userAPIKeyServiceUserAPIKeyDelete: (userAPIKeyDeleteRequest_1, ...args_1) => __awaiter(this, [userAPIKeyDeleteRequest_1, ...args_1], void 0, function* (userAPIKeyDeleteRequest, options = {}) {
1774
+ // verify required parameter 'userAPIKeyDeleteRequest' is not null or undefined
1775
+ assertParamExists('userAPIKeyServiceUserAPIKeyDelete', 'userAPIKeyDeleteRequest', userAPIKeyDeleteRequest);
1776
+ const localVarPath = `/api/v1/user/api-key/delete`;
1777
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1778
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1779
+ let baseOptions;
1780
+ if (configuration) {
1781
+ baseOptions = configuration.baseOptions;
1782
+ }
1783
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1784
+ const localVarHeaderParameter = {};
1785
+ const localVarQueryParameter = {};
1786
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1787
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1788
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1789
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1790
+ localVarRequestOptions.data = serializeDataIfNeeded(userAPIKeyDeleteRequest, localVarRequestOptions, configuration);
1791
+ return {
1792
+ url: toPathString(localVarUrlObj),
1793
+ options: localVarRequestOptions,
1794
+ };
1795
+ }),
1796
+ /**
1797
+ * UserAPIKeyGet 根据 ID 或名称获取单个 UserAPIKey Retrieve a single UserAPIKey by ID or name 请求路径: GET /api/user/api-key/get?id={id} 或 GET /api/user/api-key/get?name={name} Request path: GET /api/user/api-key/get?id={id} or GET /api/user/api-key/get?name={name} 权限要求: 需要用户认证 Permission: Requires user authentication
1798
+ * @param {string} [id] id 要获取的 UserAPIKey 的唯一标识符 Unique identifier of the UserAPIKey to retrieve @gotags: form:\"id\"
1799
+ * @param {string} [name] name 要获取的 UserAPIKey 的名称 Name of the UserAPIKey to retrieve 如果同时提供 id 和 name,以 id 为准 If both id and name are provided, id takes precedence @gotags: form:\"name\"
1800
+ * @param {*} [options] Override http request option.
1801
+ * @throws {RequiredError}
1802
+ */
1803
+ userAPIKeyServiceUserAPIKeyGet: (id_1, name_1, ...args_1) => __awaiter(this, [id_1, name_1, ...args_1], void 0, function* (id, name, options = {}) {
1804
+ const localVarPath = `/api/v1/user/api-key/get`;
1805
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1806
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1807
+ let baseOptions;
1808
+ if (configuration) {
1809
+ baseOptions = configuration.baseOptions;
1810
+ }
1811
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1812
+ const localVarHeaderParameter = {};
1813
+ const localVarQueryParameter = {};
1814
+ if (id !== undefined) {
1815
+ localVarQueryParameter['id'] = id;
1816
+ }
1817
+ if (name !== undefined) {
1818
+ localVarQueryParameter['name'] = name;
1819
+ }
1820
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1821
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1822
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1823
+ return {
1824
+ url: toPathString(localVarUrlObj),
1825
+ options: localVarRequestOptions,
1826
+ };
1827
+ }),
1828
+ /**
1829
+ * UserAPIKeyList 分页查询 UserAPIKey 列表,支持按状态和分组过滤 List UserAPIKeys with pagination, supports filtering by status and key group 请求路径: GET /api/user/api-key/list?page={page}&page_size={page_size}&key_status={status}&key_group={group} Request path: GET /api/user/api-key/list?page={page}&page_size={page_size}&key_status={status}&key_group={group} 权限要求: 需要用户认证 Permission: Requires user authentication
1830
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1831
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1832
+ * @param {string} [uid] uid 按用户 ID 过滤(可选,管理员可用) Filter by user ID (optional, admin only) 0: 返回所有用户的 API Key(仅管理员) > 0: 仅返回指定用户的 API Key 0: return API keys from all users (admin only) > 0: return API keys from specific user only @gotags: form:\"uid\"
1833
+ * @param {string} [keyStatus] key_status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回启用的 API Key 2: 仅返回禁用的 API Key 0: return all statuses 1: return enabled API keys only 2: return disabled API keys only @gotags: form:\"key_status\"
1834
+ * @param {string} [keyGroup] key_group 按分组过滤(可选) Filter by key group (optional) @gotags: form:\"key_group\"
1835
+ * @param {*} [options] Override http request option.
1836
+ * @throws {RequiredError}
1837
+ */
1838
+ userAPIKeyServiceUserAPIKeyList: (page_1, pageSize_1, uid_1, keyStatus_1, keyGroup_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, uid_1, keyStatus_1, keyGroup_1, ...args_1], void 0, function* (page, pageSize, uid, keyStatus, keyGroup, options = {}) {
1839
+ const localVarPath = `/api/v1/user/api-key/list`;
1840
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1841
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1842
+ let baseOptions;
1843
+ if (configuration) {
1844
+ baseOptions = configuration.baseOptions;
1845
+ }
1846
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1847
+ const localVarHeaderParameter = {};
1848
+ const localVarQueryParameter = {};
1849
+ if (page !== undefined) {
1850
+ localVarQueryParameter['page'] = page;
1851
+ }
1852
+ if (pageSize !== undefined) {
1853
+ localVarQueryParameter['page_size'] = pageSize;
1854
+ }
1855
+ if (uid !== undefined) {
1856
+ localVarQueryParameter['uid'] = uid;
1857
+ }
1858
+ if (keyStatus !== undefined) {
1859
+ localVarQueryParameter['key_status'] = keyStatus;
1860
+ }
1861
+ if (keyGroup !== undefined) {
1862
+ localVarQueryParameter['key_group'] = keyGroup;
1863
+ }
1864
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1865
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1866
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1867
+ return {
1868
+ url: toPathString(localVarUrlObj),
1869
+ options: localVarRequestOptions,
1870
+ };
1871
+ }),
1872
+ /**
1873
+ * UserAPIKeyUpdate 更新现有的 UserAPIKey Update an existing UserAPIKey 请求路径: POST /api/user/api-key/update Request path: POST /api/user/api-key/update 权限要求: 需要用户认证 Permission: Requires user authentication
1874
+ * @param {UserAPIKeyUpdateRequest} userAPIKeyUpdateRequest
1875
+ * @param {*} [options] Override http request option.
1876
+ * @throws {RequiredError}
1877
+ */
1878
+ userAPIKeyServiceUserAPIKeyUpdate: (userAPIKeyUpdateRequest_1, ...args_1) => __awaiter(this, [userAPIKeyUpdateRequest_1, ...args_1], void 0, function* (userAPIKeyUpdateRequest, options = {}) {
1879
+ // verify required parameter 'userAPIKeyUpdateRequest' is not null or undefined
1880
+ assertParamExists('userAPIKeyServiceUserAPIKeyUpdate', 'userAPIKeyUpdateRequest', userAPIKeyUpdateRequest);
1881
+ const localVarPath = `/api/v1/user/api-key/update`;
1882
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1883
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1884
+ let baseOptions;
1885
+ if (configuration) {
1886
+ baseOptions = configuration.baseOptions;
1887
+ }
1888
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1889
+ const localVarHeaderParameter = {};
1890
+ const localVarQueryParameter = {};
1891
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1892
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1893
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1894
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1895
+ localVarRequestOptions.data = serializeDataIfNeeded(userAPIKeyUpdateRequest, localVarRequestOptions, configuration);
1896
+ return {
1897
+ url: toPathString(localVarUrlObj),
1898
+ options: localVarRequestOptions,
1899
+ };
1900
+ }),
1901
+ };
1902
+ };
1903
+ /**
1904
+ * UserAPIKeyServiceApi - functional programming interface
1905
+ */
1906
+ export const UserAPIKeyServiceApiFp = function (configuration) {
1907
+ const localVarAxiosParamCreator = UserAPIKeyServiceApiAxiosParamCreator(configuration);
1908
+ return {
1909
+ /**
1910
+ * UserAPIKeyCreate 创建新的 UserAPIKey Create a new UserAPIKey 请求路径: POST /api/user/api-key/create Request path: POST /api/user/api-key/create 权限要求: 需要用户认证 Permission: Requires user authentication
1911
+ * @param {UserAPIKeyCreateRequest} userAPIKeyCreateRequest
1912
+ * @param {*} [options] Override http request option.
1913
+ * @throws {RequiredError}
1914
+ */
1915
+ userAPIKeyServiceUserAPIKeyCreate(userAPIKeyCreateRequest, options) {
1916
+ return __awaiter(this, void 0, void 0, function* () {
1917
+ var _a, _b, _c;
1918
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAPIKeyServiceUserAPIKeyCreate(userAPIKeyCreateRequest, options);
1919
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1920
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAPIKeyServiceApi.userAPIKeyServiceUserAPIKeyCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1921
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1922
+ });
1923
+ },
1924
+ /**
1925
+ * UserAPIKeyDelete 删除 UserAPIKey(软删除) Delete a UserAPIKey (soft delete) 请求路径: POST /api/user/api-key/delete Request path: POST /api/user/api-key/delete 权限要求: 需要用户认证 Permission: Requires user authentication
1926
+ * @param {UserAPIKeyDeleteRequest} userAPIKeyDeleteRequest
1927
+ * @param {*} [options] Override http request option.
1928
+ * @throws {RequiredError}
1929
+ */
1930
+ userAPIKeyServiceUserAPIKeyDelete(userAPIKeyDeleteRequest, options) {
1931
+ return __awaiter(this, void 0, void 0, function* () {
1932
+ var _a, _b, _c;
1933
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAPIKeyServiceUserAPIKeyDelete(userAPIKeyDeleteRequest, options);
1934
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1935
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAPIKeyServiceApi.userAPIKeyServiceUserAPIKeyDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1936
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1937
+ });
1938
+ },
1939
+ /**
1940
+ * UserAPIKeyGet 根据 ID 或名称获取单个 UserAPIKey Retrieve a single UserAPIKey by ID or name 请求路径: GET /api/user/api-key/get?id={id} 或 GET /api/user/api-key/get?name={name} Request path: GET /api/user/api-key/get?id={id} or GET /api/user/api-key/get?name={name} 权限要求: 需要用户认证 Permission: Requires user authentication
1941
+ * @param {string} [id] id 要获取的 UserAPIKey 的唯一标识符 Unique identifier of the UserAPIKey to retrieve @gotags: form:\"id\"
1942
+ * @param {string} [name] name 要获取的 UserAPIKey 的名称 Name of the UserAPIKey to retrieve 如果同时提供 id 和 name,以 id 为准 If both id and name are provided, id takes precedence @gotags: form:\"name\"
1943
+ * @param {*} [options] Override http request option.
1944
+ * @throws {RequiredError}
1945
+ */
1946
+ userAPIKeyServiceUserAPIKeyGet(id, name, options) {
1947
+ return __awaiter(this, void 0, void 0, function* () {
1948
+ var _a, _b, _c;
1949
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAPIKeyServiceUserAPIKeyGet(id, name, options);
1950
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1951
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAPIKeyServiceApi.userAPIKeyServiceUserAPIKeyGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1952
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1953
+ });
1954
+ },
1955
+ /**
1956
+ * UserAPIKeyList 分页查询 UserAPIKey 列表,支持按状态和分组过滤 List UserAPIKeys with pagination, supports filtering by status and key group 请求路径: GET /api/user/api-key/list?page={page}&page_size={page_size}&key_status={status}&key_group={group} Request path: GET /api/user/api-key/list?page={page}&page_size={page_size}&key_status={status}&key_group={group} 权限要求: 需要用户认证 Permission: Requires user authentication
1957
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
1958
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
1959
+ * @param {string} [uid] uid 按用户 ID 过滤(可选,管理员可用) Filter by user ID (optional, admin only) 0: 返回所有用户的 API Key(仅管理员) > 0: 仅返回指定用户的 API Key 0: return API keys from all users (admin only) > 0: return API keys from specific user only @gotags: form:\"uid\"
1960
+ * @param {string} [keyStatus] key_status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回启用的 API Key 2: 仅返回禁用的 API Key 0: return all statuses 1: return enabled API keys only 2: return disabled API keys only @gotags: form:\"key_status\"
1961
+ * @param {string} [keyGroup] key_group 按分组过滤(可选) Filter by key group (optional) @gotags: form:\"key_group\"
1962
+ * @param {*} [options] Override http request option.
1963
+ * @throws {RequiredError}
1964
+ */
1965
+ userAPIKeyServiceUserAPIKeyList(page, pageSize, uid, keyStatus, keyGroup, options) {
1966
+ return __awaiter(this, void 0, void 0, function* () {
1967
+ var _a, _b, _c;
1968
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAPIKeyServiceUserAPIKeyList(page, pageSize, uid, keyStatus, keyGroup, options);
1969
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1970
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAPIKeyServiceApi.userAPIKeyServiceUserAPIKeyList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1971
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1972
+ });
1973
+ },
1974
+ /**
1975
+ * UserAPIKeyUpdate 更新现有的 UserAPIKey Update an existing UserAPIKey 请求路径: POST /api/user/api-key/update Request path: POST /api/user/api-key/update 权限要求: 需要用户认证 Permission: Requires user authentication
1976
+ * @param {UserAPIKeyUpdateRequest} userAPIKeyUpdateRequest
1977
+ * @param {*} [options] Override http request option.
1978
+ * @throws {RequiredError}
1979
+ */
1980
+ userAPIKeyServiceUserAPIKeyUpdate(userAPIKeyUpdateRequest, options) {
1981
+ return __awaiter(this, void 0, void 0, function* () {
1982
+ var _a, _b, _c;
1983
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAPIKeyServiceUserAPIKeyUpdate(userAPIKeyUpdateRequest, options);
1984
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1985
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAPIKeyServiceApi.userAPIKeyServiceUserAPIKeyUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1986
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1987
+ });
1988
+ },
1989
+ };
1990
+ };
1991
+ /**
1992
+ * UserAPIKeyServiceApi - factory interface
1993
+ */
1994
+ export const UserAPIKeyServiceApiFactory = function (configuration, basePath, axios) {
1995
+ const localVarFp = UserAPIKeyServiceApiFp(configuration);
1996
+ return {
1997
+ /**
1998
+ * UserAPIKeyCreate 创建新的 UserAPIKey Create a new UserAPIKey 请求路径: POST /api/user/api-key/create Request path: POST /api/user/api-key/create 权限要求: 需要用户认证 Permission: Requires user authentication
1999
+ * @param {UserAPIKeyCreateRequest} userAPIKeyCreateRequest
2000
+ * @param {*} [options] Override http request option.
2001
+ * @throws {RequiredError}
2002
+ */
2003
+ userAPIKeyServiceUserAPIKeyCreate(userAPIKeyCreateRequest, options) {
2004
+ return localVarFp.userAPIKeyServiceUserAPIKeyCreate(userAPIKeyCreateRequest, options).then((request) => request(axios, basePath));
2005
+ },
2006
+ /**
2007
+ * UserAPIKeyDelete 删除 UserAPIKey(软删除) Delete a UserAPIKey (soft delete) 请求路径: POST /api/user/api-key/delete Request path: POST /api/user/api-key/delete 权限要求: 需要用户认证 Permission: Requires user authentication
2008
+ * @param {UserAPIKeyDeleteRequest} userAPIKeyDeleteRequest
2009
+ * @param {*} [options] Override http request option.
2010
+ * @throws {RequiredError}
2011
+ */
2012
+ userAPIKeyServiceUserAPIKeyDelete(userAPIKeyDeleteRequest, options) {
2013
+ return localVarFp.userAPIKeyServiceUserAPIKeyDelete(userAPIKeyDeleteRequest, options).then((request) => request(axios, basePath));
2014
+ },
2015
+ /**
2016
+ * UserAPIKeyGet 根据 ID 或名称获取单个 UserAPIKey Retrieve a single UserAPIKey by ID or name 请求路径: GET /api/user/api-key/get?id={id} 或 GET /api/user/api-key/get?name={name} Request path: GET /api/user/api-key/get?id={id} or GET /api/user/api-key/get?name={name} 权限要求: 需要用户认证 Permission: Requires user authentication
2017
+ * @param {string} [id] id 要获取的 UserAPIKey 的唯一标识符 Unique identifier of the UserAPIKey to retrieve @gotags: form:\"id\"
2018
+ * @param {string} [name] name 要获取的 UserAPIKey 的名称 Name of the UserAPIKey to retrieve 如果同时提供 id 和 name,以 id 为准 If both id and name are provided, id takes precedence @gotags: form:\"name\"
2019
+ * @param {*} [options] Override http request option.
2020
+ * @throws {RequiredError}
2021
+ */
2022
+ userAPIKeyServiceUserAPIKeyGet(id, name, options) {
2023
+ return localVarFp.userAPIKeyServiceUserAPIKeyGet(id, name, options).then((request) => request(axios, basePath));
2024
+ },
2025
+ /**
2026
+ * UserAPIKeyList 分页查询 UserAPIKey 列表,支持按状态和分组过滤 List UserAPIKeys with pagination, supports filtering by status and key group 请求路径: GET /api/user/api-key/list?page={page}&page_size={page_size}&key_status={status}&key_group={group} Request path: GET /api/user/api-key/list?page={page}&page_size={page_size}&key_status={status}&key_group={group} 权限要求: 需要用户认证 Permission: Requires user authentication
2027
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
2028
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
2029
+ * @param {string} [uid] uid 按用户 ID 过滤(可选,管理员可用) Filter by user ID (optional, admin only) 0: 返回所有用户的 API Key(仅管理员) > 0: 仅返回指定用户的 API Key 0: return API keys from all users (admin only) > 0: return API keys from specific user only @gotags: form:\"uid\"
2030
+ * @param {string} [keyStatus] key_status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回启用的 API Key 2: 仅返回禁用的 API Key 0: return all statuses 1: return enabled API keys only 2: return disabled API keys only @gotags: form:\"key_status\"
2031
+ * @param {string} [keyGroup] key_group 按分组过滤(可选) Filter by key group (optional) @gotags: form:\"key_group\"
2032
+ * @param {*} [options] Override http request option.
2033
+ * @throws {RequiredError}
2034
+ */
2035
+ userAPIKeyServiceUserAPIKeyList(page, pageSize, uid, keyStatus, keyGroup, options) {
2036
+ return localVarFp.userAPIKeyServiceUserAPIKeyList(page, pageSize, uid, keyStatus, keyGroup, options).then((request) => request(axios, basePath));
2037
+ },
2038
+ /**
2039
+ * UserAPIKeyUpdate 更新现有的 UserAPIKey Update an existing UserAPIKey 请求路径: POST /api/user/api-key/update Request path: POST /api/user/api-key/update 权限要求: 需要用户认证 Permission: Requires user authentication
2040
+ * @param {UserAPIKeyUpdateRequest} userAPIKeyUpdateRequest
2041
+ * @param {*} [options] Override http request option.
2042
+ * @throws {RequiredError}
2043
+ */
2044
+ userAPIKeyServiceUserAPIKeyUpdate(userAPIKeyUpdateRequest, options) {
2045
+ return localVarFp.userAPIKeyServiceUserAPIKeyUpdate(userAPIKeyUpdateRequest, options).then((request) => request(axios, basePath));
2046
+ },
2047
+ };
2048
+ };
2049
+ /**
2050
+ * UserAPIKeyServiceApi - object-oriented interface
2051
+ */
2052
+ export class UserAPIKeyServiceApi extends BaseAPI {
2053
+ /**
2054
+ * UserAPIKeyCreate 创建新的 UserAPIKey Create a new UserAPIKey 请求路径: POST /api/user/api-key/create Request path: POST /api/user/api-key/create 权限要求: 需要用户认证 Permission: Requires user authentication
2055
+ * @param {UserAPIKeyCreateRequest} userAPIKeyCreateRequest
2056
+ * @param {*} [options] Override http request option.
2057
+ * @throws {RequiredError}
2058
+ */
2059
+ userAPIKeyServiceUserAPIKeyCreate(userAPIKeyCreateRequest, options) {
2060
+ return UserAPIKeyServiceApiFp(this.configuration).userAPIKeyServiceUserAPIKeyCreate(userAPIKeyCreateRequest, options).then((request) => request(this.axios, this.basePath));
2061
+ }
2062
+ /**
2063
+ * UserAPIKeyDelete 删除 UserAPIKey(软删除) Delete a UserAPIKey (soft delete) 请求路径: POST /api/user/api-key/delete Request path: POST /api/user/api-key/delete 权限要求: 需要用户认证 Permission: Requires user authentication
2064
+ * @param {UserAPIKeyDeleteRequest} userAPIKeyDeleteRequest
2065
+ * @param {*} [options] Override http request option.
2066
+ * @throws {RequiredError}
2067
+ */
2068
+ userAPIKeyServiceUserAPIKeyDelete(userAPIKeyDeleteRequest, options) {
2069
+ return UserAPIKeyServiceApiFp(this.configuration).userAPIKeyServiceUserAPIKeyDelete(userAPIKeyDeleteRequest, options).then((request) => request(this.axios, this.basePath));
2070
+ }
2071
+ /**
2072
+ * UserAPIKeyGet 根据 ID 或名称获取单个 UserAPIKey Retrieve a single UserAPIKey by ID or name 请求路径: GET /api/user/api-key/get?id={id} 或 GET /api/user/api-key/get?name={name} Request path: GET /api/user/api-key/get?id={id} or GET /api/user/api-key/get?name={name} 权限要求: 需要用户认证 Permission: Requires user authentication
2073
+ * @param {string} [id] id 要获取的 UserAPIKey 的唯一标识符 Unique identifier of the UserAPIKey to retrieve @gotags: form:\"id\"
2074
+ * @param {string} [name] name 要获取的 UserAPIKey 的名称 Name of the UserAPIKey to retrieve 如果同时提供 id 和 name,以 id 为准 If both id and name are provided, id takes precedence @gotags: form:\"name\"
2075
+ * @param {*} [options] Override http request option.
2076
+ * @throws {RequiredError}
2077
+ */
2078
+ userAPIKeyServiceUserAPIKeyGet(id, name, options) {
2079
+ return UserAPIKeyServiceApiFp(this.configuration).userAPIKeyServiceUserAPIKeyGet(id, name, options).then((request) => request(this.axios, this.basePath));
2080
+ }
2081
+ /**
2082
+ * UserAPIKeyList 分页查询 UserAPIKey 列表,支持按状态和分组过滤 List UserAPIKeys with pagination, supports filtering by status and key group 请求路径: GET /api/user/api-key/list?page={page}&page_size={page_size}&key_status={status}&key_group={group} Request path: GET /api/user/api-key/list?page={page}&page_size={page_size}&key_status={status}&key_group={group} 权限要求: 需要用户认证 Permission: Requires user authentication
2083
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
2084
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
2085
+ * @param {string} [uid] uid 按用户 ID 过滤(可选,管理员可用) Filter by user ID (optional, admin only) 0: 返回所有用户的 API Key(仅管理员) > 0: 仅返回指定用户的 API Key 0: return API keys from all users (admin only) > 0: return API keys from specific user only @gotags: form:\"uid\"
2086
+ * @param {string} [keyStatus] key_status 按状态过滤(可选) Filter by status (optional) 0: 返回所有状态 1: 仅返回启用的 API Key 2: 仅返回禁用的 API Key 0: return all statuses 1: return enabled API keys only 2: return disabled API keys only @gotags: form:\"key_status\"
2087
+ * @param {string} [keyGroup] key_group 按分组过滤(可选) Filter by key group (optional) @gotags: form:\"key_group\"
2088
+ * @param {*} [options] Override http request option.
2089
+ * @throws {RequiredError}
2090
+ */
2091
+ userAPIKeyServiceUserAPIKeyList(page, pageSize, uid, keyStatus, keyGroup, options) {
2092
+ return UserAPIKeyServiceApiFp(this.configuration).userAPIKeyServiceUserAPIKeyList(page, pageSize, uid, keyStatus, keyGroup, options).then((request) => request(this.axios, this.basePath));
2093
+ }
2094
+ /**
2095
+ * UserAPIKeyUpdate 更新现有的 UserAPIKey Update an existing UserAPIKey 请求路径: POST /api/user/api-key/update Request path: POST /api/user/api-key/update 权限要求: 需要用户认证 Permission: Requires user authentication
2096
+ * @param {UserAPIKeyUpdateRequest} userAPIKeyUpdateRequest
2097
+ * @param {*} [options] Override http request option.
2098
+ * @throws {RequiredError}
2099
+ */
2100
+ userAPIKeyServiceUserAPIKeyUpdate(userAPIKeyUpdateRequest, options) {
2101
+ return UserAPIKeyServiceApiFp(this.configuration).userAPIKeyServiceUserAPIKeyUpdate(userAPIKeyUpdateRequest, options).then((request) => request(this.axios, this.basePath));
2102
+ }
2103
+ }
2104
+ /**
2105
+ * UserAuthServiceApi - axios parameter creator
2106
+ */
2107
+ export const UserAuthServiceApiAxiosParamCreator = function (configuration) {
2108
+ return {
2109
+ /**
2110
+ * 提交验证码流程
2111
+ * @param {number} [authType]
2112
+ * @param {number} [authAction]
2113
+ * @param {string} [payloadEmailPayloadUserEmail]
2114
+ * @param {string} [payloadEmailPayloadAuthCode]
2115
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
2116
+ * @param {string} [authAt]
2117
+ * @param {string} [nonce]
2118
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_v1:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | AuthCode | UserPasswordEncrypt )
2119
+ * @param {*} [options] Override http request option.
2120
+ * @throws {RequiredError}
2121
+ */
2122
+ userAuthServiceUserAuthFlowCode: (authType_1, authAction_1, payloadEmailPayloadUserEmail_1, payloadEmailPayloadAuthCode_1, payloadEmailPayloadUserPasswordEncrypt_1, authAt_1, nonce_1, signature_1, ...args_1) => __awaiter(this, [authType_1, authAction_1, payloadEmailPayloadUserEmail_1, payloadEmailPayloadAuthCode_1, payloadEmailPayloadUserPasswordEncrypt_1, authAt_1, nonce_1, signature_1, ...args_1], void 0, function* (authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadAuthCode, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, options = {}) {
2123
+ const localVarPath = `/auth/v1/flow/code`;
2124
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2125
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2126
+ let baseOptions;
2127
+ if (configuration) {
2128
+ baseOptions = configuration.baseOptions;
2129
+ }
2130
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2131
+ const localVarHeaderParameter = {};
2132
+ const localVarQueryParameter = {};
2133
+ if (authType !== undefined) {
2134
+ localVarQueryParameter['auth_type'] = authType;
2135
+ }
2136
+ if (authAction !== undefined) {
2137
+ localVarQueryParameter['auth_action'] = authAction;
2138
+ }
2139
+ if (payloadEmailPayloadUserEmail !== undefined) {
2140
+ localVarQueryParameter['payload.email_payload.user_email'] = payloadEmailPayloadUserEmail;
2141
+ }
2142
+ if (payloadEmailPayloadAuthCode !== undefined) {
2143
+ localVarQueryParameter['payload.email_payload.auth_code'] = payloadEmailPayloadAuthCode;
2144
+ }
2145
+ if (payloadEmailPayloadUserPasswordEncrypt !== undefined) {
2146
+ localVarQueryParameter['payload.email_payload.user_password_encrypt'] = payloadEmailPayloadUserPasswordEncrypt;
2147
+ }
2148
+ if (authAt !== undefined) {
2149
+ localVarQueryParameter['auth_at'] = authAt;
2150
+ }
2151
+ if (nonce !== undefined) {
2152
+ localVarQueryParameter['nonce'] = nonce;
2153
+ }
2154
+ if (signature !== undefined) {
2155
+ localVarQueryParameter['signature'] = signature;
2156
+ }
2157
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2158
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2159
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2160
+ return {
2161
+ url: toPathString(localVarUrlObj),
2162
+ options: localVarRequestOptions,
2163
+ };
2164
+ }),
2165
+ /**
2166
+ * 鉴权流程启动
2167
+ * @param {number} [authType]
2168
+ * @param {number} [authAction]
2169
+ * @param {string} [payloadEmailPayloadUserEmail]
2170
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
2171
+ * @param {string} [payloadEmailPayloadDisplayName]
2172
+ * @param {number} [payloadOauth2PayloadPlatform]
2173
+ * @param {string} [authAt]
2174
+ * @param {string} [nonce]
2175
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_v1:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform )
2176
+ * @param {*} [options] Override http request option.
2177
+ * @throws {RequiredError}
2178
+ */
2179
+ userAuthServiceUserAuthFlowInit: (authType_1, authAction_1, payloadEmailPayloadUserEmail_1, payloadEmailPayloadUserPasswordEncrypt_1, payloadEmailPayloadDisplayName_1, payloadOauth2PayloadPlatform_1, authAt_1, nonce_1, signature_1, ...args_1) => __awaiter(this, [authType_1, authAction_1, payloadEmailPayloadUserEmail_1, payloadEmailPayloadUserPasswordEncrypt_1, payloadEmailPayloadDisplayName_1, payloadOauth2PayloadPlatform_1, authAt_1, nonce_1, signature_1, ...args_1], void 0, function* (authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, payloadEmailPayloadDisplayName, payloadOauth2PayloadPlatform, authAt, nonce, signature, options = {}) {
2180
+ const localVarPath = `/auth/v1/flow/init`;
2181
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2182
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2183
+ let baseOptions;
2184
+ if (configuration) {
2185
+ baseOptions = configuration.baseOptions;
2186
+ }
2187
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2188
+ const localVarHeaderParameter = {};
2189
+ const localVarQueryParameter = {};
2190
+ if (authType !== undefined) {
2191
+ localVarQueryParameter['auth_type'] = authType;
2192
+ }
2193
+ if (authAction !== undefined) {
2194
+ localVarQueryParameter['auth_action'] = authAction;
2195
+ }
2196
+ if (payloadEmailPayloadUserEmail !== undefined) {
2197
+ localVarQueryParameter['payload.email_payload.user_email'] = payloadEmailPayloadUserEmail;
2198
+ }
2199
+ if (payloadEmailPayloadUserPasswordEncrypt !== undefined) {
2200
+ localVarQueryParameter['payload.email_payload.user_password_encrypt'] = payloadEmailPayloadUserPasswordEncrypt;
2201
+ }
2202
+ if (payloadEmailPayloadDisplayName !== undefined) {
2203
+ localVarQueryParameter['payload.email_payload.display_name'] = payloadEmailPayloadDisplayName;
2204
+ }
2205
+ if (payloadOauth2PayloadPlatform !== undefined) {
2206
+ localVarQueryParameter['payload.oauth2_payload.platform'] = payloadOauth2PayloadPlatform;
2207
+ }
2208
+ if (authAt !== undefined) {
2209
+ localVarQueryParameter['auth_at'] = authAt;
2210
+ }
2211
+ if (nonce !== undefined) {
2212
+ localVarQueryParameter['nonce'] = nonce;
2213
+ }
2214
+ if (signature !== undefined) {
2215
+ localVarQueryParameter['signature'] = signature;
2216
+ }
2217
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2218
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2219
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2220
+ return {
2221
+ url: toPathString(localVarUrlObj),
2222
+ options: localVarRequestOptions,
2223
+ };
2224
+ }),
2225
+ /**
2226
+ * OAUTH 流程验证回调
2227
+ * @param {string} [code]
2228
+ * @param {string} [state]
2229
+ * @param {number} [platform]
2230
+ * @param {*} [options] Override http request option.
2231
+ * @throws {RequiredError}
2232
+ */
2233
+ userAuthServiceUserAuthFlowOAuthCallback: (code_1, state_1, platform_1, ...args_1) => __awaiter(this, [code_1, state_1, platform_1, ...args_1], void 0, function* (code, state, platform, options = {}) {
2234
+ const localVarPath = `/auth/v1/flow/oauth/cb`;
2235
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2236
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2237
+ let baseOptions;
2238
+ if (configuration) {
2239
+ baseOptions = configuration.baseOptions;
2240
+ }
2241
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2242
+ const localVarHeaderParameter = {};
2243
+ const localVarQueryParameter = {};
2244
+ if (code !== undefined) {
2245
+ localVarQueryParameter['code'] = code;
2246
+ }
2247
+ if (state !== undefined) {
2248
+ localVarQueryParameter['state'] = state;
2249
+ }
2250
+ if (platform !== undefined) {
2251
+ localVarQueryParameter['platform'] = platform;
2252
+ }
2253
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2254
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2255
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2256
+ return {
2257
+ url: toPathString(localVarUrlObj),
2258
+ options: localVarRequestOptions,
2259
+ };
2260
+ }),
2261
+ /**
2262
+ * Auth Token 刷新接口
2263
+ * @param {string} [refreshToken]
2264
+ * @param {string} [authAt]
2265
+ * @param {string} [nonce]
2266
+ * @param {string} [signature]
2267
+ * @param {*} [options] Override http request option.
2268
+ * @throws {RequiredError}
2269
+ */
2270
+ userAuthServiceUserAuthFlowTokenRefresh: (refreshToken_1, authAt_1, nonce_1, signature_1, ...args_1) => __awaiter(this, [refreshToken_1, authAt_1, nonce_1, signature_1, ...args_1], void 0, function* (refreshToken, authAt, nonce, signature, options = {}) {
2271
+ const localVarPath = `/auth/v1/flow/refresh_token`;
2272
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2273
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2274
+ let baseOptions;
2275
+ if (configuration) {
2276
+ baseOptions = configuration.baseOptions;
2277
+ }
2278
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2279
+ const localVarHeaderParameter = {};
2280
+ const localVarQueryParameter = {};
2281
+ if (refreshToken !== undefined) {
2282
+ localVarQueryParameter['refresh_token'] = refreshToken;
2283
+ }
2284
+ if (authAt !== undefined) {
2285
+ localVarQueryParameter['auth_at'] = authAt;
2286
+ }
2287
+ if (nonce !== undefined) {
2288
+ localVarQueryParameter['nonce'] = nonce;
2289
+ }
2290
+ if (signature !== undefined) {
2291
+ localVarQueryParameter['signature'] = signature;
2292
+ }
2293
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2294
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2295
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2296
+ return {
2297
+ url: toPathString(localVarUrlObj),
2298
+ options: localVarRequestOptions,
2299
+ };
2300
+ }),
2301
+ };
2302
+ };
2303
+ /**
2304
+ * UserAuthServiceApi - functional programming interface
2305
+ */
2306
+ export const UserAuthServiceApiFp = function (configuration) {
2307
+ const localVarAxiosParamCreator = UserAuthServiceApiAxiosParamCreator(configuration);
2308
+ return {
2309
+ /**
2310
+ * 提交验证码流程
2311
+ * @param {number} [authType]
2312
+ * @param {number} [authAction]
2313
+ * @param {string} [payloadEmailPayloadUserEmail]
2314
+ * @param {string} [payloadEmailPayloadAuthCode]
2315
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
2316
+ * @param {string} [authAt]
2317
+ * @param {string} [nonce]
2318
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_v1:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | AuthCode | UserPasswordEncrypt )
2319
+ * @param {*} [options] Override http request option.
2320
+ * @throws {RequiredError}
2321
+ */
2322
+ userAuthServiceUserAuthFlowCode(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadAuthCode, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, options) {
2323
+ return __awaiter(this, void 0, void 0, function* () {
2324
+ var _a, _b, _c;
2325
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAuthServiceUserAuthFlowCode(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadAuthCode, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, options);
2326
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2327
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAuthServiceApi.userAuthServiceUserAuthFlowCode']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2328
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2329
+ });
2330
+ },
2331
+ /**
2332
+ * 鉴权流程启动
2333
+ * @param {number} [authType]
2334
+ * @param {number} [authAction]
2335
+ * @param {string} [payloadEmailPayloadUserEmail]
2336
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
2337
+ * @param {string} [payloadEmailPayloadDisplayName]
2338
+ * @param {number} [payloadOauth2PayloadPlatform]
2339
+ * @param {string} [authAt]
2340
+ * @param {string} [nonce]
2341
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_v1:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform )
2342
+ * @param {*} [options] Override http request option.
2343
+ * @throws {RequiredError}
2344
+ */
2345
+ userAuthServiceUserAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, payloadEmailPayloadDisplayName, payloadOauth2PayloadPlatform, authAt, nonce, signature, options) {
2346
+ return __awaiter(this, void 0, void 0, function* () {
2347
+ var _a, _b, _c;
2348
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAuthServiceUserAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, payloadEmailPayloadDisplayName, payloadOauth2PayloadPlatform, authAt, nonce, signature, options);
2349
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2350
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAuthServiceApi.userAuthServiceUserAuthFlowInit']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2351
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2352
+ });
2353
+ },
2354
+ /**
2355
+ * OAUTH 流程验证回调
2356
+ * @param {string} [code]
2357
+ * @param {string} [state]
2358
+ * @param {number} [platform]
2359
+ * @param {*} [options] Override http request option.
2360
+ * @throws {RequiredError}
2361
+ */
2362
+ userAuthServiceUserAuthFlowOAuthCallback(code, state, platform, options) {
2363
+ return __awaiter(this, void 0, void 0, function* () {
2364
+ var _a, _b, _c;
2365
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAuthServiceUserAuthFlowOAuthCallback(code, state, platform, options);
2366
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2367
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAuthServiceApi.userAuthServiceUserAuthFlowOAuthCallback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2368
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2369
+ });
2370
+ },
2371
+ /**
2372
+ * Auth Token 刷新接口
2373
+ * @param {string} [refreshToken]
2374
+ * @param {string} [authAt]
2375
+ * @param {string} [nonce]
2376
+ * @param {string} [signature]
2377
+ * @param {*} [options] Override http request option.
2378
+ * @throws {RequiredError}
2379
+ */
2380
+ userAuthServiceUserAuthFlowTokenRefresh(refreshToken, authAt, nonce, signature, options) {
2381
+ return __awaiter(this, void 0, void 0, function* () {
2382
+ var _a, _b, _c;
2383
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userAuthServiceUserAuthFlowTokenRefresh(refreshToken, authAt, nonce, signature, options);
2384
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2385
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserAuthServiceApi.userAuthServiceUserAuthFlowTokenRefresh']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2386
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2387
+ });
2388
+ },
2389
+ };
2390
+ };
2391
+ /**
2392
+ * UserAuthServiceApi - factory interface
2393
+ */
2394
+ export const UserAuthServiceApiFactory = function (configuration, basePath, axios) {
2395
+ const localVarFp = UserAuthServiceApiFp(configuration);
2396
+ return {
2397
+ /**
2398
+ * 提交验证码流程
2399
+ * @param {number} [authType]
2400
+ * @param {number} [authAction]
2401
+ * @param {string} [payloadEmailPayloadUserEmail]
2402
+ * @param {string} [payloadEmailPayloadAuthCode]
2403
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
2404
+ * @param {string} [authAt]
2405
+ * @param {string} [nonce]
2406
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_v1:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | AuthCode | UserPasswordEncrypt )
2407
+ * @param {*} [options] Override http request option.
2408
+ * @throws {RequiredError}
2409
+ */
2410
+ userAuthServiceUserAuthFlowCode(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadAuthCode, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, options) {
2411
+ return localVarFp.userAuthServiceUserAuthFlowCode(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadAuthCode, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, options).then((request) => request(axios, basePath));
2412
+ },
2413
+ /**
2414
+ * 鉴权流程启动
2415
+ * @param {number} [authType]
2416
+ * @param {number} [authAction]
2417
+ * @param {string} [payloadEmailPayloadUserEmail]
2418
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
2419
+ * @param {string} [payloadEmailPayloadDisplayName]
2420
+ * @param {number} [payloadOauth2PayloadPlatform]
2421
+ * @param {string} [authAt]
2422
+ * @param {string} [nonce]
2423
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_v1:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform )
2424
+ * @param {*} [options] Override http request option.
2425
+ * @throws {RequiredError}
2426
+ */
2427
+ userAuthServiceUserAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, payloadEmailPayloadDisplayName, payloadOauth2PayloadPlatform, authAt, nonce, signature, options) {
2428
+ return localVarFp.userAuthServiceUserAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, payloadEmailPayloadDisplayName, payloadOauth2PayloadPlatform, authAt, nonce, signature, options).then((request) => request(axios, basePath));
2429
+ },
2430
+ /**
2431
+ * OAUTH 流程验证回调
2432
+ * @param {string} [code]
2433
+ * @param {string} [state]
2434
+ * @param {number} [platform]
2435
+ * @param {*} [options] Override http request option.
2436
+ * @throws {RequiredError}
2437
+ */
2438
+ userAuthServiceUserAuthFlowOAuthCallback(code, state, platform, options) {
2439
+ return localVarFp.userAuthServiceUserAuthFlowOAuthCallback(code, state, platform, options).then((request) => request(axios, basePath));
2440
+ },
2441
+ /**
2442
+ * Auth Token 刷新接口
2443
+ * @param {string} [refreshToken]
2444
+ * @param {string} [authAt]
2445
+ * @param {string} [nonce]
2446
+ * @param {string} [signature]
2447
+ * @param {*} [options] Override http request option.
2448
+ * @throws {RequiredError}
2449
+ */
2450
+ userAuthServiceUserAuthFlowTokenRefresh(refreshToken, authAt, nonce, signature, options) {
2451
+ return localVarFp.userAuthServiceUserAuthFlowTokenRefresh(refreshToken, authAt, nonce, signature, options).then((request) => request(axios, basePath));
2452
+ },
2453
+ };
2454
+ };
2455
+ /**
2456
+ * UserAuthServiceApi - object-oriented interface
2457
+ */
2458
+ export class UserAuthServiceApi extends BaseAPI {
2459
+ /**
2460
+ * 提交验证码流程
2461
+ * @param {number} [authType]
2462
+ * @param {number} [authAction]
2463
+ * @param {string} [payloadEmailPayloadUserEmail]
2464
+ * @param {string} [payloadEmailPayloadAuthCode]
2465
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
2466
+ * @param {string} [authAt]
2467
+ * @param {string} [nonce]
2468
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_v1:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | AuthCode | UserPasswordEncrypt )
2469
+ * @param {*} [options] Override http request option.
2470
+ * @throws {RequiredError}
2471
+ */
2472
+ userAuthServiceUserAuthFlowCode(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadAuthCode, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, options) {
2473
+ return UserAuthServiceApiFp(this.configuration).userAuthServiceUserAuthFlowCode(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadAuthCode, payloadEmailPayloadUserPasswordEncrypt, authAt, nonce, signature, options).then((request) => request(this.axios, this.basePath));
2474
+ }
2475
+ /**
2476
+ * 鉴权流程启动
2477
+ * @param {number} [authType]
2478
+ * @param {number} [authAction]
2479
+ * @param {string} [payloadEmailPayloadUserEmail]
2480
+ * @param {string} [payloadEmailPayloadUserPasswordEncrypt]
2481
+ * @param {string} [payloadEmailPayloadDisplayName]
2482
+ * @param {number} [payloadOauth2PayloadPlatform]
2483
+ * @param {string} [authAt]
2484
+ * @param {string} [nonce]
2485
+ * @param {string} [signature] 加密方式: step1: 拼接一个字符串: s = \"cherryin_v1:{auth_type}:{auth_action}:{auth_at}:{nonce}:{payload.k1}:{payload.k2}:...}\" step2: md5(s) step3: hex_encode(step2) Payload 字段参与加密的字段如下: AuthType=Email:(空字符串也需要拼接) * UserEmail | UserPasswordEncrypt | DisplayName AuthType=OAuth2: * Platform )
2486
+ * @param {*} [options] Override http request option.
2487
+ * @throws {RequiredError}
2488
+ */
2489
+ userAuthServiceUserAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, payloadEmailPayloadDisplayName, payloadOauth2PayloadPlatform, authAt, nonce, signature, options) {
2490
+ return UserAuthServiceApiFp(this.configuration).userAuthServiceUserAuthFlowInit(authType, authAction, payloadEmailPayloadUserEmail, payloadEmailPayloadUserPasswordEncrypt, payloadEmailPayloadDisplayName, payloadOauth2PayloadPlatform, authAt, nonce, signature, options).then((request) => request(this.axios, this.basePath));
2491
+ }
2492
+ /**
2493
+ * OAUTH 流程验证回调
2494
+ * @param {string} [code]
2495
+ * @param {string} [state]
2496
+ * @param {number} [platform]
2497
+ * @param {*} [options] Override http request option.
2498
+ * @throws {RequiredError}
2499
+ */
2500
+ userAuthServiceUserAuthFlowOAuthCallback(code, state, platform, options) {
2501
+ return UserAuthServiceApiFp(this.configuration).userAuthServiceUserAuthFlowOAuthCallback(code, state, platform, options).then((request) => request(this.axios, this.basePath));
2502
+ }
2503
+ /**
2504
+ * Auth Token 刷新接口
2505
+ * @param {string} [refreshToken]
2506
+ * @param {string} [authAt]
2507
+ * @param {string} [nonce]
2508
+ * @param {string} [signature]
2509
+ * @param {*} [options] Override http request option.
2510
+ * @throws {RequiredError}
2511
+ */
2512
+ userAuthServiceUserAuthFlowTokenRefresh(refreshToken, authAt, nonce, signature, options) {
2513
+ return UserAuthServiceApiFp(this.configuration).userAuthServiceUserAuthFlowTokenRefresh(refreshToken, authAt, nonce, signature, options).then((request) => request(this.axios, this.basePath));
2514
+ }
2515
+ }
2516
+ /**
2517
+ * UserBalanceServiceApi - axios parameter creator
2518
+ */
2519
+ export const UserBalanceServiceApiAxiosParamCreator = function (configuration) {
2520
+ return {
2521
+ /**
2522
+ * 用户余额变更接口 - 增量操作
2523
+ * @param {boolean} [forceCreate]
2524
+ * @param {string} [uid]
2525
+ * @param {string} [balanceCode] balance_code 余额货币代码. USD/CNY
2526
+ * @param {string} [action] 变更类型,incr/decr
2527
+ * @param {string} [deltaPrepaidBalanceTotal] delta_prepaid_balance_total 预付费余额增量,使用 DECIMAL(24,12) 精度存储
2528
+ * @param {string} [deltaBonusBalanceTotal] delta_prepaid_balance_total 预付费余额增量,使用 DECIMAL(24,12) 精度存储
2529
+ * @param {*} [options] Override http request option.
2530
+ * @throws {RequiredError}
2531
+ */
2532
+ userBalanceServiceUserBalanceChange: (forceCreate_1, uid_1, balanceCode_1, action_1, deltaPrepaidBalanceTotal_1, deltaBonusBalanceTotal_1, ...args_1) => __awaiter(this, [forceCreate_1, uid_1, balanceCode_1, action_1, deltaPrepaidBalanceTotal_1, deltaBonusBalanceTotal_1, ...args_1], void 0, function* (forceCreate, uid, balanceCode, action, deltaPrepaidBalanceTotal, deltaBonusBalanceTotal, options = {}) {
2533
+ const localVarPath = `/v1/user_balance/change`;
2534
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2535
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2536
+ let baseOptions;
2537
+ if (configuration) {
2538
+ baseOptions = configuration.baseOptions;
2539
+ }
2540
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2541
+ const localVarHeaderParameter = {};
2542
+ const localVarQueryParameter = {};
2543
+ if (forceCreate !== undefined) {
2544
+ localVarQueryParameter['force_create'] = forceCreate;
2545
+ }
2546
+ if (uid !== undefined) {
2547
+ localVarQueryParameter['uid'] = uid;
2548
+ }
2549
+ if (balanceCode !== undefined) {
2550
+ localVarQueryParameter['balance_code'] = balanceCode;
2551
+ }
2552
+ if (action !== undefined) {
2553
+ localVarQueryParameter['action'] = action;
2554
+ }
2555
+ if (deltaPrepaidBalanceTotal !== undefined) {
2556
+ localVarQueryParameter['deltaPrepaidBalanceTotal'] = deltaPrepaidBalanceTotal;
2557
+ }
2558
+ if (deltaBonusBalanceTotal !== undefined) {
2559
+ localVarQueryParameter['deltaBonusBalanceTotal'] = deltaBonusBalanceTotal;
2560
+ }
2561
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2562
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2563
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2564
+ return {
2565
+ url: toPathString(localVarUrlObj),
2566
+ options: localVarRequestOptions,
2567
+ };
2568
+ }),
2569
+ /**
2570
+ * 编辑用户余额信息 - 注意,这是直接编辑最终结果值,不是增量操作 NOTE: 后台尽量别用此接口做增量变更操作,避免并发问题导致数据不一致
2571
+ * @param {boolean} [forceCreate]
2572
+ * @param {string} [uid]
2573
+ * @param {string} [dataId]
2574
+ * @param {string} [dataCreatedAt]
2575
+ * @param {string} [dataUpdatedAt]
2576
+ * @param {string} [dataUid]
2577
+ * @param {string} [dataBalanceCode] balance_code 余额货币代码. USD/CNY
2578
+ * @param {string} [dataPrepaidBalanceTotal] prepaid_balance_total 预付费余额总额,使用 DECIMAL(24,12) 精度存储
2579
+ * @param {string} [dataPrepaidBalanceUsed] prepaid_balance_used 已使用预付费余额,使用 DECIMAL(24,12) 精度存储
2580
+ * @param {string} [dataPrepaidBalanceFrozen] prepaid_balance_frozen 冻结预付费余额,使用 DECIMAL(24,12) 精度存储
2581
+ * @param {string} [dataBonusBalanceTotal] bonus_balance_total 赠送余额总额,使用 DECIMAL(24,12) 精度存储
2582
+ * @param {string} [dataBonusBalanceUsed] bonus_balance_used 已使用赠送余额,使用 DECIMAL(24,12) 精度存储
2583
+ * @param {string} [dataBonusBalanceFrozen] bonus_balance_frozen 冻结赠送余额,使用 DECIMAL(24,12) 精度存储
2584
+ * @param {string} [dataVersion]
2585
+ * @param {*} [options] Override http request option.
2586
+ * @throws {RequiredError}
2587
+ */
2588
+ userBalanceServiceUserBalanceEdit: (forceCreate_1, uid_1, dataId_1, dataCreatedAt_1, dataUpdatedAt_1, dataUid_1, dataBalanceCode_1, dataPrepaidBalanceTotal_1, dataPrepaidBalanceUsed_1, dataPrepaidBalanceFrozen_1, dataBonusBalanceTotal_1, dataBonusBalanceUsed_1, dataBonusBalanceFrozen_1, dataVersion_1, ...args_1) => __awaiter(this, [forceCreate_1, uid_1, dataId_1, dataCreatedAt_1, dataUpdatedAt_1, dataUid_1, dataBalanceCode_1, dataPrepaidBalanceTotal_1, dataPrepaidBalanceUsed_1, dataPrepaidBalanceFrozen_1, dataBonusBalanceTotal_1, dataBonusBalanceUsed_1, dataBonusBalanceFrozen_1, dataVersion_1, ...args_1], void 0, function* (forceCreate, uid, dataId, dataCreatedAt, dataUpdatedAt, dataUid, dataBalanceCode, dataPrepaidBalanceTotal, dataPrepaidBalanceUsed, dataPrepaidBalanceFrozen, dataBonusBalanceTotal, dataBonusBalanceUsed, dataBonusBalanceFrozen, dataVersion, options = {}) {
2589
+ const localVarPath = `/v1/user_balance/edit`;
2590
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2591
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2592
+ let baseOptions;
2593
+ if (configuration) {
2594
+ baseOptions = configuration.baseOptions;
2595
+ }
2596
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2597
+ const localVarHeaderParameter = {};
2598
+ const localVarQueryParameter = {};
2599
+ if (forceCreate !== undefined) {
2600
+ localVarQueryParameter['force_create'] = forceCreate;
2601
+ }
2602
+ if (uid !== undefined) {
2603
+ localVarQueryParameter['uid'] = uid;
2604
+ }
2605
+ if (dataId !== undefined) {
2606
+ localVarQueryParameter['data.id'] = dataId;
2607
+ }
2608
+ if (dataCreatedAt !== undefined) {
2609
+ localVarQueryParameter['data.created_at'] = dataCreatedAt;
2610
+ }
2611
+ if (dataUpdatedAt !== undefined) {
2612
+ localVarQueryParameter['data.updated_at'] = dataUpdatedAt;
2613
+ }
2614
+ if (dataUid !== undefined) {
2615
+ localVarQueryParameter['data.uid'] = dataUid;
2616
+ }
2617
+ if (dataBalanceCode !== undefined) {
2618
+ localVarQueryParameter['data.balance_code'] = dataBalanceCode;
2619
+ }
2620
+ if (dataPrepaidBalanceTotal !== undefined) {
2621
+ localVarQueryParameter['data.prepaid_balance_total'] = dataPrepaidBalanceTotal;
2622
+ }
2623
+ if (dataPrepaidBalanceUsed !== undefined) {
2624
+ localVarQueryParameter['data.prepaid_balance_used'] = dataPrepaidBalanceUsed;
2625
+ }
2626
+ if (dataPrepaidBalanceFrozen !== undefined) {
2627
+ localVarQueryParameter['data.prepaid_balance_frozen'] = dataPrepaidBalanceFrozen;
2628
+ }
2629
+ if (dataBonusBalanceTotal !== undefined) {
2630
+ localVarQueryParameter['data.bonus_balance_total'] = dataBonusBalanceTotal;
2631
+ }
2632
+ if (dataBonusBalanceUsed !== undefined) {
2633
+ localVarQueryParameter['data.bonus_balance_used'] = dataBonusBalanceUsed;
2634
+ }
2635
+ if (dataBonusBalanceFrozen !== undefined) {
2636
+ localVarQueryParameter['data.bonus_balance_frozen'] = dataBonusBalanceFrozen;
2637
+ }
2638
+ if (dataVersion !== undefined) {
2639
+ localVarQueryParameter['data.version'] = dataVersion;
2640
+ }
2641
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2642
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2643
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2644
+ return {
2645
+ url: toPathString(localVarUrlObj),
2646
+ options: localVarRequestOptions,
2647
+ };
2648
+ }),
2649
+ /**
2650
+ * 用户余额列表接口
2651
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\"page\"
2652
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\"page_size\"
2653
+ * @param {Array<string>} [uidList] uid_list 用户 ID 列表,空表示不按用户 ID 过滤
2654
+ * @param {*} [options] Override http request option.
2655
+ * @throws {RequiredError}
2656
+ */
2657
+ userBalanceServiceUserBalanceList: (page_1, pageSize_1, uidList_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, uidList_1, ...args_1], void 0, function* (page, pageSize, uidList, options = {}) {
2658
+ const localVarPath = `/v1/user_balance/list`;
2659
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2660
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2661
+ let baseOptions;
2662
+ if (configuration) {
2663
+ baseOptions = configuration.baseOptions;
2664
+ }
2665
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2666
+ const localVarHeaderParameter = {};
2667
+ const localVarQueryParameter = {};
2668
+ if (page !== undefined) {
2669
+ localVarQueryParameter['page'] = page;
2670
+ }
2671
+ if (pageSize !== undefined) {
2672
+ localVarQueryParameter['page_size'] = pageSize;
2673
+ }
2674
+ if (uidList) {
2675
+ localVarQueryParameter['uid_list'] = uidList;
2676
+ }
2677
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2678
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2679
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2680
+ return {
2681
+ url: toPathString(localVarUrlObj),
2682
+ options: localVarRequestOptions,
2683
+ };
2684
+ }),
2685
+ };
2686
+ };
2687
+ /**
2688
+ * UserBalanceServiceApi - functional programming interface
2689
+ */
2690
+ export const UserBalanceServiceApiFp = function (configuration) {
2691
+ const localVarAxiosParamCreator = UserBalanceServiceApiAxiosParamCreator(configuration);
2692
+ return {
2693
+ /**
2694
+ * 用户余额变更接口 - 增量操作
2695
+ * @param {boolean} [forceCreate]
2696
+ * @param {string} [uid]
2697
+ * @param {string} [balanceCode] balance_code 余额货币代码. USD/CNY
2698
+ * @param {string} [action] 变更类型,incr/decr
2699
+ * @param {string} [deltaPrepaidBalanceTotal] delta_prepaid_balance_total 预付费余额增量,使用 DECIMAL(24,12) 精度存储
2700
+ * @param {string} [deltaBonusBalanceTotal] delta_prepaid_balance_total 预付费余额增量,使用 DECIMAL(24,12) 精度存储
2701
+ * @param {*} [options] Override http request option.
2702
+ * @throws {RequiredError}
2703
+ */
2704
+ userBalanceServiceUserBalanceChange(forceCreate, uid, balanceCode, action, deltaPrepaidBalanceTotal, deltaBonusBalanceTotal, options) {
2705
+ return __awaiter(this, void 0, void 0, function* () {
2706
+ var _a, _b, _c;
2707
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userBalanceServiceUserBalanceChange(forceCreate, uid, balanceCode, action, deltaPrepaidBalanceTotal, deltaBonusBalanceTotal, options);
2708
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2709
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserBalanceServiceApi.userBalanceServiceUserBalanceChange']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2710
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2711
+ });
2712
+ },
2713
+ /**
2714
+ * 编辑用户余额信息 - 注意,这是直接编辑最终结果值,不是增量操作 NOTE: 后台尽量别用此接口做增量变更操作,避免并发问题导致数据不一致
2715
+ * @param {boolean} [forceCreate]
2716
+ * @param {string} [uid]
2717
+ * @param {string} [dataId]
2718
+ * @param {string} [dataCreatedAt]
2719
+ * @param {string} [dataUpdatedAt]
2720
+ * @param {string} [dataUid]
2721
+ * @param {string} [dataBalanceCode] balance_code 余额货币代码. USD/CNY
2722
+ * @param {string} [dataPrepaidBalanceTotal] prepaid_balance_total 预付费余额总额,使用 DECIMAL(24,12) 精度存储
2723
+ * @param {string} [dataPrepaidBalanceUsed] prepaid_balance_used 已使用预付费余额,使用 DECIMAL(24,12) 精度存储
2724
+ * @param {string} [dataPrepaidBalanceFrozen] prepaid_balance_frozen 冻结预付费余额,使用 DECIMAL(24,12) 精度存储
2725
+ * @param {string} [dataBonusBalanceTotal] bonus_balance_total 赠送余额总额,使用 DECIMAL(24,12) 精度存储
2726
+ * @param {string} [dataBonusBalanceUsed] bonus_balance_used 已使用赠送余额,使用 DECIMAL(24,12) 精度存储
2727
+ * @param {string} [dataBonusBalanceFrozen] bonus_balance_frozen 冻结赠送余额,使用 DECIMAL(24,12) 精度存储
2728
+ * @param {string} [dataVersion]
2729
+ * @param {*} [options] Override http request option.
2730
+ * @throws {RequiredError}
2731
+ */
2732
+ userBalanceServiceUserBalanceEdit(forceCreate, uid, dataId, dataCreatedAt, dataUpdatedAt, dataUid, dataBalanceCode, dataPrepaidBalanceTotal, dataPrepaidBalanceUsed, dataPrepaidBalanceFrozen, dataBonusBalanceTotal, dataBonusBalanceUsed, dataBonusBalanceFrozen, dataVersion, options) {
2733
+ return __awaiter(this, void 0, void 0, function* () {
2734
+ var _a, _b, _c;
2735
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userBalanceServiceUserBalanceEdit(forceCreate, uid, dataId, dataCreatedAt, dataUpdatedAt, dataUid, dataBalanceCode, dataPrepaidBalanceTotal, dataPrepaidBalanceUsed, dataPrepaidBalanceFrozen, dataBonusBalanceTotal, dataBonusBalanceUsed, dataBonusBalanceFrozen, dataVersion, options);
2736
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2737
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserBalanceServiceApi.userBalanceServiceUserBalanceEdit']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2738
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2739
+ });
2740
+ },
2741
+ /**
2742
+ * 用户余额列表接口
2743
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\&quot;page\&quot;
2744
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\&quot;page_size\&quot;
2745
+ * @param {Array<string>} [uidList] uid_list 用户 ID 列表,空表示不按用户 ID 过滤
2746
+ * @param {*} [options] Override http request option.
2747
+ * @throws {RequiredError}
2748
+ */
2749
+ userBalanceServiceUserBalanceList(page, pageSize, uidList, options) {
2750
+ return __awaiter(this, void 0, void 0, function* () {
2751
+ var _a, _b, _c;
2752
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userBalanceServiceUserBalanceList(page, pageSize, uidList, options);
2753
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2754
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserBalanceServiceApi.userBalanceServiceUserBalanceList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2755
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2756
+ });
2757
+ },
2758
+ };
2759
+ };
2760
+ /**
2761
+ * UserBalanceServiceApi - factory interface
2762
+ */
2763
+ export const UserBalanceServiceApiFactory = function (configuration, basePath, axios) {
2764
+ const localVarFp = UserBalanceServiceApiFp(configuration);
2765
+ return {
2766
+ /**
2767
+ * 用户余额变更接口 - 增量操作
2768
+ * @param {boolean} [forceCreate]
2769
+ * @param {string} [uid]
2770
+ * @param {string} [balanceCode] balance_code 余额货币代码. USD/CNY
2771
+ * @param {string} [action] 变更类型,incr/decr
2772
+ * @param {string} [deltaPrepaidBalanceTotal] delta_prepaid_balance_total 预付费余额增量,使用 DECIMAL(24,12) 精度存储
2773
+ * @param {string} [deltaBonusBalanceTotal] delta_prepaid_balance_total 预付费余额增量,使用 DECIMAL(24,12) 精度存储
2774
+ * @param {*} [options] Override http request option.
2775
+ * @throws {RequiredError}
2776
+ */
2777
+ userBalanceServiceUserBalanceChange(forceCreate, uid, balanceCode, action, deltaPrepaidBalanceTotal, deltaBonusBalanceTotal, options) {
2778
+ return localVarFp.userBalanceServiceUserBalanceChange(forceCreate, uid, balanceCode, action, deltaPrepaidBalanceTotal, deltaBonusBalanceTotal, options).then((request) => request(axios, basePath));
2779
+ },
2780
+ /**
2781
+ * 编辑用户余额信息 - 注意,这是直接编辑最终结果值,不是增量操作 NOTE: 后台尽量别用此接口做增量变更操作,避免并发问题导致数据不一致
2782
+ * @param {boolean} [forceCreate]
2783
+ * @param {string} [uid]
2784
+ * @param {string} [dataId]
2785
+ * @param {string} [dataCreatedAt]
2786
+ * @param {string} [dataUpdatedAt]
2787
+ * @param {string} [dataUid]
2788
+ * @param {string} [dataBalanceCode] balance_code 余额货币代码. USD/CNY
2789
+ * @param {string} [dataPrepaidBalanceTotal] prepaid_balance_total 预付费余额总额,使用 DECIMAL(24,12) 精度存储
2790
+ * @param {string} [dataPrepaidBalanceUsed] prepaid_balance_used 已使用预付费余额,使用 DECIMAL(24,12) 精度存储
2791
+ * @param {string} [dataPrepaidBalanceFrozen] prepaid_balance_frozen 冻结预付费余额,使用 DECIMAL(24,12) 精度存储
2792
+ * @param {string} [dataBonusBalanceTotal] bonus_balance_total 赠送余额总额,使用 DECIMAL(24,12) 精度存储
2793
+ * @param {string} [dataBonusBalanceUsed] bonus_balance_used 已使用赠送余额,使用 DECIMAL(24,12) 精度存储
2794
+ * @param {string} [dataBonusBalanceFrozen] bonus_balance_frozen 冻结赠送余额,使用 DECIMAL(24,12) 精度存储
2795
+ * @param {string} [dataVersion]
2796
+ * @param {*} [options] Override http request option.
2797
+ * @throws {RequiredError}
2798
+ */
2799
+ userBalanceServiceUserBalanceEdit(forceCreate, uid, dataId, dataCreatedAt, dataUpdatedAt, dataUid, dataBalanceCode, dataPrepaidBalanceTotal, dataPrepaidBalanceUsed, dataPrepaidBalanceFrozen, dataBonusBalanceTotal, dataBonusBalanceUsed, dataBonusBalanceFrozen, dataVersion, options) {
2800
+ return localVarFp.userBalanceServiceUserBalanceEdit(forceCreate, uid, dataId, dataCreatedAt, dataUpdatedAt, dataUid, dataBalanceCode, dataPrepaidBalanceTotal, dataPrepaidBalanceUsed, dataPrepaidBalanceFrozen, dataBonusBalanceTotal, dataBonusBalanceUsed, dataBonusBalanceFrozen, dataVersion, options).then((request) => request(axios, basePath));
2801
+ },
2802
+ /**
2803
+ * 用户余额列表接口
2804
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\&quot;page\&quot;
2805
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\&quot;page_size\&quot;
2806
+ * @param {Array<string>} [uidList] uid_list 用户 ID 列表,空表示不按用户 ID 过滤
2807
+ * @param {*} [options] Override http request option.
2808
+ * @throws {RequiredError}
2809
+ */
2810
+ userBalanceServiceUserBalanceList(page, pageSize, uidList, options) {
2811
+ return localVarFp.userBalanceServiceUserBalanceList(page, pageSize, uidList, options).then((request) => request(axios, basePath));
2812
+ },
2813
+ };
2814
+ };
2815
+ /**
2816
+ * UserBalanceServiceApi - object-oriented interface
2817
+ */
2818
+ export class UserBalanceServiceApi extends BaseAPI {
2819
+ /**
2820
+ * 用户余额变更接口 - 增量操作
2821
+ * @param {boolean} [forceCreate]
2822
+ * @param {string} [uid]
2823
+ * @param {string} [balanceCode] balance_code 余额货币代码. USD/CNY
2824
+ * @param {string} [action] 变更类型,incr/decr
2825
+ * @param {string} [deltaPrepaidBalanceTotal] delta_prepaid_balance_total 预付费余额增量,使用 DECIMAL(24,12) 精度存储
2826
+ * @param {string} [deltaBonusBalanceTotal] delta_prepaid_balance_total 预付费余额增量,使用 DECIMAL(24,12) 精度存储
2827
+ * @param {*} [options] Override http request option.
2828
+ * @throws {RequiredError}
2829
+ */
2830
+ userBalanceServiceUserBalanceChange(forceCreate, uid, balanceCode, action, deltaPrepaidBalanceTotal, deltaBonusBalanceTotal, options) {
2831
+ return UserBalanceServiceApiFp(this.configuration).userBalanceServiceUserBalanceChange(forceCreate, uid, balanceCode, action, deltaPrepaidBalanceTotal, deltaBonusBalanceTotal, options).then((request) => request(this.axios, this.basePath));
2832
+ }
2833
+ /**
2834
+ * 编辑用户余额信息 - 注意,这是直接编辑最终结果值,不是增量操作 NOTE: 后台尽量别用此接口做增量变更操作,避免并发问题导致数据不一致
2835
+ * @param {boolean} [forceCreate]
2836
+ * @param {string} [uid]
2837
+ * @param {string} [dataId]
2838
+ * @param {string} [dataCreatedAt]
2839
+ * @param {string} [dataUpdatedAt]
2840
+ * @param {string} [dataUid]
2841
+ * @param {string} [dataBalanceCode] balance_code 余额货币代码. USD/CNY
2842
+ * @param {string} [dataPrepaidBalanceTotal] prepaid_balance_total 预付费余额总额,使用 DECIMAL(24,12) 精度存储
2843
+ * @param {string} [dataPrepaidBalanceUsed] prepaid_balance_used 已使用预付费余额,使用 DECIMAL(24,12) 精度存储
2844
+ * @param {string} [dataPrepaidBalanceFrozen] prepaid_balance_frozen 冻结预付费余额,使用 DECIMAL(24,12) 精度存储
2845
+ * @param {string} [dataBonusBalanceTotal] bonus_balance_total 赠送余额总额,使用 DECIMAL(24,12) 精度存储
2846
+ * @param {string} [dataBonusBalanceUsed] bonus_balance_used 已使用赠送余额,使用 DECIMAL(24,12) 精度存储
2847
+ * @param {string} [dataBonusBalanceFrozen] bonus_balance_frozen 冻结赠送余额,使用 DECIMAL(24,12) 精度存储
2848
+ * @param {string} [dataVersion]
2849
+ * @param {*} [options] Override http request option.
2850
+ * @throws {RequiredError}
2851
+ */
2852
+ userBalanceServiceUserBalanceEdit(forceCreate, uid, dataId, dataCreatedAt, dataUpdatedAt, dataUid, dataBalanceCode, dataPrepaidBalanceTotal, dataPrepaidBalanceUsed, dataPrepaidBalanceFrozen, dataBonusBalanceTotal, dataBonusBalanceUsed, dataBonusBalanceFrozen, dataVersion, options) {
2853
+ return UserBalanceServiceApiFp(this.configuration).userBalanceServiceUserBalanceEdit(forceCreate, uid, dataId, dataCreatedAt, dataUpdatedAt, dataUid, dataBalanceCode, dataPrepaidBalanceTotal, dataPrepaidBalanceUsed, dataPrepaidBalanceFrozen, dataBonusBalanceTotal, dataBonusBalanceUsed, dataBonusBalanceFrozen, dataVersion, options).then((request) => request(this.axios, this.basePath));
2854
+ }
2855
+ /**
2856
+ * 用户余额列表接口
2857
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\&quot;page\&quot;
2858
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\&quot;page_size\&quot;
2859
+ * @param {Array<string>} [uidList] uid_list 用户 ID 列表,空表示不按用户 ID 过滤
2860
+ * @param {*} [options] Override http request option.
2861
+ * @throws {RequiredError}
2862
+ */
2863
+ userBalanceServiceUserBalanceList(page, pageSize, uidList, options) {
2864
+ return UserBalanceServiceApiFp(this.configuration).userBalanceServiceUserBalanceList(page, pageSize, uidList, options).then((request) => request(this.axios, this.basePath));
2865
+ }
2866
+ }
2867
+ /**
2868
+ * UserLabelServiceApi - axios parameter creator
2869
+ */
2870
+ export const UserLabelServiceApiAxiosParamCreator = function (configuration) {
2871
+ return {
2872
+ /**
2873
+ *
2874
+ * @param {LabelCreateRequest} labelCreateRequest
2875
+ * @param {*} [options] Override http request option.
2876
+ * @throws {RequiredError}
2877
+ */
2878
+ userLabelServiceLabelCreate: (labelCreateRequest_1, ...args_1) => __awaiter(this, [labelCreateRequest_1, ...args_1], void 0, function* (labelCreateRequest, options = {}) {
2879
+ // verify required parameter 'labelCreateRequest' is not null or undefined
2880
+ assertParamExists('userLabelServiceLabelCreate', 'labelCreateRequest', labelCreateRequest);
2881
+ const localVarPath = `/admin/label/create`;
2882
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2883
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2884
+ let baseOptions;
2885
+ if (configuration) {
2886
+ baseOptions = configuration.baseOptions;
2887
+ }
2888
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2889
+ const localVarHeaderParameter = {};
2890
+ const localVarQueryParameter = {};
2891
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2892
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2893
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2894
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2895
+ localVarRequestOptions.data = serializeDataIfNeeded(labelCreateRequest, localVarRequestOptions, configuration);
2896
+ return {
2897
+ url: toPathString(localVarUrlObj),
2898
+ options: localVarRequestOptions,
2899
+ };
2900
+ }),
2901
+ /**
2902
+ *
2903
+ * @param {LabelDeleteRequest} labelDeleteRequest
2904
+ * @param {*} [options] Override http request option.
2905
+ * @throws {RequiredError}
2906
+ */
2907
+ userLabelServiceLabelDelete: (labelDeleteRequest_1, ...args_1) => __awaiter(this, [labelDeleteRequest_1, ...args_1], void 0, function* (labelDeleteRequest, options = {}) {
2908
+ // verify required parameter 'labelDeleteRequest' is not null or undefined
2909
+ assertParamExists('userLabelServiceLabelDelete', 'labelDeleteRequest', labelDeleteRequest);
2910
+ const localVarPath = `/admin/label/delete`;
2911
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2912
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2913
+ let baseOptions;
2914
+ if (configuration) {
2915
+ baseOptions = configuration.baseOptions;
2916
+ }
2917
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
2918
+ const localVarHeaderParameter = {};
2919
+ const localVarQueryParameter = {};
2920
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2921
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2922
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2923
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2924
+ localVarRequestOptions.data = serializeDataIfNeeded(labelDeleteRequest, localVarRequestOptions, configuration);
2925
+ return {
2926
+ url: toPathString(localVarUrlObj),
2927
+ options: localVarRequestOptions,
2928
+ };
2929
+ }),
2930
+ /**
2931
+ *
2932
+ * @param {LabelUpdateRequest} labelUpdateRequest
2933
+ * @param {*} [options] Override http request option.
2934
+ * @throws {RequiredError}
2935
+ */
2936
+ userLabelServiceLabelGet: (labelUpdateRequest_1, ...args_1) => __awaiter(this, [labelUpdateRequest_1, ...args_1], void 0, function* (labelUpdateRequest, options = {}) {
2937
+ // verify required parameter 'labelUpdateRequest' is not null or undefined
2938
+ assertParamExists('userLabelServiceLabelGet', 'labelUpdateRequest', labelUpdateRequest);
2939
+ const localVarPath = `/admin/label/get`;
2940
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2941
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2942
+ let baseOptions;
2943
+ if (configuration) {
2944
+ baseOptions = configuration.baseOptions;
2945
+ }
2946
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2947
+ const localVarHeaderParameter = {};
2948
+ const localVarQueryParameter = {};
2949
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2950
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2951
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2952
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2953
+ localVarRequestOptions.data = serializeDataIfNeeded(labelUpdateRequest, localVarRequestOptions, configuration);
2954
+ return {
2955
+ url: toPathString(localVarUrlObj),
2956
+ options: localVarRequestOptions,
2957
+ };
2958
+ }),
2959
+ /**
2960
+ *
2961
+ * @param {LabelListRequest} labelListRequest
2962
+ * @param {*} [options] Override http request option.
2963
+ * @throws {RequiredError}
2964
+ */
2965
+ userLabelServiceLabelList: (labelListRequest_1, ...args_1) => __awaiter(this, [labelListRequest_1, ...args_1], void 0, function* (labelListRequest, options = {}) {
2966
+ // verify required parameter 'labelListRequest' is not null or undefined
2967
+ assertParamExists('userLabelServiceLabelList', 'labelListRequest', labelListRequest);
2968
+ const localVarPath = `/admin/label/list`;
2969
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2970
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2971
+ let baseOptions;
2972
+ if (configuration) {
2973
+ baseOptions = configuration.baseOptions;
2974
+ }
2975
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2976
+ const localVarHeaderParameter = {};
2977
+ const localVarQueryParameter = {};
2978
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2979
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2980
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2981
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2982
+ localVarRequestOptions.data = serializeDataIfNeeded(labelListRequest, localVarRequestOptions, configuration);
2983
+ return {
2984
+ url: toPathString(localVarUrlObj),
2985
+ options: localVarRequestOptions,
2986
+ };
2987
+ }),
2988
+ /**
2989
+ *
2990
+ * @param {LabelUpdateRequest} labelUpdateRequest
2991
+ * @param {*} [options] Override http request option.
2992
+ * @throws {RequiredError}
2993
+ */
2994
+ userLabelServiceLabelUpdate: (labelUpdateRequest_1, ...args_1) => __awaiter(this, [labelUpdateRequest_1, ...args_1], void 0, function* (labelUpdateRequest, options = {}) {
2995
+ // verify required parameter 'labelUpdateRequest' is not null or undefined
2996
+ assertParamExists('userLabelServiceLabelUpdate', 'labelUpdateRequest', labelUpdateRequest);
2997
+ const localVarPath = `/admin/label/update`;
2998
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2999
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3000
+ let baseOptions;
3001
+ if (configuration) {
3002
+ baseOptions = configuration.baseOptions;
3003
+ }
3004
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3005
+ const localVarHeaderParameter = {};
3006
+ const localVarQueryParameter = {};
3007
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3008
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3009
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3010
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3011
+ localVarRequestOptions.data = serializeDataIfNeeded(labelUpdateRequest, localVarRequestOptions, configuration);
3012
+ return {
3013
+ url: toPathString(localVarUrlObj),
3014
+ options: localVarRequestOptions,
3015
+ };
3016
+ }),
3017
+ /**
3018
+ *
3019
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\&quot;page\&quot;
3020
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\&quot;page_size\&quot;
3021
+ * @param {Array<string>} [uidList]
3022
+ * @param {Array<string>} [labelIds]
3023
+ * @param {*} [options] Override http request option.
3024
+ * @throws {RequiredError}
3025
+ */
3026
+ userLabelServiceUserLabelList: (page_1, pageSize_1, uidList_1, labelIds_1, ...args_1) => __awaiter(this, [page_1, pageSize_1, uidList_1, labelIds_1, ...args_1], void 0, function* (page, pageSize, uidList, labelIds, options = {}) {
3027
+ const localVarPath = `/admin/users/label/list`;
3028
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3029
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3030
+ let baseOptions;
3031
+ if (configuration) {
3032
+ baseOptions = configuration.baseOptions;
3033
+ }
3034
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3035
+ const localVarHeaderParameter = {};
3036
+ const localVarQueryParameter = {};
3037
+ if (page !== undefined) {
3038
+ localVarQueryParameter['page'] = page;
3039
+ }
3040
+ if (pageSize !== undefined) {
3041
+ localVarQueryParameter['page_size'] = pageSize;
3042
+ }
3043
+ if (uidList) {
3044
+ localVarQueryParameter['uid_list'] = uidList;
3045
+ }
3046
+ if (labelIds) {
3047
+ localVarQueryParameter['label_ids'] = labelIds;
3048
+ }
3049
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3050
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3051
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3052
+ return {
3053
+ url: toPathString(localVarUrlObj),
3054
+ options: localVarRequestOptions,
3055
+ };
3056
+ }),
3057
+ /**
3058
+ *
3059
+ * @param {UserLabelPairChangeRequest} userLabelPairChangeRequest
3060
+ * @param {*} [options] Override http request option.
3061
+ * @throws {RequiredError}
3062
+ */
3063
+ userLabelServiceUserLabelPairChange: (userLabelPairChangeRequest_1, ...args_1) => __awaiter(this, [userLabelPairChangeRequest_1, ...args_1], void 0, function* (userLabelPairChangeRequest, options = {}) {
3064
+ // verify required parameter 'userLabelPairChangeRequest' is not null or undefined
3065
+ assertParamExists('userLabelServiceUserLabelPairChange', 'userLabelPairChangeRequest', userLabelPairChangeRequest);
3066
+ const localVarPath = `/admin/users/label/change`;
3067
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3068
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3069
+ let baseOptions;
3070
+ if (configuration) {
3071
+ baseOptions = configuration.baseOptions;
3072
+ }
3073
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3074
+ const localVarHeaderParameter = {};
3075
+ const localVarQueryParameter = {};
3076
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3077
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3078
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3079
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3080
+ localVarRequestOptions.data = serializeDataIfNeeded(userLabelPairChangeRequest, localVarRequestOptions, configuration);
3081
+ return {
3082
+ url: toPathString(localVarUrlObj),
3083
+ options: localVarRequestOptions,
3084
+ };
3085
+ }),
3086
+ };
3087
+ };
3088
+ /**
3089
+ * UserLabelServiceApi - functional programming interface
3090
+ */
3091
+ export const UserLabelServiceApiFp = function (configuration) {
3092
+ const localVarAxiosParamCreator = UserLabelServiceApiAxiosParamCreator(configuration);
3093
+ return {
3094
+ /**
3095
+ *
3096
+ * @param {LabelCreateRequest} labelCreateRequest
3097
+ * @param {*} [options] Override http request option.
3098
+ * @throws {RequiredError}
3099
+ */
3100
+ userLabelServiceLabelCreate(labelCreateRequest, options) {
3101
+ return __awaiter(this, void 0, void 0, function* () {
3102
+ var _a, _b, _c;
3103
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userLabelServiceLabelCreate(labelCreateRequest, options);
3104
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3105
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserLabelServiceApi.userLabelServiceLabelCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3106
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3107
+ });
3108
+ },
3109
+ /**
3110
+ *
3111
+ * @param {LabelDeleteRequest} labelDeleteRequest
3112
+ * @param {*} [options] Override http request option.
3113
+ * @throws {RequiredError}
3114
+ */
3115
+ userLabelServiceLabelDelete(labelDeleteRequest, options) {
3116
+ return __awaiter(this, void 0, void 0, function* () {
3117
+ var _a, _b, _c;
3118
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userLabelServiceLabelDelete(labelDeleteRequest, options);
3119
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3120
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserLabelServiceApi.userLabelServiceLabelDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3121
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3122
+ });
3123
+ },
3124
+ /**
3125
+ *
3126
+ * @param {LabelUpdateRequest} labelUpdateRequest
3127
+ * @param {*} [options] Override http request option.
3128
+ * @throws {RequiredError}
3129
+ */
3130
+ userLabelServiceLabelGet(labelUpdateRequest, options) {
3131
+ return __awaiter(this, void 0, void 0, function* () {
3132
+ var _a, _b, _c;
3133
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userLabelServiceLabelGet(labelUpdateRequest, options);
3134
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3135
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserLabelServiceApi.userLabelServiceLabelGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3136
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3137
+ });
3138
+ },
3139
+ /**
3140
+ *
3141
+ * @param {LabelListRequest} labelListRequest
3142
+ * @param {*} [options] Override http request option.
3143
+ * @throws {RequiredError}
3144
+ */
3145
+ userLabelServiceLabelList(labelListRequest, options) {
3146
+ return __awaiter(this, void 0, void 0, function* () {
3147
+ var _a, _b, _c;
3148
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userLabelServiceLabelList(labelListRequest, options);
3149
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3150
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserLabelServiceApi.userLabelServiceLabelList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3151
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3152
+ });
3153
+ },
3154
+ /**
3155
+ *
3156
+ * @param {LabelUpdateRequest} labelUpdateRequest
3157
+ * @param {*} [options] Override http request option.
3158
+ * @throws {RequiredError}
3159
+ */
3160
+ userLabelServiceLabelUpdate(labelUpdateRequest, options) {
3161
+ return __awaiter(this, void 0, void 0, function* () {
3162
+ var _a, _b, _c;
3163
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userLabelServiceLabelUpdate(labelUpdateRequest, options);
3164
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3165
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserLabelServiceApi.userLabelServiceLabelUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3166
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3167
+ });
3168
+ },
3169
+ /**
3170
+ *
3171
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\&quot;page\&quot;
3172
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\&quot;page_size\&quot;
3173
+ * @param {Array<string>} [uidList]
3174
+ * @param {Array<string>} [labelIds]
3175
+ * @param {*} [options] Override http request option.
3176
+ * @throws {RequiredError}
3177
+ */
3178
+ userLabelServiceUserLabelList(page, pageSize, uidList, labelIds, options) {
3179
+ return __awaiter(this, void 0, void 0, function* () {
3180
+ var _a, _b, _c;
3181
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userLabelServiceUserLabelList(page, pageSize, uidList, labelIds, options);
3182
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3183
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserLabelServiceApi.userLabelServiceUserLabelList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3184
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3185
+ });
3186
+ },
3187
+ /**
3188
+ *
3189
+ * @param {UserLabelPairChangeRequest} userLabelPairChangeRequest
3190
+ * @param {*} [options] Override http request option.
3191
+ * @throws {RequiredError}
3192
+ */
3193
+ userLabelServiceUserLabelPairChange(userLabelPairChangeRequest, options) {
3194
+ return __awaiter(this, void 0, void 0, function* () {
3195
+ var _a, _b, _c;
3196
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userLabelServiceUserLabelPairChange(userLabelPairChangeRequest, options);
3197
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3198
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserLabelServiceApi.userLabelServiceUserLabelPairChange']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3199
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3200
+ });
3201
+ },
3202
+ };
3203
+ };
3204
+ /**
3205
+ * UserLabelServiceApi - factory interface
3206
+ */
3207
+ export const UserLabelServiceApiFactory = function (configuration, basePath, axios) {
3208
+ const localVarFp = UserLabelServiceApiFp(configuration);
3209
+ return {
3210
+ /**
3211
+ *
3212
+ * @param {LabelCreateRequest} labelCreateRequest
3213
+ * @param {*} [options] Override http request option.
3214
+ * @throws {RequiredError}
3215
+ */
3216
+ userLabelServiceLabelCreate(labelCreateRequest, options) {
3217
+ return localVarFp.userLabelServiceLabelCreate(labelCreateRequest, options).then((request) => request(axios, basePath));
3218
+ },
3219
+ /**
3220
+ *
3221
+ * @param {LabelDeleteRequest} labelDeleteRequest
3222
+ * @param {*} [options] Override http request option.
3223
+ * @throws {RequiredError}
3224
+ */
3225
+ userLabelServiceLabelDelete(labelDeleteRequest, options) {
3226
+ return localVarFp.userLabelServiceLabelDelete(labelDeleteRequest, options).then((request) => request(axios, basePath));
3227
+ },
3228
+ /**
3229
+ *
3230
+ * @param {LabelUpdateRequest} labelUpdateRequest
3231
+ * @param {*} [options] Override http request option.
3232
+ * @throws {RequiredError}
3233
+ */
3234
+ userLabelServiceLabelGet(labelUpdateRequest, options) {
3235
+ return localVarFp.userLabelServiceLabelGet(labelUpdateRequest, options).then((request) => request(axios, basePath));
3236
+ },
3237
+ /**
3238
+ *
3239
+ * @param {LabelListRequest} labelListRequest
3240
+ * @param {*} [options] Override http request option.
3241
+ * @throws {RequiredError}
3242
+ */
3243
+ userLabelServiceLabelList(labelListRequest, options) {
3244
+ return localVarFp.userLabelServiceLabelList(labelListRequest, options).then((request) => request(axios, basePath));
3245
+ },
3246
+ /**
3247
+ *
3248
+ * @param {LabelUpdateRequest} labelUpdateRequest
3249
+ * @param {*} [options] Override http request option.
3250
+ * @throws {RequiredError}
3251
+ */
3252
+ userLabelServiceLabelUpdate(labelUpdateRequest, options) {
3253
+ return localVarFp.userLabelServiceLabelUpdate(labelUpdateRequest, options).then((request) => request(axios, basePath));
3254
+ },
3255
+ /**
3256
+ *
3257
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\&quot;page\&quot;
3258
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\&quot;page_size\&quot;
3259
+ * @param {Array<string>} [uidList]
3260
+ * @param {Array<string>} [labelIds]
3261
+ * @param {*} [options] Override http request option.
3262
+ * @throws {RequiredError}
3263
+ */
3264
+ userLabelServiceUserLabelList(page, pageSize, uidList, labelIds, options) {
3265
+ return localVarFp.userLabelServiceUserLabelList(page, pageSize, uidList, labelIds, options).then((request) => request(axios, basePath));
3266
+ },
3267
+ /**
3268
+ *
3269
+ * @param {UserLabelPairChangeRequest} userLabelPairChangeRequest
3270
+ * @param {*} [options] Override http request option.
3271
+ * @throws {RequiredError}
3272
+ */
3273
+ userLabelServiceUserLabelPairChange(userLabelPairChangeRequest, options) {
3274
+ return localVarFp.userLabelServiceUserLabelPairChange(userLabelPairChangeRequest, options).then((request) => request(axios, basePath));
3275
+ },
3276
+ };
3277
+ };
3278
+ /**
3279
+ * UserLabelServiceApi - object-oriented interface
3280
+ */
3281
+ export class UserLabelServiceApi extends BaseAPI {
3282
+ /**
3283
+ *
3284
+ * @param {LabelCreateRequest} labelCreateRequest
3285
+ * @param {*} [options] Override http request option.
3286
+ * @throws {RequiredError}
3287
+ */
3288
+ userLabelServiceLabelCreate(labelCreateRequest, options) {
3289
+ return UserLabelServiceApiFp(this.configuration).userLabelServiceLabelCreate(labelCreateRequest, options).then((request) => request(this.axios, this.basePath));
3290
+ }
3291
+ /**
3292
+ *
3293
+ * @param {LabelDeleteRequest} labelDeleteRequest
3294
+ * @param {*} [options] Override http request option.
3295
+ * @throws {RequiredError}
3296
+ */
3297
+ userLabelServiceLabelDelete(labelDeleteRequest, options) {
3298
+ return UserLabelServiceApiFp(this.configuration).userLabelServiceLabelDelete(labelDeleteRequest, options).then((request) => request(this.axios, this.basePath));
3299
+ }
3300
+ /**
3301
+ *
3302
+ * @param {LabelUpdateRequest} labelUpdateRequest
3303
+ * @param {*} [options] Override http request option.
3304
+ * @throws {RequiredError}
3305
+ */
3306
+ userLabelServiceLabelGet(labelUpdateRequest, options) {
3307
+ return UserLabelServiceApiFp(this.configuration).userLabelServiceLabelGet(labelUpdateRequest, options).then((request) => request(this.axios, this.basePath));
3308
+ }
3309
+ /**
3310
+ *
3311
+ * @param {LabelListRequest} labelListRequest
3312
+ * @param {*} [options] Override http request option.
3313
+ * @throws {RequiredError}
3314
+ */
3315
+ userLabelServiceLabelList(labelListRequest, options) {
3316
+ return UserLabelServiceApiFp(this.configuration).userLabelServiceLabelList(labelListRequest, options).then((request) => request(this.axios, this.basePath));
3317
+ }
3318
+ /**
3319
+ *
3320
+ * @param {LabelUpdateRequest} labelUpdateRequest
3321
+ * @param {*} [options] Override http request option.
3322
+ * @throws {RequiredError}
3323
+ */
3324
+ userLabelServiceLabelUpdate(labelUpdateRequest, options) {
3325
+ return UserLabelServiceApiFp(this.configuration).userLabelServiceLabelUpdate(labelUpdateRequest, options).then((request) => request(this.axios, this.basePath));
3326
+ }
3327
+ /**
3328
+ *
3329
+ * @param {number} [page] page 页码,从 1 开始 Page number, starts from 1 默认值: 1 Default: 1 @gotags: form:\&quot;page\&quot;
3330
+ * @param {number} [pageSize] page_size 每页数量 Number of items per page 默认值: 20,最大值: 100 Default: 20, Maximum: 100 @gotags: form:\&quot;page_size\&quot;
3331
+ * @param {Array<string>} [uidList]
3332
+ * @param {Array<string>} [labelIds]
3333
+ * @param {*} [options] Override http request option.
3334
+ * @throws {RequiredError}
3335
+ */
3336
+ userLabelServiceUserLabelList(page, pageSize, uidList, labelIds, options) {
3337
+ return UserLabelServiceApiFp(this.configuration).userLabelServiceUserLabelList(page, pageSize, uidList, labelIds, options).then((request) => request(this.axios, this.basePath));
3338
+ }
3339
+ /**
3340
+ *
3341
+ * @param {UserLabelPairChangeRequest} userLabelPairChangeRequest
3342
+ * @param {*} [options] Override http request option.
3343
+ * @throws {RequiredError}
3344
+ */
3345
+ userLabelServiceUserLabelPairChange(userLabelPairChangeRequest, options) {
3346
+ return UserLabelServiceApiFp(this.configuration).userLabelServiceUserLabelPairChange(userLabelPairChangeRequest, options).then((request) => request(this.axios, this.basePath));
3347
+ }
3348
+ }
3349
+ /**
3350
+ * UserModelServiceApi - axios parameter creator
3351
+ */
3352
+ export const UserModelServiceApiAxiosParamCreator = function (configuration) {
3353
+ return {
3354
+ /**
3355
+ *
3356
+ * @param {string} [currencyCode] 货币代码过滤,例如 \&quot;USD\&quot;, \&quot;CNY\&quot; Filter by currency code, e.g., \&quot;USD\&quot;, \&quot;CNY\&quot; @gotags: form:\&quot;currency_code\&quot;
3357
+ * @param {string} [beforeId] ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. @gotags: form:\&quot;before_id\&quot;
3358
+ * @param {string} [afterId] ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. @gotags: form:\&quot;after_id\&quot;
3359
+ * @param {string} [limit] Number of items to return per page. Defaults to 0. Ranges from 1 to 1000. if limit is 0, server will return all models. @gotags: form:\&quot;limit\&quot;
3360
+ * @param {boolean} [withPricing] optional extra info @gotags: form:\&quot;with_pricing\&quot;
3361
+ * @param {*} [options] Override http request option.
3362
+ * @throws {RequiredError}
3363
+ */
3364
+ userModelServiceUserModelList: (currencyCode_1, beforeId_1, afterId_1, limit_1, withPricing_1, ...args_1) => __awaiter(this, [currencyCode_1, beforeId_1, afterId_1, limit_1, withPricing_1, ...args_1], void 0, function* (currencyCode, beforeId, afterId, limit, withPricing, options = {}) {
3365
+ const localVarPath = `/v1/models`;
3366
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3367
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3368
+ let baseOptions;
3369
+ if (configuration) {
3370
+ baseOptions = configuration.baseOptions;
3371
+ }
3372
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
3373
+ const localVarHeaderParameter = {};
3374
+ const localVarQueryParameter = {};
3375
+ if (currencyCode !== undefined) {
3376
+ localVarQueryParameter['currency_code'] = currencyCode;
3377
+ }
3378
+ if (beforeId !== undefined) {
3379
+ localVarQueryParameter['beforeId'] = beforeId;
3380
+ }
3381
+ if (afterId !== undefined) {
3382
+ localVarQueryParameter['afterId'] = afterId;
3383
+ }
3384
+ if (limit !== undefined) {
3385
+ localVarQueryParameter['limit'] = limit;
3386
+ }
3387
+ if (withPricing !== undefined) {
3388
+ localVarQueryParameter['with_pricing'] = withPricing;
3389
+ }
3390
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3391
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3392
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3393
+ return {
3394
+ url: toPathString(localVarUrlObj),
3395
+ options: localVarRequestOptions,
3396
+ };
3397
+ }),
3398
+ };
3399
+ };
3400
+ /**
3401
+ * UserModelServiceApi - functional programming interface
3402
+ */
3403
+ export const UserModelServiceApiFp = function (configuration) {
3404
+ const localVarAxiosParamCreator = UserModelServiceApiAxiosParamCreator(configuration);
3405
+ return {
3406
+ /**
3407
+ *
3408
+ * @param {string} [currencyCode] 货币代码过滤,例如 \&quot;USD\&quot;, \&quot;CNY\&quot; Filter by currency code, e.g., \&quot;USD\&quot;, \&quot;CNY\&quot; @gotags: form:\&quot;currency_code\&quot;
3409
+ * @param {string} [beforeId] ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. @gotags: form:\&quot;before_id\&quot;
3410
+ * @param {string} [afterId] ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. @gotags: form:\&quot;after_id\&quot;
3411
+ * @param {string} [limit] Number of items to return per page. Defaults to 0. Ranges from 1 to 1000. if limit is 0, server will return all models. @gotags: form:\&quot;limit\&quot;
3412
+ * @param {boolean} [withPricing] optional extra info @gotags: form:\&quot;with_pricing\&quot;
3413
+ * @param {*} [options] Override http request option.
3414
+ * @throws {RequiredError}
3415
+ */
3416
+ userModelServiceUserModelList(currencyCode, beforeId, afterId, limit, withPricing, options) {
3417
+ return __awaiter(this, void 0, void 0, function* () {
3418
+ var _a, _b, _c;
3419
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userModelServiceUserModelList(currencyCode, beforeId, afterId, limit, withPricing, options);
3420
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3421
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserModelServiceApi.userModelServiceUserModelList']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3422
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3423
+ });
3424
+ },
3425
+ };
3426
+ };
3427
+ /**
3428
+ * UserModelServiceApi - factory interface
3429
+ */
3430
+ export const UserModelServiceApiFactory = function (configuration, basePath, axios) {
3431
+ const localVarFp = UserModelServiceApiFp(configuration);
3432
+ return {
3433
+ /**
3434
+ *
3435
+ * @param {string} [currencyCode] 货币代码过滤,例如 \&quot;USD\&quot;, \&quot;CNY\&quot; Filter by currency code, e.g., \&quot;USD\&quot;, \&quot;CNY\&quot; @gotags: form:\&quot;currency_code\&quot;
3436
+ * @param {string} [beforeId] ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. @gotags: form:\&quot;before_id\&quot;
3437
+ * @param {string} [afterId] ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. @gotags: form:\&quot;after_id\&quot;
3438
+ * @param {string} [limit] Number of items to return per page. Defaults to 0. Ranges from 1 to 1000. if limit is 0, server will return all models. @gotags: form:\&quot;limit\&quot;
3439
+ * @param {boolean} [withPricing] optional extra info @gotags: form:\&quot;with_pricing\&quot;
3440
+ * @param {*} [options] Override http request option.
3441
+ * @throws {RequiredError}
3442
+ */
3443
+ userModelServiceUserModelList(currencyCode, beforeId, afterId, limit, withPricing, options) {
3444
+ return localVarFp.userModelServiceUserModelList(currencyCode, beforeId, afterId, limit, withPricing, options).then((request) => request(axios, basePath));
3445
+ },
3446
+ };
3447
+ };
3448
+ /**
3449
+ * UserModelServiceApi - object-oriented interface
3450
+ */
3451
+ export class UserModelServiceApi extends BaseAPI {
3452
+ /**
3453
+ *
3454
+ * @param {string} [currencyCode] 货币代码过滤,例如 \&quot;USD\&quot;, \&quot;CNY\&quot; Filter by currency code, e.g., \&quot;USD\&quot;, \&quot;CNY\&quot; @gotags: form:\&quot;currency_code\&quot;
3455
+ * @param {string} [beforeId] ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately before this object. @gotags: form:\&quot;before_id\&quot;
3456
+ * @param {string} [afterId] ID of the object to use as a cursor for pagination. When provided, returns the page of results immediately after this object. @gotags: form:\&quot;after_id\&quot;
3457
+ * @param {string} [limit] Number of items to return per page. Defaults to 0. Ranges from 1 to 1000. if limit is 0, server will return all models. @gotags: form:\&quot;limit\&quot;
3458
+ * @param {boolean} [withPricing] optional extra info @gotags: form:\&quot;with_pricing\&quot;
3459
+ * @param {*} [options] Override http request option.
3460
+ * @throws {RequiredError}
3461
+ */
3462
+ userModelServiceUserModelList(currencyCode, beforeId, afterId, limit, withPricing, options) {
3463
+ return UserModelServiceApiFp(this.configuration).userModelServiceUserModelList(currencyCode, beforeId, afterId, limit, withPricing, options).then((request) => request(this.axios, this.basePath));
3464
+ }
3465
+ }
3466
+ /**
3467
+ * UserPayServiceApi - axios parameter creator
3468
+ */
3469
+ export const UserPayServiceApiAxiosParamCreator = function (configuration) {
3470
+ return {
3471
+ /**
3472
+ *
3473
+ * @param {string} [currencyCode]
3474
+ * @param {number} [chargeAmount]
3475
+ * @param {*} [options] Override http request option.
3476
+ * @throws {RequiredError}
3477
+ */
3478
+ userPayServiceUserPayStripeCheckout: (currencyCode_1, chargeAmount_1, ...args_1) => __awaiter(this, [currencyCode_1, chargeAmount_1, ...args_1], void 0, function* (currencyCode, chargeAmount, options = {}) {
3479
+ const localVarPath = `/api/v1/user/pay/stripe/checkout`;
3480
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3481
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3482
+ let baseOptions;
3483
+ if (configuration) {
3484
+ baseOptions = configuration.baseOptions;
3485
+ }
3486
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3487
+ const localVarHeaderParameter = {};
3488
+ const localVarQueryParameter = {};
3489
+ if (currencyCode !== undefined) {
3490
+ localVarQueryParameter['currencyCode'] = currencyCode;
3491
+ }
3492
+ if (chargeAmount !== undefined) {
3493
+ localVarQueryParameter['chargeAmount'] = chargeAmount;
3494
+ }
3495
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3496
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3497
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3498
+ return {
3499
+ url: toPathString(localVarUrlObj),
3500
+ options: localVarRequestOptions,
3501
+ };
3502
+ }),
3503
+ };
3504
+ };
3505
+ /**
3506
+ * UserPayServiceApi - functional programming interface
3507
+ */
3508
+ export const UserPayServiceApiFp = function (configuration) {
3509
+ const localVarAxiosParamCreator = UserPayServiceApiAxiosParamCreator(configuration);
3510
+ return {
3511
+ /**
3512
+ *
3513
+ * @param {string} [currencyCode]
3514
+ * @param {number} [chargeAmount]
3515
+ * @param {*} [options] Override http request option.
3516
+ * @throws {RequiredError}
3517
+ */
3518
+ userPayServiceUserPayStripeCheckout(currencyCode, chargeAmount, options) {
3519
+ return __awaiter(this, void 0, void 0, function* () {
3520
+ var _a, _b, _c;
3521
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userPayServiceUserPayStripeCheckout(currencyCode, chargeAmount, options);
3522
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3523
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserPayServiceApi.userPayServiceUserPayStripeCheckout']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3524
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3525
+ });
3526
+ },
3527
+ };
3528
+ };
3529
+ /**
3530
+ * UserPayServiceApi - factory interface
3531
+ */
3532
+ export const UserPayServiceApiFactory = function (configuration, basePath, axios) {
3533
+ const localVarFp = UserPayServiceApiFp(configuration);
3534
+ return {
3535
+ /**
3536
+ *
3537
+ * @param {string} [currencyCode]
3538
+ * @param {number} [chargeAmount]
3539
+ * @param {*} [options] Override http request option.
3540
+ * @throws {RequiredError}
3541
+ */
3542
+ userPayServiceUserPayStripeCheckout(currencyCode, chargeAmount, options) {
3543
+ return localVarFp.userPayServiceUserPayStripeCheckout(currencyCode, chargeAmount, options).then((request) => request(axios, basePath));
3544
+ },
3545
+ };
3546
+ };
3547
+ /**
3548
+ * UserPayServiceApi - object-oriented interface
3549
+ */
3550
+ export class UserPayServiceApi extends BaseAPI {
3551
+ /**
3552
+ *
3553
+ * @param {string} [currencyCode]
3554
+ * @param {number} [chargeAmount]
3555
+ * @param {*} [options] Override http request option.
3556
+ * @throws {RequiredError}
3557
+ */
3558
+ userPayServiceUserPayStripeCheckout(currencyCode, chargeAmount, options) {
3559
+ return UserPayServiceApiFp(this.configuration).userPayServiceUserPayStripeCheckout(currencyCode, chargeAmount, options).then((request) => request(this.axios, this.basePath));
3560
+ }
3561
+ }
3562
+ /**
3563
+ * UserPoralServiceApi - axios parameter creator
3564
+ */
3565
+ export const UserPoralServiceApiAxiosParamCreator = function (configuration) {
3566
+ return {
3567
+ /**
3568
+ *
3569
+ * @param {*} [options] Override http request option.
3570
+ * @throws {RequiredError}
3571
+ */
3572
+ userPoralServiceUserMeInfo: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
3573
+ const localVarPath = `/api/v1/user/me/info`;
3574
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3575
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3576
+ let baseOptions;
3577
+ if (configuration) {
3578
+ baseOptions = configuration.baseOptions;
3579
+ }
3580
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
3581
+ const localVarHeaderParameter = {};
3582
+ const localVarQueryParameter = {};
3583
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3584
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3585
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3586
+ return {
3587
+ url: toPathString(localVarUrlObj),
3588
+ options: localVarRequestOptions,
3589
+ };
3590
+ }),
3591
+ };
3592
+ };
3593
+ /**
3594
+ * UserPoralServiceApi - functional programming interface
3595
+ */
3596
+ export const UserPoralServiceApiFp = function (configuration) {
3597
+ const localVarAxiosParamCreator = UserPoralServiceApiAxiosParamCreator(configuration);
3598
+ return {
3599
+ /**
3600
+ *
3601
+ * @param {*} [options] Override http request option.
3602
+ * @throws {RequiredError}
3603
+ */
3604
+ userPoralServiceUserMeInfo(options) {
3605
+ return __awaiter(this, void 0, void 0, function* () {
3606
+ var _a, _b, _c;
3607
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.userPoralServiceUserMeInfo(options);
3608
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3609
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['UserPoralServiceApi.userPoralServiceUserMeInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3610
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3611
+ });
3612
+ },
3613
+ };
3614
+ };
3615
+ /**
3616
+ * UserPoralServiceApi - factory interface
3617
+ */
3618
+ export const UserPoralServiceApiFactory = function (configuration, basePath, axios) {
3619
+ const localVarFp = UserPoralServiceApiFp(configuration);
3620
+ return {
3621
+ /**
3622
+ *
3623
+ * @param {*} [options] Override http request option.
3624
+ * @throws {RequiredError}
3625
+ */
3626
+ userPoralServiceUserMeInfo(options) {
3627
+ return localVarFp.userPoralServiceUserMeInfo(options).then((request) => request(axios, basePath));
3628
+ },
3629
+ };
3630
+ };
3631
+ /**
3632
+ * UserPoralServiceApi - object-oriented interface
3633
+ */
3634
+ export class UserPoralServiceApi extends BaseAPI {
3635
+ /**
3636
+ *
3637
+ * @param {*} [options] Override http request option.
3638
+ * @throws {RequiredError}
3639
+ */
3640
+ userPoralServiceUserMeInfo(options) {
3641
+ return UserPoralServiceApiFp(this.configuration).userPoralServiceUserMeInfo(options).then((request) => request(this.axios, this.basePath));
3642
+ }
3643
+ }