echoapi-converter 0.0.40 → 0.0.41
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 +17 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -250,6 +250,12 @@ const API_METHODS = [
|
|
|
250
250
|
'PROPFIND',
|
|
251
251
|
'VIEW',
|
|
252
252
|
];
|
|
253
|
+
const APIPOST_GRANT_TYPES = ['authorization_code', 'password_credentials', 'authorization_code_with_pkce'];
|
|
254
|
+
const THUNDER_CLIENT_GRANT_TYPES = {
|
|
255
|
+
"password": 'password_credentials',
|
|
256
|
+
"authorization_code": "authorization_code",
|
|
257
|
+
"authorization_code_with_pkce": "authorization_code_with_pkce"
|
|
258
|
+
};
|
|
253
259
|
|
|
254
260
|
// @ts-nocheck
|
|
255
261
|
const splicedPath = (name, version) => {
|
|
@@ -5474,7 +5480,6 @@ class InsomniaToApipost {
|
|
|
5474
5480
|
|
|
5475
5481
|
// @ts-nocheck
|
|
5476
5482
|
const DEFAULT_FIELD_TYPE = ["string", "file"];
|
|
5477
|
-
const APIPOST_GRANT_TYPES = ['authorization_code', 'password_credentials', 'authorization_code_with_pkce'];
|
|
5478
5483
|
class PostmanToApipost {
|
|
5479
5484
|
constructor() {
|
|
5480
5485
|
Object.defineProperty(this, "apis", {
|
|
@@ -6539,7 +6544,7 @@ class ThunderToApipost {
|
|
|
6539
6544
|
}
|
|
6540
6545
|
// auth
|
|
6541
6546
|
completionApiRequestAuth(auth) {
|
|
6542
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
6547
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
6543
6548
|
const customAuth = {};
|
|
6544
6549
|
if ((auth === null || auth === void 0 ? void 0 : auth.type) === "bearer") {
|
|
6545
6550
|
customAuth["type"] = "bearer";
|
|
@@ -6581,18 +6586,18 @@ class ThunderToApipost {
|
|
|
6581
6586
|
addTokenTo: "header",
|
|
6582
6587
|
headerPrefix: "Bearer",
|
|
6583
6588
|
access_token: "",
|
|
6584
|
-
grant_type: (
|
|
6585
|
-
redirect_uri: ((
|
|
6586
|
-
authUrl: ((
|
|
6587
|
-
accessTokenUrl: ((
|
|
6588
|
-
clientId: ((
|
|
6589
|
-
clientSecret: ((
|
|
6590
|
-
username: ((
|
|
6591
|
-
password: ((
|
|
6589
|
+
grant_type: THUNDER_CLIENT_GRANT_TYPES[(_m = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _m === void 0 ? void 0 : _m.grantType] ? THUNDER_CLIENT_GRANT_TYPES[(_o = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _o === void 0 ? void 0 : _o.grantType] : "authorization_code",
|
|
6590
|
+
redirect_uri: ((_p = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _p === void 0 ? void 0 : _p.callbackUrl) || "",
|
|
6591
|
+
authUrl: ((_q = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _q === void 0 ? void 0 : _q.authUrl) || "",
|
|
6592
|
+
accessTokenUrl: ((_r = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _r === void 0 ? void 0 : _r.tokenUrl) || "",
|
|
6593
|
+
clientId: ((_s = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _s === void 0 ? void 0 : _s.clientId) || "",
|
|
6594
|
+
clientSecret: ((_t = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _t === void 0 ? void 0 : _t.clientSecret) || "",
|
|
6595
|
+
username: ((_u = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _u === void 0 ? void 0 : _u.username) || "",
|
|
6596
|
+
password: ((_v = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _v === void 0 ? void 0 : _v.password) || "",
|
|
6592
6597
|
challengeAlgorithm: "S256",
|
|
6593
6598
|
code_verifier: "Bearer",
|
|
6594
|
-
scope: ((
|
|
6595
|
-
state: ((
|
|
6599
|
+
scope: ((_w = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _w === void 0 ? void 0 : _w.scope) || "",
|
|
6600
|
+
state: ((_x = auth === null || auth === void 0 ? void 0 : auth.oauth2) === null || _x === void 0 ? void 0 : _x.state) || "",
|
|
6596
6601
|
client_authentication: "header",
|
|
6597
6602
|
refreshTokenUrl: "",
|
|
6598
6603
|
authRequestParams: [],
|