@botpress/api 0.29.1 → 0.29.3

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/index.js CHANGED
@@ -251507,7 +251507,7 @@ __export(src_exports, {
251507
251507
  });
251508
251508
  module.exports = __toCommonJS(src_exports);
251509
251509
 
251510
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
251510
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.17_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
251511
251511
  var import_zod_openapi = __toESM(require_src(), 1);
251512
251512
  var import_zod_openapi2 = __toESM(require_src(), 1);
251513
251513
  var import_path = __toESM(require("path"), 1);
@@ -251553,7 +251553,7 @@ var title = (str2) => {
251553
251553
  return str2.split(/(?=[A-Z])|[\.\-\s_]/).map((s2) => s2.trim()).filter((s2) => !!s2).map((s2) => capitalize(s2.toLowerCase())).join(" ");
251554
251554
  };
251555
251555
 
251556
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
251556
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.17_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
251557
251557
  var import_decompress = __toESM(require_decompress(), 1);
251558
251558
  var import_fs3 = __toESM(require("fs"), 1);
251559
251559
  var import_promises = __toESM(require("fs/promises"), 1);
@@ -254470,7 +254470,7 @@ var {
254470
254470
  mergeConfig: mergeConfig2
254471
254471
  } = axios_default;
254472
254472
 
254473
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
254473
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.17_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
254474
254474
  var import_json_schema_to_typescript = __toESM(require_src3(), 1);
254475
254475
  var import_fs4 = __toESM(require("fs"), 1);
254476
254476
  var import_path3 = __toESM(require("path"), 1);
@@ -258806,7 +258806,7 @@ async function openapiTS(schema3, options = {}) {
258806
258806
  }
258807
258807
  var dist_default = openapiTS;
258808
258808
 
258809
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
258809
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.17_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
258810
258810
  var import_openapi3_ts = __toESM(require_dist3(), 1);
258811
258811
  var import_verror2 = __toESM(require_verror(), 1);
258812
258812
  var import_verror3 = __toESM(require_verror(), 1);
@@ -262447,7 +262447,7 @@ var z = /* @__PURE__ */ Object.freeze({
262447
262447
  ZodError
262448
262448
  });
262449
262449
 
262450
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.15_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
262450
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.10.17_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
262451
262451
  var import_openapi_parser = __toESM(require_lib10(), 1);
262452
262452
  var import_json_schema_to_typescript2 = __toESM(require_src3(), 1);
262453
262453
  var import_zod_openapi4 = __toESM(require_src(), 1);
@@ -262904,7 +262904,8 @@ var client_node_exports = {};
262904
262904
  __export2(client_node_exports, {
262905
262905
  generateIndex: () => generateIndex,
262906
262906
  generateModels: () => generateModels,
262907
- generateOperations: () => generateOperations
262907
+ generateOperations: () => generateOperations,
262908
+ generateToAxios: () => generateToAxios
262908
262909
  });
262909
262910
  var entries = (obj) => Object.entries(obj);
