@botpress/api 0.15.7 → 0.15.9
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/gen/state.d.ts +68 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +292 -175
- package/package.json +2 -2
- package/src/gen/metadata.json +1 -1
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +115 -34
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -259672,11 +259672,12 @@ var require_src3 = __commonJS({
|
|
|
259672
259672
|
// src/index.ts
|
|
259673
259673
|
var src_exports = {};
|
|
259674
259674
|
__export(src_exports, {
|
|
259675
|
-
api: () => api
|
|
259675
|
+
api: () => api,
|
|
259676
|
+
state: () => state
|
|
259676
259677
|
});
|
|
259677
259678
|
module.exports = __toCommonJS(src_exports);
|
|
259678
259679
|
|
|
259679
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.
|
|
259680
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.3_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
259680
259681
|
var import_zod_openapi = __toESM(require_src(), 1);
|
|
259681
259682
|
var import_zod_openapi2 = __toESM(require_src(), 1);
|
|
259682
259683
|
var import_chalk = __toESM(require_source(), 1);
|
|
@@ -259720,19 +259721,19 @@ var title = (str2) => {
|
|
|
259720
259721
|
return str2.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => capitalize(s.toLowerCase())).join(" ");
|
|
259721
259722
|
};
|
|
259722
259723
|
|
|
259723
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.
|
|
259724
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.3_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
259724
259725
|
var import_decompress = __toESM(require_decompress(), 1);
|
|
259725
259726
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
259726
259727
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
259727
259728
|
|
|
259728
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
259729
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/bind.js
|
|
259729
259730
|
function bind(fn, thisArg) {
|
|
259730
259731
|
return function wrap() {
|
|
259731
259732
|
return fn.apply(thisArg, arguments);
|
|
259732
259733
|
};
|
|
259733
259734
|
}
|
|
259734
259735
|
|
|
259735
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
259736
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/utils.js
|
|
259736
259737
|
var { toString } = Object.prototype;
|
|
259737
259738
|
var { getPrototypeOf } = Object;
|
|
259738
259739
|
var kindOf = ((cache) => (thing) => {
|
|
@@ -259950,8 +259951,9 @@ var reduceDescriptors = (obj, reducer) => {
|
|
|
259950
259951
|
const descriptors2 = Object.getOwnPropertyDescriptors(obj);
|
|
259951
259952
|
const reducedDescriptors = {};
|
|
259952
259953
|
forEach(descriptors2, (descriptor, name) => {
|
|
259953
|
-
|
|
259954
|
-
|
|
259954
|
+
let ret;
|
|
259955
|
+
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
259956
|
+
reducedDescriptors[name] = ret || descriptor;
|
|
259955
259957
|
}
|
|
259956
259958
|
});
|
|
259957
259959
|
Object.defineProperties(obj, reducedDescriptors);
|
|
@@ -260088,7 +260090,7 @@ var utils_default = {
|
|
|
260088
260090
|
isThenable
|
|
260089
260091
|
};
|
|
260090
260092
|
|
|
260091
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260093
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/AxiosError.js
|
|
260092
260094
|
function AxiosError(message, code, config, request, response) {
|
|
260093
260095
|
Error.call(this);
|
|
260094
260096
|
if (Error.captureStackTrace) {
|
|
@@ -260155,11 +260157,11 @@ AxiosError.from = (error2, code, config, request, response, customProps) => {
|
|
|
260155
260157
|
};
|
|
260156
260158
|
var AxiosError_default = AxiosError;
|
|
260157
260159
|
|
|
260158
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260160
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/node/classes/FormData.js
|
|
260159
260161
|
var import_form_data = __toESM(require_form_data(), 1);
|
|
260160
260162
|
var FormData_default = import_form_data.default;
|
|
260161
260163
|
|
|
260162
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260164
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/toFormData.js
|
|
260163
260165
|
function isVisitable(thing) {
|
|
260164
260166
|
return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
|
|
260165
260167
|
}
|
|
@@ -260273,7 +260275,7 @@ function toFormData(obj, formData, options) {
|
|
|
260273
260275
|
}
|
|
260274
260276
|
var toFormData_default = toFormData;
|
|
260275
260277
|
|
|
260276
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260278
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
|
|
260277
260279
|
function encode(str2) {
|
|
260278
260280
|
const charMap = {
|
|
260279
260281
|
"!": "%21",
|
|
@@ -260306,7 +260308,7 @@ prototype2.toString = function toString2(encoder) {
|
|
|
260306
260308
|
};
|
|
260307
260309
|
var AxiosURLSearchParams_default = AxiosURLSearchParams;
|
|
260308
260310
|
|
|
260309
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260311
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/buildURL.js
|
|
260310
260312
|
function encode2(val) {
|
|
260311
260313
|
return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
260312
260314
|
}
|
|
@@ -260332,7 +260334,7 @@ function buildURL(url2, params, options) {
|
|
|
260332
260334
|
return url2;
|
|
260333
260335
|
}
|
|
260334
260336
|
|
|
260335
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260337
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/InterceptorManager.js
|
|
260336
260338
|
var InterceptorManager = class {
|
|
260337
260339
|
constructor() {
|
|
260338
260340
|
this.handlers = [];
|
|
@@ -260366,18 +260368,18 @@ var InterceptorManager = class {
|
|
|
260366
260368
|
};
|
|
260367
260369
|
var InterceptorManager_default = InterceptorManager;
|
|
260368
260370
|
|
|
260369
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260371
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/defaults/transitional.js
|
|
260370
260372
|
var transitional_default = {
|
|
260371
260373
|
silentJSONParsing: true,
|
|
260372
260374
|
forcedJSONParsing: true,
|
|
260373
260375
|
clarifyTimeoutError: false
|
|
260374
260376
|
};
|
|
260375
260377
|
|
|
260376
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260378
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
|
|
260377
260379
|
var import_url = __toESM(require("url"), 1);
|
|
260378
260380
|
var URLSearchParams_default = import_url.default.URLSearchParams;
|
|
260379
260381
|
|
|
260380
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260382
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/node/index.js
|
|
260381
260383
|
var node_default = {
|
|
260382
260384
|
isNode: true,
|
|
260383
260385
|
classes: {
|
|
@@ -260388,11 +260390,32 @@ var node_default = {
|
|
|
260388
260390
|
protocols: ["http", "https", "file", "data"]
|
|
260389
260391
|
};
|
|
260390
260392
|
|
|
260391
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260393
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/common/utils.js
|
|
260394
|
+
var utils_exports = {};
|
|
260395
|
+
__export(utils_exports, {
|
|
260396
|
+
hasBrowserEnv: () => hasBrowserEnv,
|
|
260397
|
+
hasStandardBrowserEnv: () => hasStandardBrowserEnv,
|
|
260398
|
+
hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv
|
|
260399
|
+
});
|
|
260400
|
+
var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
|
|
260401
|
+
var hasStandardBrowserEnv = ((product) => {
|
|
260402
|
+
return hasBrowserEnv && ["ReactNative", "NativeScript", "NS"].indexOf(product) < 0;
|
|
260403
|
+
})(typeof navigator !== "undefined" && navigator.product);
|
|
260404
|
+
var hasStandardBrowserWebWorkerEnv = (() => {
|
|
260405
|
+
return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
|
|
260406
|
+
})();
|
|
260407
|
+
|
|
260408
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/platform/index.js
|
|
260409
|
+
var platform_default = {
|
|
260410
|
+
...utils_exports,
|
|
260411
|
+
...node_default
|
|
260412
|
+
};
|
|
260413
|
+
|
|
260414
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/toURLEncodedForm.js
|
|
260392
260415
|
function toURLEncodedForm(data, options) {
|
|
260393
|
-
return toFormData_default(data, new
|
|
260416
|
+
return toFormData_default(data, new platform_default.classes.URLSearchParams(), Object.assign({
|
|
260394
260417
|
visitor: function(value, key, path2, helpers) {
|
|
260395
|
-
if (
|
|
260418
|
+
if (platform_default.isNode && utils_default.isBuffer(value)) {
|
|
260396
260419
|
this.append(key, value.toString("base64"));
|
|
260397
260420
|
return false;
|
|
260398
260421
|
}
|
|
@@ -260401,7 +260424,7 @@ function toURLEncodedForm(data, options) {
|
|
|
260401
260424
|
}, options));
|
|
260402
260425
|
}
|
|
260403
260426
|
|
|
260404
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260427
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/formDataToJSON.js
|
|
260405
260428
|
function parsePropPath(name) {
|
|
260406
260429
|
return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
|
|
260407
260430
|
return match[0] === "[]" ? "" : match[1] || match[0];
|
|
@@ -260453,10 +260476,7 @@ function formDataToJSON(formData) {
|
|
|
260453
260476
|
}
|
|
260454
260477
|
var formDataToJSON_default = formDataToJSON;
|
|
260455
260478
|
|
|
260456
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260457
|
-
var DEFAULT_CONTENT_TYPE = {
|
|
260458
|
-
"Content-Type": void 0
|
|
260459
|
-
};
|
|
260479
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/defaults/index.js
|
|
260460
260480
|
function stringifySafely(rawValue, parser, encoder) {
|
|
260461
260481
|
if (utils_default.isString(rawValue)) {
|
|
260462
260482
|
try {
|
|
@@ -260543,27 +260563,25 @@ var defaults = {
|
|
|
260543
260563
|
maxContentLength: -1,
|
|
260544
260564
|
maxBodyLength: -1,
|
|
260545
260565
|
env: {
|
|
260546
|
-
FormData:
|
|
260547
|
-
Blob:
|
|
260566
|
+
FormData: platform_default.classes.FormData,
|
|
260567
|
+
Blob: platform_default.classes.Blob
|
|
260548
260568
|
},
|
|
260549
260569
|
validateStatus: function validateStatus(status) {
|
|
260550
260570
|
return status >= 200 && status < 300;
|
|
260551
260571
|
},
|
|
260552
260572
|
headers: {
|
|
260553
260573
|
common: {
|
|
260554
|
-
"Accept": "application/json, text/plain, */*"
|
|
260574
|
+
"Accept": "application/json, text/plain, */*",
|
|
260575
|
+
"Content-Type": void 0
|
|
260555
260576
|
}
|
|
260556
260577
|
}
|
|
260557
260578
|
};
|
|
260558
|
-
utils_default.forEach(["delete", "get", "head"],
|
|
260579
|
+
utils_default.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
|
|
260559
260580
|
defaults.headers[method] = {};
|
|
260560
260581
|
});
|
|
260561
|
-
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
260562
|
-
defaults.headers[method] = utils_default.merge(DEFAULT_CONTENT_TYPE);
|
|
260563
|
-
});
|
|
260564
260582
|
var defaults_default = defaults;
|
|
260565
260583
|
|
|
260566
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260584
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/parseHeaders.js
|
|
260567
260585
|
var ignoreDuplicateOf = utils_default.toObjectSet([
|
|
260568
260586
|
"age",
|
|
260569
260587
|
"authorization",
|
|
@@ -260608,7 +260626,7 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
260608
260626
|
return parsed;
|
|
260609
260627
|
};
|
|
260610
260628
|
|
|
260611
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260629
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/AxiosHeaders.js
|
|
260612
260630
|
var $internals = Symbol("internals");
|
|
260613
260631
|
function normalizeHeader(header) {
|
|
260614
260632
|
return header && String(header).trim().toLowerCase();
|
|
@@ -260814,11 +260832,19 @@ var AxiosHeaders = class {
|
|
|
260814
260832
|
}
|
|
260815
260833
|
};
|
|
260816
260834
|
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
260817
|
-
utils_default.
|
|
260835
|
+
utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
260836
|
+
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
260837
|
+
return {
|
|
260838
|
+
get: () => value,
|
|
260839
|
+
set(headerValue) {
|
|
260840
|
+
this[mapped] = headerValue;
|
|
260841
|
+
}
|
|
260842
|
+
};
|
|
260843
|
+
});
|
|
260818
260844
|
utils_default.freezeMethods(AxiosHeaders);
|
|
260819
260845
|
var AxiosHeaders_default = AxiosHeaders;
|
|
260820
260846
|
|
|
260821
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260847
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/transformData.js
|
|
260822
260848
|
function transformData(fns, response) {
|
|
260823
260849
|
const config = this || defaults_default;
|
|
260824
260850
|
const context = response || config;
|
|
@@ -260831,12 +260857,12 @@ function transformData(fns, response) {
|
|
|
260831
260857
|
return data;
|
|
260832
260858
|
}
|
|
260833
260859
|
|
|
260834
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260860
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/cancel/isCancel.js
|
|
260835
260861
|
function isCancel(value) {
|
|
260836
260862
|
return !!(value && value.__CANCEL__);
|
|
260837
260863
|
}
|
|
260838
260864
|
|
|
260839
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260865
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/cancel/CanceledError.js
|
|
260840
260866
|
function CanceledError(message, config, request) {
|
|
260841
260867
|
AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
260842
260868
|
this.name = "CanceledError";
|
|
@@ -260846,7 +260872,7 @@ utils_default.inherits(CanceledError, AxiosError_default, {
|
|
|
260846
260872
|
});
|
|
260847
260873
|
var CanceledError_default = CanceledError;
|
|
260848
260874
|
|
|
260849
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260875
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/settle.js
|
|
260850
260876
|
function settle(resolve, reject, response) {
|
|
260851
260877
|
const validateStatus2 = response.config.validateStatus;
|
|
260852
260878
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
@@ -260862,17 +260888,17 @@ function settle(resolve, reject, response) {
|
|
|
260862
260888
|
}
|
|
260863
260889
|
}
|
|
260864
260890
|
|
|
260865
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260891
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
260866
260892
|
function isAbsoluteURL(url2) {
|
|
260867
260893
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
260868
260894
|
}
|
|
260869
260895
|
|
|
260870
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260896
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/combineURLs.js
|
|
260871
260897
|
function combineURLs(baseURL, relativeURL) {
|
|
260872
260898
|
return relativeURL ? baseURL.replace(/\/+$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
260873
260899
|
}
|
|
260874
260900
|
|
|
260875
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260901
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/buildFullPath.js
|
|
260876
260902
|
function buildFullPath(baseURL, requestedURL) {
|
|
260877
260903
|
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
|
260878
260904
|
return combineURLs(baseURL, requestedURL);
|
|
@@ -260880,7 +260906,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
|
260880
260906
|
return requestedURL;
|
|
260881
260907
|
}
|
|
260882
260908
|
|
|
260883
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260909
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/http.js
|
|
260884
260910
|
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
260885
260911
|
var import_http = __toESM(require("http"), 1);
|
|
260886
260912
|
var import_https = __toESM(require("https"), 1);
|
|
@@ -260888,19 +260914,19 @@ var import_util2 = __toESM(require("util"), 1);
|
|
|
260888
260914
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
260889
260915
|
var import_zlib = __toESM(require("zlib"), 1);
|
|
260890
260916
|
|
|
260891
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260892
|
-
var VERSION = "1.
|
|
260917
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/env/data.js
|
|
260918
|
+
var VERSION = "1.6.2";
|
|
260893
260919
|
|
|
260894
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260920
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/parseProtocol.js
|
|
260895
260921
|
function parseProtocol(url2) {
|
|
260896
260922
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
|
|
260897
260923
|
return match && match[1] || "";
|
|
260898
260924
|
}
|
|
260899
260925
|
|
|
260900
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260926
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/fromDataURI.js
|
|
260901
260927
|
var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
260902
260928
|
function fromDataURI(uri, asBlob, options) {
|
|
260903
|
-
const _Blob = options && options.Blob ||
|
|
260929
|
+
const _Blob = options && options.Blob || platform_default.classes.Blob;
|
|
260904
260930
|
const protocol = parseProtocol(uri);
|
|
260905
260931
|
if (asBlob === void 0 && _Blob) {
|
|
260906
260932
|
asBlob = true;
|
|
@@ -260926,13 +260952,13 @@ function fromDataURI(uri, asBlob, options) {
|
|
|
260926
260952
|
throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
|
|
260927
260953
|
}
|
|
260928
260954
|
|
|
260929
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260955
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/http.js
|
|
260930
260956
|
var import_stream4 = __toESM(require("stream"), 1);
|
|
260931
260957
|
|
|
260932
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260958
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
260933
260959
|
var import_stream = __toESM(require("stream"), 1);
|
|
260934
260960
|
|
|
260935
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260961
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/throttle.js
|
|
260936
260962
|
function throttle(fn, freq) {
|
|
260937
260963
|
let timestamp2 = 0;
|
|
260938
260964
|
const threshold = 1e3 / freq;
|
|
@@ -260958,7 +260984,7 @@ function throttle(fn, freq) {
|
|
|
260958
260984
|
}
|
|
260959
260985
|
var throttle_default = throttle;
|
|
260960
260986
|
|
|
260961
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
260987
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/speedometer.js
|
|
260962
260988
|
function speedometer(samplesCount, min2) {
|
|
260963
260989
|
samplesCount = samplesCount || 10;
|
|
260964
260990
|
const bytes = new Array(samplesCount);
|
|
@@ -260994,7 +261020,7 @@ function speedometer(samplesCount, min2) {
|
|
|
260994
261020
|
}
|
|
260995
261021
|
var speedometer_default = speedometer;
|
|
260996
261022
|
|
|
260997
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261023
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/AxiosTransformStream.js
|
|
260998
261024
|
var kInternals = Symbol("internals");
|
|
260999
261025
|
var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
261000
261026
|
constructor(options) {
|
|
@@ -261144,14 +261170,14 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
261144
261170
|
};
|
|
261145
261171
|
var AxiosTransformStream_default = AxiosTransformStream;
|
|
261146
261172
|
|
|
261147
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261173
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/http.js
|
|
261148
261174
|
var import_events = __toESM(require("events"), 1);
|
|
261149
261175
|
|
|
261150
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261176
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/formDataToStream.js
|
|
261151
261177
|
var import_util = require("util");
|
|
261152
261178
|
var import_stream2 = require("stream");
|
|
261153
261179
|
|
|
261154
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261180
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/readBlob.js
|
|
261155
261181
|
var { asyncIterator } = Symbol;
|
|
261156
261182
|
var readBlob = async function* (blob) {
|
|
261157
261183
|
if (blob.stream) {
|
|
@@ -261166,7 +261192,7 @@ var readBlob = async function* (blob) {
|
|
|
261166
261192
|
};
|
|
261167
261193
|
var readBlob_default = readBlob;
|
|
261168
261194
|
|
|
261169
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261195
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/formDataToStream.js
|
|
261170
261196
|
var BOUNDARY_ALPHABET = utils_default.ALPHABET.ALPHA_DIGIT + "-_";
|
|
261171
261197
|
var textEncoder = new import_util.TextEncoder();
|
|
261172
261198
|
var CRLF = "\r\n";
|
|
@@ -261245,7 +261271,7 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
261245
261271
|
};
|
|
261246
261272
|
var formDataToStream_default = formDataToStream;
|
|
261247
261273
|
|
|
261248
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261274
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
|
|
261249
261275
|
var import_stream3 = __toESM(require("stream"), 1);
|
|
261250
261276
|
var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
|
261251
261277
|
__transform(chunk, encoding, callback) {
|
|
@@ -261267,7 +261293,7 @@ var ZlibHeaderTransformStream = class extends import_stream3.default.Transform {
|
|
|
261267
261293
|
};
|
|
261268
261294
|
var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
|
261269
261295
|
|
|
261270
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261296
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/callbackify.js
|
|
261271
261297
|
var callbackify = (fn, reducer) => {
|
|
261272
261298
|
return utils_default.isAsyncFn(fn) ? function(...args) {
|
|
261273
261299
|
const cb = args.pop();
|
|
@@ -261282,7 +261308,7 @@ var callbackify = (fn, reducer) => {
|
|
|
261282
261308
|
};
|
|
261283
261309
|
var callbackify_default = callbackify;
|
|
261284
261310
|
|
|
261285
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261311
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/http.js
|
|
261286
261312
|
var zlibOptions = {
|
|
261287
261313
|
flush: import_zlib.default.constants.Z_SYNC_FLUSH,
|
|
261288
261314
|
finishFlush: import_zlib.default.constants.Z_SYNC_FLUSH
|
|
@@ -261294,7 +261320,7 @@ var brotliOptions = {
|
|
|
261294
261320
|
var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
|
|
261295
261321
|
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
261296
261322
|
var isHttps = /https:?/;
|
|
261297
|
-
var supportedProtocols =
|
|
261323
|
+
var supportedProtocols = platform_default.protocols.map((protocol) => {
|
|
261298
261324
|
return protocol + ":";
|
|
261299
261325
|
});
|
|
261300
261326
|
function dispatchBeforeRedirect(options) {
|
|
@@ -261360,6 +261386,16 @@ var wrapAsync = (asyncExecutor) => {
|
|
|
261360
261386
|
asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
|
|
261361
261387
|
});
|
|
261362
261388
|
};
|
|
261389
|
+
var resolveFamily = ({ address, family }) => {
|
|
261390
|
+
if (!utils_default.isString(address)) {
|
|
261391
|
+
throw TypeError("address must be a string");
|
|
261392
|
+
}
|
|
261393
|
+
return {
|
|
261394
|
+
address,
|
|
261395
|
+
family: family || (address.indexOf(".") < 0 ? 6 : 4)
|
|
261396
|
+
};
|
|
261397
|
+
};
|
|
261398
|
+
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
261363
261399
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
261364
261400
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
261365
261401
|
let { data, lookup, family } = config;
|
|
@@ -261368,15 +261404,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
261368
261404
|
let isDone;
|
|
261369
261405
|
let rejected = false;
|
|
261370
261406
|
let req;
|
|
261371
|
-
if (lookup
|
|
261372
|
-
|
|
261373
|
-
|
|
261374
|
-
|
|
261375
|
-
|
|
261376
|
-
|
|
261377
|
-
}
|
|
261378
|
-
|
|
261379
|
-
});
|
|
261407
|
+
if (lookup) {
|
|
261408
|
+
const _lookup = callbackify_default(lookup, (value) => utils_default.isArray(value) ? value : [value]);
|
|
261409
|
+
lookup = (hostname, opt, cb) => {
|
|
261410
|
+
_lookup(hostname, opt, (err, arg0, arg1) => {
|
|
261411
|
+
const addresses = utils_default.isArray(arg0) ? arg0.map((addr) => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];
|
|
261412
|
+
opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
|
|
261413
|
+
});
|
|
261414
|
+
};
|
|
261380
261415
|
}
|
|
261381
261416
|
const emitter = new import_events.default();
|
|
261382
261417
|
const onFinished = () => {
|
|
@@ -261558,10 +261593,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
261558
261593
|
auth,
|
|
261559
261594
|
protocol,
|
|
261560
261595
|
family,
|
|
261561
|
-
lookup,
|
|
261562
261596
|
beforeRedirect: dispatchBeforeRedirect,
|
|
261563
261597
|
beforeRedirects: {}
|
|
261564
261598
|
};
|
|
261599
|
+
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
261565
261600
|
if (config.socketPath) {
|
|
261566
261601
|
options.socketPath = config.socketPath;
|
|
261567
261602
|
} else {
|
|
@@ -261616,7 +261651,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
261616
261651
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
261617
261652
|
delete res.headers["content-encoding"];
|
|
261618
261653
|
}
|
|
261619
|
-
switch (res.headers["content-encoding"]) {
|
|
261654
|
+
switch ((res.headers["content-encoding"] || "").toLowerCase()) {
|
|
261620
261655
|
case "gzip":
|
|
261621
261656
|
case "x-gzip":
|
|
261622
261657
|
case "compress":
|
|
@@ -261697,7 +261732,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
261697
261732
|
}
|
|
261698
261733
|
response.data = responseData;
|
|
261699
261734
|
} catch (err) {
|
|
261700
|
-
reject(AxiosError_default.from(err, null, config, response.request, response));
|
|
261735
|
+
return reject(AxiosError_default.from(err, null, config, response.request, response));
|
|
261701
261736
|
}
|
|
261702
261737
|
settle(resolve, reject, response);
|
|
261703
261738
|
});
|
|
@@ -261721,7 +261756,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
261721
261756
|
});
|
|
261722
261757
|
if (config.timeout) {
|
|
261723
261758
|
const timeout = parseInt(config.timeout, 10);
|
|
261724
|
-
if (isNaN(timeout)) {
|
|
261759
|
+
if (Number.isNaN(timeout)) {
|
|
261725
261760
|
reject(new AxiosError_default(
|
|
261726
261761
|
"error trying to parse `config.timeout` to int",
|
|
261727
261762
|
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
@@ -261769,48 +261804,35 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
261769
261804
|
});
|
|
261770
261805
|
};
|
|
261771
261806
|
|
|
261772
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261773
|
-
var cookies_default =
|
|
261774
|
-
|
|
261775
|
-
|
|
261776
|
-
|
|
261777
|
-
|
|
261778
|
-
|
|
261779
|
-
|
|
261780
|
-
|
|
261781
|
-
|
|
261782
|
-
|
|
261783
|
-
|
|
261784
|
-
|
|
261785
|
-
|
|
261786
|
-
|
|
261787
|
-
|
|
261788
|
-
|
|
261789
|
-
|
|
261790
|
-
|
|
261791
|
-
|
|
261792
|
-
|
|
261793
|
-
|
|
261794
|
-
|
|
261795
|
-
|
|
261796
|
-
|
|
261797
|
-
|
|
261798
|
-
}
|
|
261799
|
-
};
|
|
261800
|
-
}() : function nonStandardBrowserEnv() {
|
|
261801
|
-
return {
|
|
261802
|
-
write: function write() {
|
|
261803
|
-
},
|
|
261804
|
-
read: function read() {
|
|
261805
|
-
return null;
|
|
261806
|
-
},
|
|
261807
|
-
remove: function remove() {
|
|
261808
|
-
}
|
|
261809
|
-
};
|
|
261810
|
-
}();
|
|
261807
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/cookies.js
|
|
261808
|
+
var cookies_default = platform_default.hasStandardBrowserEnv ? {
|
|
261809
|
+
write(name, value, expires, path2, domain, secure) {
|
|
261810
|
+
const cookie = [name + "=" + encodeURIComponent(value)];
|
|
261811
|
+
utils_default.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
|
|
261812
|
+
utils_default.isString(path2) && cookie.push("path=" + path2);
|
|
261813
|
+
utils_default.isString(domain) && cookie.push("domain=" + domain);
|
|
261814
|
+
secure === true && cookie.push("secure");
|
|
261815
|
+
document.cookie = cookie.join("; ");
|
|
261816
|
+
},
|
|
261817
|
+
read(name) {
|
|
261818
|
+
const match = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
|
|
261819
|
+
return match ? decodeURIComponent(match[3]) : null;
|
|
261820
|
+
},
|
|
261821
|
+
remove(name) {
|
|
261822
|
+
this.write(name, "", Date.now() - 864e5);
|
|
261823
|
+
}
|
|
261824
|
+
} : {
|
|
261825
|
+
write() {
|
|
261826
|
+
},
|
|
261827
|
+
read() {
|
|
261828
|
+
return null;
|
|
261829
|
+
},
|
|
261830
|
+
remove() {
|
|
261831
|
+
}
|
|
261832
|
+
};
|
|
261811
261833
|
|
|
261812
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261813
|
-
var isURLSameOrigin_default =
|
|
261834
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/isURLSameOrigin.js
|
|
261835
|
+
var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? function standardBrowserEnv() {
|
|
261814
261836
|
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
261815
261837
|
const urlParsingNode = document.createElement("a");
|
|
261816
261838
|
let originURL;
|
|
@@ -261837,13 +261859,13 @@ var isURLSameOrigin_default = node_default.isStandardBrowserEnv ? function stand
|
|
|
261837
261859
|
const parsed = utils_default.isString(requestURL) ? resolveURL(requestURL) : requestURL;
|
|
261838
261860
|
return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
|
|
261839
261861
|
};
|
|
261840
|
-
}() : function
|
|
261862
|
+
}() : function nonStandardBrowserEnv() {
|
|
261841
261863
|
return function isURLSameOrigin() {
|
|
261842
261864
|
return true;
|
|
261843
261865
|
};
|
|
261844
261866
|
}();
|
|
261845
261867
|
|
|
261846
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
261868
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/xhr.js
|
|
261847
261869
|
function progressEventReducer(listener, isDownloadStream) {
|
|
261848
261870
|
let bytesNotified = 0;
|
|
261849
261871
|
const _speedometer = speedometer_default(50, 250);
|
|
@@ -261872,7 +261894,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
261872
261894
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
261873
261895
|
let requestData = config.data;
|
|
261874
261896
|
const requestHeaders = AxiosHeaders_default.from(config.headers).normalize();
|
|
261875
|
-
|
|
261897
|
+
let { responseType, withXSRFToken } = config;
|
|
261876
261898
|
let onCanceled;
|
|
261877
261899
|
function done() {
|
|
261878
261900
|
if (config.cancelToken) {
|
|
@@ -261882,11 +261904,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
261882
261904
|
config.signal.removeEventListener("abort", onCanceled);
|
|
261883
261905
|
}
|
|
261884
261906
|
}
|
|
261907
|
+
let contentType;
|
|
261885
261908
|
if (utils_default.isFormData(requestData)) {
|
|
261886
|
-
if (
|
|
261909
|
+
if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
|
|
261887
261910
|
requestHeaders.setContentType(false);
|
|
261888
|
-
} else {
|
|
261889
|
-
|
|
261911
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
261912
|
+
const [type2, ...tokens] = contentType ? contentType.split(";").map((token) => token.trim()).filter(Boolean) : [];
|
|
261913
|
+
requestHeaders.setContentType([type2 || "multipart/form-data", ...tokens].join("; "));
|
|
261890
261914
|
}
|
|
261891
261915
|
}
|
|
261892
261916
|
let request = new XMLHttpRequest();
|
|
@@ -261961,10 +261985,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
261961
261985
|
));
|
|
261962
261986
|
request = null;
|
|
261963
261987
|
};
|
|
261964
|
-
if (
|
|
261965
|
-
|
|
261966
|
-
if (
|
|
261967
|
-
|
|
261988
|
+
if (platform_default.hasStandardBrowserEnv) {
|
|
261989
|
+
withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
261990
|
+
if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(fullPath)) {
|
|
261991
|
+
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies_default.read(config.xsrfCookieName);
|
|
261992
|
+
if (xsrfValue) {
|
|
261993
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
261994
|
+
}
|
|
261968
261995
|
}
|
|
261969
261996
|
}
|
|
261970
261997
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
@@ -262000,7 +262027,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
262000
262027
|
}
|
|
262001
262028
|
}
|
|
262002
262029
|
const protocol = parseProtocol(fullPath);
|
|
262003
|
-
if (protocol &&
|
|
262030
|
+
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
|
262004
262031
|
reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
|
|
262005
262032
|
return;
|
|
262006
262033
|
}
|
|
@@ -262008,7 +262035,7 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
262008
262035
|
});
|
|
262009
262036
|
};
|
|
262010
262037
|
|
|
262011
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262038
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/adapters/adapters.js
|
|
262012
262039
|
var knownAdapters = {
|
|
262013
262040
|
http: http_default,
|
|
262014
262041
|
xhr: xhr_default
|
|
@@ -262022,38 +262049,46 @@ utils_default.forEach(knownAdapters, (fn, value) => {
|
|
|
262022
262049
|
Object.defineProperty(fn, "adapterName", { value });
|
|
262023
262050
|
}
|
|
262024
262051
|
});
|
|
262052
|
+
var renderReason = (reason) => `- ${reason}`;
|
|
262053
|
+
var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false;
|
|
262025
262054
|
var adapters_default = {
|
|
262026
262055
|
getAdapter: (adapters) => {
|
|
262027
262056
|
adapters = utils_default.isArray(adapters) ? adapters : [adapters];
|
|
262028
262057
|
const { length } = adapters;
|
|
262029
262058
|
let nameOrAdapter;
|
|
262030
262059
|
let adapter;
|
|
262060
|
+
const rejectedReasons = {};
|
|
262031
262061
|
for (let i = 0; i < length; i++) {
|
|
262032
262062
|
nameOrAdapter = adapters[i];
|
|
262033
|
-
|
|
262063
|
+
let id;
|
|
262064
|
+
adapter = nameOrAdapter;
|
|
262065
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
262066
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
262067
|
+
if (adapter === void 0) {
|
|
262068
|
+
throw new AxiosError_default(`Unknown adapter '${id}'`);
|
|
262069
|
+
}
|
|
262070
|
+
}
|
|
262071
|
+
if (adapter) {
|
|
262034
262072
|
break;
|
|
262035
262073
|
}
|
|
262074
|
+
rejectedReasons[id || "#" + i] = adapter;
|
|
262036
262075
|
}
|
|
262037
262076
|
if (!adapter) {
|
|
262038
|
-
|
|
262039
|
-
|
|
262040
|
-
|
|
262041
|
-
|
|
262042
|
-
|
|
262043
|
-
|
|
262044
|
-
|
|
262045
|
-
utils_default.hasOwnProp(knownAdapters, nameOrAdapter) ? `Adapter '${nameOrAdapter}' is not available in the build` : `Unknown adapter '${nameOrAdapter}'`
|
|
262077
|
+
const reasons = Object.entries(rejectedReasons).map(
|
|
262078
|
+
([id, state2]) => `adapter ${id} ` + (state2 === false ? "is not supported by the environment" : "is not available in the build")
|
|
262079
|
+
);
|
|
262080
|
+
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
262081
|
+
throw new AxiosError_default(
|
|
262082
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
262083
|
+
"ERR_NOT_SUPPORT"
|
|
262046
262084
|
);
|
|
262047
|
-
}
|
|
262048
|
-
if (!utils_default.isFunction(adapter)) {
|
|
262049
|
-
throw new TypeError("adapter is not a function");
|
|
262050
262085
|
}
|
|
262051
262086
|
return adapter;
|
|
262052
262087
|
},
|
|
262053
262088
|
adapters: knownAdapters
|
|
262054
262089
|
};
|
|
262055
262090
|
|
|
262056
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262091
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/dispatchRequest.js
|
|
262057
262092
|
function throwIfCancellationRequested(config) {
|
|
262058
262093
|
if (config.cancelToken) {
|
|
262059
262094
|
config.cancelToken.throwIfRequested();
|
|
@@ -262098,7 +262133,7 @@ function dispatchRequest(config) {
|
|
|
262098
262133
|
});
|
|
262099
262134
|
}
|
|
262100
262135
|
|
|
262101
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262136
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/mergeConfig.js
|
|
262102
262137
|
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? thing.toJSON() : thing;
|
|
262103
262138
|
function mergeConfig(config1, config2) {
|
|
262104
262139
|
config2 = config2 || {};
|
|
@@ -262150,6 +262185,7 @@ function mergeConfig(config1, config2) {
|
|
|
262150
262185
|
timeout: defaultToConfig2,
|
|
262151
262186
|
timeoutMessage: defaultToConfig2,
|
|
262152
262187
|
withCredentials: defaultToConfig2,
|
|
262188
|
+
withXSRFToken: defaultToConfig2,
|
|
262153
262189
|
adapter: defaultToConfig2,
|
|
262154
262190
|
responseType: defaultToConfig2,
|
|
262155
262191
|
xsrfCookieName: defaultToConfig2,
|
|
@@ -262177,7 +262213,7 @@ function mergeConfig(config1, config2) {
|
|
|
262177
262213
|
return config;
|
|
262178
262214
|
}
|
|
262179
262215
|
|
|
262180
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262216
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/validator.js
|
|
262181
262217
|
var validators = {};
|
|
262182
262218
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i) => {
|
|
262183
262219
|
validators[type2] = function validator(thing) {
|
|
@@ -262235,7 +262271,7 @@ var validator_default = {
|
|
|
262235
262271
|
validators
|
|
262236
262272
|
};
|
|
262237
262273
|
|
|
262238
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262274
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/core/Axios.js
|
|
262239
262275
|
var validators2 = validator_default.validators;
|
|
262240
262276
|
var Axios = class {
|
|
262241
262277
|
constructor(instanceConfig) {
|
|
@@ -262274,12 +262310,11 @@ var Axios = class {
|
|
|
262274
262310
|
}
|
|
262275
262311
|
}
|
|
262276
262312
|
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
262277
|
-
let contextHeaders
|
|
262278
|
-
contextHeaders = headers && utils_default.merge(
|
|
262313
|
+
let contextHeaders = headers && utils_default.merge(
|
|
262279
262314
|
headers.common,
|
|
262280
262315
|
headers[config.method]
|
|
262281
262316
|
);
|
|
262282
|
-
|
|
262317
|
+
headers && utils_default.forEach(
|
|
262283
262318
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
262284
262319
|
(method) => {
|
|
262285
262320
|
delete headers[method];
|
|
@@ -262344,7 +262379,7 @@ var Axios = class {
|
|
|
262344
262379
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
262345
262380
|
}
|
|
262346
262381
|
};
|
|
262347
|
-
utils_default.forEach(["delete", "get", "head", "options"], function
|
|
262382
|
+
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
262348
262383
|
Axios.prototype[method] = function(url2, config) {
|
|
262349
262384
|
return this.request(mergeConfig(config || {}, {
|
|
262350
262385
|
method,
|
|
@@ -262353,7 +262388,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
|
|
|
262353
262388
|
}));
|
|
262354
262389
|
};
|
|
262355
262390
|
});
|
|
262356
|
-
utils_default.forEach(["post", "put", "patch"], function
|
|
262391
|
+
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
262357
262392
|
function generateHTTPMethod(isForm) {
|
|
262358
262393
|
return function httpMethod(url2, data, config) {
|
|
262359
262394
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -262371,7 +262406,7 @@ utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData2(
|
|
|
262371
262406
|
});
|
|
262372
262407
|
var Axios_default = Axios;
|
|
262373
262408
|
|
|
262374
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262409
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/cancel/CancelToken.js
|
|
262375
262410
|
var CancelToken = class {
|
|
262376
262411
|
constructor(executor) {
|
|
262377
262412
|
if (typeof executor !== "function") {
|
|
@@ -262448,19 +262483,19 @@ var CancelToken = class {
|
|
|
262448
262483
|
};
|
|
262449
262484
|
var CancelToken_default = CancelToken;
|
|
262450
262485
|
|
|
262451
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262486
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/spread.js
|
|
262452
262487
|
function spread(callback) {
|
|
262453
262488
|
return function wrap(arr) {
|
|
262454
262489
|
return callback.apply(null, arr);
|
|
262455
262490
|
};
|
|
262456
262491
|
}
|
|
262457
262492
|
|
|
262458
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262493
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/isAxiosError.js
|
|
262459
262494
|
function isAxiosError(payload) {
|
|
262460
262495
|
return utils_default.isObject(payload) && payload.isAxiosError === true;
|
|
262461
262496
|
}
|
|
262462
262497
|
|
|
262463
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262498
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/helpers/HttpStatusCode.js
|
|
262464
262499
|
var HttpStatusCode = {
|
|
262465
262500
|
Continue: 100,
|
|
262466
262501
|
SwitchingProtocols: 101,
|
|
@@ -262531,7 +262566,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
|
262531
262566
|
});
|
|
262532
262567
|
var HttpStatusCode_default = HttpStatusCode;
|
|
262533
262568
|
|
|
262534
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262569
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/lib/axios.js
|
|
262535
262570
|
function createInstance(defaultConfig) {
|
|
262536
262571
|
const context = new Axios_default(defaultConfig);
|
|
262537
262572
|
const instance = bind(Axios_default.prototype.request, context);
|
|
@@ -262559,11 +262594,12 @@ axios.isAxiosError = isAxiosError;
|
|
|
262559
262594
|
axios.mergeConfig = mergeConfig;
|
|
262560
262595
|
axios.AxiosHeaders = AxiosHeaders_default;
|
|
262561
262596
|
axios.formToJSON = (thing) => formDataToJSON_default(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
262597
|
+
axios.getAdapter = adapters_default.getAdapter;
|
|
262562
262598
|
axios.HttpStatusCode = HttpStatusCode_default;
|
|
262563
262599
|
axios.default = axios;
|
|
262564
262600
|
var axios_default = axios;
|
|
262565
262601
|
|
|
262566
|
-
// ../../node_modules/.pnpm/axios@1.
|
|
262602
|
+
// ../../node_modules/.pnpm/axios@1.6.2/node_modules/axios/index.js
|
|
262567
262603
|
var {
|
|
262568
262604
|
Axios: Axios2,
|
|
262569
262605
|
AxiosError: AxiosError2,
|
|
@@ -262579,6 +262615,7 @@ var {
|
|
|
262579
262615
|
AxiosHeaders: AxiosHeaders2,
|
|
262580
262616
|
HttpStatusCode: HttpStatusCode2,
|
|
262581
262617
|
formToJSON,
|
|
262618
|
+
getAdapter,
|
|
262582
262619
|
mergeConfig: mergeConfig2
|
|
262583
262620
|
} = axios_default;
|
|
262584
262621
|
|
|
@@ -266709,7 +266746,7 @@ async function openapiTS(schema3, options = {}) {
|
|
|
266709
266746
|
}
|
|
266710
266747
|
var dist_default = openapiTS;
|
|
266711
266748
|
|
|
266712
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.
|
|
266749
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.3_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
266713
266750
|
var import_zod_openapi3 = __toESM(require_src(), 1);
|
|
266714
266751
|
var import_openapi3_ts = __toESM(require_dist3(), 1);
|
|
266715
266752
|
var import_verror2 = __toESM(require_verror(), 1);
|
|
@@ -270304,7 +270341,7 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
270304
270341
|
ZodError
|
|
270305
270342
|
});
|
|
270306
270343
|
|
|
270307
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.
|
|
270344
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.3_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
270308
270345
|
var import_openapi_parser = __toESM(require_lib11(), 1);
|
|
270309
270346
|
var import_json_schema_to_typescript = __toESM(require_src3(), 1);
|
|
270310
270347
|
var import_zod_openapi4 = __toESM(require_src(), 1);
|
|
@@ -426669,7 +426706,8 @@ function getParameterFromPath(path2) {
|
|
|
426669
426706
|
return parameters;
|
|
426670
426707
|
}
|
|
426671
426708
|
var import_prettier = __toESM2(require_prettier2());
|
|
426672
|
-
var
|
|
426709
|
+
var DEFAULT_IMPORT_PATH = "@bpinternal/opapi";
|
|
426710
|
+
var exportStateAsTypescript = (state2, dir, opts = {}) => {
|
|
426673
426711
|
import_fs3.default.mkdirSync(dir, { recursive: true });
|
|
426674
426712
|
const json2 = JSON.stringify(state2, null, 2);
|
|
426675
426713
|
const schemaNames = Object.keys(state2.schemas);
|
|
@@ -426678,28 +426716,29 @@ var exportStateAsTypescript = (state2, dir) => {
|
|
|
426678
426716
|
const typeSchema = !schemaNames.length ? "never" : schemaNames.map((s) => `'${s}'`).join(" | ");
|
|
426679
426717
|
const typeParam = !paramNames.length ? "never" : paramNames.map((s) => `'${s}'`).join(" | ");
|
|
426680
426718
|
const typeSection = !sectionNames.length ? "never" : sectionNames.map((s) => `'${s}'`).join(" | ");
|
|
426719
|
+
const importPath = opts.importPath ?? DEFAULT_IMPORT_PATH;
|
|
426681
426720
|
const header = `${tsFileHeader}/* prettier-ignore */
|
|
426682
426721
|
`;
|
|
426683
|
-
const
|
|
426684
|
-
|
|
426685
|
-
|
|
426686
|
-
|
|
426687
|
-
|
|
426688
|
-
const
|
|
426722
|
+
const content = [
|
|
426723
|
+
`import * as opapi from '${importPath}'`,
|
|
426724
|
+
`export type State = opapi.State<${typeSchema}, ${typeParam}, ${typeSection}>`,
|
|
426725
|
+
`export const state = ${json2} satisfies State`
|
|
426726
|
+
].join("\n");
|
|
426727
|
+
const formatted = import_prettier.default.format(content, { parser: "typescript" });
|
|
426728
|
+
const ts = header + formatted;
|
|
426689
426729
|
const path2 = import_path2.default.join(dir, "state.ts");
|
|
426690
426730
|
import_fs3.default.writeFileSync(path2, ts);
|
|
426691
426731
|
};
|
|
426692
426732
|
var schema2 = import_zod_openapi2.extendApi;
|
|
426693
426733
|
var createOpapiFromState = (state2) => {
|
|
426694
426734
|
return {
|
|
426695
|
-
getState: () => state2,
|
|
426696
426735
|
getModelRef: (name) => getRef(state2, "schemas", name),
|
|
426697
426736
|
addOperation: (operationProps) => addOperation(state2, operationProps),
|
|
426698
426737
|
exportClient: (dir = ".", openapiGeneratorEndpoint, postProcessors) => generateClient(state2, dir, openapiGeneratorEndpoint, postProcessors),
|
|
426699
426738
|
exportTypesBySection: (dir = ".") => generateTypesBySection(state2, dir),
|
|
426700
426739
|
exportServer: (dir = ".", useExpressTypes) => generateServer(state2, dir, useExpressTypes),
|
|
426701
426740
|
exportOpenapi: (dir = ".") => generateOpenapi(state2, dir),
|
|
426702
|
-
exportState: (dir = ".") => exportStateAsTypescript(state2, dir),
|
|
426741
|
+
exportState: (dir = ".", opts) => exportStateAsTypescript(state2, dir, opts),
|
|
426703
426742
|
exportErrors: (dir = ".") => generateErrorsFile(state2.errors ?? [], dir)
|
|
426704
426743
|
};
|
|
426705
426744
|
};
|
|
@@ -428116,6 +428155,51 @@ var state = {
|
|
|
428116
428155
|
},
|
|
428117
428156
|
parameters: {}
|
|
428118
428157
|
},
|
|
428158
|
+
runVrl: {
|
|
428159
|
+
name: "runVrl",
|
|
428160
|
+
description: "Run a VRL script",
|
|
428161
|
+
method: "post",
|
|
428162
|
+
path: "/v1/admin/helper/vrl",
|
|
428163
|
+
section: "helper",
|
|
428164
|
+
requestBody: {
|
|
428165
|
+
description: "VRL script",
|
|
428166
|
+
schema: {
|
|
428167
|
+
type: "object",
|
|
428168
|
+
properties: {
|
|
428169
|
+
data: {
|
|
428170
|
+
type: "object",
|
|
428171
|
+
additionalProperties: true
|
|
428172
|
+
},
|
|
428173
|
+
script: {
|
|
428174
|
+
type: "string"
|
|
428175
|
+
}
|
|
428176
|
+
},
|
|
428177
|
+
required: ["data", "script"],
|
|
428178
|
+
title: "runVrlBody",
|
|
428179
|
+
additionalProperties: false
|
|
428180
|
+
}
|
|
428181
|
+
},
|
|
428182
|
+
response: {
|
|
428183
|
+
description: "Success",
|
|
428184
|
+
schema: {
|
|
428185
|
+
type: "object",
|
|
428186
|
+
properties: {
|
|
428187
|
+
data: {
|
|
428188
|
+
type: "object",
|
|
428189
|
+
additionalProperties: true
|
|
428190
|
+
},
|
|
428191
|
+
result: {
|
|
428192
|
+
type: "object",
|
|
428193
|
+
additionalProperties: true
|
|
428194
|
+
}
|
|
428195
|
+
},
|
|
428196
|
+
required: ["data", "result"],
|
|
428197
|
+
title: "runVrlResponse",
|
|
428198
|
+
additionalProperties: false
|
|
428199
|
+
}
|
|
428200
|
+
},
|
|
428201
|
+
parameters: {}
|
|
428202
|
+
},
|
|
428119
428203
|
getAccount: {
|
|
428120
428204
|
name: "getAccount",
|
|
428121
428205
|
description: "Get details of the account authenticating with this endpoint.",
|
|
@@ -428948,6 +429032,10 @@ var state = {
|
|
|
428948
429032
|
required: ["url", "name"]
|
|
428949
429033
|
},
|
|
428950
429034
|
description: "Media files associated with the [Bot](#schema_bot)"
|
|
429035
|
+
},
|
|
429036
|
+
alwaysAlive: {
|
|
429037
|
+
type: "boolean",
|
|
429038
|
+
description: "Indicates if the [Bot](#schema_bot) should be in always alive mode"
|
|
428951
429039
|
}
|
|
428952
429040
|
},
|
|
428953
429041
|
title: "updateBotBody",
|
|
@@ -430057,7 +430145,8 @@ var state = {
|
|
|
430057
430145
|
"integrations_owned_count",
|
|
430058
430146
|
"ai_spend",
|
|
430059
430147
|
"openai_spend",
|
|
430060
|
-
"bing_search_spend"
|
|
430148
|
+
"bing_search_spend",
|
|
430149
|
+
"always_alive"
|
|
430061
430150
|
],
|
|
430062
430151
|
required: true
|
|
430063
430152
|
},
|
|
@@ -430117,7 +430206,8 @@ var state = {
|
|
|
430117
430206
|
"integrations_owned_count",
|
|
430118
430207
|
"ai_spend",
|
|
430119
430208
|
"openai_spend",
|
|
430120
|
-
"bing_search_spend"
|
|
430209
|
+
"bing_search_spend",
|
|
430210
|
+
"always_alive"
|
|
430121
430211
|
],
|
|
430122
430212
|
required: true
|
|
430123
430213
|
},
|
|
@@ -430185,7 +430275,8 @@ var state = {
|
|
|
430185
430275
|
"integrations_owned_count",
|
|
430186
430276
|
"ai_spend",
|
|
430187
430277
|
"openai_spend",
|
|
430188
|
-
"bing_search_spend"
|
|
430278
|
+
"bing_search_spend",
|
|
430279
|
+
"always_alive"
|
|
430189
430280
|
]
|
|
430190
430281
|
},
|
|
430191
430282
|
completion: {
|
|
@@ -430231,7 +430322,8 @@ var state = {
|
|
|
430231
430322
|
"integrations_owned_count",
|
|
430232
430323
|
"ai_spend",
|
|
430233
430324
|
"openai_spend",
|
|
430234
|
-
"bing_search_spend"
|
|
430325
|
+
"bing_search_spend",
|
|
430326
|
+
"always_alive"
|
|
430235
430327
|
],
|
|
430236
430328
|
required: true
|
|
430237
430329
|
},
|
|
@@ -430272,7 +430364,8 @@ var state = {
|
|
|
430272
430364
|
"integrations_owned_count",
|
|
430273
430365
|
"ai_spend",
|
|
430274
430366
|
"openai_spend",
|
|
430275
|
-
"bing_search_spend"
|
|
430367
|
+
"bing_search_spend",
|
|
430368
|
+
"always_alive"
|
|
430276
430369
|
],
|
|
430277
430370
|
description: "Usage type that can be used"
|
|
430278
430371
|
}
|
|
@@ -430341,7 +430434,8 @@ var state = {
|
|
|
430341
430434
|
"integrations_owned_count",
|
|
430342
430435
|
"ai_spend",
|
|
430343
430436
|
"openai_spend",
|
|
430344
|
-
"bing_search_spend"
|
|
430437
|
+
"bing_search_spend",
|
|
430438
|
+
"always_alive"
|
|
430345
430439
|
],
|
|
430346
430440
|
description: "Usage type that can be used"
|
|
430347
430441
|
}
|
|
@@ -431981,7 +432075,8 @@ var state = {
|
|
|
431981
432075
|
"integrations_owned_count",
|
|
431982
432076
|
"ai_spend",
|
|
431983
432077
|
"openai_spend",
|
|
431984
|
-
"bing_search_spend"
|
|
432078
|
+
"bing_search_spend",
|
|
432079
|
+
"always_alive"
|
|
431985
432080
|
],
|
|
431986
432081
|
required: true
|
|
431987
432082
|
},
|
|
@@ -432034,7 +432129,8 @@ var state = {
|
|
|
432034
432129
|
"integrations_owned_count",
|
|
432035
432130
|
"ai_spend",
|
|
432036
432131
|
"openai_spend",
|
|
432037
|
-
"bing_search_spend"
|
|
432132
|
+
"bing_search_spend",
|
|
432133
|
+
"always_alive"
|
|
432038
432134
|
],
|
|
432039
432135
|
required: true
|
|
432040
432136
|
},
|
|
@@ -432310,7 +432406,7 @@ var state = {
|
|
|
432310
432406
|
title: "Botpress API",
|
|
432311
432407
|
description: "API for Botpress Cloud",
|
|
432312
432408
|
server: "https://api.botpress.cloud",
|
|
432313
|
-
version: "0.15.
|
|
432409
|
+
version: "0.15.9",
|
|
432314
432410
|
prefix: "v1"
|
|
432315
432411
|
},
|
|
432316
432412
|
errors: [
|
|
@@ -432438,6 +432534,7 @@ var state = {
|
|
|
432438
432534
|
patchStateBody: true,
|
|
432439
432535
|
callActionBody: true,
|
|
432440
432536
|
configureIntegrationBody: true,
|
|
432537
|
+
runVrlBody: true,
|
|
432441
432538
|
createPersonalAccessTokenBody: true,
|
|
432442
432539
|
createBotBody: true,
|
|
432443
432540
|
updateBotBody: true,
|
|
@@ -432486,6 +432583,7 @@ var state = {
|
|
|
432486
432583
|
patchStateResponse: true,
|
|
432487
432584
|
callActionResponse: true,
|
|
432488
432585
|
configureIntegrationResponse: true,
|
|
432586
|
+
runVrlResponse: true,
|
|
432489
432587
|
getAccountResponse: true,
|
|
432490
432588
|
listPersonalAccessTokensResponse: true,
|
|
432491
432589
|
createPersonalAccessTokenResponse: true,
|
|
@@ -432895,6 +432993,15 @@ var state = {
|
|
|
432895
432993
|
type: "string",
|
|
432896
432994
|
description: "Id of the user that created the bot"
|
|
432897
432995
|
},
|
|
432996
|
+
alwaysAlive: {
|
|
432997
|
+
type: "boolean",
|
|
432998
|
+
description: "Indicates if the [Bot](#schema_bot) should be in always alive mode"
|
|
432999
|
+
},
|
|
433000
|
+
status: {
|
|
433001
|
+
type: "string",
|
|
433002
|
+
enum: ["active", "deploying"],
|
|
433003
|
+
description: "Status of the bot"
|
|
433004
|
+
},
|
|
432898
433005
|
medias: {
|
|
432899
433006
|
type: "array",
|
|
432900
433007
|
items: {
|
|
@@ -432929,6 +433036,8 @@ var state = {
|
|
|
432929
433036
|
"recurringEvents",
|
|
432930
433037
|
"name",
|
|
432931
433038
|
"dev",
|
|
433039
|
+
"alwaysAlive",
|
|
433040
|
+
"status",
|
|
432932
433041
|
"medias"
|
|
432933
433042
|
],
|
|
432934
433043
|
additionalProperties: false
|
|
@@ -433449,7 +433558,8 @@ var state = {
|
|
|
433449
433558
|
"integrations_owned_count",
|
|
433450
433559
|
"ai_spend",
|
|
433451
433560
|
"openai_spend",
|
|
433452
|
-
"bing_search_spend"
|
|
433561
|
+
"bing_search_spend",
|
|
433562
|
+
"always_alive"
|
|
433453
433563
|
],
|
|
433454
433564
|
description: "Usage type that can be used"
|
|
433455
433565
|
}
|
|
@@ -434061,6 +434171,12 @@ var state = {
|
|
|
434061
434171
|
description: "",
|
|
434062
434172
|
name: "quotas",
|
|
434063
434173
|
operations: ["changeAISpendQuota"]
|
|
434174
|
+
},
|
|
434175
|
+
{
|
|
434176
|
+
title: "Helper",
|
|
434177
|
+
description: "",
|
|
434178
|
+
name: "helper",
|
|
434179
|
+
operations: ["runVrl"]
|
|
434064
434180
|
}
|
|
434065
434181
|
],
|
|
434066
434182
|
options: {
|
|
@@ -434072,7 +434188,8 @@ var state = {
|
|
|
434072
434188
|
var api = OpenApi.fromState(state);
|
|
434073
434189
|
// Annotate the CommonJS export names for ESM import in node:
|
|
434074
434190
|
0 && (module.exports = {
|
|
434075
|
-
api
|
|
434191
|
+
api,
|
|
434192
|
+
state
|
|
434076
434193
|
});
|
|
434077
434194
|
/*! Bundled license information:
|
|
434078
434195
|
|