@quantcdn/quant-client 4.19.0 → 4.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * QuantCDN API
5
5
  * Unified API for QuantCDN Admin and QuantCloud Platform services
6
6
  *
7
- * The version of the OpenAPI document: 4.19.0
7
+ * The version of the OpenAPI document: 4.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -300,6 +300,17 @@ export const ListTasks200ResponseTasksInnerStatusEnum = {
300
300
  Cancelled: 'cancelled',
301
301
  Blocked: 'blocked'
302
302
  };
303
+ export const OaiChatCompletions200ResponseChoicesInnerFinishReasonEnum = {
304
+ Stop: 'stop',
305
+ ToolCalls: 'tool_calls',
306
+ Length: 'length'
307
+ };
308
+ export const OaiChatCompletionsRequestMessagesInnerRoleEnum = {
309
+ System: 'system',
310
+ User: 'user',
311
+ Assistant: 'assistant',
312
+ Tool: 'tool'
313
+ };
303
314
  export const PatchEnvironmentComposeRequestSpotConfigurationStrategyEnum = {
304
315
  Off: 'off',
305
316
  SpotOnly: 'spot-only',
@@ -10825,20 +10836,24 @@ export const CommandsApiAxiosParamCreator = function (configuration) {
10825
10836
  *
10826
10837
  * @summary Create a command for an environment
10827
10838
  * @param {string} organisation The organisation ID
10839
+ * @param {string} application The application ID
10828
10840
  * @param {string} environment The environment ID
10829
10841
  * @param {CreateCommandRequest} createCommandRequest
10830
10842
  * @param {*} [options] Override http request option.
10831
10843
  * @throws {RequiredError}
10832
10844
  */
10833
- createCommand: (organisation_1, environment_1, createCommandRequest_1, ...args_1) => __awaiter(this, [organisation_1, environment_1, createCommandRequest_1, ...args_1], void 0, function* (organisation, environment, createCommandRequest, options = {}) {
10845
+ createCommand: (organisation_1, application_1, environment_1, createCommandRequest_1, ...args_1) => __awaiter(this, [organisation_1, application_1, environment_1, createCommandRequest_1, ...args_1], void 0, function* (organisation, application, environment, createCommandRequest, options = {}) {
10834
10846
  // verify required parameter 'organisation' is not null or undefined
10835
10847
  assertParamExists('createCommand', 'organisation', organisation);
10848
+ // verify required parameter 'application' is not null or undefined
10849
+ assertParamExists('createCommand', 'application', application);
10836
10850
  // verify required parameter 'environment' is not null or undefined
10837
10851
  assertParamExists('createCommand', 'environment', environment);
10838
10852
  // verify required parameter 'createCommandRequest' is not null or undefined
10839
10853
  assertParamExists('createCommand', 'createCommandRequest', createCommandRequest);
10840
- const localVarPath = `/api/v3/organizations/{organisation}/environments/{environment}/commands`
10854
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/commands`
10841
10855
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
10856
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
10842
10857
  .replace(`{${"environment"}}`, encodeURIComponent(String(environment)));
10843
10858
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
10844
10859
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -10866,20 +10881,24 @@ export const CommandsApiAxiosParamCreator = function (configuration) {
10866
10881
  *
10867
10882
  * @summary Get a command
10868
10883
  * @param {string} organisation The organisation ID
10884
+ * @param {string} application The application ID
10869
10885
  * @param {string} environment The environment ID
10870
- * @param {string} command The command ID
10886
+ * @param {string} command The command run ID
10871
10887
  * @param {*} [options] Override http request option.
10872
10888
  * @throws {RequiredError}
10873
10889
  */
10874
- getCommand: (organisation_1, environment_1, command_1, ...args_1) => __awaiter(this, [organisation_1, environment_1, command_1, ...args_1], void 0, function* (organisation, environment, command, options = {}) {
10890
+ getCommand: (organisation_1, application_1, environment_1, command_1, ...args_1) => __awaiter(this, [organisation_1, application_1, environment_1, command_1, ...args_1], void 0, function* (organisation, application, environment, command, options = {}) {
10875
10891
  // verify required parameter 'organisation' is not null or undefined
10876
10892
  assertParamExists('getCommand', 'organisation', organisation);
10893
+ // verify required parameter 'application' is not null or undefined
10894
+ assertParamExists('getCommand', 'application', application);
10877
10895
  // verify required parameter 'environment' is not null or undefined
10878
10896
  assertParamExists('getCommand', 'environment', environment);
10879
10897
  // verify required parameter 'command' is not null or undefined
10880
10898
  assertParamExists('getCommand', 'command', command);
10881
- const localVarPath = `/api/v3/organizations/{organisation}/environments/{environment}/commands/{command}`
10899
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/commands/{command}`
10882
10900
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
10901
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
10883
10902
  .replace(`{${"environment"}}`, encodeURIComponent(String(environment)))
10884
10903
  .replace(`{${"command"}}`, encodeURIComponent(String(command)));
10885
10904
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -10906,17 +10925,21 @@ export const CommandsApiAxiosParamCreator = function (configuration) {
10906
10925
  *
10907
10926
  * @summary Get all commands for an environment
10908
10927
  * @param {string} organisation The organisation ID
10928
+ * @param {string} application The application ID
10909
10929
  * @param {string} environment The environment ID
10910
10930
  * @param {*} [options] Override http request option.
10911
10931
  * @throws {RequiredError}
10912
10932
  */
10913
- listCommands: (organisation_1, environment_1, ...args_1) => __awaiter(this, [organisation_1, environment_1, ...args_1], void 0, function* (organisation, environment, options = {}) {
10933
+ listCommands: (organisation_1, application_1, environment_1, ...args_1) => __awaiter(this, [organisation_1, application_1, environment_1, ...args_1], void 0, function* (organisation, application, environment, options = {}) {
10914
10934
  // verify required parameter 'organisation' is not null or undefined
10915
10935
  assertParamExists('listCommands', 'organisation', organisation);
10936
+ // verify required parameter 'application' is not null or undefined
10937
+ assertParamExists('listCommands', 'application', application);
10916
10938
  // verify required parameter 'environment' is not null or undefined
10917
10939
  assertParamExists('listCommands', 'environment', environment);
10918
- const localVarPath = `/api/v3/organizations/{organisation}/environments/{environment}/commands`
10940
+ const localVarPath = `/api/v3/organizations/{organisation}/applications/{application}/environments/{environment}/commands`
10919
10941
  .replace(`{${"organisation"}}`, encodeURIComponent(String(organisation)))
10942
+ .replace(`{${"application"}}`, encodeURIComponent(String(application)))
10920
10943
  .replace(`{${"environment"}}`, encodeURIComponent(String(environment)));
10921
10944
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
10922
10945
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -10951,15 +10974,16 @@ export const CommandsApiFp = function (configuration) {
10951
10974
  *
10952
10975
  * @summary Create a command for an environment
10953
10976
  * @param {string} organisation The organisation ID
10977
+ * @param {string} application The application ID
10954
10978
  * @param {string} environment The environment ID
10955
10979
  * @param {CreateCommandRequest} createCommandRequest
10956
10980
  * @param {*} [options] Override http request option.
10957
10981
  * @throws {RequiredError}
10958
10982
  */
10959
- createCommand(organisation, environment, createCommandRequest, options) {
10983
+ createCommand(organisation, application, environment, createCommandRequest, options) {
10960
10984
  return __awaiter(this, void 0, void 0, function* () {
10961
10985
  var _a, _b, _c;
10962
- const localVarAxiosArgs = yield localVarAxiosParamCreator.createCommand(organisation, environment, createCommandRequest, options);
10986
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCommand(organisation, application, environment, createCommandRequest, options);
10963
10987
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
10964
10988
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CommandsApi.createCommand']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
10965
10989
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -10969,15 +10993,16 @@ export const CommandsApiFp = function (configuration) {
10969
10993
  *
10970
10994
  * @summary Get a command
10971
10995
  * @param {string} organisation The organisation ID
10996
+ * @param {string} application The application ID
10972
10997
  * @param {string} environment The environment ID
10973
- * @param {string} command The command ID
10998
+ * @param {string} command The command run ID
10974
10999
  * @param {*} [options] Override http request option.
10975
11000
  * @throws {RequiredError}
10976
11001
  */
10977
- getCommand(organisation, environment, command, options) {
11002
+ getCommand(organisation, application, environment, command, options) {
10978
11003
  return __awaiter(this, void 0, void 0, function* () {
10979
11004
  var _a, _b, _c;
10980
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getCommand(organisation, environment, command, options);
11005
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCommand(organisation, application, environment, command, options);
10981
11006
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
10982
11007
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CommandsApi.getCommand']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
10983
11008
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -10987,14 +11012,15 @@ export const CommandsApiFp = function (configuration) {
10987
11012
  *
10988
11013
  * @summary Get all commands for an environment
10989
11014
  * @param {string} organisation The organisation ID
11015
+ * @param {string} application The application ID
10990
11016
  * @param {string} environment The environment ID
10991
11017
  * @param {*} [options] Override http request option.
10992
11018
  * @throws {RequiredError}
10993
11019
  */
10994
- listCommands(organisation, environment, options) {
11020
+ listCommands(organisation, application, environment, options) {
10995
11021
  return __awaiter(this, void 0, void 0, function* () {
10996
11022
  var _a, _b, _c;
10997
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listCommands(organisation, environment, options);
11023
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listCommands(organisation, application, environment, options);
10998
11024
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
10999
11025
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['CommandsApi.listCommands']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
11000
11026
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -11013,36 +11039,39 @@ export const CommandsApiFactory = function (configuration, basePath, axios) {
11013
11039
  *
11014
11040
  * @summary Create a command for an environment
11015
11041
  * @param {string} organisation The organisation ID
11042
+ * @param {string} application The application ID
11016
11043
  * @param {string} environment The environment ID
11017
11044
  * @param {CreateCommandRequest} createCommandRequest
11018
11045
  * @param {*} [options] Override http request option.
11019
11046
  * @throws {RequiredError}
11020
11047
  */
11021
- createCommand(organisation, environment, createCommandRequest, options) {
11022
- return localVarFp.createCommand(organisation, environment, createCommandRequest, options).then((request) => request(axios, basePath));
11048
+ createCommand(organisation, application, environment, createCommandRequest, options) {
11049
+ return localVarFp.createCommand(organisation, application, environment, createCommandRequest, options).then((request) => request(axios, basePath));
11023
11050
  },
11024
11051
  /**
11025
11052
  *
11026
11053
  * @summary Get a command
11027
11054
  * @param {string} organisation The organisation ID
11055
+ * @param {string} application The application ID
11028
11056
  * @param {string} environment The environment ID
11029
- * @param {string} command The command ID
11057
+ * @param {string} command The command run ID
11030
11058
  * @param {*} [options] Override http request option.
11031
11059
  * @throws {RequiredError}
11032
11060
  */
11033
- getCommand(organisation, environment, command, options) {
11034
- return localVarFp.getCommand(organisation, environment, command, options).then((request) => request(axios, basePath));
11061
+ getCommand(organisation, application, environment, command, options) {
11062
+ return localVarFp.getCommand(organisation, application, environment, command, options).then((request) => request(axios, basePath));
11035
11063
  },
11036
11064
  /**
11037
11065
  *
11038
11066
  * @summary Get all commands for an environment
11039
11067
  * @param {string} organisation The organisation ID
11068
+ * @param {string} application The application ID
11040
11069
  * @param {string} environment The environment ID
11041
11070
  * @param {*} [options] Override http request option.
11042
11071
  * @throws {RequiredError}
11043
11072
  */
11044
- listCommands(organisation, environment, options) {
11045
- return localVarFp.listCommands(organisation, environment, options).then((request) => request(axios, basePath));
11073
+ listCommands(organisation, application, environment, options) {
11074
+ return localVarFp.listCommands(organisation, application, environment, options).then((request) => request(axios, basePath));
11046
11075
  },
11047
11076
  };
11048
11077
  };
@@ -11057,39 +11086,42 @@ export class CommandsApi extends BaseAPI {
11057
11086
  *
11058
11087
  * @summary Create a command for an environment
11059
11088
  * @param {string} organisation The organisation ID
11089
+ * @param {string} application The application ID
11060
11090
  * @param {string} environment The environment ID
11061
11091
  * @param {CreateCommandRequest} createCommandRequest
11062
11092
  * @param {*} [options] Override http request option.
11063
11093
  * @throws {RequiredError}
11064
11094
  * @memberof CommandsApi
11065
11095
  */
11066
- createCommand(organisation, environment, createCommandRequest, options) {
11067
- return CommandsApiFp(this.configuration).createCommand(organisation, environment, createCommandRequest, options).then((request) => request(this.axios, this.basePath));
11096
+ createCommand(organisation, application, environment, createCommandRequest, options) {
11097
+ return CommandsApiFp(this.configuration).createCommand(organisation, application, environment, createCommandRequest, options).then((request) => request(this.axios, this.basePath));
11068
11098
  }
11069
11099
  /**
11070
11100
  *
11071
11101
  * @summary Get a command
11072
11102
  * @param {string} organisation The organisation ID
11103
+ * @param {string} application The application ID
11073
11104
  * @param {string} environment The environment ID
11074
- * @param {string} command The command ID
11105
+ * @param {string} command The command run ID
11075
11106
  * @param {*} [options] Override http request option.
11076
11107
  * @throws {RequiredError}
11077
11108
  * @memberof CommandsApi
11078
11109
  */
11079
- getCommand(organisation, environment, command, options) {
11080
- return CommandsApiFp(this.configuration).getCommand(organisation, environment, command, options).then((request) => request(this.axios, this.basePath));
11110
+ getCommand(organisation, application, environment, command, options) {
11111
+ return CommandsApiFp(this.configuration).getCommand(organisation, application, environment, command, options).then((request) => request(this.axios, this.basePath));
11081
11112
  }
11082
11113
  /**
11083
11114
  *
11084
11115
  * @summary Get all commands for an environment
11085
11116
  * @param {string} organisation The organisation ID
11117
+ * @param {string} application The application ID
11086
11118
  * @param {string} environment The environment ID
11087
11119
  * @param {*} [options] Override http request option.
11088
11120
  * @throws {RequiredError}
11089
11121
  * @memberof CommandsApi
11090
11122
  */
11091
- listCommands(organisation, environment, options) {
11092
- return CommandsApiFp(this.configuration).listCommands(organisation, environment, options).then((request) => request(this.axios, this.basePath));
11123
+ listCommands(organisation, application, environment, options) {
11124
+ return CommandsApiFp(this.configuration).listCommands(organisation, application, environment, options).then((request) => request(this.axios, this.basePath));
11093
11125
  }
11094
11126
  }
11095
11127
  /**
@@ -16193,6 +16225,311 @@ export class KVApi extends BaseAPI {
16193
16225
  return KVApiFp(this.configuration).kVUnlinkFromProject(organization, project, storeId, options).then((request) => request(this.axios, this.basePath));
16194
16226
  }
16195
16227
  }
16228
+ /**
16229
+ * OpenAICompatibilityApi - axios parameter creator
16230
+ * @export
16231
+ */
16232
+ export const OpenAICompatibilityApiAxiosParamCreator = function (configuration) {
16233
+ return {
16234
+ /**
16235
+ * Drop-in replacement for OpenAI\'s POST /v1/chat/completions. Point any OpenAI SDK at base_url=https://<host>/oai/v1 and use a Quant API token (qc_...) as the api_key. Set `stream: true` to receive Server-Sent Events (chat.completion.chunk objects terminated by `data: [DONE]`); otherwise a single chat.completion object is returned. Supports tool/function calling and the standard tool_choice modes.
16236
+ * @summary Create a chat completion (OpenAI-compatible)
16237
+ * @param {OaiChatCompletionsRequest} oaiChatCompletionsRequest
16238
+ * @param {*} [options] Override http request option.
16239
+ * @throws {RequiredError}
16240
+ */
16241
+ oaiChatCompletions: (oaiChatCompletionsRequest_1, ...args_1) => __awaiter(this, [oaiChatCompletionsRequest_1, ...args_1], void 0, function* (oaiChatCompletionsRequest, options = {}) {
16242
+ // verify required parameter 'oaiChatCompletionsRequest' is not null or undefined
16243
+ assertParamExists('oaiChatCompletions', 'oaiChatCompletionsRequest', oaiChatCompletionsRequest);
16244
+ const localVarPath = `/oai/v1/chat/completions`;
16245
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16246
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16247
+ let baseOptions;
16248
+ if (configuration) {
16249
+ baseOptions = configuration.baseOptions;
16250
+ }
16251
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
16252
+ const localVarHeaderParameter = {};
16253
+ const localVarQueryParameter = {};
16254
+ // authentication BearerAuth required
16255
+ // http bearer authentication required
16256
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16257
+ localVarHeaderParameter['Content-Type'] = 'application/json';
16258
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16259
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16260
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16261
+ localVarRequestOptions.data = serializeDataIfNeeded(oaiChatCompletionsRequest, localVarRequestOptions, configuration);
16262
+ return {
16263
+ url: toPathString(localVarUrlObj),
16264
+ options: localVarRequestOptions,
16265
+ };
16266
+ }),
16267
+ /**
16268
+ * Drop-in replacement for OpenAI\'s POST /v1/embeddings. Accepts a single string or an array of strings in `input` and returns a list of embedding objects.
16269
+ * @summary Create embeddings (OpenAI-compatible)
16270
+ * @param {OaiEmbeddingsRequest} oaiEmbeddingsRequest
16271
+ * @param {*} [options] Override http request option.
16272
+ * @throws {RequiredError}
16273
+ */
16274
+ oaiEmbeddings: (oaiEmbeddingsRequest_1, ...args_1) => __awaiter(this, [oaiEmbeddingsRequest_1, ...args_1], void 0, function* (oaiEmbeddingsRequest, options = {}) {
16275
+ // verify required parameter 'oaiEmbeddingsRequest' is not null or undefined
16276
+ assertParamExists('oaiEmbeddings', 'oaiEmbeddingsRequest', oaiEmbeddingsRequest);
16277
+ const localVarPath = `/oai/v1/embeddings`;
16278
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16279
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16280
+ let baseOptions;
16281
+ if (configuration) {
16282
+ baseOptions = configuration.baseOptions;
16283
+ }
16284
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
16285
+ const localVarHeaderParameter = {};
16286
+ const localVarQueryParameter = {};
16287
+ // authentication BearerAuth required
16288
+ // http bearer authentication required
16289
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16290
+ localVarHeaderParameter['Content-Type'] = 'application/json';
16291
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16292
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16293
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16294
+ localVarRequestOptions.data = serializeDataIfNeeded(oaiEmbeddingsRequest, localVarRequestOptions, configuration);
16295
+ return {
16296
+ url: toPathString(localVarUrlObj),
16297
+ options: localVarRequestOptions,
16298
+ };
16299
+ }),
16300
+ /**
16301
+ * Drop-in replacement for OpenAI\'s GET /v1/models/{model}.
16302
+ * @summary Retrieve a model (OpenAI-compatible)
16303
+ * @param {string} model
16304
+ * @param {*} [options] Override http request option.
16305
+ * @throws {RequiredError}
16306
+ */
16307
+ oaiGetModel: (model_1, ...args_1) => __awaiter(this, [model_1, ...args_1], void 0, function* (model, options = {}) {
16308
+ // verify required parameter 'model' is not null or undefined
16309
+ assertParamExists('oaiGetModel', 'model', model);
16310
+ const localVarPath = `/oai/v1/models/{model}`
16311
+ .replace(`{${"model"}}`, encodeURIComponent(String(model)));
16312
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16313
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16314
+ let baseOptions;
16315
+ if (configuration) {
16316
+ baseOptions = configuration.baseOptions;
16317
+ }
16318
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16319
+ const localVarHeaderParameter = {};
16320
+ const localVarQueryParameter = {};
16321
+ // authentication BearerAuth required
16322
+ // http bearer authentication required
16323
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16324
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16325
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16326
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16327
+ return {
16328
+ url: toPathString(localVarUrlObj),
16329
+ options: localVarRequestOptions,
16330
+ };
16331
+ }),
16332
+ /**
16333
+ * Drop-in replacement for OpenAI\'s GET /v1/models. Returns the model ids available to the organisation; pass one of these ids as `model` in chat/embeddings requests.
16334
+ * @summary List available models (OpenAI-compatible)
16335
+ * @param {*} [options] Override http request option.
16336
+ * @throws {RequiredError}
16337
+ */
16338
+ oaiListModels: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
16339
+ const localVarPath = `/oai/v1/models`;
16340
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
16341
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
16342
+ let baseOptions;
16343
+ if (configuration) {
16344
+ baseOptions = configuration.baseOptions;
16345
+ }
16346
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
16347
+ const localVarHeaderParameter = {};
16348
+ const localVarQueryParameter = {};
16349
+ // authentication BearerAuth required
16350
+ // http bearer authentication required
16351
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
16352
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
16353
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16354
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16355
+ return {
16356
+ url: toPathString(localVarUrlObj),
16357
+ options: localVarRequestOptions,
16358
+ };
16359
+ }),
16360
+ };
16361
+ };
16362
+ /**
16363
+ * OpenAICompatibilityApi - functional programming interface
16364
+ * @export
16365
+ */
16366
+ export const OpenAICompatibilityApiFp = function (configuration) {
16367
+ const localVarAxiosParamCreator = OpenAICompatibilityApiAxiosParamCreator(configuration);
16368
+ return {
16369
+ /**
16370
+ * Drop-in replacement for OpenAI\'s POST /v1/chat/completions. Point any OpenAI SDK at base_url=https://<host>/oai/v1 and use a Quant API token (qc_...) as the api_key. Set `stream: true` to receive Server-Sent Events (chat.completion.chunk objects terminated by `data: [DONE]`); otherwise a single chat.completion object is returned. Supports tool/function calling and the standard tool_choice modes.
16371
+ * @summary Create a chat completion (OpenAI-compatible)
16372
+ * @param {OaiChatCompletionsRequest} oaiChatCompletionsRequest
16373
+ * @param {*} [options] Override http request option.
16374
+ * @throws {RequiredError}
16375
+ */
16376
+ oaiChatCompletions(oaiChatCompletionsRequest, options) {
16377
+ return __awaiter(this, void 0, void 0, function* () {
16378
+ var _a, _b, _c;
16379
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.oaiChatCompletions(oaiChatCompletionsRequest, options);
16380
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
16381
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OpenAICompatibilityApi.oaiChatCompletions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
16382
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16383
+ });
16384
+ },
16385
+ /**
16386
+ * Drop-in replacement for OpenAI\'s POST /v1/embeddings. Accepts a single string or an array of strings in `input` and returns a list of embedding objects.
16387
+ * @summary Create embeddings (OpenAI-compatible)
16388
+ * @param {OaiEmbeddingsRequest} oaiEmbeddingsRequest
16389
+ * @param {*} [options] Override http request option.
16390
+ * @throws {RequiredError}
16391
+ */
16392
+ oaiEmbeddings(oaiEmbeddingsRequest, options) {
16393
+ return __awaiter(this, void 0, void 0, function* () {
16394
+ var _a, _b, _c;
16395
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.oaiEmbeddings(oaiEmbeddingsRequest, options);
16396
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
16397
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OpenAICompatibilityApi.oaiEmbeddings']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
16398
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16399
+ });
16400
+ },
16401
+ /**
16402
+ * Drop-in replacement for OpenAI\'s GET /v1/models/{model}.
16403
+ * @summary Retrieve a model (OpenAI-compatible)
16404
+ * @param {string} model
16405
+ * @param {*} [options] Override http request option.
16406
+ * @throws {RequiredError}
16407
+ */
16408
+ oaiGetModel(model, options) {
16409
+ return __awaiter(this, void 0, void 0, function* () {
16410
+ var _a, _b, _c;
16411
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.oaiGetModel(model, options);
16412
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
16413
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OpenAICompatibilityApi.oaiGetModel']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
16414
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16415
+ });
16416
+ },
16417
+ /**
16418
+ * Drop-in replacement for OpenAI\'s GET /v1/models. Returns the model ids available to the organisation; pass one of these ids as `model` in chat/embeddings requests.
16419
+ * @summary List available models (OpenAI-compatible)
16420
+ * @param {*} [options] Override http request option.
16421
+ * @throws {RequiredError}
16422
+ */
16423
+ oaiListModels(options) {
16424
+ return __awaiter(this, void 0, void 0, function* () {
16425
+ var _a, _b, _c;
16426
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.oaiListModels(options);
16427
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
16428
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OpenAICompatibilityApi.oaiListModels']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
16429
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
16430
+ });
16431
+ },
16432
+ };
16433
+ };
16434
+ /**
16435
+ * OpenAICompatibilityApi - factory interface
16436
+ * @export
16437
+ */
16438
+ export const OpenAICompatibilityApiFactory = function (configuration, basePath, axios) {
16439
+ const localVarFp = OpenAICompatibilityApiFp(configuration);
16440
+ return {
16441
+ /**
16442
+ * Drop-in replacement for OpenAI\'s POST /v1/chat/completions. Point any OpenAI SDK at base_url=https://<host>/oai/v1 and use a Quant API token (qc_...) as the api_key. Set `stream: true` to receive Server-Sent Events (chat.completion.chunk objects terminated by `data: [DONE]`); otherwise a single chat.completion object is returned. Supports tool/function calling and the standard tool_choice modes.
16443
+ * @summary Create a chat completion (OpenAI-compatible)
16444
+ * @param {OaiChatCompletionsRequest} oaiChatCompletionsRequest
16445
+ * @param {*} [options] Override http request option.
16446
+ * @throws {RequiredError}
16447
+ */
16448
+ oaiChatCompletions(oaiChatCompletionsRequest, options) {
16449
+ return localVarFp.oaiChatCompletions(oaiChatCompletionsRequest, options).then((request) => request(axios, basePath));
16450
+ },
16451
+ /**
16452
+ * Drop-in replacement for OpenAI\'s POST /v1/embeddings. Accepts a single string or an array of strings in `input` and returns a list of embedding objects.
16453
+ * @summary Create embeddings (OpenAI-compatible)
16454
+ * @param {OaiEmbeddingsRequest} oaiEmbeddingsRequest
16455
+ * @param {*} [options] Override http request option.
16456
+ * @throws {RequiredError}
16457
+ */
16458
+ oaiEmbeddings(oaiEmbeddingsRequest, options) {
16459
+ return localVarFp.oaiEmbeddings(oaiEmbeddingsRequest, options).then((request) => request(axios, basePath));
16460
+ },
16461
+ /**
16462
+ * Drop-in replacement for OpenAI\'s GET /v1/models/{model}.
16463
+ * @summary Retrieve a model (OpenAI-compatible)
16464
+ * @param {string} model
16465
+ * @param {*} [options] Override http request option.
16466
+ * @throws {RequiredError}
16467
+ */
16468
+ oaiGetModel(model, options) {
16469
+ return localVarFp.oaiGetModel(model, options).then((request) => request(axios, basePath));
16470
+ },
16471
+ /**
16472
+ * Drop-in replacement for OpenAI\'s GET /v1/models. Returns the model ids available to the organisation; pass one of these ids as `model` in chat/embeddings requests.
16473
+ * @summary List available models (OpenAI-compatible)
16474
+ * @param {*} [options] Override http request option.
16475
+ * @throws {RequiredError}
16476
+ */
16477
+ oaiListModels(options) {
16478
+ return localVarFp.oaiListModels(options).then((request) => request(axios, basePath));
16479
+ },
16480
+ };
16481
+ };
16482
+ /**
16483
+ * OpenAICompatibilityApi - object-oriented interface
16484
+ * @export
16485
+ * @class OpenAICompatibilityApi
16486
+ * @extends {BaseAPI}
16487
+ */
16488
+ export class OpenAICompatibilityApi extends BaseAPI {
16489
+ /**
16490
+ * Drop-in replacement for OpenAI\'s POST /v1/chat/completions. Point any OpenAI SDK at base_url=https://<host>/oai/v1 and use a Quant API token (qc_...) as the api_key. Set `stream: true` to receive Server-Sent Events (chat.completion.chunk objects terminated by `data: [DONE]`); otherwise a single chat.completion object is returned. Supports tool/function calling and the standard tool_choice modes.
16491
+ * @summary Create a chat completion (OpenAI-compatible)
16492
+ * @param {OaiChatCompletionsRequest} oaiChatCompletionsRequest
16493
+ * @param {*} [options] Override http request option.
16494
+ * @throws {RequiredError}
16495
+ * @memberof OpenAICompatibilityApi
16496
+ */
16497
+ oaiChatCompletions(oaiChatCompletionsRequest, options) {
16498
+ return OpenAICompatibilityApiFp(this.configuration).oaiChatCompletions(oaiChatCompletionsRequest, options).then((request) => request(this.axios, this.basePath));
16499
+ }
16500
+ /**
16501
+ * Drop-in replacement for OpenAI\'s POST /v1/embeddings. Accepts a single string or an array of strings in `input` and returns a list of embedding objects.
16502
+ * @summary Create embeddings (OpenAI-compatible)
16503
+ * @param {OaiEmbeddingsRequest} oaiEmbeddingsRequest
16504
+ * @param {*} [options] Override http request option.
16505
+ * @throws {RequiredError}
16506
+ * @memberof OpenAICompatibilityApi
16507
+ */
16508
+ oaiEmbeddings(oaiEmbeddingsRequest, options) {
16509
+ return OpenAICompatibilityApiFp(this.configuration).oaiEmbeddings(oaiEmbeddingsRequest, options).then((request) => request(this.axios, this.basePath));
16510
+ }
16511
+ /**
16512
+ * Drop-in replacement for OpenAI\'s GET /v1/models/{model}.
16513
+ * @summary Retrieve a model (OpenAI-compatible)
16514
+ * @param {string} model
16515
+ * @param {*} [options] Override http request option.
16516
+ * @throws {RequiredError}
16517
+ * @memberof OpenAICompatibilityApi
16518
+ */
16519
+ oaiGetModel(model, options) {
16520
+ return OpenAICompatibilityApiFp(this.configuration).oaiGetModel(model, options).then((request) => request(this.axios, this.basePath));
16521
+ }
16522
+ /**
16523
+ * Drop-in replacement for OpenAI\'s GET /v1/models. Returns the model ids available to the organisation; pass one of these ids as `model` in chat/embeddings requests.
16524
+ * @summary List available models (OpenAI-compatible)
16525
+ * @param {*} [options] Override http request option.
16526
+ * @throws {RequiredError}
16527
+ * @memberof OpenAICompatibilityApi
16528
+ */
16529
+ oaiListModels(options) {
16530
+ return OpenAICompatibilityApiFp(this.configuration).oaiListModels(options).then((request) => request(this.axios, this.basePath));
16531
+ }
16532
+ }
16196
16533
  /**
16197
16534
  * OrganizationsApi - axios parameter creator
16198
16535
  * @export
@@ -2,7 +2,7 @@
2
2
  * QuantCDN API
3
3
  * Unified API for QuantCDN Admin and QuantCloud Platform services
4
4
  *
5
- * The version of the OpenAPI document: 4.19.0
5
+ * The version of the OpenAPI document: 4.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * QuantCDN API
5
5
  * Unified API for QuantCDN Admin and QuantCloud Platform services
6
6
  *
7
- * The version of the OpenAPI document: 4.19.0
7
+ * The version of the OpenAPI document: 4.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * QuantCDN API
3
3
  * Unified API for QuantCDN Admin and QuantCloud Platform services
4
4
  *
5
- * The version of the OpenAPI document: 4.19.0
5
+ * The version of the OpenAPI document: 4.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * QuantCDN API
5
5
  * Unified API for QuantCDN Admin and QuantCloud Platform services
6
6
  *
7
- * The version of the OpenAPI document: 4.19.0
7
+ * The version of the OpenAPI document: 4.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * QuantCDN API
3
3
  * Unified API for QuantCDN Admin and QuantCloud Platform services
4
4
  *
5
- * The version of the OpenAPI document: 4.19.0
5
+ * The version of the OpenAPI document: 4.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * QuantCDN API
5
5
  * Unified API for QuantCDN Admin and QuantCloud Platform services
6
6
  *
7
- * The version of the OpenAPI document: 4.19.0
7
+ * The version of the OpenAPI document: 4.21.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * QuantCDN API
3
3
  * Unified API for QuantCDN Admin and QuantCloud Platform services
4
4
  *
5
- * The version of the OpenAPI document: 4.19.0
5
+ * The version of the OpenAPI document: 4.21.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).