262910
262911
  function filterObject(obj, fn) {
@@ -263239,16 +263240,18 @@ function getError(err: Error) {
263239
263240
  return errorFrom(err)
263240
263241
  }
263241
263242
  `;
263242
- var GET_AXIOS_REQ_FUNCTION = `// ensures axios request is properly formatted
263243
- type Primitive = string | number | boolean
263244
- type Value<P extends Primitive> = P | P[] | Record<string, P>
263245
- type QueryValue = Value<string> | Value<boolean> | Value<number> | undefined
263246
- type AnyQueryParams = Record<string, QueryValue>
263247
- type HeaderValue = string | undefined
263248
- type AnyHeaderParams = Record<string, HeaderValue>
263249
- type AnyBodyParams = Record<string, any>
263243
+ var GET_AXIOS_REQ_FUNCTION = `
263244
+ import { AxiosRequestConfig } from "axios"
263245
+ import qs from "qs"
263250
263246
 
263251
- type ParsedRequest = {
263247
+ export type Primitive = string | number | boolean
263248
+ export type Value<P extends Primitive> = P | P[] | Record<string, P>
263249
+ export type QueryValue = Value<string> | Value<boolean> | Value<number> | undefined
263250
+ export type AnyQueryParams = Record<string, QueryValue>
263251
+ export type HeaderValue = string | undefined
263252
+ export type AnyHeaderParams = Record<string, HeaderValue>
263253
+ export type AnyBodyParams = Record<string, any>
263254
+ export type ParsedRequest = {
263252
263255
  method: string
263253
263256
  path: string
263254
263257
  query: AnyQueryParams
@@ -263259,7 +263262,7 @@ type ParsedRequest = {
263259
263262
  const isDefined = <T>(pair: [string, T | undefined]): pair is [string, T] => pair[1] !== undefined
263260
263263
 
263261
263264
  export const toAxiosRequest = (req: ParsedRequest): AxiosRequestConfig => {
263262
- const { method, path: url, query, headers: headerParams, body: data } = req
263265
+ const { method, path, query, headers: headerParams, body: data } = req
263263
263266
 
263264
263267
  // prepare headers
263265
263268
  const headerEntries: [string, string][] = Object.entries(headerParams).filter(isDefined)
@@ -263267,13 +263270,13 @@ export const toAxiosRequest = (req: ParsedRequest): AxiosRequestConfig => {
263267
263270
 
263268
263271
  // prepare query params
263269
263272
  const queryString = qs.stringify(query, { encode: true, arrayFormat: 'repeat', allowDots: true })
263270
- const params = new URLSearchParams(queryString)
263273
+
263274
+ const url = queryString ? [path, queryString].join('?') : path
263271
263275
 
263272
263276
  return {
263273
263277
  method,
263274
263278
  url,
263275
263279
  headers,
263276
- params,
263277
263280
  data,
263278
263281
  }
263279
263282
  }
@@ -263389,13 +263392,16 @@ ${responseCode}`;
263389
263392
  await writeTs(file, code);
263390
263393
  }
263391
263394
  };
