@nice2dev/ui-api 1.4.30 → 1.4.32
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/CHANGELOG.md +47 -0
- package/dist/NiceApiClient.d.ts +10 -0
- package/dist/NiceIntegrationsEditor.d.ts +18 -1
- package/dist/apiClient/ApiClientParts.d.ts +31 -1
- package/dist/core/integration.d.ts +11 -0
- package/dist/core/model.d.ts +12 -0
- package/dist/core/variables.d.ts +9 -1
- package/dist/core.cjs +37 -37
- package/dist/core.mjs +401 -351
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +2809 -1947
- package/dist/ui-api.css +1 -1
- package/package.json +3 -3
package/dist/core.mjs
CHANGED
|
@@ -27,7 +27,7 @@ let Me = 0;
|
|
|
27
27
|
function Ne(e = "r") {
|
|
28
28
|
return Me = (Me + 1) % 1e6, `${e}${Date.now().toString(36)}${Me.toString(36)}${Math.random().toString(36).slice(2, 6)}`;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function ge(e = {}) {
|
|
31
31
|
return {
|
|
32
32
|
...e,
|
|
33
33
|
kind: "request",
|
|
@@ -48,7 +48,7 @@ function Te(e = {}) {
|
|
|
48
48
|
items: e.items ?? []
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function be(e = {}) {
|
|
52
52
|
return {
|
|
53
53
|
...e,
|
|
54
54
|
id: e.id ?? Ne("c"),
|
|
@@ -57,18 +57,18 @@ function ge(e = {}) {
|
|
|
57
57
|
variables: e.variables ?? []
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function me(e, t = []) {
|
|
61
61
|
const n = [];
|
|
62
62
|
for (const s of e)
|
|
63
|
-
s.kind === "folder" ? n.push(...
|
|
63
|
+
s.kind === "folder" ? n.push(...me(s.items, [...t, s])) : n.push({ request: s, folders: [...t] });
|
|
64
64
|
return n;
|
|
65
65
|
}
|
|
66
|
-
const
|
|
66
|
+
const mt = "#/components/schemas/";
|
|
67
67
|
function Es(e, t, n) {
|
|
68
68
|
var a;
|
|
69
69
|
if (!n || t === n || !((a = e.schemas) != null && a[t]) || e.schemas[n])
|
|
70
70
|
return e;
|
|
71
|
-
const s =
|
|
71
|
+
const s = mt + t, r = mt + n, o = (c) => Array.isArray(c) ? c.map(o) : c && typeof c == "object" ? Object.fromEntries(
|
|
72
72
|
Object.entries(c).map(([p, u]) => [
|
|
73
73
|
p,
|
|
74
74
|
p === "$ref" && u === s ? r : o(u)
|
|
@@ -168,11 +168,11 @@ function oe(e) {
|
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function jt(e, t) {
|
|
172
172
|
const n = (t ?? "").toLowerCase();
|
|
173
|
-
return n.includes("x-www-form-urlencoded") ? { kind: "form", fields:
|
|
173
|
+
return n.includes("x-www-form-urlencoded") ? { kind: "form", fields: Ot(e) } : n.includes("soap+xml") ? { kind: "soap", envelope: e, version: "1.2" } : n.includes("xml") ? /<(\w+:)?Envelope[\s>]/.test(e) ? { kind: "soap", envelope: e, version: "1.1" } : { kind: "xml", text: e } : n.includes("json") || !n && /^\s*[[{]/.test(e) ? an(e) ?? { kind: "json", text: e } : { kind: "text", text: e, contentType: t || void 0 };
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function Ot(e) {
|
|
176
176
|
return e ? e.split("&").map((t) => {
|
|
177
177
|
const n = t.indexOf("="), s = (r) => {
|
|
178
178
|
try {
|
|
@@ -198,10 +198,10 @@ function an(e) {
|
|
|
198
198
|
}
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
|
-
const
|
|
202
|
-
function
|
|
201
|
+
const Nt = /\{\{\s*([^{}]+?)\s*\}\}/g;
|
|
202
|
+
function Ct(e) {
|
|
203
203
|
const t = /* @__PURE__ */ new Set();
|
|
204
|
-
for (const n of e.matchAll(
|
|
204
|
+
for (const n of e.matchAll(Nt))
|
|
205
205
|
t.add(n[1]);
|
|
206
206
|
return [...t];
|
|
207
207
|
}
|
|
@@ -209,7 +209,7 @@ function cn(e) {
|
|
|
209
209
|
const t = (s) => Array.from({ length: s }, () => Math.floor(e() * 16).toString(16)).join(""), n = (8 + Math.floor(e() * 4)).toString(16);
|
|
210
210
|
return `${t(8)}-${t(4)}-4${t(3)}-${n}${t(3)}-${t(12)}`;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function Ut(e, t, n = {}) {
|
|
213
213
|
const s = typeof t == "function" ? t : (c) => t[c], r = n.random ?? Math.random, o = n.now ?? (() => /* @__PURE__ */ new Date()), i = (c) => {
|
|
214
214
|
var p;
|
|
215
215
|
if (c.startsWith("secret:"))
|
|
@@ -230,7 +230,7 @@ function Ct(e, t, n = {}) {
|
|
|
230
230
|
};
|
|
231
231
|
let a = e;
|
|
232
232
|
for (let c = 0; c < 5 && a.includes("{{"); c++) {
|
|
233
|
-
const p = a.replace(
|
|
233
|
+
const p = a.replace(Nt, (u, d) => i(d) ?? u);
|
|
234
234
|
if (p === a)
|
|
235
235
|
break;
|
|
236
236
|
a = p;
|
|
@@ -238,21 +238,33 @@ function Ct(e, t, n = {}) {
|
|
|
238
238
|
return a;
|
|
239
239
|
}
|
|
240
240
|
function Is(e, t, n = {}) {
|
|
241
|
-
return
|
|
241
|
+
return Ct(Ut(e, t, n));
|
|
242
|
+
}
|
|
243
|
+
function Ls(e, t) {
|
|
244
|
+
const n = [];
|
|
245
|
+
for (const s of e)
|
|
246
|
+
for (const r of (s == null ? void 0 : s.variableSets) ?? []) {
|
|
247
|
+
const o = t.find((i) => i.id === r);
|
|
248
|
+
o && n.push(o);
|
|
249
|
+
}
|
|
250
|
+
return n;
|
|
242
251
|
}
|
|
243
|
-
function
|
|
244
|
-
const
|
|
245
|
-
for (const
|
|
246
|
-
L(
|
|
252
|
+
function Ps(e, t, n, s) {
|
|
253
|
+
const r = {}, o = (i) => {
|
|
254
|
+
for (const a of i ?? [])
|
|
255
|
+
L(a) && a.key && (r[a.key] = a.value);
|
|
247
256
|
};
|
|
248
|
-
|
|
257
|
+
o(e == null ? void 0 : e.variables), o(t == null ? void 0 : t.values);
|
|
258
|
+
for (const i of s ?? [])
|
|
259
|
+
o(i.values);
|
|
260
|
+
return { ...r, ...n };
|
|
249
261
|
}
|
|
250
262
|
function pe(e) {
|
|
251
263
|
let t = e.trim(), n = "";
|
|
252
264
|
const s = t.indexOf("#");
|
|
253
265
|
s >= 0 && (n = t.slice(s), t = t.slice(0, s));
|
|
254
266
|
const r = t.indexOf("?");
|
|
255
|
-
return r < 0 ? { base: t, query: [], hash: n } : { base: t.slice(0, r), query:
|
|
267
|
+
return r < 0 ? { base: t, query: [], hash: n } : { base: t.slice(0, r), query: Ot(t.slice(r + 1)), hash: n };
|
|
256
268
|
}
|
|
257
269
|
function pn(e) {
|
|
258
270
|
const t = pe(e).base, n = [], s = t.replace(/^[a-z][\w+.-]*:\/\/[^/]*/i, "").replace(/^\{\{[^}]+\}\}/, "");
|
|
@@ -289,7 +301,7 @@ function un(e, t) {
|
|
|
289
301
|
function fn(e) {
|
|
290
302
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
291
303
|
}
|
|
292
|
-
function
|
|
304
|
+
function ht(e) {
|
|
293
305
|
return encodeURIComponent(e).replace(
|
|
294
306
|
/[!'()*]/g,
|
|
295
307
|
(t) => `%${t.charCodeAt(0).toString(16).toUpperCase()}`
|
|
@@ -302,17 +314,17 @@ function Ue(e, t = (n) => n) {
|
|
|
302
314
|
if (a.in !== "path" || !L(a))
|
|
303
315
|
continue;
|
|
304
316
|
const c = encodeURIComponent(t(a.value)), p = new RegExp(`(^|/):${fn(a.key)}(?=/|$)`);
|
|
305
|
-
o = o.split(`{${a.key}}`).join(c).replace(p, (u,
|
|
317
|
+
o = o.split(`{${a.key}}`).join(c).replace(p, (u, d) => d + c);
|
|
306
318
|
}
|
|
307
319
|
const i = [...s, ...e.params.filter((a) => a.in === "query" && L(a))].map(
|
|
308
320
|
(a) => {
|
|
309
|
-
const c =
|
|
310
|
-
return p === "" && !("in" in a) ? c : `${c}=${
|
|
321
|
+
const c = ht(t(a.key)), p = t(a.value);
|
|
322
|
+
return p === "" && !("in" in a) ? c : `${c}=${ht(p)}`;
|
|
311
323
|
}
|
|
312
324
|
);
|
|
313
325
|
return o + (i.length ? `?${i.join("&")}` : "") + t(r);
|
|
314
326
|
}
|
|
315
|
-
function
|
|
327
|
+
function Rs(e, t) {
|
|
316
328
|
return e ? t ? `${e.replace(/\/+$/, "")}/${t.replace(/^\/+/, "")}` : e : t;
|
|
317
329
|
}
|
|
318
330
|
function dn(e) {
|
|
@@ -361,7 +373,7 @@ function hn(e, t = mn(e)) {
|
|
|
361
373
|
if (p === "$" && n[i + 1] === "'" && t === "bash") {
|
|
362
374
|
for (i += 2; i < n.length && n[i] !== "'"; ) {
|
|
363
375
|
if (n[i] === "\\" && i + 1 < n.length) {
|
|
364
|
-
const u = n[i + 1],
|
|
376
|
+
const u = n[i + 1], d = {
|
|
365
377
|
n: `
|
|
366
378
|
`,
|
|
367
379
|
t: " ",
|
|
@@ -372,11 +384,11 @@ function hn(e, t = mn(e)) {
|
|
|
372
384
|
0: "\0"
|
|
373
385
|
};
|
|
374
386
|
if (u === "x") {
|
|
375
|
-
const
|
|
376
|
-
r += String.fromCharCode(parseInt(
|
|
387
|
+
const f = ((c = /^[0-9a-fA-F]{1,2}/.exec(n.slice(i + 2))) == null ? void 0 : c[0]) ?? "";
|
|
388
|
+
r += String.fromCharCode(parseInt(f || "0", 16)), i += 2 + f.length;
|
|
377
389
|
continue;
|
|
378
390
|
}
|
|
379
|
-
r +=
|
|
391
|
+
r += d[u] ?? `\\${u}`, i += 2;
|
|
380
392
|
continue;
|
|
381
393
|
}
|
|
382
394
|
r += n[i++];
|
|
@@ -486,7 +498,7 @@ const yn = new Set("XHdFubAemoxwTEKrUzCcDYyQt".split("")), gn = /* @__PURE__ */
|
|
|
486
498
|
"login-options",
|
|
487
499
|
"sasl-authzid",
|
|
488
500
|
"tls-max"
|
|
489
|
-
]),
|
|
501
|
+
]), yt = {
|
|
490
502
|
X: "request",
|
|
491
503
|
H: "header",
|
|
492
504
|
d: "data",
|
|
@@ -503,7 +515,7 @@ const yn = new Set("XHdFubAemoxwTEKrUzCcDYyQt".split("")), gn = /* @__PURE__ */
|
|
|
503
515
|
T: "upload-file",
|
|
504
516
|
E: "cert"
|
|
505
517
|
};
|
|
506
|
-
function
|
|
518
|
+
function Et(e) {
|
|
507
519
|
try {
|
|
508
520
|
const t = Uint8Array.from(atob(e.trim()), (n) => n.charCodeAt(0));
|
|
509
521
|
return new TextDecoder().decode(t);
|
|
@@ -555,7 +567,7 @@ function $n(e) {
|
|
|
555
567
|
const r = [], o = [], i = [], a = [];
|
|
556
568
|
let c;
|
|
557
569
|
const p = [];
|
|
558
|
-
let u,
|
|
570
|
+
let u, d = !1, f, l, m = !1, k = !1, y = !1;
|
|
559
571
|
const v = {}, $ = (j, x) => {
|
|
560
572
|
switch (j) {
|
|
561
573
|
case "request":
|
|
@@ -565,7 +577,7 @@ function $n(e) {
|
|
|
565
577
|
s = x ?? s;
|
|
566
578
|
break;
|
|
567
579
|
case "url-query":
|
|
568
|
-
x && i.push(...
|
|
580
|
+
x && i.push(...gt(x));
|
|
569
581
|
break;
|
|
570
582
|
case "header": {
|
|
571
583
|
if (!x)
|
|
@@ -609,13 +621,13 @@ function $n(e) {
|
|
|
609
621
|
u = x;
|
|
610
622
|
break;
|
|
611
623
|
case "oauth2-bearer":
|
|
612
|
-
|
|
624
|
+
f = x;
|
|
613
625
|
break;
|
|
614
626
|
case "aws-sigv4":
|
|
615
627
|
l = x;
|
|
616
628
|
break;
|
|
617
629
|
case "digest":
|
|
618
|
-
|
|
630
|
+
d = !0;
|
|
619
631
|
break;
|
|
620
632
|
case "get":
|
|
621
633
|
m = !0;
|
|
@@ -647,10 +659,10 @@ function $n(e) {
|
|
|
647
659
|
const M = x[_];
|
|
648
660
|
if (yn.has(M)) {
|
|
649
661
|
const g = x.slice(_ + 1) || t[++j];
|
|
650
|
-
$(
|
|
662
|
+
$(yt[M] ?? M, g);
|
|
651
663
|
break;
|
|
652
664
|
}
|
|
653
|
-
$(
|
|
665
|
+
$(yt[M] ?? M, void 0);
|
|
654
666
|
}
|
|
655
667
|
else s || (s = x);
|
|
656
668
|
}
|
|
@@ -661,7 +673,7 @@ function $n(e) {
|
|
|
661
673
|
if (x)
|
|
662
674
|
T = { type: "bearer", token: x[1].trim() }, r.splice(b, 1);
|
|
663
675
|
else if (_) {
|
|
664
|
-
const M =
|
|
676
|
+
const M = Et(_[1]), h = M.indexOf(":");
|
|
665
677
|
h >= 0 && (T = {
|
|
666
678
|
type: "basic",
|
|
667
679
|
username: M.slice(0, h),
|
|
@@ -681,19 +693,19 @@ function $n(e) {
|
|
|
681
693
|
service: h
|
|
682
694
|
};
|
|
683
695
|
} else
|
|
684
|
-
T =
|
|
696
|
+
T = d ? { type: "digest", username: x, password: _ } : { type: "basic", username: x, password: _ };
|
|
685
697
|
}
|
|
686
|
-
|
|
698
|
+
f !== void 0 && (T = { type: "bearer", token: f });
|
|
687
699
|
const S = r.findIndex((j) => j.key.toLowerCase() === "content-type"), w = S >= 0 ? r[S].value : void 0;
|
|
688
700
|
y && (S < 0 && r.push({ key: "Content-Type", value: "application/json" }), r.some((j) => j.key.toLowerCase() === "accept") || r.push({ key: "Accept", value: "application/json" }));
|
|
689
701
|
let O = { kind: "none" };
|
|
690
702
|
if (m && a.length)
|
|
691
|
-
i.push(...
|
|
703
|
+
i.push(...gt(a.join("&")));
|
|
692
704
|
else if (p.length)
|
|
693
705
|
O = { kind: "multipart", parts: p };
|
|
694
706
|
else if (a.length) {
|
|
695
707
|
const j = a.join(y ? "" : "&"), x = /^\s*[[{]/.test(j);
|
|
696
|
-
O =
|
|
708
|
+
O = jt(
|
|
697
709
|
j,
|
|
698
710
|
w ?? (y || x ? "application/json" : "application/x-www-form-urlencoded")
|
|
699
711
|
);
|
|
@@ -702,8 +714,8 @@ function $n(e) {
|
|
|
702
714
|
...r.map((j) => ({ ...j, in: "header" })),
|
|
703
715
|
...o.map((j) => ({ ...j, in: "cookie" }))
|
|
704
716
|
];
|
|
705
|
-
let H =
|
|
706
|
-
name:
|
|
717
|
+
let H = ge({
|
|
718
|
+
name: _t(P, s),
|
|
707
719
|
method: P,
|
|
708
720
|
params: R,
|
|
709
721
|
body: O,
|
|
@@ -715,7 +727,7 @@ function $n(e) {
|
|
|
715
727
|
params: [...H.params, ...i.map((j) => ({ ...j, in: "query" }))]
|
|
716
728
|
}), H;
|
|
717
729
|
}
|
|
718
|
-
function
|
|
730
|
+
function gt(e) {
|
|
719
731
|
return e.split("&").filter(Boolean).map((t) => {
|
|
720
732
|
const n = t.indexOf("="), s = (r) => {
|
|
721
733
|
try {
|
|
@@ -727,7 +739,7 @@ function yt(e) {
|
|
|
727
739
|
return n < 0 ? { key: s(t), value: "" } : { key: s(t.slice(0, n)), value: s(t.slice(n + 1)) };
|
|
728
740
|
});
|
|
729
741
|
}
|
|
730
|
-
function
|
|
742
|
+
function _t(e, t) {
|
|
731
743
|
const n = t.replace(/^[a-z][\w+.-]*:\/\/[^/]*/i, "").replace(/^\{\{[^}]+\}\}/, "").split("?")[0];
|
|
732
744
|
return `${e} ${n || "/"}`;
|
|
733
745
|
}
|
|
@@ -775,11 +787,11 @@ function De(e, t = {}) {
|
|
|
775
787
|
params: [...e.params, ...o.query.map((w) => ({ ...w, in: "query" }))]
|
|
776
788
|
}, a = Ue(i, s), c = [], p = e.method.toUpperCase(), u = e.body.kind !== "none";
|
|
777
789
|
p === "HEAD" ? c.push(["-I"]) : !(p === "GET" && !u) && !(p === "POST" && u) && c.push(["-X", p]);
|
|
778
|
-
const
|
|
779
|
-
for (const w of
|
|
790
|
+
const d = e.params.filter((w) => w.in === "header" && L(w));
|
|
791
|
+
for (const w of d)
|
|
780
792
|
c.push(["-H", `${s(w.key)}: ${s(w.value)}`]);
|
|
781
793
|
c.push(...o.options);
|
|
782
|
-
const
|
|
794
|
+
const f = Ce(e.body), l = d.some((w) => w.key.toLowerCase() === "content-type"), m = [
|
|
783
795
|
...e.params.filter((w) => w.in === "cookie" && L(w)),
|
|
784
796
|
...o.cookies
|
|
785
797
|
];
|
|
@@ -803,10 +815,10 @@ function De(e, t = {}) {
|
|
|
803
815
|
]);
|
|
804
816
|
break;
|
|
805
817
|
case "binary":
|
|
806
|
-
!l &&
|
|
818
|
+
!l && f && c.push(["-H", `Content-Type: ${f}`]), c.push(["--data-binary", `@${k.fileName ?? "file"}`]);
|
|
807
819
|
break;
|
|
808
820
|
default: {
|
|
809
|
-
!l &&
|
|
821
|
+
!l && f && c.push(["-H", `Content-Type: ${f}`]), k.kind === "soap" && k.version === "1.1" && k.action !== void 0 && (d.some((w) => w.key.toLowerCase() === "soapaction") || c.push(["-H", `SOAPAction: "${s(k.action)}"`])), c.push(["--data-raw", s(oe(k) ?? "")]);
|
|
810
822
|
break;
|
|
811
823
|
}
|
|
812
824
|
}
|
|
@@ -832,7 +844,7 @@ const An = [
|
|
|
832
844
|
{ id: "python", label: "Python requests", syntax: "python" }
|
|
833
845
|
];
|
|
834
846
|
function _e(e, t) {
|
|
835
|
-
var
|
|
847
|
+
var f;
|
|
836
848
|
const n = t.transform ?? ((l) => l), s = t.auth ?? e.auth, r = e.params.filter((l) => l.in === "header" && L(l)).map((l) => [n(l.key), n(l.value)]), o = [], i = e.params.filter((l) => l.in === "cookie" && L(l)).map((l) => `${n(l.key)}=${n(l.value)}`);
|
|
837
849
|
let a;
|
|
838
850
|
switch (s == null ? void 0 : s.type) {
|
|
@@ -869,14 +881,14 @@ function _e(e, t) {
|
|
|
869
881
|
break;
|
|
870
882
|
}
|
|
871
883
|
i.length && r.push(["Cookie", i.join("; ")]);
|
|
872
|
-
const c = Ue({ ...e, params: [...e.params, ...o] }, n), p = e.body, u = ((
|
|
884
|
+
const c = Ue({ ...e, params: [...e.params, ...o] }, n), p = e.body, u = ((f = r.find(([l]) => l.toLowerCase() === "content-type")) == null ? void 0 : f[1]) ?? Ce(p);
|
|
873
885
|
p.kind === "soap" && p.version === "1.1" && p.action !== void 0 && (r.some(([l]) => l.toLowerCase() === "soapaction") || r.push(["SOAPAction", `"${n(p.action)}"`]));
|
|
874
|
-
const
|
|
886
|
+
const d = xn(p, n);
|
|
875
887
|
return {
|
|
876
888
|
method: e.method.toUpperCase(),
|
|
877
889
|
url: c,
|
|
878
890
|
headers: r,
|
|
879
|
-
body:
|
|
891
|
+
body: d,
|
|
880
892
|
contentType: u,
|
|
881
893
|
note: a
|
|
882
894
|
};
|
|
@@ -911,12 +923,12 @@ function xn(e, t) {
|
|
|
911
923
|
}
|
|
912
924
|
}
|
|
913
925
|
const se = (e) => JSON.stringify(e), F = (e) => `@"${e.replace(/"/g, '""')}"`, te = (e) => `'${e.replace(/'/g, "''")}'`, Y = (e) => JSON.stringify(e);
|
|
914
|
-
function
|
|
926
|
+
function qt(e, t) {
|
|
915
927
|
return e.split(`
|
|
916
928
|
`).map((n, s) => s === 0 ? n : t + n).join(`
|
|
917
929
|
`);
|
|
918
930
|
}
|
|
919
|
-
function
|
|
931
|
+
function It(e) {
|
|
920
932
|
try {
|
|
921
933
|
return JSON.stringify(JSON.parse(e), null, 2);
|
|
922
934
|
} catch {
|
|
@@ -930,8 +942,8 @@ function Tn(e) {
|
|
|
930
942
|
const r = [...e.headers], o = r.some(([a]) => a.toLowerCase() === "content-type");
|
|
931
943
|
switch (e.body.kind) {
|
|
932
944
|
case "json": {
|
|
933
|
-
const a =
|
|
934
|
-
s = a ? `JSON.stringify(${
|
|
945
|
+
const a = It(e.body.text);
|
|
946
|
+
s = a ? `JSON.stringify(${qt(a, " ")})` : se(e.body.text), o || r.push(["Content-Type", "application/json"]);
|
|
935
947
|
break;
|
|
936
948
|
}
|
|
937
949
|
case "form":
|
|
@@ -1067,10 +1079,10 @@ function Nn(e) {
|
|
|
1067
1079
|
case "none":
|
|
1068
1080
|
break;
|
|
1069
1081
|
case "json": {
|
|
1070
|
-
const r =
|
|
1082
|
+
const r = It(e.body.text);
|
|
1071
1083
|
if (r) {
|
|
1072
1084
|
const o = r.replace(/\btrue\b/g, "True").replace(/\bfalse\b/g, "False").replace(/\bnull\b/g, "None");
|
|
1073
|
-
n.push(` json=${
|
|
1085
|
+
n.push(` json=${qt(o, " ")},`);
|
|
1074
1086
|
for (let i = s.length - 1; i >= 0; i--)
|
|
1075
1087
|
s[i][0].toLowerCase() === "content-type" && s.splice(i, 1);
|
|
1076
1088
|
} else
|
|
@@ -1138,7 +1150,7 @@ class Z extends Error {
|
|
|
1138
1150
|
super(`${t} (line ${n})`), this.line = n, this.name = "NiceYamlError";
|
|
1139
1151
|
}
|
|
1140
1152
|
}
|
|
1141
|
-
function
|
|
1153
|
+
function bt(e) {
|
|
1142
1154
|
let t = null;
|
|
1143
1155
|
for (let n = 0; n < e.length; n++) {
|
|
1144
1156
|
const s = e[n];
|
|
@@ -1234,7 +1246,7 @@ class En {
|
|
|
1234
1246
|
const r = n.length - n.replace(/^ +/, "").length, o = n.slice(r);
|
|
1235
1247
|
if (o.startsWith(" "))
|
|
1236
1248
|
throw new Z("Tabs cannot indent YAML", s + 1);
|
|
1237
|
-
return { indent: r, raw: o, text:
|
|
1249
|
+
return { indent: r, raw: o, text: bt(o), num: s + 1 };
|
|
1238
1250
|
});
|
|
1239
1251
|
}
|
|
1240
1252
|
skipBlank() {
|
|
@@ -1390,35 +1402,35 @@ class En {
|
|
|
1390
1402
|
const o = r[1] === ">", i = r[3] ?? "", a = Number(r[2] ?? r[4] ?? 0), c = [];
|
|
1391
1403
|
let p = a ? n + a : -1;
|
|
1392
1404
|
for (; this.i < this.lines.length; ) {
|
|
1393
|
-
const
|
|
1405
|
+
const f = this.lines[this.i], l = f.raw.trim() === "";
|
|
1394
1406
|
if (!l) {
|
|
1395
1407
|
if (p < 0) {
|
|
1396
|
-
if (
|
|
1408
|
+
if (f.indent <= n)
|
|
1397
1409
|
break;
|
|
1398
|
-
p =
|
|
1410
|
+
p = f.indent;
|
|
1399
1411
|
}
|
|
1400
|
-
if (
|
|
1412
|
+
if (f.indent < p)
|
|
1401
1413
|
break;
|
|
1402
1414
|
}
|
|
1403
|
-
c.push(l ? "" : " ".repeat(
|
|
1415
|
+
c.push(l ? "" : " ".repeat(f.indent - p) + f.raw), this.i++;
|
|
1404
1416
|
}
|
|
1405
1417
|
let u = 0;
|
|
1406
1418
|
for (; c.length && c[c.length - 1] === ""; )
|
|
1407
1419
|
c.pop(), u++;
|
|
1408
|
-
let
|
|
1409
|
-
return o ? (
|
|
1420
|
+
let d;
|
|
1421
|
+
return o ? (d = "", c.forEach((f, l) => {
|
|
1410
1422
|
if (l === 0) {
|
|
1411
|
-
|
|
1423
|
+
d = f;
|
|
1412
1424
|
return;
|
|
1413
1425
|
}
|
|
1414
|
-
const m = c[l - 1], k =
|
|
1415
|
-
|
|
1416
|
-
` : m === "" || k ?
|
|
1417
|
-
`) +
|
|
1418
|
-
})) :
|
|
1419
|
-
`), c.length ? i === "-" ?
|
|
1426
|
+
const m = c[l - 1], k = f.startsWith(" ") || m.startsWith(" ");
|
|
1427
|
+
f === "" ? d += `
|
|
1428
|
+
` : m === "" || k ? d += (m === "" ? "" : `
|
|
1429
|
+
`) + f : d += ` ${f}`;
|
|
1430
|
+
})) : d = c.join(`
|
|
1431
|
+
`), c.length ? i === "-" ? d : i === "+" ? `${d}
|
|
1420
1432
|
${`
|
|
1421
|
-
`.repeat(u)}` : `${
|
|
1433
|
+
`.repeat(u)}` : `${d}
|
|
1422
1434
|
` : i === "+" ? `
|
|
1423
1435
|
`.repeat(u) : "";
|
|
1424
1436
|
}
|
|
@@ -1430,7 +1442,7 @@ ${`
|
|
|
1430
1442
|
const a = this.findClosingQuote(o, s);
|
|
1431
1443
|
if (a >= 0) {
|
|
1432
1444
|
r.push(o.slice(0, a));
|
|
1433
|
-
const p =
|
|
1445
|
+
const p = bt(o.slice(a + 1)).trim();
|
|
1434
1446
|
if (p)
|
|
1435
1447
|
throw new Z(`Text after a quoted scalar: ${p.slice(0, 20)}`, i);
|
|
1436
1448
|
break;
|
|
@@ -1598,7 +1610,7 @@ class qn {
|
|
|
1598
1610
|
function In(e) {
|
|
1599
1611
|
return new En(e).parseDocument();
|
|
1600
1612
|
}
|
|
1601
|
-
function
|
|
1613
|
+
function Lt(e) {
|
|
1602
1614
|
for (let t = 0; t < e.length; t++) {
|
|
1603
1615
|
const n = e.charCodeAt(t);
|
|
1604
1616
|
if (n < 32 && n !== 9 && n !== 10 && n !== 13)
|
|
@@ -1607,8 +1619,8 @@ function It(e) {
|
|
|
1607
1619
|
return !1;
|
|
1608
1620
|
}
|
|
1609
1621
|
const Ln = /^[-?:,[\]{}#&*!|>'"%@`]/;
|
|
1610
|
-
function
|
|
1611
|
-
return e === "" || e !== e.trim() || Ln.test(e) || /: |:$| #|[\t\n\r]/.test(e) ||
|
|
1622
|
+
function Pt(e) {
|
|
1623
|
+
return e === "" || e !== e.trim() || Ln.test(e) || /: |:$| #|[\t\n\r]/.test(e) || Lt(e) || typeof ct(e) != "string";
|
|
1612
1624
|
}
|
|
1613
1625
|
function Pn(e) {
|
|
1614
1626
|
if (e == null)
|
|
@@ -1618,12 +1630,12 @@ function Pn(e) {
|
|
|
1618
1630
|
if (typeof e == "boolean")
|
|
1619
1631
|
return String(e);
|
|
1620
1632
|
const t = String(e);
|
|
1621
|
-
return
|
|
1633
|
+
return Pt(t) ? JSON.stringify(t) : t;
|
|
1622
1634
|
}
|
|
1623
1635
|
function Rn(e) {
|
|
1624
|
-
return
|
|
1636
|
+
return Pt(e) ? JSON.stringify(e) : e;
|
|
1625
1637
|
}
|
|
1626
|
-
function
|
|
1638
|
+
function kt(e) {
|
|
1627
1639
|
return Array.isArray(e) ? e.length > 0 : !!e && typeof e == "object" && Object.keys(e).length > 0;
|
|
1628
1640
|
}
|
|
1629
1641
|
function Qe(e, t, n, s) {
|
|
@@ -1635,7 +1647,7 @@ function Qe(e, t, n, s) {
|
|
|
1635
1647
|
}
|
|
1636
1648
|
s && n.push(s.trimEnd());
|
|
1637
1649
|
for (const o of e)
|
|
1638
|
-
if (
|
|
1650
|
+
if (kt(o)) {
|
|
1639
1651
|
const i = [];
|
|
1640
1652
|
Qe(o, t + 2, i, ""), n.push(`${r}- ${i[0].trimStart()}`, ...i.slice(1));
|
|
1641
1653
|
} else
|
|
@@ -1651,7 +1663,7 @@ function Qe(e, t, n, s) {
|
|
|
1651
1663
|
s && n.push(s.trimEnd());
|
|
1652
1664
|
for (const [i, a] of o) {
|
|
1653
1665
|
const c = `${r}${Rn(i)}:`;
|
|
1654
|
-
|
|
1666
|
+
kt(a) ? Qe(a, Array.isArray(a) ? t : t + 2, n, c) : ze(a, t, n, `${c} `);
|
|
1655
1667
|
}
|
|
1656
1668
|
return;
|
|
1657
1669
|
}
|
|
@@ -1667,7 +1679,7 @@ function ze(e, t, n, s) {
|
|
|
1667
1679
|
return;
|
|
1668
1680
|
}
|
|
1669
1681
|
if (typeof e == "string" && e.includes(`
|
|
1670
|
-
`) && !
|
|
1682
|
+
`) && !Lt(e)) {
|
|
1671
1683
|
const r = e.endsWith(`
|
|
1672
1684
|
`), o = (r ? e.slice(0, -1) : e).split(`
|
|
1673
1685
|
`), i = o[0].startsWith(" "), a = " ".repeat(t + 2), c = r ? e.endsWith(`
|
|
@@ -1695,7 +1707,7 @@ function Ge(e, t = In) {
|
|
|
1695
1707
|
}
|
|
1696
1708
|
return t(e);
|
|
1697
1709
|
}
|
|
1698
|
-
function
|
|
1710
|
+
function pt(e) {
|
|
1699
1711
|
return (t) => {
|
|
1700
1712
|
var s;
|
|
1701
1713
|
const n = (s = /^#\/(?:components\/schemas|definitions)\/(.+)$/.exec(t)) == null ? void 0 : s[1];
|
|
@@ -1747,7 +1759,7 @@ function Hn(e, t) {
|
|
|
1747
1759
|
}
|
|
1748
1760
|
function Rt(e, t = {}) {
|
|
1749
1761
|
const n = t.maxDepth ?? 6, s = t.arrayItems ?? 1, r = t.now ?? (() => /* @__PURE__ */ new Date()), o = (i, a, c) => {
|
|
1750
|
-
var u,
|
|
1762
|
+
var u, d, f, l, m, k;
|
|
1751
1763
|
if (!i)
|
|
1752
1764
|
return null;
|
|
1753
1765
|
if (i.$ref) {
|
|
@@ -1758,13 +1770,13 @@ function Rt(e, t = {}) {
|
|
|
1758
1770
|
}
|
|
1759
1771
|
if (i.example !== void 0)
|
|
1760
1772
|
return i.example;
|
|
1761
|
-
if ((
|
|
1773
|
+
if ((d = i.examples) != null && d.length)
|
|
1762
1774
|
return i.examples[0];
|
|
1763
1775
|
if (i.const !== void 0)
|
|
1764
1776
|
return i.const;
|
|
1765
1777
|
if (i.default !== void 0)
|
|
1766
1778
|
return i.default;
|
|
1767
|
-
if ((
|
|
1779
|
+
if ((f = i.enum) != null && f.length)
|
|
1768
1780
|
return i.enum[0];
|
|
1769
1781
|
if ((l = i.allOf) != null && l.length) {
|
|
1770
1782
|
const y = {};
|
|
@@ -1827,13 +1839,13 @@ function Ye(e) {
|
|
|
1827
1839
|
return {};
|
|
1828
1840
|
}
|
|
1829
1841
|
}
|
|
1830
|
-
function
|
|
1842
|
+
function Ms(e, t) {
|
|
1831
1843
|
var p;
|
|
1832
1844
|
const n = (p = e.examples) == null ? void 0 : p[0];
|
|
1833
1845
|
if (n) {
|
|
1834
1846
|
const u = {};
|
|
1835
|
-
for (const
|
|
1836
|
-
u[
|
|
1847
|
+
for (const d of n.headers ?? [])
|
|
1848
|
+
u[d.key] = d.value;
|
|
1837
1849
|
return { status: n.status, headers: u, body: n.body ?? "" };
|
|
1838
1850
|
}
|
|
1839
1851
|
const s = Object.entries(e.responses ?? {}), [r, o] = s.find(([u]) => /^2\d\d$/.test(u)) ?? s.find(([u]) => u === "default") ?? ["200", void 0], i = /^\d{3}$/.test(r) ? Number(r) : 200;
|
|
@@ -1843,7 +1855,7 @@ function Rs(e, t) {
|
|
|
1843
1855
|
let c = o.example ?? "";
|
|
1844
1856
|
if (!c && o.schema) {
|
|
1845
1857
|
const u = Rt(o.schema, {
|
|
1846
|
-
resolveRef:
|
|
1858
|
+
resolveRef: pt(t == null ? void 0 : t.schemas),
|
|
1847
1859
|
usage: "response"
|
|
1848
1860
|
});
|
|
1849
1861
|
c = typeof u == "string" ? u : JSON.stringify(u, null, 2);
|
|
@@ -1851,7 +1863,7 @@ function Rs(e, t) {
|
|
|
1851
1863
|
return { status: i, headers: { "Content-Type": a }, body: c };
|
|
1852
1864
|
}
|
|
1853
1865
|
const N = (e) => !!e && typeof e == "object" && !Array.isArray(e), z = (e) => typeof e == "string" ? e : void 0, Mt = ["get", "put", "post", "delete", "options", "head", "patch", "trace"], zn = ["query", "path", "header", "cookie"];
|
|
1854
|
-
function
|
|
1866
|
+
function $t(e, t) {
|
|
1855
1867
|
const n = t.indexOf("#"), s = n >= 0 ? t.slice(n + 1) : "";
|
|
1856
1868
|
if (!s || s === "/")
|
|
1857
1869
|
return e;
|
|
@@ -1898,7 +1910,7 @@ function Wn(e, t = {}) {
|
|
|
1898
1910
|
const s = n, r = t.baseUrlVariable ?? "baseUrl", o = /* @__PURE__ */ new Map(), i = (h) => {
|
|
1899
1911
|
var A;
|
|
1900
1912
|
if (h.startsWith("#"))
|
|
1901
|
-
return
|
|
1913
|
+
return $t(s, h);
|
|
1902
1914
|
const g = h.split("#")[0];
|
|
1903
1915
|
if (!o.has(g)) {
|
|
1904
1916
|
const U = (A = t.resolveRef) == null ? void 0 : A.call(t, g);
|
|
@@ -1907,7 +1919,7 @@ function Wn(e, t = {}) {
|
|
|
1907
1919
|
typeof U == "string" ? Ge(U, t.parseYaml) : U
|
|
1908
1920
|
);
|
|
1909
1921
|
}
|
|
1910
|
-
return
|
|
1922
|
+
return $t(o.get(g), h);
|
|
1911
1923
|
}, a = (h) => {
|
|
1912
1924
|
let g = h;
|
|
1913
1925
|
for (let A = 0; A < 20 && N(g) && typeof g.$ref == "string"; A++)
|
|
@@ -1934,7 +1946,7 @@ function Wn(e, t = {}) {
|
|
|
1934
1946
|
if (N(p.schemas))
|
|
1935
1947
|
for (const [h, g] of Object.entries(p.schemas))
|
|
1936
1948
|
u[h] = c(g) ?? {};
|
|
1937
|
-
const
|
|
1949
|
+
const d = pt(u), f = (h) => {
|
|
1938
1950
|
if (!N(h))
|
|
1939
1951
|
return;
|
|
1940
1952
|
const g = Object.values(h)[0], A = a(g);
|
|
@@ -2026,11 +2038,11 @@ function Wn(e, t = {}) {
|
|
|
2026
2038
|
const A = zn.find((ie) => ie === g.in);
|
|
2027
2039
|
if (!A || A === "header" && /^(accept|content-type|authorization)$/i.test(g.name))
|
|
2028
2040
|
return null;
|
|
2029
|
-
const U = c(g.schema) ?? (N(g.content) ? c((B = We(g.content)) == null ? void 0 : B[1].schema) : void 0), C = U != null && U.$ref ?
|
|
2041
|
+
const U = c(g.schema) ?? (N(g.content) ? c((B = We(g.content)) == null ? void 0 : B[1].schema) : void 0), C = U != null && U.$ref ? d(U.$ref) : U, q = g.example ?? f(g.examples) ?? (C == null ? void 0 : C.example) ?? (C == null ? void 0 : C.default) ?? ((re = C == null ? void 0 : C.enum) == null ? void 0 : re[0]), I = A === "path" || g.required === !0, D = { key: g.name, value: ue(q), in: A };
|
|
2030
2042
|
return I && (D.required = !0), !I && q === void 0 && (D.enabled = !1), typeof g.description == "string" && (D.description = g.description), U && (D.schema = U), typeof g.style == "string" && (D.style = g.style), typeof g.explode == "boolean" && (D.explode = g.explode), D;
|
|
2031
2043
|
}, T = (h, g) => {
|
|
2032
|
-
const A = c(g.schema), U = g.example ??
|
|
2033
|
-
const D = I != null && I.$ref ?
|
|
2044
|
+
const A = c(g.schema), U = g.example ?? f(g.examples), C = U !== void 0 ? U : Rt(A, { resolveRef: d, usage: "request" }), q = (I) => {
|
|
2045
|
+
const D = I != null && I.$ref ? d(I.$ref) : I;
|
|
2034
2046
|
return (D == null ? void 0 : D.properties) ?? {};
|
|
2035
2047
|
};
|
|
2036
2048
|
if (h === "application/x-www-form-urlencoded") {
|
|
@@ -2070,7 +2082,7 @@ function Wn(e, t = {}) {
|
|
|
2070
2082
|
A.contentType = C;
|
|
2071
2083
|
const I = c(q.schema);
|
|
2072
2084
|
I && (A.schema = I);
|
|
2073
|
-
const D = q.example ??
|
|
2085
|
+
const D = q.example ?? f(q.examples);
|
|
2074
2086
|
D !== void 0 && (A.example = typeof D == "string" ? D : JSON.stringify(D, null, 2));
|
|
2075
2087
|
}
|
|
2076
2088
|
return N(g.headers) && (A.headers = Object.entries(g.headers).map(([C, q]) => {
|
|
@@ -2092,8 +2104,8 @@ function Wn(e, t = {}) {
|
|
|
2092
2104
|
const ce = $(G);
|
|
2093
2105
|
if (!ce)
|
|
2094
2106
|
continue;
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2107
|
+
const ft = I.findIndex((dt) => dt.key === ce.key && dt.in === ce.in);
|
|
2108
|
+
ft >= 0 ? I[ft] = ce : I.push(ce);
|
|
2097
2109
|
}
|
|
2098
2110
|
let D = { kind: "none" };
|
|
2099
2111
|
const B = a(q.requestBody);
|
|
@@ -2109,7 +2121,7 @@ function Wn(e, t = {}) {
|
|
|
2109
2121
|
ie != null && ie.contentType && ie.contentType !== "*/*" && I.push({ key: "Accept", value: ie.contentType, in: "header" });
|
|
2110
2122
|
let Ee = v(q.security);
|
|
2111
2123
|
Ee && S && JSON.stringify(Ee) === JSON.stringify(S) && (Ee = void 0);
|
|
2112
|
-
const le = Array.isArray(q.tags) ? q.tags.filter((G) => typeof G == "string") : void 0, Zt =
|
|
2124
|
+
const le = Array.isArray(q.tags) ? q.tags.filter((G) => typeof G == "string") : void 0, Zt = ge({
|
|
2113
2125
|
name: z(q.summary) ?? z(q.operationId) ?? `${C.toUpperCase()} ${h}`,
|
|
2114
2126
|
method: C.toUpperCase(),
|
|
2115
2127
|
url: `{{${r}}}${h}`,
|
|
@@ -2150,7 +2162,7 @@ function Wn(e, t = {}) {
|
|
|
2150
2162
|
N(U) && (g = g.split(`{${A}}`).join(ue(U.default)));
|
|
2151
2163
|
return { url: g, description: z(h.description) };
|
|
2152
2164
|
}), j = N(s.info) ? s.info : {};
|
|
2153
|
-
return
|
|
2165
|
+
return be({
|
|
2154
2166
|
name: z(j.title) ?? "API",
|
|
2155
2167
|
description: z(j.description),
|
|
2156
2168
|
version: j.version === void 0 ? void 0 : ue(j.version),
|
|
@@ -2276,7 +2288,7 @@ function Bn(e) {
|
|
|
2276
2288
|
Mt.includes(b) && N(S) ? T[b] = p(S, $) : b !== "parameters" && (T[b] = S);
|
|
2277
2289
|
u[y] = T;
|
|
2278
2290
|
}
|
|
2279
|
-
const
|
|
2291
|
+
const d = {};
|
|
2280
2292
|
if (N(n.securityDefinitions)) {
|
|
2281
2293
|
const y = {
|
|
2282
2294
|
implicit: "implicit",
|
|
@@ -2285,12 +2297,12 @@ function Bn(e) {
|
|
|
2285
2297
|
accessCode: "authorizationCode"
|
|
2286
2298
|
};
|
|
2287
2299
|
for (const [v, $] of Object.entries(n.securityDefinitions))
|
|
2288
|
-
N($) && ($.type === "basic" ?
|
|
2300
|
+
N($) && ($.type === "basic" ? d[v] = { type: "http", scheme: "basic", description: $.description } : $.type === "apiKey" ? d[v] = {
|
|
2289
2301
|
type: "apiKey",
|
|
2290
2302
|
name: $.name,
|
|
2291
2303
|
in: $.in,
|
|
2292
2304
|
description: $.description
|
|
2293
|
-
} : $.type === "oauth2" && (
|
|
2305
|
+
} : $.type === "oauth2" && (d[v] = {
|
|
2294
2306
|
type: "oauth2",
|
|
2295
2307
|
description: $.description,
|
|
2296
2308
|
flows: {
|
|
@@ -2302,10 +2314,10 @@ function Bn(e) {
|
|
|
2302
2314
|
}
|
|
2303
2315
|
}));
|
|
2304
2316
|
}
|
|
2305
|
-
const
|
|
2317
|
+
const f = {};
|
|
2306
2318
|
if (N(n.responses))
|
|
2307
2319
|
for (const [y, v] of Object.entries(n.responses))
|
|
2308
|
-
|
|
2320
|
+
f[y] = c(v, r);
|
|
2309
2321
|
const l = z(n.host), m = z(n.basePath) ?? "", k = Array.isArray(n.schemes) && typeof n.schemes[0] == "string" ? n.schemes[0] : "https";
|
|
2310
2322
|
return {
|
|
2311
2323
|
openapi: "3.0.3",
|
|
@@ -2316,12 +2328,12 @@ function Bn(e) {
|
|
|
2316
2328
|
paths: u,
|
|
2317
2329
|
components: {
|
|
2318
2330
|
schemas: n.definitions,
|
|
2319
|
-
responses:
|
|
2320
|
-
securitySchemes:
|
|
2331
|
+
responses: f,
|
|
2332
|
+
securitySchemes: d
|
|
2321
2333
|
}
|
|
2322
2334
|
};
|
|
2323
2335
|
}
|
|
2324
|
-
function
|
|
2336
|
+
function Ds(e) {
|
|
2325
2337
|
const t = /* @__PURE__ */ new Map(), n = (s, r) => {
|
|
2326
2338
|
if (!s || s.type === "none" || s.type === "inherit")
|
|
2327
2339
|
return;
|
|
@@ -2338,7 +2350,7 @@ function Ms(e) {
|
|
|
2338
2350
|
r ? i.requestIds.push(r) : i.collectionDefault = !0, t.set(o.name, i);
|
|
2339
2351
|
};
|
|
2340
2352
|
n(e.auth);
|
|
2341
|
-
for (const { request: s, folders: r } of
|
|
2353
|
+
for (const { request: s, folders: r } of me(e.items)) {
|
|
2342
2354
|
let o = s.auth;
|
|
2343
2355
|
for (let i = r.length - 1; (!o || o.type === "inherit") && i >= 0; i--)
|
|
2344
2356
|
o = r[i].auth;
|
|
@@ -2511,7 +2523,7 @@ function Kn(e, t = {}) {
|
|
|
2511
2523
|
if (S)
|
|
2512
2524
|
return i[S.name] = S.scheme, [{ [S.name]: S.scopes }];
|
|
2513
2525
|
}, c = a(e.auth), p = {}, u = /* @__PURE__ */ new Map();
|
|
2514
|
-
for (const { request: b, folders: S } of
|
|
2526
|
+
for (const { request: b, folders: S } of me(e.items)) {
|
|
2515
2527
|
const w = Fn(b.url, o), O = b.method.toLowerCase();
|
|
2516
2528
|
if (p[w] ?? (p[w] = {}), p[w][O])
|
|
2517
2529
|
continue;
|
|
@@ -2549,7 +2561,7 @@ function Kn(e, t = {}) {
|
|
|
2549
2561
|
const M = a(b.auth);
|
|
2550
2562
|
M && (j.security = M), p[w][O] = j;
|
|
2551
2563
|
}
|
|
2552
|
-
const
|
|
2564
|
+
const d = {
|
|
2553
2565
|
openapi: "3.1.0",
|
|
2554
2566
|
info: {
|
|
2555
2567
|
title: e.name,
|
|
@@ -2557,20 +2569,20 @@ function Kn(e, t = {}) {
|
|
|
2557
2569
|
...e.description ? { description: e.description } : {}
|
|
2558
2570
|
}
|
|
2559
2571
|
};
|
|
2560
|
-
r && (
|
|
2572
|
+
r && (d.servers = r.map((b) => b.description ? b : { url: b.url })), u.size && (d.tags = [...u].map(
|
|
2561
2573
|
([b, S]) => S ? { name: b, description: S } : { name: b }
|
|
2562
|
-
)), c && (
|
|
2563
|
-
const
|
|
2564
|
-
return e.schemas && Object.keys(e.schemas).length && (
|
|
2574
|
+
)), c && (d.security = c), d.paths = p;
|
|
2575
|
+
const f = {};
|
|
2576
|
+
return e.schemas && Object.keys(e.schemas).length && (f.schemas = e.schemas), Object.keys(i).length && (f.securitySchemes = i), Object.keys(f).length && (d.components = f), d;
|
|
2565
2577
|
}
|
|
2566
|
-
function
|
|
2578
|
+
function Hs(e, t = {}) {
|
|
2567
2579
|
return Mn(Kn(e, t));
|
|
2568
2580
|
}
|
|
2569
2581
|
const W = (e) => !!e && typeof e == "object" && !Array.isArray(e), E = (e) => typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : void 0, ke = (e) => Array.isArray(e) ? e.filter(W) : [], Jn = "https://schema.getpostman.com/json/collection/v2.1.0/collection.json";
|
|
2570
2582
|
function Ht(e) {
|
|
2571
2583
|
return W(e) && W(e.info) && Array.isArray(e.item);
|
|
2572
2584
|
}
|
|
2573
|
-
function
|
|
2585
|
+
function ye(e) {
|
|
2574
2586
|
if (typeof e == "string")
|
|
2575
2587
|
return e || void 0;
|
|
2576
2588
|
if (W(e))
|
|
@@ -2580,11 +2592,11 @@ function Se(e) {
|
|
|
2580
2592
|
return ke(e).map((t) => {
|
|
2581
2593
|
const n = { key: E(t.key) ?? "", value: E(t.value) ?? "" };
|
|
2582
2594
|
t.disabled === !0 && (n.enabled = !1);
|
|
2583
|
-
const s =
|
|
2595
|
+
const s = ye(t.description);
|
|
2584
2596
|
return s && (n.description = s), n;
|
|
2585
2597
|
});
|
|
2586
2598
|
}
|
|
2587
|
-
function
|
|
2599
|
+
function lt(e) {
|
|
2588
2600
|
if (!W(e) || typeof e.type != "string")
|
|
2589
2601
|
return;
|
|
2590
2602
|
const t = e[e.type], n = (s) => {
|
|
@@ -2725,15 +2737,15 @@ function Yn(e) {
|
|
|
2725
2737
|
headers: Se(i.header),
|
|
2726
2738
|
body: E(i.body)
|
|
2727
2739
|
}));
|
|
2728
|
-
return
|
|
2740
|
+
return ge({
|
|
2729
2741
|
id: E(e.id) ?? void 0,
|
|
2730
2742
|
name: E(e.name) ?? "Request",
|
|
2731
2743
|
method: (E(t.method) ?? "GET").toUpperCase(),
|
|
2732
2744
|
url: n,
|
|
2733
2745
|
params: [...s, ...r],
|
|
2734
2746
|
body: Gn(t.body),
|
|
2735
|
-
auth:
|
|
2736
|
-
description:
|
|
2747
|
+
auth: lt(t.auth),
|
|
2748
|
+
description: ye(t.description) ?? ye(e.description),
|
|
2737
2749
|
scripts: zt(e.event),
|
|
2738
2750
|
examples: o.length ? o : void 0
|
|
2739
2751
|
});
|
|
@@ -2743,9 +2755,9 @@ function Wt(e) {
|
|
|
2743
2755
|
(t) => Array.isArray(t.item) ? Te({
|
|
2744
2756
|
id: E(t.id) ?? void 0,
|
|
2745
2757
|
name: E(t.name) ?? "Folder",
|
|
2746
|
-
description:
|
|
2758
|
+
description: ye(t.description),
|
|
2747
2759
|
items: Wt(t.item),
|
|
2748
|
-
auth:
|
|
2760
|
+
auth: lt(t.auth)
|
|
2749
2761
|
}) : Yn(t)
|
|
2750
2762
|
);
|
|
2751
2763
|
}
|
|
@@ -2753,7 +2765,7 @@ function Bt(e) {
|
|
|
2753
2765
|
return ke(e).map((t) => {
|
|
2754
2766
|
const n = { key: E(t.key) ?? "", value: E(t.value) ?? "" };
|
|
2755
2767
|
t.type === "secret" && (n.secret = !0), (t.disabled === !0 || t.enabled === !1) && (n.enabled = !1);
|
|
2756
|
-
const s =
|
|
2768
|
+
const s = ye(t.description);
|
|
2757
2769
|
return s && (n.description = s), n;
|
|
2758
2770
|
});
|
|
2759
2771
|
}
|
|
@@ -2761,14 +2773,14 @@ function Xn(e) {
|
|
|
2761
2773
|
const t = typeof e == "string" ? JSON.parse(e) : e;
|
|
2762
2774
|
if (!Ht(t))
|
|
2763
2775
|
throw new Error("Not a Postman collection");
|
|
2764
|
-
const n = t, s = n.info, r = zt(n.event), o =
|
|
2776
|
+
const n = t, s = n.info, r = zt(n.event), o = be({
|
|
2765
2777
|
id: E(s._postman_id) ?? void 0,
|
|
2766
2778
|
name: E(s.name) ?? "Postman collection",
|
|
2767
|
-
description:
|
|
2779
|
+
description: ye(s.description),
|
|
2768
2780
|
version: W(s.version) ? E(s.version.raw) : E(s.version),
|
|
2769
2781
|
items: Wt(n.item),
|
|
2770
2782
|
variables: Bt(n.variable),
|
|
2771
|
-
auth:
|
|
2783
|
+
auth: lt(n.auth)
|
|
2772
2784
|
});
|
|
2773
2785
|
if (r) {
|
|
2774
2786
|
const i = (a) => a.map(
|
|
@@ -2863,16 +2875,16 @@ const je = (e) => {
|
|
|
2863
2875
|
return L(e) || (t.disabled = !0), e.description && (t.description = e.description), t;
|
|
2864
2876
|
};
|
|
2865
2877
|
function es(e) {
|
|
2866
|
-
const t = e.params.filter((
|
|
2878
|
+
const t = e.params.filter((d) => d.in === "query"), n = Ue({
|
|
2867
2879
|
...e,
|
|
2868
|
-
params: e.params.filter((
|
|
2880
|
+
params: e.params.filter((d) => d.in === "query" && L(d))
|
|
2869
2881
|
}).replace(/%7B%7B(.*?)%7D%7D/g, "{{$1}}").replace(new RegExp("(?<!\\{)\\{([A-Za-z_][\\w.-]*)\\}(?!\\})", "g"), ":$1"), s = pe(e.url).base, r = /^([a-z][\w+.-]*):\/\//i.exec(s), o = r ? s.slice(r[0].length) : s, i = o.indexOf("/"), a = i < 0 ? o : o.slice(0, i), c = i < 0 ? [] : o.slice(i + 1).split("/"), p = {
|
|
2870
2882
|
raw: n,
|
|
2871
2883
|
host: a ? a.startsWith("{{") ? [a] : a.split(".") : [],
|
|
2872
|
-
path: c.map((
|
|
2884
|
+
path: c.map((d) => d.replace(/^\{([A-Za-z_][\w.-]*)\}$/, ":$1"))
|
|
2873
2885
|
};
|
|
2874
2886
|
r && (p.protocol = r[1]), t.length && (p.query = t.map(je));
|
|
2875
|
-
const u = e.params.filter((
|
|
2887
|
+
const u = e.params.filter((d) => d.in === "path");
|
|
2876
2888
|
return u.length && (p.variable = u.map(je)), p;
|
|
2877
2889
|
}
|
|
2878
2890
|
function ts(e) {
|
|
@@ -2949,7 +2961,7 @@ function Ft(e) {
|
|
|
2949
2961
|
body: a.body ?? ""
|
|
2950
2962
|
})), o;
|
|
2951
2963
|
}
|
|
2952
|
-
function
|
|
2964
|
+
function zs(e) {
|
|
2953
2965
|
const t = {
|
|
2954
2966
|
info: {
|
|
2955
2967
|
_postman_id: e.id,
|
|
@@ -2966,7 +2978,7 @@ function Hs(e) {
|
|
|
2966
2978
|
const n = Xe(e.auth);
|
|
2967
2979
|
return n && (t.auth = n), t;
|
|
2968
2980
|
}
|
|
2969
|
-
function
|
|
2981
|
+
function Ws(e) {
|
|
2970
2982
|
return {
|
|
2971
2983
|
id: e.id,
|
|
2972
2984
|
name: e.name,
|
|
@@ -2997,7 +3009,7 @@ function rs(e, t = {}) {
|
|
|
2997
3009
|
const a = fe(i.request) ? i.request : {}, c = fe(i.response) ? i.response : {}, p = fe(c.content) ? c.content : {}, u = (K(p.mimeType) ?? "").toLowerCase();
|
|
2998
3010
|
if (r && ss.test(u))
|
|
2999
3011
|
continue;
|
|
3000
|
-
const { base:
|
|
3012
|
+
const { base: d, query: f } = pe(K(a.url) ?? ""), l = Array.isArray(a.queryString) ? we(a.queryString) : f, m = we(a.cookies), k = we(a.headers).filter(
|
|
3001
3013
|
(w) => !w.key.startsWith(":") && !/^(content-length|host|connection)$/i.test(w.key) && !(m.length && /^cookie$/i.test(w.key))
|
|
3002
3014
|
), y = [
|
|
3003
3015
|
...l.map((w) => ({ ...w, in: "query" })),
|
|
@@ -3019,12 +3031,12 @@ function rs(e, t = {}) {
|
|
|
3019
3031
|
contentType: K(P.contentType)
|
|
3020
3032
|
} : { key: K(P.name) ?? "", value: K(P.value) ?? "", type: "text" }
|
|
3021
3033
|
)
|
|
3022
|
-
} : O.length ? v = { kind: "form", fields: we(O) } : K($.text) !== void 0 && (v =
|
|
3034
|
+
} : O.length ? v = { kind: "form", fields: we(O) } : K($.text) !== void 0 && (v = jt(K($.text) ?? "", w || void 0));
|
|
3023
3035
|
}
|
|
3024
3036
|
const T = (K(a.method) ?? "GET").toUpperCase(), b = [], S = Number(c.status);
|
|
3025
3037
|
if (Number.isFinite(S) && S > 0) {
|
|
3026
3038
|
let w = K(p.text);
|
|
3027
|
-
w !== void 0 && p.encoding === "base64" && /json|xml|text|javascript/.test(u) && (w =
|
|
3039
|
+
w !== void 0 && p.encoding === "base64" && /json|xml|text|javascript/.test(u) && (w = Et(w)), b.push({
|
|
3028
3040
|
name: `${S} ${K(c.statusText) ?? ""}`.trim(),
|
|
3029
3041
|
status: S,
|
|
3030
3042
|
headers: we(c.headers).filter((O) => !O.key.startsWith(":")),
|
|
@@ -3032,23 +3044,23 @@ function rs(e, t = {}) {
|
|
|
3032
3044
|
});
|
|
3033
3045
|
}
|
|
3034
3046
|
o.push(
|
|
3035
|
-
|
|
3036
|
-
name:
|
|
3047
|
+
ge({
|
|
3048
|
+
name: _t(T, d),
|
|
3037
3049
|
method: T,
|
|
3038
|
-
url:
|
|
3050
|
+
url: d,
|
|
3039
3051
|
params: y,
|
|
3040
3052
|
body: v,
|
|
3041
3053
|
examples: b.length ? b : void 0
|
|
3042
3054
|
})
|
|
3043
3055
|
);
|
|
3044
3056
|
}
|
|
3045
|
-
return
|
|
3057
|
+
return be({ name: t.name ?? "HAR import", items: o });
|
|
3046
3058
|
}
|
|
3047
3059
|
const Be = (e) => ({ name: e.key, value: e.value });
|
|
3048
|
-
function
|
|
3049
|
-
const n = Array.isArray(e) ? e :
|
|
3060
|
+
function Bs(e, t = {}) {
|
|
3061
|
+
const n = Array.isArray(e) ? e : me(e.items).map((i) => i.request), s = t.transform ?? ((i) => i), r = (t.now ?? (() => /* @__PURE__ */ new Date()))().toISOString(), o = n.map((i) => {
|
|
3050
3062
|
var k, y, v, $, T;
|
|
3051
|
-
const a = Ue(i, s), c = i.params.filter((b) => b.in === "header" && L(b)).map((b) => ({ key: s(b.key), value: s(b.value) })), p = i.params.filter((b) => b.in === "cookie" && L(b)).map((b) => ({ key: s(b.key), value: s(b.value) })), u = ((k = c.find((b) => /^content-type$/i.test(b.key))) == null ? void 0 : k.value) ?? Ce(i.body),
|
|
3063
|
+
const a = Ue(i, s), c = i.params.filter((b) => b.in === "header" && L(b)).map((b) => ({ key: s(b.key), value: s(b.value) })), p = i.params.filter((b) => b.in === "cookie" && L(b)).map((b) => ({ key: s(b.key), value: s(b.value) })), u = ((k = c.find((b) => /^content-type$/i.test(b.key))) == null ? void 0 : k.value) ?? Ce(i.body), d = {
|
|
3052
3064
|
method: i.method.toUpperCase(),
|
|
3053
3065
|
url: a,
|
|
3054
3066
|
httpVersion: "HTTP/1.1",
|
|
@@ -3057,22 +3069,22 @@ function Ws(e, t = {}) {
|
|
|
3057
3069
|
cookies: p.map(Be),
|
|
3058
3070
|
headersSize: -1,
|
|
3059
3071
|
bodySize: -1
|
|
3060
|
-
},
|
|
3061
|
-
|
|
3072
|
+
}, f = i.body;
|
|
3073
|
+
f.kind === "form" ? d.postData = {
|
|
3062
3074
|
mimeType: u,
|
|
3063
|
-
params:
|
|
3064
|
-
text: s(oe(
|
|
3065
|
-
} :
|
|
3075
|
+
params: f.fields.filter(L).map((b) => ({ name: s(b.key), value: s(b.value) })),
|
|
3076
|
+
text: s(oe(f) ?? "")
|
|
3077
|
+
} : f.kind === "multipart" ? d.postData = {
|
|
3066
3078
|
mimeType: u,
|
|
3067
|
-
params:
|
|
3079
|
+
params: f.parts.filter(L).map(
|
|
3068
3080
|
(b) => b.type === "file" ? { name: s(b.key), fileName: b.fileName ?? "", contentType: b.contentType } : { name: s(b.key), value: s(b.value) }
|
|
3069
3081
|
)
|
|
3070
|
-
} :
|
|
3082
|
+
} : f.kind !== "none" && f.kind !== "binary" && (d.postData = { mimeType: u, text: s(oe(f) ?? "") });
|
|
3071
3083
|
const l = (y = i.examples) == null ? void 0 : y[0], m = (($ = (v = l == null ? void 0 : l.headers) == null ? void 0 : v.find((b) => /^content-type$/i.test(b.key))) == null ? void 0 : $.value) ?? "";
|
|
3072
3084
|
return {
|
|
3073
3085
|
startedDateTime: r,
|
|
3074
3086
|
time: 0,
|
|
3075
|
-
request:
|
|
3087
|
+
request: d,
|
|
3076
3088
|
response: {
|
|
3077
3089
|
status: (l == null ? void 0 : l.status) ?? 0,
|
|
3078
3090
|
// the example's name is "201 Created" when it came from a HAR
|
|
@@ -3101,7 +3113,7 @@ function Ws(e, t = {}) {
|
|
|
3101
3113
|
}
|
|
3102
3114
|
};
|
|
3103
3115
|
}
|
|
3104
|
-
const
|
|
3116
|
+
const Fs = `query IntrospectionQuery {
|
|
3105
3117
|
__schema {
|
|
3106
3118
|
queryType { name }
|
|
3107
3119
|
mutationType { name }
|
|
@@ -3247,12 +3259,12 @@ function cs(e) {
|
|
|
3247
3259
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
3248
3260
|
}
|
|
3249
3261
|
function ps(e, t, n = {}) {
|
|
3250
|
-
const { kind: s, field: r } = t, o = n.depth ?? 2, i = cs(r.name), a = r.args ?? [], c = a.length ? `(${a.map((l) => `$${l.name}: ${et(l.type)}`).join(", ")})` : "", p = a.length ? `(${a.map((l) => `${l.name}: $${l.name}`).join(", ")})` : "", u = Jt(e, r.type) ? "" : ` ${tt(e, r.type, o - 1, " ")}`,
|
|
3262
|
+
const { kind: s, field: r } = t, o = n.depth ?? 2, i = cs(r.name), a = r.args ?? [], c = a.length ? `(${a.map((l) => `$${l.name}: ${et(l.type)}`).join(", ")})` : "", p = a.length ? `(${a.map((l) => `${l.name}: $${l.name}`).join(", ")})` : "", u = Jt(e, r.type) ? "" : ` ${tt(e, r.type, o - 1, " ")}`, d = `${s} ${i}${c} {
|
|
3251
3263
|
${r.name}${p}${u}
|
|
3252
|
-
}`,
|
|
3264
|
+
}`, f = {};
|
|
3253
3265
|
for (const l of a)
|
|
3254
|
-
l.defaultValue == null && (
|
|
3255
|
-
return { query:
|
|
3266
|
+
l.defaultValue == null && (f[l.name] = qe(e, l.type));
|
|
3267
|
+
return { query: d, variables: f, operationName: i };
|
|
3256
3268
|
}
|
|
3257
3269
|
function ls(e, t = {}) {
|
|
3258
3270
|
const n = typeof e == "object" && e && "types" in e && !Array.isArray(e.types) ? e : is(e), s = {
|
|
@@ -3262,7 +3274,7 @@ function ls(e, t = {}) {
|
|
|
3262
3274
|
...t.folderNames
|
|
3263
3275
|
}, r = /* @__PURE__ */ new Map();
|
|
3264
3276
|
for (const o of os(n)) {
|
|
3265
|
-
const i = ps(n, o, { depth: t.depth }), a =
|
|
3277
|
+
const i = ps(n, o, { depth: t.depth }), a = ge({
|
|
3266
3278
|
name: o.field.name,
|
|
3267
3279
|
method: "POST",
|
|
3268
3280
|
url: "{{graphqlUrl}}",
|
|
@@ -3277,7 +3289,7 @@ function ls(e, t = {}) {
|
|
|
3277
3289
|
});
|
|
3278
3290
|
r.has(o.kind) || r.set(o.kind, []), r.get(o.kind).push(a);
|
|
3279
3291
|
}
|
|
3280
|
-
return
|
|
3292
|
+
return be({
|
|
3281
3293
|
name: t.name ?? "GraphQL API",
|
|
3282
3294
|
items: [...r].map(([o, i]) => Te({ name: s[o], items: i })),
|
|
3283
3295
|
variables: [{ key: "graphqlUrl", value: t.endpoint ?? "" }]
|
|
@@ -3298,7 +3310,7 @@ function ae(e, t) {
|
|
|
3298
3310
|
const n = t.indexOf(":"), s = n < 0 ? null : t.slice(0, n), r = n < 0 ? t : t.slice(n + 1);
|
|
3299
3311
|
return { namespace: e.lookupNamespaceURI(s) ?? void 0, name: r };
|
|
3300
3312
|
}
|
|
3301
|
-
function
|
|
3313
|
+
function wt(e) {
|
|
3302
3314
|
var s;
|
|
3303
3315
|
const t = ne(e, Q, "documentation");
|
|
3304
3316
|
return ((s = t == null ? void 0 : t.textContent) == null ? void 0 : s.trim()) || void 0;
|
|
@@ -3314,48 +3326,48 @@ function ms(e, t = ds()) {
|
|
|
3314
3326
|
if (!s || s.localName !== "definitions" || s.namespaceURI !== Q)
|
|
3315
3327
|
throw new Error("Not a WSDL 1.1 document");
|
|
3316
3328
|
const r = s.getAttribute("targetNamespace") ?? void 0, o = { elements: /* @__PURE__ */ new Map(), types: /* @__PURE__ */ new Map(), qualified: /* @__PURE__ */ new Map() }, i = ne(s, Q, "types");
|
|
3317
|
-
for (const
|
|
3318
|
-
const
|
|
3319
|
-
o.qualified.set(
|
|
3320
|
-
for (const l of X(
|
|
3329
|
+
for (const d of i ? X(i, de, "schema") : []) {
|
|
3330
|
+
const f = d.getAttribute("targetNamespace") ?? void 0;
|
|
3331
|
+
o.qualified.set(f ?? "", d.getAttribute("elementFormDefault") === "qualified");
|
|
3332
|
+
for (const l of X(d, de, "element")) {
|
|
3321
3333
|
const m = l.getAttribute("name");
|
|
3322
|
-
m && o.elements.set(ee(
|
|
3334
|
+
m && o.elements.set(ee(f, m), l);
|
|
3323
3335
|
}
|
|
3324
|
-
for (const l of [...X(
|
|
3336
|
+
for (const l of [...X(d, de, "complexType"), ...X(d, de, "simpleType")]) {
|
|
3325
3337
|
const m = l.getAttribute("name");
|
|
3326
|
-
m && o.types.set(ee(
|
|
3338
|
+
m && o.types.set(ee(f, m), l);
|
|
3327
3339
|
}
|
|
3328
3340
|
}
|
|
3329
3341
|
const a = /* @__PURE__ */ new Map();
|
|
3330
|
-
for (const
|
|
3331
|
-
const
|
|
3342
|
+
for (const d of X(s, Q, "message")) {
|
|
3343
|
+
const f = X(d, Q, "part").map((l) => ({
|
|
3332
3344
|
name: l.getAttribute("name") ?? "",
|
|
3333
3345
|
element: ae(l, l.getAttribute("element")),
|
|
3334
3346
|
type: ae(l, l.getAttribute("type"))
|
|
3335
3347
|
}));
|
|
3336
|
-
a.set(ee(r,
|
|
3348
|
+
a.set(ee(r, d.getAttribute("name") ?? ""), f);
|
|
3337
3349
|
}
|
|
3338
3350
|
const c = /* @__PURE__ */ new Map();
|
|
3339
|
-
for (const
|
|
3340
|
-
const
|
|
3341
|
-
for (const l of X(
|
|
3351
|
+
for (const d of X(s, Q, "portType")) {
|
|
3352
|
+
const f = /* @__PURE__ */ new Map();
|
|
3353
|
+
for (const l of X(d, Q, "operation")) {
|
|
3342
3354
|
const m = ne(l, Q, "input"), k = ne(l, Q, "output"), y = m ? ae(m, m.getAttribute("message")) : void 0, v = k ? ae(k, k.getAttribute("message")) : void 0;
|
|
3343
|
-
|
|
3344
|
-
doc:
|
|
3355
|
+
f.set(l.getAttribute("name") ?? "", {
|
|
3356
|
+
doc: wt(l),
|
|
3345
3357
|
input: y ? ee(y.namespace, y.name) : void 0,
|
|
3346
3358
|
output: v ? ee(v.namespace, v.name) : void 0
|
|
3347
3359
|
});
|
|
3348
3360
|
}
|
|
3349
|
-
c.set(ee(r,
|
|
3361
|
+
c.set(ee(r, d.getAttribute("name") ?? ""), f);
|
|
3350
3362
|
}
|
|
3351
3363
|
const p = /* @__PURE__ */ new Map();
|
|
3352
|
-
for (const
|
|
3353
|
-
const
|
|
3364
|
+
for (const d of X(s, Q, "binding")) {
|
|
3365
|
+
const f = ne(d, Fe, "binding"), l = ne(d, Ve, "binding"), m = f ?? l, k = ee(r, d.getAttribute("name") ?? "");
|
|
3354
3366
|
if (!m) {
|
|
3355
3367
|
p.set(k, null);
|
|
3356
3368
|
continue;
|
|
3357
3369
|
}
|
|
3358
|
-
const y =
|
|
3370
|
+
const y = f ? Fe : Ve, v = ae(d, d.getAttribute("type")), $ = v ? c.get(ee(v.namespace, v.name)) : void 0, T = m.getAttribute("style") === "rpc" ? "rpc" : "document", b = X(d, Q, "operation").map((S) => {
|
|
3359
3371
|
const w = S.getAttribute("name") ?? "", O = ne(S, y, "operation"), P = ((O == null ? void 0 : O.getAttribute("style")) ?? T) === "rpc" ? "rpc" : "document", R = $ == null ? void 0 : $.get(w), H = R != null && R.input ? a.get(R.input) : void 0, j = R != null && R.output ? a.get(R.output) : void 0, x = ne(S, Q, "input"), _ = x ? ne(x, y, "body") : void 0, M = {
|
|
3360
3372
|
name: w,
|
|
3361
3373
|
soapAction: (O == null ? void 0 : O.getAttribute("soapAction")) ?? void 0,
|
|
@@ -3374,19 +3386,19 @@ function ms(e, t = ds()) {
|
|
|
3374
3386
|
const h = j == null ? void 0 : j.find((g) => g.element);
|
|
3375
3387
|
return h != null && h.element && (M.outputElement = h.element), M;
|
|
3376
3388
|
});
|
|
3377
|
-
p.set(k, { version:
|
|
3389
|
+
p.set(k, { version: f ? "1.1" : "1.2", operations: b });
|
|
3378
3390
|
}
|
|
3379
|
-
const u = X(s, Q, "service").map((
|
|
3380
|
-
name:
|
|
3381
|
-
documentation:
|
|
3382
|
-
ports: X(
|
|
3383
|
-
const l = ae(
|
|
3391
|
+
const u = X(s, Q, "service").map((d) => ({
|
|
3392
|
+
name: d.getAttribute("name") ?? "Service",
|
|
3393
|
+
documentation: wt(d),
|
|
3394
|
+
ports: X(d, Q, "port").flatMap((f) => {
|
|
3395
|
+
const l = ae(f, f.getAttribute("binding")), m = l ? p.get(ee(l.namespace, l.name)) : void 0;
|
|
3384
3396
|
if (!m)
|
|
3385
3397
|
return [];
|
|
3386
|
-
const k = ne(
|
|
3398
|
+
const k = ne(f, Fe, "address") ?? ne(f, Ve, "address");
|
|
3387
3399
|
return [
|
|
3388
3400
|
{
|
|
3389
|
-
name:
|
|
3401
|
+
name: f.getAttribute("name") ?? "",
|
|
3390
3402
|
binding: (l == null ? void 0 : l.name) ?? "",
|
|
3391
3403
|
version: m.version,
|
|
3392
3404
|
address: (k == null ? void 0 : k.getAttribute("location")) ?? "",
|
|
@@ -3404,7 +3416,7 @@ function Qt(e, t, n, s, r, o, i) {
|
|
|
3404
3416
|
const $ = ae(t, t.getAttribute("ref")), T = $ ? e.schema.elements.get(ee($.namespace, $.name)) : void 0;
|
|
3405
3417
|
T && (c = T, p = $ == null ? void 0 : $.namespace);
|
|
3406
3418
|
}
|
|
3407
|
-
const u = c.getAttribute("name") ?? a.split(":").pop() ?? a,
|
|
3419
|
+
const u = c.getAttribute("name") ?? a.split(":").pop() ?? a, d = r && p ? nt(p, s) : "", f = d ? `${d}:${u}` : u, m = c.getAttribute("minOccurs") === "0" || t.getAttribute("minOccurs") === "0" ? `${o}<!--Optional:-->
|
|
3408
3420
|
` : "";
|
|
3409
3421
|
let k = ne(c, de, "complexType");
|
|
3410
3422
|
const y = ae(c, c.getAttribute("type"));
|
|
@@ -3413,27 +3425,27 @@ function Qt(e, t, n, s, r, o, i) {
|
|
|
3413
3425
|
($ == null ? void 0 : $.localName) === "complexType" && (k = $);
|
|
3414
3426
|
}
|
|
3415
3427
|
if (!k || i > 6)
|
|
3416
|
-
return `${m}${o}<${
|
|
3428
|
+
return `${m}${o}<${f}>?</${f}>`;
|
|
3417
3429
|
const v = hs(e, k, p, s, o, i);
|
|
3418
|
-
return v ? `${m}${o}<${
|
|
3430
|
+
return v ? `${m}${o}<${f}>
|
|
3419
3431
|
${v}
|
|
3420
|
-
${o}</${
|
|
3432
|
+
${o}</${f}>` : `${m}${o}<${f}/>`;
|
|
3421
3433
|
}
|
|
3422
3434
|
function hs(e, t, n, s, r, o) {
|
|
3423
3435
|
const i = e.schema.qualified.get(n ?? "") ?? !1, a = [], c = (p) => {
|
|
3424
3436
|
for (const u of Array.from(p.childNodes)) {
|
|
3425
3437
|
if (u.nodeType !== 1)
|
|
3426
3438
|
continue;
|
|
3427
|
-
const
|
|
3428
|
-
if (
|
|
3429
|
-
if (
|
|
3430
|
-
a.push(Qt(e,
|
|
3431
|
-
else if (["sequence", "all", "choice", "complexContent", "extension"].includes(
|
|
3432
|
-
if (
|
|
3433
|
-
const
|
|
3439
|
+
const d = u;
|
|
3440
|
+
if (d.namespaceURI === de) {
|
|
3441
|
+
if (d.localName === "element")
|
|
3442
|
+
a.push(Qt(e, d, n, s, i, `${r} `, o + 1));
|
|
3443
|
+
else if (["sequence", "all", "choice", "complexContent", "extension"].includes(d.localName)) {
|
|
3444
|
+
if (d.localName === "extension") {
|
|
3445
|
+
const f = ae(d, d.getAttribute("base")), l = f ? e.schema.types.get(ee(f.namespace, f.name)) : void 0;
|
|
3434
3446
|
l && c(l);
|
|
3435
3447
|
}
|
|
3436
|
-
c(
|
|
3448
|
+
c(d);
|
|
3437
3449
|
}
|
|
3438
3450
|
}
|
|
3439
3451
|
}
|
|
@@ -3449,18 +3461,18 @@ function ys(e, t, n = "1.1") {
|
|
|
3449
3461
|
let o;
|
|
3450
3462
|
const i = t.inputElement;
|
|
3451
3463
|
if (t.style === "rpc") {
|
|
3452
|
-
const p = i == null ? void 0 : i.namespace, u = p ? nt(p, s) : "",
|
|
3453
|
-
o =
|
|
3454
|
-
${
|
|
3464
|
+
const p = i == null ? void 0 : i.namespace, u = p ? nt(p, s) : "", d = u ? `${u}:${t.name}` : t.name, f = (t.inputParts ?? []).map((l) => ` <${l.name}>?</${l.name}>`);
|
|
3465
|
+
o = f.length ? ` <${d}>
|
|
3466
|
+
${f.join(`
|
|
3455
3467
|
`)}
|
|
3456
|
-
</${
|
|
3468
|
+
</${d}>` : ` <${d}/>`;
|
|
3457
3469
|
} else if (i) {
|
|
3458
3470
|
const p = e.schema.elements.get(ee(i.namespace, i.name));
|
|
3459
3471
|
if (p)
|
|
3460
3472
|
o = Qt(e, p, i.namespace, s, !0, " ", 0);
|
|
3461
3473
|
else {
|
|
3462
|
-
const u = i.namespace ? nt(i.namespace, s) : "",
|
|
3463
|
-
o = ` <${
|
|
3474
|
+
const u = i.namespace ? nt(i.namespace, s) : "", d = u ? `${u}:${i.name}` : i.name;
|
|
3475
|
+
o = ` <${d}>?</${d}>`;
|
|
3464
3476
|
}
|
|
3465
3477
|
} else
|
|
3466
3478
|
o = "";
|
|
@@ -3486,7 +3498,7 @@ function gs(e, t = {}) {
|
|
|
3486
3498
|
name: n.services.length > 1 || o.ports.length > 1 ? `${o.name} — ${i.name}` : o.name,
|
|
3487
3499
|
description: o.documentation,
|
|
3488
3500
|
items: i.operations.map(
|
|
3489
|
-
(a) =>
|
|
3501
|
+
(a) => ge({
|
|
3490
3502
|
name: a.name,
|
|
3491
3503
|
method: "POST",
|
|
3492
3504
|
url: i.address,
|
|
@@ -3502,12 +3514,12 @@ function gs(e, t = {}) {
|
|
|
3502
3514
|
})
|
|
3503
3515
|
)
|
|
3504
3516
|
);
|
|
3505
|
-
return
|
|
3517
|
+
return be({
|
|
3506
3518
|
name: t.name ?? ((r = n.services[0]) == null ? void 0 : r.name) ?? "SOAP service",
|
|
3507
3519
|
items: s.length === 1 ? s[0].items : s
|
|
3508
3520
|
});
|
|
3509
3521
|
}
|
|
3510
|
-
const
|
|
3522
|
+
const vt = [
|
|
3511
3523
|
7,
|
|
3512
3524
|
12,
|
|
3513
3525
|
17,
|
|
@@ -3583,20 +3595,20 @@ function Gt(e) {
|
|
|
3583
3595
|
r.setUint32(s.length - 8, n >>> 0, !0), r.setUint32(s.length - 4, Math.floor(n / 2 ** 32), !0);
|
|
3584
3596
|
let o = 1732584193, i = 4023233417, a = 2562383102, c = 271733878;
|
|
3585
3597
|
const p = new Uint32Array(16);
|
|
3586
|
-
for (let
|
|
3598
|
+
for (let d = 0; d < s.length; d += 64) {
|
|
3587
3599
|
for (let y = 0; y < 16; y++)
|
|
3588
|
-
p[y] = r.getUint32(
|
|
3589
|
-
let
|
|
3600
|
+
p[y] = r.getUint32(d + y * 4, !0);
|
|
3601
|
+
let f = o, l = i, m = a, k = c;
|
|
3590
3602
|
for (let y = 0; y < 64; y++) {
|
|
3591
3603
|
let v, $;
|
|
3592
3604
|
y < 16 ? (v = l & m | ~l & k, $ = y) : y < 32 ? (v = k & l | ~k & m, $ = (5 * y + 1) % 16) : y < 48 ? (v = l ^ m ^ k, $ = (3 * y + 5) % 16) : (v = m ^ (l | ~k), $ = 7 * y % 16);
|
|
3593
|
-
const T =
|
|
3594
|
-
|
|
3605
|
+
const T = f + v + bs[y] + p[$] >>> 0;
|
|
3606
|
+
f = k, k = m, m = l, l = l + (T << vt[y] | T >>> 32 - vt[y]) >>> 0;
|
|
3595
3607
|
}
|
|
3596
|
-
o = o +
|
|
3608
|
+
o = o + f >>> 0, i = i + l >>> 0, a = a + m >>> 0, c = c + k >>> 0;
|
|
3597
3609
|
}
|
|
3598
3610
|
const u = new DataView(new ArrayBuffer(16));
|
|
3599
|
-
return [o, i, a, c].forEach((
|
|
3611
|
+
return [o, i, a, c].forEach((d, f) => u.setUint32(f * 4, d, !0)), Array.from(new Uint8Array(u.buffer), (d) => d.toString(16).padStart(2, "0")).join(
|
|
3600
3612
|
""
|
|
3601
3613
|
);
|
|
3602
3614
|
}
|
|
@@ -3623,7 +3635,7 @@ function rt() {
|
|
|
3623
3635
|
function xe(e) {
|
|
3624
3636
|
return Array.from(new Uint8Array(e), (t) => t.toString(16).padStart(2, "0")).join("");
|
|
3625
3637
|
}
|
|
3626
|
-
function
|
|
3638
|
+
function ut(e) {
|
|
3627
3639
|
let t = "";
|
|
3628
3640
|
for (const n of e instanceof Uint8Array ? e : new Uint8Array(e))
|
|
3629
3641
|
t += String.fromCharCode(n);
|
|
@@ -3636,7 +3648,7 @@ function Ie(e) {
|
|
|
3636
3648
|
async function Re(e, t) {
|
|
3637
3649
|
return rt().digest(e, Ie(t));
|
|
3638
3650
|
}
|
|
3639
|
-
async function
|
|
3651
|
+
async function he(e, t, n) {
|
|
3640
3652
|
const s = t instanceof ArrayBuffer ? new Uint8Array(t) : Ie(t), r = await rt().importKey(
|
|
3641
3653
|
"raw",
|
|
3642
3654
|
Ie(s),
|
|
@@ -3680,15 +3692,15 @@ async function ws(e, t, n, s = {}) {
|
|
|
3680
3692
|
const r = e.algorithm ?? "MD5", o = n.replace(/^[a-z][\w+.-]*:\/\/[^/]*/i, "") || "/", i = (l = e.qop) != null && l.split(",").map((m) => m.trim()).includes("auth") ? "auth" : e.qop ? e.qop.split(",")[0].trim() : void 0, a = s.cnonce ?? Gt(String(Math.random())).slice(0, 16), c = (s.nc ?? 1).toString(16).padStart(8, "0");
|
|
3681
3693
|
let p = await ve(r, `${e.username}:${e.realm}:${e.password}`);
|
|
3682
3694
|
/-sess$/i.test(r) && (p = await ve(r, `${p}:${e.nonce}:${a}`));
|
|
3683
|
-
const u = await ve(r, `${t}:${o}`),
|
|
3695
|
+
const u = await ve(r, `${t}:${o}`), d = i ? await ve(r, `${p}:${e.nonce}:${c}:${a}:${i}:${u}`) : await ve(r, `${p}:${e.nonce}:${u}`), f = [
|
|
3684
3696
|
`username="${e.username}"`,
|
|
3685
3697
|
`realm="${e.realm}"`,
|
|
3686
3698
|
`nonce="${e.nonce}"`,
|
|
3687
3699
|
`uri="${o}"`,
|
|
3688
3700
|
`algorithm=${r}`,
|
|
3689
|
-
`response="${
|
|
3701
|
+
`response="${d}"`
|
|
3690
3702
|
];
|
|
3691
|
-
return i &&
|
|
3703
|
+
return i && f.push(`qop=${i}`, `nc=${c}`, `cnonce="${a}"`), e.opaque && f.push(`opaque="${e.opaque}"`), `Digest ${f.join(", ")}`;
|
|
3692
3704
|
}
|
|
3693
3705
|
async function vs(e, t, n = /* @__PURE__ */ new Date()) {
|
|
3694
3706
|
var b;
|
|
@@ -3697,13 +3709,13 @@ async function vs(e, t, n = /* @__PURE__ */ new Date()) {
|
|
|
3697
3709
|
typeof e.body == "string" ? i = e.body : ((b = e.body) == null ? void 0 : b.kind) === "binary" && e.body.data && (i = Uint8Array.from(atob(e.body.data), (S) => S.charCodeAt(0)));
|
|
3698
3710
|
const a = e.body && typeof e.body != "string" && e.body.kind === "multipart" ? "UNSIGNED-PAYLOAD" : xe(await Re("SHA-256", i)), c = t.service === "s3";
|
|
3699
3711
|
J(e.headers, "X-Amz-Date", r), c && J(e.headers, "X-Amz-Content-Sha256", a), t.sessionToken && J(e.headers, "X-Amz-Security-Token", t.sessionToken);
|
|
3700
|
-
const p = s.pathname.split("/").map((S) => c ? S : Ke(S)).join("/") || "/", u = [...s.searchParams.entries()].map(([S, w]) => [Ke(S), Ke(w)]).sort(([S, w], [O, P]) => S === O ? w < P ? -1 : w > P ? 1 : 0 : S < O ? -1 : 1).map(([S, w]) => `${S}=${w}`).join("&"),
|
|
3712
|
+
const p = s.pathname.split("/").map((S) => c ? S : Ke(S)).join("/") || "/", u = [...s.searchParams.entries()].map(([S, w]) => [Ke(S), Ke(w)]).sort(([S, w], [O, P]) => S === O ? w < P ? -1 : w > P ? 1 : 0 : S < O ? -1 : 1).map(([S, w]) => `${S}=${w}`).join("&"), d = /* @__PURE__ */ new Map([["host", s.host]]);
|
|
3701
3713
|
for (const [S, w] of e.headers) {
|
|
3702
3714
|
const O = S.toLowerCase();
|
|
3703
|
-
(O.startsWith("x-amz-") || O === "content-type") &&
|
|
3715
|
+
(O.startsWith("x-amz-") || O === "content-type") && d.set(O, w.trim().replace(/\s+/g, " "));
|
|
3704
3716
|
}
|
|
3705
|
-
const
|
|
3706
|
-
`).join(""), m =
|
|
3717
|
+
const f = [...d.keys()].sort(), l = f.map((S) => `${S}:${d.get(S)}
|
|
3718
|
+
`).join(""), m = f.join(";"), k = [
|
|
3707
3719
|
e.method.toUpperCase(),
|
|
3708
3720
|
p,
|
|
3709
3721
|
u,
|
|
@@ -3715,9 +3727,9 @@ async function vs(e, t, n = /* @__PURE__ */ new Date()) {
|
|
|
3715
3727
|
`
|
|
3716
3728
|
`
|
|
3717
3729
|
);
|
|
3718
|
-
let $ = await
|
|
3719
|
-
$ = await
|
|
3720
|
-
const T = xe(await
|
|
3730
|
+
let $ = await he("SHA-256", `AWS4${t.secretAccessKey}`, o);
|
|
3731
|
+
$ = await he("SHA-256", $, t.region), $ = await he("SHA-256", $, t.service), $ = await he("SHA-256", $, "aws4_request");
|
|
3732
|
+
const T = xe(await he("SHA-256", $, v));
|
|
3721
3733
|
J(
|
|
3722
3734
|
e.headers,
|
|
3723
3735
|
"Authorization",
|
|
@@ -3729,12 +3741,12 @@ async function As(e, t, n = /* @__PURE__ */ new Date()) {
|
|
|
3729
3741
|
{path}
|
|
3730
3742
|
{timestamp}
|
|
3731
3743
|
{body}`, o = String(Math.floor(n.getTime() / 1e3)), i = r.replace(/\\n/g, `
|
|
3732
|
-
`).replace(/\{method\}/g, e.method.toUpperCase()).replace(/\{path\}/g, s.pathname + s.search).replace(/\{query\}/g, s.search.replace(/^\?/, "")).replace(/\{timestamp\}/g, o).replace(/\{body\}/g, typeof e.body == "string" ? e.body : ""), a = await
|
|
3744
|
+
`).replace(/\{method\}/g, e.method.toUpperCase()).replace(/\{path\}/g, s.pathname + s.search).replace(/\{query\}/g, s.search.replace(/^\?/, "")).replace(/\{timestamp\}/g, o).replace(/\{body\}/g, typeof e.body == "string" ? e.body : ""), a = await he(t.algorithm, t.secret, i), c = t.encoding === "base64" ? ut(a) : xe(a);
|
|
3733
3745
|
J(e.headers, t.header, `${t.prefix ?? ""}${c}`), r.includes("{timestamp}") && J(e.headers, t.timestampHeader ?? "X-Timestamp", o);
|
|
3734
3746
|
}
|
|
3735
|
-
async function
|
|
3747
|
+
async function At(e, t = {}) {
|
|
3736
3748
|
var m;
|
|
3737
|
-
const n = (k) =>
|
|
3749
|
+
const n = (k) => Ut(k, t.variables ?? {}, t), s = t.auth ?? e.auth, r = !s || s.type === "inherit" ? { type: "none" } : st(s, n), o = [], i = e.params.filter((k) => k.in === "header" && L(k)).map((k) => [n(k.key), n(k.value)]), a = e.params.filter((k) => k.in === "cookie" && L(k)).map((k) => `${n(k.key)}=${n(k.value)}`);
|
|
3738
3750
|
switch (r.type) {
|
|
3739
3751
|
case "basic":
|
|
3740
3752
|
J(i, "Authorization", `Basic ${at(`${r.username}:${r.password}`)}`);
|
|
@@ -3765,9 +3777,9 @@ async function vt(e, t = {}) {
|
|
|
3765
3777
|
kind: "multipart",
|
|
3766
3778
|
parts: u.parts.filter(L).map((k) => ({ ...k, key: n(k.key), value: n(k.value) }))
|
|
3767
3779
|
} : u.kind === "binary" ? p = { kind: "binary", fileName: u.fileName, contentType: u.contentType, data: u.data } : u.kind !== "none" && (p = n(oe(u) ?? ""));
|
|
3768
|
-
const
|
|
3769
|
-
|
|
3770
|
-
const
|
|
3780
|
+
const d = Ce(u);
|
|
3781
|
+
d && u.kind !== "multipart" && !Le(i, "Content-Type") && J(i, "Content-Type", d), u.kind === "soap" && u.version === "1.1" && u.action !== void 0 && !Le(i, "SOAPAction") && J(i, "SOAPAction", `"${n(u.action)}"`);
|
|
3782
|
+
const f = {
|
|
3771
3783
|
method: e.method.toUpperCase(),
|
|
3772
3784
|
url: c,
|
|
3773
3785
|
headers: i,
|
|
@@ -3775,13 +3787,13 @@ async function vt(e, t = {}) {
|
|
|
3775
3787
|
settings: { ...e.settings }
|
|
3776
3788
|
}, l = ((m = t.now) == null ? void 0 : m.call(t)) ?? /* @__PURE__ */ new Date();
|
|
3777
3789
|
if (r.type === "digest") {
|
|
3778
|
-
const k = await ws(r,
|
|
3779
|
-
k && J(
|
|
3780
|
-
} else r.type === "awsSigV4" ? await vs(
|
|
3781
|
-
return
|
|
3790
|
+
const k = await ws(r, f.method, c);
|
|
3791
|
+
k && J(f.headers, "Authorization", k);
|
|
3792
|
+
} else r.type === "awsSigV4" ? await vs(f, r, l) : r.type === "hmac" && await As(f, r, l);
|
|
3793
|
+
return f;
|
|
3782
3794
|
}
|
|
3783
|
-
async function
|
|
3784
|
-
let r = await
|
|
3795
|
+
async function Vs(e, t, n = {}, s) {
|
|
3796
|
+
let r = await At(e, n), o = await t(r, s);
|
|
3785
3797
|
const i = n.auth ?? e.auth;
|
|
3786
3798
|
if (o.status === 401 && (i == null ? void 0 : i.type) === "digest" && !i.nonce) {
|
|
3787
3799
|
const a = $s(Le(o.headers, "WWW-Authenticate") ?? "");
|
|
@@ -3794,75 +3806,75 @@ async function Fs(e, t, n = {}, s) {
|
|
|
3794
3806
|
algorithm: a.algorithm,
|
|
3795
3807
|
opaque: a.opaque
|
|
3796
3808
|
};
|
|
3797
|
-
return r = await
|
|
3809
|
+
return r = await At(e, { ...n, auth: c }), o = await t(r, s), { response: o, sent: r, auth: c };
|
|
3798
3810
|
}
|
|
3799
3811
|
}
|
|
3800
3812
|
return { response: o, sent: r, auth: i };
|
|
3801
3813
|
}
|
|
3802
3814
|
const xs = /^text\/|json|xml|javascript|ecmascript|x-www-form-urlencoded|graphql|yaml|csv|html/i;
|
|
3803
|
-
function
|
|
3815
|
+
function xt(e, t) {
|
|
3804
3816
|
const n = Uint8Array.from(atob(e), (s) => s.charCodeAt(0));
|
|
3805
3817
|
return new Blob([n], t ? { type: t } : void 0);
|
|
3806
3818
|
}
|
|
3807
|
-
function
|
|
3819
|
+
function Ks(e = (...t) => fetch(...t)) {
|
|
3808
3820
|
return async (t, n) => {
|
|
3809
|
-
var p, u,
|
|
3821
|
+
var p, u, d;
|
|
3810
3822
|
const s = new Headers();
|
|
3811
|
-
for (const [
|
|
3812
|
-
s.append(
|
|
3823
|
+
for (const [f, l] of t.headers)
|
|
3824
|
+
s.append(f, l);
|
|
3813
3825
|
let r;
|
|
3814
3826
|
if (typeof t.body == "string")
|
|
3815
3827
|
r = t.body;
|
|
3816
3828
|
else if (((p = t.body) == null ? void 0 : p.kind) === "multipart") {
|
|
3817
|
-
const
|
|
3829
|
+
const f = new FormData();
|
|
3818
3830
|
for (const l of t.body.parts)
|
|
3819
3831
|
if (l.type === "file") {
|
|
3820
3832
|
const m = (u = t.body.files) == null ? void 0 : u[l.key];
|
|
3821
|
-
|
|
3833
|
+
f.append(
|
|
3822
3834
|
l.key,
|
|
3823
|
-
m ?
|
|
3835
|
+
m ? xt(m, l.contentType) : new Blob([]),
|
|
3824
3836
|
l.fileName ?? l.key
|
|
3825
3837
|
);
|
|
3826
3838
|
} else
|
|
3827
|
-
|
|
3828
|
-
r =
|
|
3829
|
-
} else ((
|
|
3839
|
+
f.append(l.key, l.value);
|
|
3840
|
+
r = f, s.delete("Content-Type");
|
|
3841
|
+
} else ((d = t.body) == null ? void 0 : d.kind) === "binary" && t.body.data && (r = xt(t.body.data, t.body.contentType));
|
|
3830
3842
|
const o = new AbortController(), i = () => o.abort();
|
|
3831
3843
|
n == null || n.addEventListener("abort", i);
|
|
3832
3844
|
const a = t.settings.timeoutMs ? setTimeout(i, t.settings.timeoutMs) : void 0, c = Date.now();
|
|
3833
3845
|
try {
|
|
3834
|
-
const
|
|
3846
|
+
const f = await e(t.url, {
|
|
3835
3847
|
method: t.method,
|
|
3836
3848
|
headers: s,
|
|
3837
3849
|
body: t.method === "GET" || t.method === "HEAD" ? void 0 : r,
|
|
3838
3850
|
redirect: t.settings.followRedirects === !1 ? "manual" : "follow",
|
|
3839
3851
|
signal: o.signal
|
|
3840
|
-
}), l = await
|
|
3841
|
-
return
|
|
3842
|
-
status:
|
|
3843
|
-
statusText:
|
|
3852
|
+
}), l = await f.arrayBuffer(), m = f.headers.get("content-type") ?? "", k = !m || xs.test(m), y = [];
|
|
3853
|
+
return f.headers.forEach((v, $) => y.push([$, v])), {
|
|
3854
|
+
status: f.status,
|
|
3855
|
+
statusText: f.statusText,
|
|
3844
3856
|
headers: y,
|
|
3845
3857
|
body: k ? new TextDecoder().decode(l) : "",
|
|
3846
|
-
bodyBase64: k ? void 0 :
|
|
3858
|
+
bodyBase64: k ? void 0 : ut(l),
|
|
3847
3859
|
timeMs: Date.now() - c,
|
|
3848
3860
|
size: l.byteLength,
|
|
3849
|
-
url:
|
|
3861
|
+
url: f.url || t.url
|
|
3850
3862
|
};
|
|
3851
3863
|
} finally {
|
|
3852
3864
|
a && clearTimeout(a), n == null || n.removeEventListener("abort", i);
|
|
3853
3865
|
}
|
|
3854
3866
|
};
|
|
3855
3867
|
}
|
|
3856
|
-
function
|
|
3857
|
-
return
|
|
3868
|
+
function Tt(e) {
|
|
3869
|
+
return ut(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
3858
3870
|
}
|
|
3859
|
-
async function
|
|
3871
|
+
async function Js() {
|
|
3860
3872
|
const e = new Uint8Array(32);
|
|
3861
3873
|
globalThis.crypto.getRandomValues(e);
|
|
3862
|
-
const t =
|
|
3874
|
+
const t = Tt(e), n = Tt(await Re("SHA-256", t));
|
|
3863
3875
|
return { verifier: t, challenge: n };
|
|
3864
3876
|
}
|
|
3865
|
-
function
|
|
3877
|
+
function Qs(e, t = {}) {
|
|
3866
3878
|
const n = new URLSearchParams();
|
|
3867
3879
|
n.set("response_type", e.grant === "implicit" ? "token" : "code"), n.set("client_id", e.clientId), e.redirectUri && n.set("redirect_uri", e.redirectUri), e.scope && n.set("scope", e.scope), e.audience && n.set("audience", e.audience), t.state && n.set("state", t.state), t.challenge && (n.set("code_challenge", t.challenge), n.set("code_challenge_method", "S256"));
|
|
3868
3880
|
const s = e.authUrl ?? "";
|
|
@@ -3906,7 +3918,7 @@ async function Oe(e, t, n) {
|
|
|
3906
3918
|
idToken: typeof i.id_token == "string" ? i.id_token : void 0
|
|
3907
3919
|
};
|
|
3908
3920
|
}
|
|
3909
|
-
async function
|
|
3921
|
+
async function Gs(e, t) {
|
|
3910
3922
|
if (e.grant === "clientCredentials")
|
|
3911
3923
|
return Oe(e, { grant_type: "client_credentials" }, t);
|
|
3912
3924
|
if (e.grant === "password")
|
|
@@ -3919,14 +3931,14 @@ async function Qs(e, t) {
|
|
|
3919
3931
|
`OAuth 2: the ${e.grant} grant needs the user — use buildAuthorizationUrl / startDeviceAuthorization`
|
|
3920
3932
|
);
|
|
3921
3933
|
}
|
|
3922
|
-
async function
|
|
3934
|
+
async function Ys(e, t, n, s) {
|
|
3923
3935
|
const r = { grant_type: "authorization_code", code: t };
|
|
3924
3936
|
return e.redirectUri && (r.redirect_uri = e.redirectUri), s && (r.code_verifier = s), Oe(e, r, n);
|
|
3925
3937
|
}
|
|
3926
|
-
async function
|
|
3938
|
+
async function Xs(e, t, n) {
|
|
3927
3939
|
return Oe(e, { grant_type: "refresh_token", refresh_token: t }, n);
|
|
3928
3940
|
}
|
|
3929
|
-
async function
|
|
3941
|
+
async function Zs(e, t) {
|
|
3930
3942
|
if (!e.deviceUrl)
|
|
3931
3943
|
throw new Error("OAuth 2: no device authorization URL");
|
|
3932
3944
|
const n = new URLSearchParams({ client_id: e.clientId });
|
|
@@ -3951,7 +3963,7 @@ async function Xs(e, t) {
|
|
|
3951
3963
|
expiresIn: r.expires_in === void 0 ? void 0 : Number(r.expires_in)
|
|
3952
3964
|
};
|
|
3953
3965
|
}
|
|
3954
|
-
async function
|
|
3966
|
+
async function er(e, t, n) {
|
|
3955
3967
|
try {
|
|
3956
3968
|
return await Oe(
|
|
3957
3969
|
e,
|
|
@@ -4021,14 +4033,14 @@ function Ss(e, t) {
|
|
|
4021
4033
|
return "";
|
|
4022
4034
|
}
|
|
4023
4035
|
}
|
|
4024
|
-
function
|
|
4036
|
+
function St(e, t) {
|
|
4025
4037
|
const n = e.includes("```") ? "````" : "```";
|
|
4026
4038
|
return `${n}${t}
|
|
4027
4039
|
${e}
|
|
4028
4040
|
${n}`;
|
|
4029
4041
|
}
|
|
4030
4042
|
function js(e, t, n, s, r, o) {
|
|
4031
|
-
var
|
|
4043
|
+
var f;
|
|
4032
4044
|
const i = "#".repeat(o), a = [], c = e.url.replace(/^\{\{[^}]+\}\}/, "") || "/";
|
|
4033
4045
|
a.push(
|
|
4034
4046
|
`${i} \`${e.method}\` ${c}${e.name && e.name !== `${e.method} ${c}` ? ` — ${e.name}` : ""}`,
|
|
@@ -4062,15 +4074,15 @@ function js(e, t, n, s, r, o) {
|
|
|
4062
4074
|
);
|
|
4063
4075
|
else {
|
|
4064
4076
|
const l = u.kind === "json" || u.kind === "graphql" ? "json" : u.kind === "text" ? "" : "xml";
|
|
4065
|
-
a.push(
|
|
4077
|
+
a.push(St(oe(u) ?? "", l), "");
|
|
4066
4078
|
}
|
|
4067
|
-
const
|
|
4068
|
-
if (
|
|
4079
|
+
const d = Object.entries(e.responses ?? {});
|
|
4080
|
+
if (d.length && a.push(
|
|
4069
4081
|
`${i}# ${s.responses}`,
|
|
4070
4082
|
"",
|
|
4071
4083
|
`| ${s.status} | ${s.description} | ${s.type} |`,
|
|
4072
4084
|
"|---|---|---|",
|
|
4073
|
-
...
|
|
4085
|
+
...d.map(
|
|
4074
4086
|
([l, m]) => `| ${l} | ${Ae(m.description)} | ${Ae(m.schema ? it(m.schema) : m.contentType)} |`
|
|
4075
4087
|
),
|
|
4076
4088
|
""
|
|
@@ -4079,12 +4091,12 @@ function js(e, t, n, s, r, o) {
|
|
|
4079
4091
|
(v) => v.kind === "folder"
|
|
4080
4092
|
), m = r.codeLanguage ?? "curl", k = Cn(e, m, {
|
|
4081
4093
|
auth: on(e, l, t)
|
|
4082
|
-
}), y = ((
|
|
4083
|
-
a.push(`${i}# ${s.example}`, "",
|
|
4094
|
+
}), y = ((f = An.find((v) => v.id === m)) == null ? void 0 : f.syntax) ?? "shell";
|
|
4095
|
+
a.push(`${i}# ${s.example}`, "", St(k, y), "");
|
|
4084
4096
|
}
|
|
4085
4097
|
return a;
|
|
4086
4098
|
}
|
|
4087
|
-
function
|
|
4099
|
+
function tr(e, t = {}) {
|
|
4088
4100
|
var o;
|
|
4089
4101
|
const n = { ...Ts, ...t.labels }, s = [`# ${e.name}`, ""];
|
|
4090
4102
|
e.description && s.push(e.description, ""), e.version && s.push(`**${n.version}:** ${e.version}`, ""), (o = e.servers) != null && o.length && s.push(
|
|
@@ -4136,7 +4148,7 @@ function Os(e, t = {}) {
|
|
|
4136
4148
|
if (r.__schema || o != null && o.__schema)
|
|
4137
4149
|
return "graphql";
|
|
4138
4150
|
}
|
|
4139
|
-
function
|
|
4151
|
+
function nr(e, t = {}) {
|
|
4140
4152
|
const n = Os(e, t), s = () => Yt(e.trim(), t.parseYaml);
|
|
4141
4153
|
switch (n) {
|
|
4142
4154
|
case "curl":
|
|
@@ -4159,7 +4171,7 @@ function tr(e, t = {}) {
|
|
|
4159
4171
|
);
|
|
4160
4172
|
}
|
|
4161
4173
|
}
|
|
4162
|
-
const
|
|
4174
|
+
const sr = [
|
|
4163
4175
|
"rest",
|
|
4164
4176
|
"graphql",
|
|
4165
4177
|
"soap",
|
|
@@ -4171,14 +4183,14 @@ const nr = [
|
|
|
4171
4183
|
"database",
|
|
4172
4184
|
"sftp"
|
|
4173
4185
|
];
|
|
4174
|
-
function
|
|
4186
|
+
function rr(e = {}) {
|
|
4175
4187
|
return {
|
|
4176
4188
|
...e,
|
|
4177
4189
|
key: e.key ?? Ne("i"),
|
|
4178
4190
|
name: e.name ?? "New integration",
|
|
4179
4191
|
direction: e.direction ?? "outbound",
|
|
4180
4192
|
connection: e.connection ?? { protocol: "rest", baseUrl: "" },
|
|
4181
|
-
endpoints: e.endpoints ??
|
|
4193
|
+
endpoints: e.endpoints ?? be({ name: e.name ?? "API" })
|
|
4182
4194
|
};
|
|
4183
4195
|
}
|
|
4184
4196
|
function Xt(e, t) {
|
|
@@ -4195,7 +4207,7 @@ function Xt(e, t) {
|
|
|
4195
4207
|
i.secret && o[i.key] === void 0 && (o[i.key] = `{{secret:${i.key}}}`);
|
|
4196
4208
|
return o;
|
|
4197
4209
|
}
|
|
4198
|
-
function
|
|
4210
|
+
function ir(e, t, n) {
|
|
4199
4211
|
const s = /* @__PURE__ */ new Set();
|
|
4200
4212
|
let r = e.sets.find((a) => a.id === t), o = !0;
|
|
4201
4213
|
for (; r && !s.has(r.id); ) {
|
|
@@ -4206,7 +4218,7 @@ function rr(e, t, n) {
|
|
|
4206
4218
|
const i = e.variables.find((a) => a.key === n);
|
|
4207
4219
|
return (i == null ? void 0 : i.defaultValue) !== void 0 ? { value: i.defaultValue, from: "default" } : { from: "none" };
|
|
4208
4220
|
}
|
|
4209
|
-
function
|
|
4221
|
+
function or(e) {
|
|
4210
4222
|
return e.sets.map((t) => ({
|
|
4211
4223
|
id: t.id,
|
|
4212
4224
|
name: t.name,
|
|
@@ -4220,7 +4232,7 @@ function ir(e) {
|
|
|
4220
4232
|
})
|
|
4221
4233
|
}));
|
|
4222
4234
|
}
|
|
4223
|
-
function
|
|
4235
|
+
function ar(e, t) {
|
|
4224
4236
|
return (t ? e.sets.find((n) => {
|
|
4225
4237
|
var s;
|
|
4226
4238
|
return ((s = n.appliesTo) == null ? void 0 : s.database) === t;
|
|
@@ -4240,7 +4252,7 @@ function ot(e, t = []) {
|
|
|
4240
4252
|
ot(n, t);
|
|
4241
4253
|
return t;
|
|
4242
4254
|
}
|
|
4243
|
-
function
|
|
4255
|
+
function cr(e, t = { variables: [], sets: [] }, n = {}) {
|
|
4244
4256
|
var a, c;
|
|
4245
4257
|
const s = [], r = new Set(t.variables.map((p) => p.key)), o = /* @__PURE__ */ new Set();
|
|
4246
4258
|
for (const p of e.integrations) {
|
|
@@ -4256,21 +4268,21 @@ function ar(e, t = { variables: [], sets: [] }, n = {}) {
|
|
|
4256
4268
|
code: "baseUrlMissing",
|
|
4257
4269
|
message: `${u}: no base URL`
|
|
4258
4270
|
});
|
|
4259
|
-
const
|
|
4260
|
-
ot([p.connection, p.endpoints]).flatMap(
|
|
4271
|
+
const d = new Set(
|
|
4272
|
+
ot([p.connection, p.endpoints]).flatMap(Ct).filter((m) => !m.startsWith("$") && !m.startsWith("secret:"))
|
|
4261
4273
|
);
|
|
4262
|
-
for (const m of
|
|
4274
|
+
for (const m of d)
|
|
4263
4275
|
!r.has(m) && !p.endpoints.variables.some((k) => k.key === m) && s.push({
|
|
4264
4276
|
severity: "warning",
|
|
4265
4277
|
integration: u,
|
|
4266
4278
|
code: "variableUndeclared",
|
|
4267
4279
|
message: `${u}: {{${m}}} is not declared in the environment variables`
|
|
4268
4280
|
});
|
|
4269
|
-
const
|
|
4270
|
-
|
|
4281
|
+
const f = new Set(
|
|
4282
|
+
me(p.endpoints.items).map(({ request: m }) => m.id)
|
|
4271
4283
|
), l = new Set((p.expose ?? []).map((m) => m.key));
|
|
4272
4284
|
for (const m of p.operations ?? [])
|
|
4273
|
-
m.endpoint && !
|
|
4285
|
+
m.endpoint && !f.has(m.endpoint) && !l.has(m.endpoint) && s.push({
|
|
4274
4286
|
severity: "error",
|
|
4275
4287
|
integration: u,
|
|
4276
4288
|
code: "endpointMissing",
|
|
@@ -4298,25 +4310,61 @@ function ar(e, t = { variables: [], sets: [] }, n = {}) {
|
|
|
4298
4310
|
code: "extendsMissing",
|
|
4299
4311
|
message: `${p.id} extends ${p.extends}, which does not exist`
|
|
4300
4312
|
});
|
|
4301
|
-
for (const
|
|
4302
|
-
const
|
|
4303
|
-
|
|
4313
|
+
for (const d of t.variables) {
|
|
4314
|
+
const f = p.values[d.key];
|
|
4315
|
+
d.secret && f !== void 0 && f !== "" && !/^\{\{\s*secret:/.test(f) && s.push({
|
|
4304
4316
|
severity: "error",
|
|
4305
4317
|
code: "secretInSeed",
|
|
4306
|
-
message: `${p.id}: ${
|
|
4318
|
+
message: `${p.id}: ${d.key} is a secret — write {{secret:${d.key}}}, not the value`
|
|
4307
4319
|
});
|
|
4308
4320
|
}
|
|
4309
4321
|
const u = Xt(t, p.id);
|
|
4310
|
-
for (const
|
|
4311
|
-
|
|
4322
|
+
for (const d of t.variables)
|
|
4323
|
+
d.required && !u[d.key] && s.push({
|
|
4312
4324
|
severity: "warning",
|
|
4313
4325
|
code: "requiredUnset",
|
|
4314
|
-
message: `${p.id}: ${
|
|
4326
|
+
message: `${p.id}: ${d.key} has no value`
|
|
4315
4327
|
});
|
|
4316
4328
|
}
|
|
4317
4329
|
return s;
|
|
4318
4330
|
}
|
|
4319
|
-
function
|
|
4331
|
+
function pr(e, t) {
|
|
4332
|
+
var p, u, d;
|
|
4333
|
+
if (!e || !t)
|
|
4334
|
+
return [];
|
|
4335
|
+
const n = (p = me(e.items).find(
|
|
4336
|
+
(f) => f.request.id === t
|
|
4337
|
+
)) == null ? void 0 : p.request, s = ((u = n == null ? void 0 : n.responses) == null ? void 0 : u["200"]) ?? ((d = n == null ? void 0 : n.responses) == null ? void 0 : d["201"]), r = pt(e.schemas), o = (f, l = 0) => {
|
|
4338
|
+
if (!f || l > 8)
|
|
4339
|
+
return {};
|
|
4340
|
+
if (f.$ref)
|
|
4341
|
+
return o(r(f.$ref), l + 1);
|
|
4342
|
+
const m = { ...f.properties ?? {} };
|
|
4343
|
+
for (const k of f.allOf ?? [])
|
|
4344
|
+
Object.assign(m, o(k, l + 1));
|
|
4345
|
+
return m;
|
|
4346
|
+
}, i = (f) => f != null && f.$ref ? r(f.$ref) : f, a = [], c = i(s == null ? void 0 : s.schema);
|
|
4347
|
+
if (!c)
|
|
4348
|
+
return a;
|
|
4349
|
+
if (c.type === "array" || c.items) {
|
|
4350
|
+
for (const f of Object.keys(o(c.items)))
|
|
4351
|
+
a.push(`$[*].${f}`);
|
|
4352
|
+
return a;
|
|
4353
|
+
}
|
|
4354
|
+
for (const [f, l] of Object.entries(o(c))) {
|
|
4355
|
+
const m = i(l);
|
|
4356
|
+
if (m && (m.type === "array" || m.items)) {
|
|
4357
|
+
const k = Object.keys(o(m.items));
|
|
4358
|
+
if (k.length) {
|
|
4359
|
+
k.forEach((y) => a.push(`$.${f}[*].${y}`));
|
|
4360
|
+
continue;
|
|
4361
|
+
}
|
|
4362
|
+
}
|
|
4363
|
+
a.push(`$.${f}`);
|
|
4364
|
+
}
|
|
4365
|
+
return a;
|
|
4366
|
+
}
|
|
4367
|
+
function lr(e) {
|
|
4320
4368
|
const t = /* @__PURE__ */ new Map();
|
|
4321
4369
|
for (const s of e) {
|
|
4322
4370
|
const r = s.package ?? "";
|
|
@@ -4330,8 +4378,8 @@ function cr(e) {
|
|
|
4330
4378
|
directions: n.filter((o) => r.has(o)).map((o) => ({ direction: o, integrations: r.get(o) }))
|
|
4331
4379
|
}));
|
|
4332
4380
|
}
|
|
4333
|
-
function
|
|
4334
|
-
const t =
|
|
4381
|
+
function ur(e) {
|
|
4382
|
+
const t = me(e.endpoints.items).map(
|
|
4335
4383
|
({ request: s }) => ({
|
|
4336
4384
|
id: s.id,
|
|
4337
4385
|
label: `${s.method} ${s.name}`,
|
|
@@ -4345,49 +4393,50 @@ function pr(e) {
|
|
|
4345
4393
|
return [...t, ...n];
|
|
4346
4394
|
}
|
|
4347
4395
|
export {
|
|
4348
|
-
|
|
4396
|
+
Fs as GRAPHQL_INTROSPECTION_QUERY,
|
|
4349
4397
|
Us as NICE_API_AUTH_TYPES,
|
|
4350
4398
|
An as NICE_API_CODE_LANGUAGES,
|
|
4351
4399
|
Ts as NICE_API_MARKDOWN_LABELS,
|
|
4352
4400
|
Cs as NICE_API_METHODS,
|
|
4353
|
-
|
|
4401
|
+
sr as NICE_CONNECTION_PROTOCOLS,
|
|
4354
4402
|
Z as NiceYamlError,
|
|
4355
4403
|
Jn as POSTMAN_SCHEMA_V21,
|
|
4356
|
-
|
|
4404
|
+
Ds as apiSecuritySchemes,
|
|
4405
|
+
Ls as assignedVariableSets,
|
|
4357
4406
|
Ce as bodyContentType,
|
|
4358
|
-
|
|
4407
|
+
jt as bodyFromText,
|
|
4359
4408
|
oe as bodyText,
|
|
4360
|
-
|
|
4409
|
+
Qs as buildAuthorizationUrl,
|
|
4361
4410
|
ps as buildGraphqlOperation,
|
|
4362
4411
|
Ue as buildRequestUrl,
|
|
4363
4412
|
ys as buildSoapEnvelope,
|
|
4364
|
-
|
|
4365
|
-
|
|
4413
|
+
tr as collectionToMarkdown,
|
|
4414
|
+
Js as createPkcePair,
|
|
4366
4415
|
Os as detectApiDocument,
|
|
4367
4416
|
Re as digest,
|
|
4368
4417
|
ws as digestAuthorization,
|
|
4369
4418
|
on as effectiveAuth,
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4419
|
+
ar as environmentSetFor,
|
|
4420
|
+
Ys as exchangeAuthorizationCode,
|
|
4421
|
+
Bs as exportHar,
|
|
4373
4422
|
Kn as exportOpenApi,
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4423
|
+
Hs as exportOpenApiYaml,
|
|
4424
|
+
zs as exportPostman,
|
|
4425
|
+
Ws as exportPostmanEnvironment,
|
|
4426
|
+
Gs as fetchOAuth2Token,
|
|
4427
|
+
Ks as fetchTransport,
|
|
4379
4428
|
nn as findApiItem,
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4429
|
+
Ct as findVariables,
|
|
4430
|
+
me as flattenApiRequests,
|
|
4431
|
+
Et as fromBase64,
|
|
4383
4432
|
Cn as generateCode,
|
|
4384
4433
|
qe as graphqlExampleValue,
|
|
4385
4434
|
os as graphqlOperations,
|
|
4386
4435
|
et as graphqlTypeName,
|
|
4387
|
-
|
|
4436
|
+
lr as groupIntegrations,
|
|
4388
4437
|
qs as headerValue,
|
|
4389
|
-
|
|
4390
|
-
|
|
4438
|
+
he as hmac,
|
|
4439
|
+
nr as importApiDocument,
|
|
4391
4440
|
ls as importGraphqlIntrospection,
|
|
4392
4441
|
rs as importHar,
|
|
4393
4442
|
Wn as importOpenApi,
|
|
@@ -4395,57 +4444,58 @@ export {
|
|
|
4395
4444
|
Zn as importPostmanEnvironment,
|
|
4396
4445
|
gs as importWsdl,
|
|
4397
4446
|
Ye as inferSchema,
|
|
4398
|
-
|
|
4399
|
-
|
|
4447
|
+
ur as integrationEndpoints,
|
|
4448
|
+
Ut as interpolate,
|
|
4400
4449
|
dn as isCurlCommand,
|
|
4401
4450
|
L as isEnabled,
|
|
4402
4451
|
Vt as isHar,
|
|
4403
4452
|
Ht as isPostmanCollection,
|
|
4404
|
-
|
|
4405
|
-
|
|
4453
|
+
Rs as joinUrl,
|
|
4454
|
+
$t as jsonPointer,
|
|
4406
4455
|
Gt as md5Hex,
|
|
4407
4456
|
Rt as mockFromSchema,
|
|
4408
|
-
|
|
4457
|
+
Ms as mockResponse,
|
|
4409
4458
|
Kt as namedType,
|
|
4410
|
-
|
|
4459
|
+
be as newApiCollection,
|
|
4411
4460
|
Te as newApiFolder,
|
|
4412
4461
|
Ne as newApiId,
|
|
4413
|
-
|
|
4414
|
-
|
|
4462
|
+
ge as newApiRequest,
|
|
4463
|
+
rr as newIntegration,
|
|
4415
4464
|
rn as paramsIn,
|
|
4416
4465
|
$n as parseCurl,
|
|
4417
4466
|
$s as parseDigestChallenge,
|
|
4418
|
-
|
|
4467
|
+
Ot as parseFormEncoded,
|
|
4419
4468
|
is as parseGraphqlIntrospection,
|
|
4420
4469
|
Ge as parseJsonOrYaml,
|
|
4421
4470
|
ms as parseWsdl,
|
|
4422
4471
|
In as parseYaml,
|
|
4423
4472
|
pn as pathParamNames,
|
|
4424
|
-
|
|
4425
|
-
|
|
4473
|
+
er as pollDeviceToken,
|
|
4474
|
+
Xs as refreshOAuth2Token,
|
|
4426
4475
|
Es as renameApiSchema,
|
|
4427
|
-
|
|
4476
|
+
_t as requestName,
|
|
4428
4477
|
Xt as resolveEnvironmentSet,
|
|
4429
4478
|
ct as resolvePlainScalar,
|
|
4430
|
-
|
|
4479
|
+
At as resolveRequest,
|
|
4480
|
+
pr as responseFieldPaths,
|
|
4431
4481
|
_s as rowsToRecord,
|
|
4432
|
-
|
|
4433
|
-
|
|
4482
|
+
pt as schemaResolver,
|
|
4483
|
+
Vs as sendApiRequest,
|
|
4434
4484
|
un as setRequestUrl,
|
|
4435
4485
|
vs as signAwsV4,
|
|
4436
4486
|
As as signHmac,
|
|
4437
4487
|
pe as splitUrl,
|
|
4438
|
-
|
|
4488
|
+
Zs as startDeviceAuthorization,
|
|
4439
4489
|
Mn as stringifyYaml,
|
|
4440
4490
|
Bn as swagger2ToOpenApi3,
|
|
4441
4491
|
ln as syncPathParams,
|
|
4442
|
-
|
|
4492
|
+
or as toApiEnvironments,
|
|
4443
4493
|
at as toBase64,
|
|
4444
4494
|
De as toCurl,
|
|
4445
4495
|
hn as tokenizeCommand,
|
|
4446
4496
|
Is as unresolvedVariables,
|
|
4447
4497
|
sn as updateApiItem,
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4498
|
+
cr as validateIntegrations,
|
|
4499
|
+
ir as valueOrigin,
|
|
4500
|
+
Ps as variableScope
|
|
4451
4501
|
};
|