263395
+ var generateToAxios = async (toAxiosFile) => {
263396
+ await writeTs(toAxiosFile, GET_AXIOS_REQ_FUNCTION);
263397
+ };
263392
263398
  var generateIndex = async (state2, indexFile) => {
263393
263399
  const operationsByName = import_lodash.default.mapKeys(state2.operations, (v) => v.name);
263394
263400
  let indexCode = [
263395
263401
  `${HEADER}`,
263396
- "import qs from 'qs'",
263397
- "import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'",
263402
+ "import axios, { AxiosInstance } from 'axios'",
263398
263403
  "import { errorFrom } from './errors'",
263404
+ "import { toAxiosRequest } from './to-axios'",
263399
263405
  ""
263400
263406
  ].join("\n");
263401
263407
  for (const [name] of Object.entries(operationsByName)) {
@@ -263409,14 +263415,21 @@ var generateIndex = async (state2, indexFile) => {
263409
263415
  `;
263410
263416
  }
263411
263417
  indexCode += "\n";
263418
+ indexCode += [
263419
+ "export type ClientProps = {",
263420
+ " toAxiosRequest: typeof toAxiosRequest",
263421
+ "}"
263422
+ ].join("\n");
263423
+ indexCode += "\n\n";
263412
263424
  indexCode += "export class Client {\n\n";
263413
- indexCode += "constructor(private axiosInstance: AxiosInstance) {}\n\n";
263425
+ indexCode += " public constructor(private axiosInstance: AxiosInstance, private props: Partial<ClientProps> = {}) {}\n\n";
263414
263426
  for (const [name, operation] of Object.entries(operationsByName)) {
263415
263427
  const { inputName, resName } = Names.of(name);
263416
263428
  indexCode += [
263417
263429
  ` public readonly ${name} = async (input: ${name}.${inputName}): Promise<${name}.${resName}> => {`,
263418
263430
  ` const { path, headers, query, body } = ${name}.parseReq(input)`,
263419
- ` const axiosReq = toAxiosRequest({`,
263431
+ ` const mapper = this.props.toAxiosRequest ?? toAxiosRequest`,
263432
+ ` const axiosReq = mapper({`,
263420
263433
  ` method: "${operation.method}",`,
263421
263434
  " path,",
263422
263435
  " headers: { ...headers },",
@@ -263431,8 +263444,6 @@ var generateIndex = async (state2, indexFile) => {
263431
263444
  }
263432
263445
  indexCode += "}\n\n";
263433
263446
  indexCode += `${GET_ERROR_FUNCTION}
263434
- `;
263435
- indexCode += `${GET_AXIOS_REQ_FUNCTION}
263436
263447
  `;
263437
263448
  await writeTs(indexFile, indexCode);
263438
263449
  };
@@ -264208,14 +264219,17 @@ var generateClientWithOpapi = async (state2, dir) => {
264208
264219
  const errorsFile = import_path.default.join(dir, "errors.ts");
264209
264220
  const indexFile = import_path.default.join(dir, "index.ts");
264210
264221
  const operationsDir = import_path.default.join(dir, "operations");
264222
+ const toAxiosFile = import_path.default.join(dir, "to-axios.ts");
264211
264223
  import_fs.default.mkdirSync(operationsDir, { recursive: true });
264212
264224
  log_default.info("Generating models");
264213
264225
  await client_node_exports.generateModels(state2, modelsFile);
264214
264226
  log_default.info("Generating operations");
264215
264227
  await client_node_exports.generateOperations(state2, operationsDir);
264216
- log_default.info("generating errors file");
264228
+ log_default.info("Generating errors file");
264217
264229
  const errorsFileContent = generateErrors(state2.errors ?? []);
264218
264230
  await import_fs.default.promises.writeFile(errorsFile, errorsFileContent);
264231
+ log_default.info("Generating to-axios file");
264232
+ await client_node_exports.generateToAxios(toAxiosFile);
264219
264233
  log_default.info("Generating index file");
264220
264234
  await client_node_exports.generateIndex(state2, indexFile);
264221
264235
  };
@@ -273085,7 +273099,7 @@ var state = {
273085
273099
  "createFile": {
273086
273100
  "name": "createFile",
273087
273101
  "path": "/v1/files",
273088
- "description": "Creates a file.",
273102
+ "description": "Creates a file. Once the file is created, use the uploadUrl from the response body to upload the file content, using a PUT request.",
273089
273103
  "method": "post",
273090
273104
  "requestBody": {
273091
273105
  "description": "The file to upload.",
@@ -273202,18 +273216,18 @@ var state = {
273202
273216
  "status": {
273203
273217
  "type": "string",
273204
273218
  "enum": [
273205
- "UPLOAD_PENDING",
273206
- "UPLOAD_FAILED",
273207
- "UPLOAD_COMPLETED",
273208
- "INDEXING_PENDING",
273209
- "INDEXING_FAILED",
273210
- "INDEXING_COMPLETED"
273219
+ "upload_pending",
273220
+ "upload_failed",
273221
+ "upload_completed",
273222
+ "indexing_pending",
273223
+ "indexing_failed",
273224
+ "indexing_completed"
273211
273225
  ],
273212
- "description": 'Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field.'
273226
+ "description": 'Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field.'
273213
273227
  },
273214
273228
  "failedStatusReason": {
273215
273229
  "type": "string",
273216
- "description": 'If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure.'
273230
+ "description": 'If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure.'
273217
273231
  },
273218
273232
  "uploadUrl": {
273219
273233
  "type": "string",
@@ -273363,18 +273377,18 @@ var state = {
273363
273377
  "status": {
273364
273378
  "type": "string",
273365
273379
  "enum": [
273366
- "UPLOAD_PENDING",
273367
- "UPLOAD_FAILED",
273368
- "UPLOAD_COMPLETED",
273369
- "INDEXING_PENDING",
273370
- "INDEXING_FAILED",
273371
- "INDEXING_COMPLETED"
273380
+ "upload_pending",
273381
+ "upload_failed",
273382
+ "upload_completed",
273383
+ "indexing_pending",
273384
+ "indexing_failed",
273385
+ "indexing_completed"
273372
273386
  ],
273373
- "description": 'Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field.'
273387
+ "description": 'Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field.'
273374
273388
  },
273375
273389
  "failedStatusReason": {
273376
273390
  "type": "string",
273377
- "description": 'If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure.'
273391
+ "description": 'If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure.'
273378
273392
  }
273379
273393
  },
273380
273394
  "required": [
@@ -273495,18 +273509,18 @@ var state = {
273495
273509
  "status": {
273496
273510
  "type": "string",
273497
273511
  "enum": [
273498
- "UPLOAD_PENDING",
273499
- "UPLOAD_FAILED",
273500
- "UPLOAD_COMPLETED",
273501
- "INDEXING_PENDING",
273502
- "INDEXING_FAILED",
273503
- "INDEXING_COMPLETED"
273512
+ "upload_pending",
273513
+ "upload_failed",
273514
+ "upload_completed",
273515
+ "indexing_pending",
273516
+ "indexing_failed",
273517
+ "indexing_completed"
273504
273518
  ],
273505
- "description": 'Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field.'
273519
+ "description": 'Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field.'
273506
273520
  },
273507
273521
  "failedStatusReason": {
273508
273522
  "type": "string",
273509
- "description": 'If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure.'
273523
+ "description": 'If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure.'
273510
273524
  }
273511
273525
  },
273512
273526
  "required": [
@@ -273646,18 +273660,18 @@ var state = {
273646
273660
  "status": {
273647
273661
  "type": "string",
273648
273662
  "enum": [
273649
- "UPLOAD_PENDING",
273650
- "UPLOAD_FAILED",
273651
- "UPLOAD_COMPLETED",
273652
- "INDEXING_PENDING",
273653
- "INDEXING_FAILED",
273654
- "INDEXING_COMPLETED"
273663
+ "upload_pending",
273664
+ "upload_failed",
273665
+ "upload_completed",
273666
+ "indexing_pending",
273667
+ "indexing_failed",
273668
+ "indexing_completed"
273655
273669
  ],
273656
- "description": 'Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field.'
273670
+ "description": 'Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field.'
273657
273671
  },
273658
273672
  "failedStatusReason": {
273659
273673
  "type": "string",
273660
- "description": 'If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure.'
273674
+ "description": 'If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure.'
273661
273675
  }
273662
273676
  },
273663
273677
  "required": [
@@ -274693,7 +274707,7 @@ var state = {
274693
274707
  "title": "Botpress API",
274694
274708
  "description": "API for Botpress Cloud",
274695
274709
  "server": "https://api.botpress.cloud",
274696
- "version": "0.29.1",
274710
+ "version": "0.29.3",
274697
274711
  "prefix": "v1"
274698
274712
  },
274699
274713
  "errors": [
@@ -277210,18 +277224,18 @@ var state = {
277210
277224
  "status": {
277211
277225
  "type": "string",
277212
277226
  "enum": [
277213
- "UPLOAD_PENDING",
277214
- "UPLOAD_FAILED",
277215
- "UPLOAD_COMPLETED",
277216
- "INDEXING_PENDING",
277217
- "INDEXING_FAILED",
277218
- "INDEXING_COMPLETED"
277227
+ "upload_pending",
277228
+ "upload_failed",
277229
+ "upload_completed",
277230
+ "indexing_pending",
277231
+ "indexing_failed",
277232
+ "indexing_completed"
277219
277233
  ],
277220
- "description": 'Status of the file. If the status is "UPLOAD_PENDING", the file content has not been uploaded yet. The status will be set to "UPLOAD_COMPLETED" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "UPLOAD_FAILED" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "INDEXING_PENDING" status (the "UPLOAD_COMPLETED" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "INDEXING_COMPLETED". If the indexing failed the status will be set to "INDEXING_FAILED" and the reason for the failure will be available in the `failedStatusReason` field.'
277234
+ "description": 'Status of the file. If the status is "upload_pending", the file content has not been uploaded yet. The status will be set to "upload_completed" once the file content has been uploaded successfully.\n\nIf the upload failed for any reason (e.g. exceeding the storage quota or the maximum file size limit) the status will be set to "upload_failed" and the reason for the failure will be available in the `failedStatusReason` field of the file.\n\nHowever, if the file has been uploaded and the `index` attribute was set to `true` on the file, the status will immediately transition to the "indexing_pending" status (the "upload_completed" status step will be skipped).\n\nOnce the indexing is completed and the file is ready to be used for searching its status will be set to "indexing_completed". If the indexing failed the status will be set to "indexing_failed" and the reason for the failure will be available in the `failedStatusReason` field.'
277221
277235
  },
277222
277236
  "failedStatusReason": {
277223
277237
  "type": "string",
277224
- "description": 'If the file status is "UPLOAD_FAILED" or "INDEXING_FAILED" this will contain the reason of the failure.'
277238
+ "description": 'If the file status is "upload_failed" or "indexing_failed" this will contain the reason of the failure.'
277225
277239
  }
277226
277240
  },
277227
277241
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.29.1",
3
+ "version": "0.29.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -23,6 +23,6 @@
23
23
  "zod": "^3.22.4"
24
24
  },
25
25
  "dependencies": {
26
- "@bpinternal/opapi": "0.10.15"
26
+ "@bpinternal/opapi": "0.10.17"
27
27
  }
28
28
  }