zudoku 0.33.2-local.4 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +121 -0
- package/dist/config/loader.d.ts +3 -2
- package/dist/config/loader.js +10 -20
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/common.d.ts +346 -346
- package/dist/config/validators/validate.d.ts +165 -165
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +4 -4
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +6 -5
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -0
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +4 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +5 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +75 -24
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -8
- package/dist/lib/ui/Checkbox.js +1 -13
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +6 -6
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/ui/SyntaxHighlight.js +19 -15
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.js +3 -7
- package/dist/vite/config.js.map +1 -1
- package/lib/{AuthenticationPlugin-BCYuduZ9.js → AuthenticationPlugin-4ip08maU.js} +3 -3
- package/lib/{AuthenticationPlugin-BCYuduZ9.js.map → AuthenticationPlugin-4ip08maU.js.map} +1 -1
- package/lib/Callout-B_sEhkYd.js +211 -0
- package/lib/Callout-B_sEhkYd.js.map +1 -0
- package/lib/{Dialog-mi6BrnrM.js → Dialog-sbgekbjb.js} +48 -33
- package/lib/{Dialog-mi6BrnrM.js.map → Dialog-sbgekbjb.js.map} +1 -1
- package/lib/{Markdown-DofXBcqg.js → Markdown-DZXjQjpH.js} +4099 -3848
- package/lib/Markdown-DZXjQjpH.js.map +1 -0
- package/lib/{MdxPage-KJcNWIgt.js → MdxPage-52vRwa_7.js} +13 -13
- package/lib/{MdxPage-KJcNWIgt.js.map → MdxPage-52vRwa_7.js.map} +1 -1
- package/lib/{OasProvider-HcqBeC4H.js → OasProvider-CR2nG1Eg.js} +4 -4
- package/lib/{OasProvider-HcqBeC4H.js.map → OasProvider-CR2nG1Eg.js.map} +1 -1
- package/lib/{OperationList-C3wnbFxp.js → OperationList-DndcCJUG.js} +1097 -1052
- package/lib/{OperationList-C3wnbFxp.js.map → OperationList-DndcCJUG.js.map} +1 -1
- package/lib/{Select-Co6MuS4j.js → Select-FAYHOYTy.js} +35 -35
- package/lib/{Select-Co6MuS4j.js.map → Select-FAYHOYTy.js.map} +1 -1
- package/lib/{SlotletProvider-CYFNHuok.js → SlotletProvider-TydSHROc.js} +4 -4
- package/lib/{SlotletProvider-CYFNHuok.js.map → SlotletProvider-TydSHROc.js.map} +1 -1
- package/lib/{chunk-IR6S3I6Y-CRDBmIgK.js → chunk-HA7DTUK3-ZGg2W6yV.js} +276 -276
- package/lib/chunk-HA7DTUK3-ZGg2W6yV.js.map +1 -0
- package/lib/{hook-LTe5qHSc.js → hook-CfCFKZ-2.js} +10 -7
- package/lib/{hook-LTe5qHSc.js.map → hook-CfCFKZ-2.js.map} +1 -1
- package/lib/index-DK7IuUyR.js +2201 -0
- package/lib/index-DK7IuUyR.js.map +1 -0
- package/lib/index.esm-CltAN0Tf.js +711 -0
- package/lib/index.esm-CltAN0Tf.js.map +1 -0
- package/lib/objectEntries-BS7aAgOm.js +12 -0
- package/lib/objectEntries-BS7aAgOm.js.map +1 -0
- package/lib/ui/Checkbox.js +15 -25
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +483 -502
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useExposedProps-D76yras4.js → useExposedProps-BslIn-FE.js} +2 -2
- package/lib/{useExposedProps-D76yras4.js.map → useExposedProps-BslIn-FE.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +3 -3
- package/lib/zudoku.components.js +1390 -32
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +5 -5
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +84 -154
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/package.json +5 -5
- package/src/lib/components/AnchorLink.tsx +7 -7
- package/src/lib/components/navigation/SidebarItem.tsx +8 -23
- package/src/lib/core/ZudokuContext.ts +4 -0
- package/src/lib/plugins/openapi/OperationList.tsx +73 -33
- package/src/lib/plugins/openapi/OperationListItem.tsx +105 -92
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +164 -133
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +66 -45
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +94 -96
- package/src/lib/util/MdxComponents.tsx +2 -2
- package/lib/Command-CrTA1FX0.js +0 -140
- package/lib/Command-CrTA1FX0.js.map +0 -1
- package/lib/Markdown-DofXBcqg.js.map +0 -1
- package/lib/chunk-IR6S3I6Y-CRDBmIgK.js.map +0 -1
- package/lib/index-CtkRMvMw.js +0 -2052
- package/lib/index-CtkRMvMw.js.map +0 -1
- package/lib/index-vn5bsvmU.js +0 -1399
- package/lib/index-vn5bsvmU.js.map +0 -1
- package/lib/useScrollToAnchor-DKyrbZoy.js +0 -977
- package/lib/useScrollToAnchor-DKyrbZoy.js.map +0 -1
package/lib/index-CtkRMvMw.js
DELETED
|
@@ -1,2052 +0,0 @@
|
|
|
1
|
-
var vt = Object.defineProperty;
|
|
2
|
-
var He = (t) => {
|
|
3
|
-
throw TypeError(t);
|
|
4
|
-
};
|
|
5
|
-
var jt = (t, a, s) => a in t ? vt(t, a, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[a] = s;
|
|
6
|
-
var le = (t, a, s) => jt(t, typeof a != "symbol" ? a + "" : a, s), bt = (t, a, s) => a.has(t) || He("Cannot " + s);
|
|
7
|
-
var de = (t, a, s) => (bt(t, a, "read from private field"), s ? s.call(t) : a.get(t)), ce = (t, a, s) => a.has(t) ? He("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s);
|
|
8
|
-
import { j as e } from "./jsx-runtime-CYK1ROHF.js";
|
|
9
|
-
import { s as ee } from "./index-LNp6rxyU.js";
|
|
10
|
-
import { Circle as Nt, ChevronRightIcon as Q, CheckIcon as wt, DotIcon as Ct, Check as Tt, XIcon as $t, ChevronDownIcon as St, InfoIcon as Be, LogInIcon as Pt, CirclePlayIcon as kt } from "lucide-react";
|
|
11
|
-
import { r as Ot, m as Ue } from "./chunk-IR6S3I6Y-CRDBmIgK.js";
|
|
12
|
-
import { g as Rt, h as It, e as At } from "./hook-LTe5qHSc.js";
|
|
13
|
-
import { Button as te } from "./ui/Button.js";
|
|
14
|
-
import { j as E } from "./joinUrl-10po2Jdj.js";
|
|
15
|
-
import { Z as Et } from "./invariant-Caa8-XvF.js";
|
|
16
|
-
import { VisuallyHidden as qt } from "@radix-ui/react-visually-hidden";
|
|
17
|
-
import * as f from "react";
|
|
18
|
-
import { Fragment as R, useRef as V, useEffect as fe, useState as F, useCallback as Dt, useTransition as Lt } from "react";
|
|
19
|
-
import { D as Vt, c as Ft, a as zt, b as Ht } from "./Dialog-mi6BrnrM.js";
|
|
20
|
-
import { S as Ye, a as et, b as tt, c as at, e as Z, u as Bt } from "./Select-Co6MuS4j.js";
|
|
21
|
-
import { b as ye, u as ve, C as I, a as Ut, F as Mt } from "./index.esm--gIChbWs.js";
|
|
22
|
-
import { c as je } from "./index-CPNSgwSb.js";
|
|
23
|
-
import { c as m } from "./cn-qaFjX9_3.js";
|
|
24
|
-
import { B as q, S as Gt } from "./Spinner-1KrEmx1V.js";
|
|
25
|
-
import * as st from "@radix-ui/react-label";
|
|
26
|
-
import * as _ from "@radix-ui/react-radio-group";
|
|
27
|
-
import { Card as be, CardHeader as Jt, CardTitle as Qt, CardContent as _t } from "./ui/Card.js";
|
|
28
|
-
import { Tabs as nt, TabsList as rt, TabsTrigger as D, TabsContent as L } from "./ui/Tabs.js";
|
|
29
|
-
import { z as Wt } from "./index-DwT-v3zK.js";
|
|
30
|
-
import * as j from "@radix-ui/react-dropdown-menu";
|
|
31
|
-
import * as xe from "@radix-ui/react-checkbox";
|
|
32
|
-
import * as ae from "@radix-ui/react-popover";
|
|
33
|
-
import { PopoverAnchor as Zt } from "@radix-ui/react-popover";
|
|
34
|
-
import { T as Kt } from "./index-gQD2h1wX.js";
|
|
35
|
-
import { f as Xt, g as Yt, C as ea, b as ta } from "./Command-CrTA1FX0.js";
|
|
36
|
-
import { Input as Ne } from "./ui/Input.js";
|
|
37
|
-
import { Slot as aa } from "@radix-ui/react-slot";
|
|
38
|
-
import { Callout as sa } from "./ui/Callout.js";
|
|
39
|
-
import { Collapsible as Me, CollapsibleTrigger as Ge, CollapsibleContent as Je } from "./ui/Collapsible.js";
|
|
40
|
-
import { d as na } from "./useQuery-CQUwWR9i.js";
|
|
41
|
-
import * as we from "@radix-ui/react-collapsible";
|
|
42
|
-
import { SyntaxHighlight as ra } from "./ui/SyntaxHighlight.js";
|
|
43
|
-
let me;
|
|
44
|
-
const oa = (t) => {
|
|
45
|
-
var a;
|
|
46
|
-
if ((a = t.errors) != null && a[0])
|
|
47
|
-
throw new Et(t.errors[0].message, {
|
|
48
|
-
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
var re, oe;
|
|
52
|
-
class ia {
|
|
53
|
-
constructor(a) {
|
|
54
|
-
ce(this, re, async () => (me || (me = import("./createServer-DmusVVsi.js").then(
|
|
55
|
-
(a) => a.createServer(this.config)
|
|
56
|
-
)), me));
|
|
57
|
-
ce(this, oe, async (a) => this.config.server ? fetch(this.config.server, a) : (await de(this, re).call(this)).fetch("http://localhost/graphql", a));
|
|
58
|
-
le(this, "fetch", async (a, ...[s]) => {
|
|
59
|
-
var l;
|
|
60
|
-
const n = (l = a.match(/query (\w+)/)) == null ? void 0 : l[1], r = await de(this, oe).call(this, {
|
|
61
|
-
method: "POST",
|
|
62
|
-
body: JSON.stringify({ query: a, variables: s, operationName: n }),
|
|
63
|
-
headers: { "Content-Type": "application/json" }
|
|
64
|
-
});
|
|
65
|
-
if (!r.ok)
|
|
66
|
-
throw new Error("Network response was not ok");
|
|
67
|
-
const o = await r.json();
|
|
68
|
-
return oa(o), o.data;
|
|
69
|
-
});
|
|
70
|
-
this.config = a;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
re = new WeakMap(), oe = new WeakMap();
|
|
74
|
-
class z extends String {
|
|
75
|
-
constructor(s, n) {
|
|
76
|
-
super(s);
|
|
77
|
-
le(this, "__apiType");
|
|
78
|
-
this.value = s, this.__meta__ = n;
|
|
79
|
-
}
|
|
80
|
-
toString() {
|
|
81
|
-
return this.value;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
const la = new z(
|
|
85
|
-
`
|
|
86
|
-
fragment OperationsFragment on OperationItem {
|
|
87
|
-
slug
|
|
88
|
-
summary
|
|
89
|
-
method
|
|
90
|
-
description
|
|
91
|
-
operationId
|
|
92
|
-
contentTypes
|
|
93
|
-
path
|
|
94
|
-
parameters {
|
|
95
|
-
name
|
|
96
|
-
in
|
|
97
|
-
description
|
|
98
|
-
required
|
|
99
|
-
schema
|
|
100
|
-
style
|
|
101
|
-
examples {
|
|
102
|
-
name
|
|
103
|
-
description
|
|
104
|
-
externalValue
|
|
105
|
-
value
|
|
106
|
-
summary
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
requestBody {
|
|
110
|
-
content {
|
|
111
|
-
mediaType
|
|
112
|
-
encoding {
|
|
113
|
-
name
|
|
114
|
-
}
|
|
115
|
-
examples {
|
|
116
|
-
name
|
|
117
|
-
description
|
|
118
|
-
externalValue
|
|
119
|
-
value
|
|
120
|
-
summary
|
|
121
|
-
}
|
|
122
|
-
schema
|
|
123
|
-
}
|
|
124
|
-
description
|
|
125
|
-
required
|
|
126
|
-
}
|
|
127
|
-
responses {
|
|
128
|
-
statusCode
|
|
129
|
-
links
|
|
130
|
-
description
|
|
131
|
-
content {
|
|
132
|
-
examples {
|
|
133
|
-
name
|
|
134
|
-
description
|
|
135
|
-
externalValue
|
|
136
|
-
value
|
|
137
|
-
summary
|
|
138
|
-
}
|
|
139
|
-
mediaType
|
|
140
|
-
encoding {
|
|
141
|
-
name
|
|
142
|
-
}
|
|
143
|
-
schema
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
`,
|
|
148
|
-
{ fragmentName: "OperationsFragment" }
|
|
149
|
-
), da = new z(`
|
|
150
|
-
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
151
|
-
schema(input: $input, type: $type) {
|
|
152
|
-
url
|
|
153
|
-
servers {
|
|
154
|
-
url
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
`), ca = new z(`
|
|
159
|
-
query AllOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
160
|
-
schema(input: $input, type: $type) {
|
|
161
|
-
servers {
|
|
162
|
-
url
|
|
163
|
-
}
|
|
164
|
-
description
|
|
165
|
-
summary
|
|
166
|
-
title
|
|
167
|
-
url
|
|
168
|
-
version
|
|
169
|
-
tags(name: $tag) {
|
|
170
|
-
name
|
|
171
|
-
description
|
|
172
|
-
}
|
|
173
|
-
operations(tag: $tag, untagged: $untagged) {
|
|
174
|
-
slug
|
|
175
|
-
...OperationsFragment
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
fragment OperationsFragment on OperationItem {
|
|
180
|
-
slug
|
|
181
|
-
summary
|
|
182
|
-
method
|
|
183
|
-
description
|
|
184
|
-
operationId
|
|
185
|
-
contentTypes
|
|
186
|
-
path
|
|
187
|
-
parameters {
|
|
188
|
-
name
|
|
189
|
-
in
|
|
190
|
-
description
|
|
191
|
-
required
|
|
192
|
-
schema
|
|
193
|
-
style
|
|
194
|
-
examples {
|
|
195
|
-
name
|
|
196
|
-
description
|
|
197
|
-
externalValue
|
|
198
|
-
value
|
|
199
|
-
summary
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
requestBody {
|
|
203
|
-
content {
|
|
204
|
-
mediaType
|
|
205
|
-
encoding {
|
|
206
|
-
name
|
|
207
|
-
}
|
|
208
|
-
examples {
|
|
209
|
-
name
|
|
210
|
-
description
|
|
211
|
-
externalValue
|
|
212
|
-
value
|
|
213
|
-
summary
|
|
214
|
-
}
|
|
215
|
-
schema
|
|
216
|
-
}
|
|
217
|
-
description
|
|
218
|
-
required
|
|
219
|
-
}
|
|
220
|
-
responses {
|
|
221
|
-
statusCode
|
|
222
|
-
links
|
|
223
|
-
description
|
|
224
|
-
content {
|
|
225
|
-
examples {
|
|
226
|
-
name
|
|
227
|
-
description
|
|
228
|
-
externalValue
|
|
229
|
-
value
|
|
230
|
-
summary
|
|
231
|
-
}
|
|
232
|
-
mediaType
|
|
233
|
-
encoding {
|
|
234
|
-
name
|
|
235
|
-
}
|
|
236
|
-
schema
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}`), ma = new z(`
|
|
240
|
-
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
241
|
-
schema(input: $input, type: $type) {
|
|
242
|
-
url
|
|
243
|
-
servers {
|
|
244
|
-
url
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
`), ua = new z(`
|
|
249
|
-
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
250
|
-
schema(input: $input, type: $type) {
|
|
251
|
-
url
|
|
252
|
-
tags {
|
|
253
|
-
name
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
`), pa = new z(`
|
|
258
|
-
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
|
|
259
|
-
schema(input: $input, type: $type) {
|
|
260
|
-
operations(tag: $tag) {
|
|
261
|
-
slug
|
|
262
|
-
deprecated
|
|
263
|
-
method
|
|
264
|
-
summary
|
|
265
|
-
operationId
|
|
266
|
-
path
|
|
267
|
-
tags {
|
|
268
|
-
name
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
untagged: operations(untagged: true) {
|
|
272
|
-
slug
|
|
273
|
-
deprecated
|
|
274
|
-
method
|
|
275
|
-
summary
|
|
276
|
-
operationId
|
|
277
|
-
path
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
`), ha = {
|
|
282
|
-
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": da,
|
|
283
|
-
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": la,
|
|
284
|
-
"\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n": ca,
|
|
285
|
-
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": ma,
|
|
286
|
-
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": ua,
|
|
287
|
-
"\n query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {\n schema(input: $input, type: $type) {\n operations(tag: $tag) {\n slug\n deprecated\n method\n summary\n operationId\n path\n tags {\n name\n }\n }\n untagged: operations(untagged: true) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n": pa
|
|
288
|
-
};
|
|
289
|
-
function ot(t) {
|
|
290
|
-
return ha[t] ?? {};
|
|
291
|
-
}
|
|
292
|
-
const xa = je(
|
|
293
|
-
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
294
|
-
{
|
|
295
|
-
variants: {
|
|
296
|
-
variant: {
|
|
297
|
-
default: "bg-background text-foreground",
|
|
298
|
-
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
defaultVariants: {
|
|
302
|
-
variant: "default"
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
), K = f.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
306
|
-
"div",
|
|
307
|
-
{
|
|
308
|
-
ref: n,
|
|
309
|
-
role: "alert",
|
|
310
|
-
className: m(xa({ variant: a }), t),
|
|
311
|
-
...s
|
|
312
|
-
}
|
|
313
|
-
));
|
|
314
|
-
K.displayName = "Alert";
|
|
315
|
-
const X = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
316
|
-
"h5",
|
|
317
|
-
{
|
|
318
|
-
ref: s,
|
|
319
|
-
className: m("mb-1 font-medium leading-none tracking-tight", t),
|
|
320
|
-
...a
|
|
321
|
-
}
|
|
322
|
-
));
|
|
323
|
-
X.displayName = "AlertTitle";
|
|
324
|
-
const Y = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
325
|
-
"div",
|
|
326
|
-
{
|
|
327
|
-
ref: s,
|
|
328
|
-
className: m("text-sm [&_p]:leading-relaxed", t),
|
|
329
|
-
...a
|
|
330
|
-
}
|
|
331
|
-
));
|
|
332
|
-
Y.displayName = "AlertDescription";
|
|
333
|
-
const ga = ({
|
|
334
|
-
path: t,
|
|
335
|
-
renderParam: a
|
|
336
|
-
}) => {
|
|
337
|
-
let s = 0;
|
|
338
|
-
return t.split("/").map((n, r, o) => {
|
|
339
|
-
const l = Array.from(n.matchAll(/{([^}]+)}/g)), c = [];
|
|
340
|
-
let d = 0;
|
|
341
|
-
return l.forEach((u) => {
|
|
342
|
-
const [g, N] = u;
|
|
343
|
-
if (!N) return;
|
|
344
|
-
const y = u.index;
|
|
345
|
-
y > d && c.push(
|
|
346
|
-
/* @__PURE__ */ e.jsx(R, { children: n.slice(d, y) }, `text-${d}-${y}`)
|
|
347
|
-
), c.push(
|
|
348
|
-
/* @__PURE__ */ e.jsx(R, { children: a({ name: N, originalValue: g, index: s++ }) }, `param-${N}`)
|
|
349
|
-
), d = y + g.length;
|
|
350
|
-
}), d < n.length && c.push(
|
|
351
|
-
/* @__PURE__ */ e.jsx(R, { children: n.slice(d) }, `text-${d}-${n.length}`)
|
|
352
|
-
), // eslint-disable-next-line react/no-array-index-key
|
|
353
|
-
/* @__PURE__ */ e.jsxs(R, { children: [
|
|
354
|
-
c,
|
|
355
|
-
r < o.length - 1 && "/",
|
|
356
|
-
/* @__PURE__ */ e.jsx("wbr", {})
|
|
357
|
-
] }, `${n}-${r}`);
|
|
358
|
-
});
|
|
359
|
-
}, fa = je(
|
|
360
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
361
|
-
), M = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
362
|
-
st.Root,
|
|
363
|
-
{
|
|
364
|
-
ref: s,
|
|
365
|
-
className: m(fa(), t),
|
|
366
|
-
...a
|
|
367
|
-
}
|
|
368
|
-
));
|
|
369
|
-
M.displayName = st.Root.displayName;
|
|
370
|
-
const Ce = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
371
|
-
_.Root,
|
|
372
|
-
{
|
|
373
|
-
className: m("grid gap-2", t),
|
|
374
|
-
...a,
|
|
375
|
-
ref: s
|
|
376
|
-
}
|
|
377
|
-
));
|
|
378
|
-
Ce.displayName = _.Root.displayName;
|
|
379
|
-
const se = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
380
|
-
_.Item,
|
|
381
|
-
{
|
|
382
|
-
ref: s,
|
|
383
|
-
className: m(
|
|
384
|
-
"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
385
|
-
t
|
|
386
|
-
),
|
|
387
|
-
...a,
|
|
388
|
-
children: /* @__PURE__ */ e.jsx(_.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e.jsx(Nt, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
389
|
-
}
|
|
390
|
-
));
|
|
391
|
-
se.displayName = _.Item.displayName;
|
|
392
|
-
const it = f.forwardRef(
|
|
393
|
-
({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
394
|
-
"textarea",
|
|
395
|
-
{
|
|
396
|
-
className: m(
|
|
397
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
398
|
-
t
|
|
399
|
-
),
|
|
400
|
-
ref: s,
|
|
401
|
-
...a
|
|
402
|
-
}
|
|
403
|
-
)
|
|
404
|
-
);
|
|
405
|
-
it.displayName = "Textarea";
|
|
406
|
-
const ue = (t) => Math.abs(
|
|
407
|
-
isNaN(parseInt(t)) ? t.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(t)) ? 0 : parseInt(t)
|
|
408
|
-
), pe = (t) => t.length > 1 ? parseInt(t.split("").reduce((a, s) => `${ue(a) + ue(s)}`)) : ue(t), Qe = (t, a = {}) => {
|
|
409
|
-
const s = (3 * pe(t) + 2 * pe(t) + pe(t)) % 360, { saturation: n = 75, lightness: r = 60 } = a;
|
|
410
|
-
return `${s}deg ${n}% ${r}%`;
|
|
411
|
-
}, he = "data-linked-param", ya = (t) => {
|
|
412
|
-
const { resolvedTheme: a } = Wt();
|
|
413
|
-
return {
|
|
414
|
-
text: Qe(
|
|
415
|
-
t,
|
|
416
|
-
a === "light" ? { saturation: 95, lightness: 38 } : {}
|
|
417
|
-
),
|
|
418
|
-
background: Qe(
|
|
419
|
-
t,
|
|
420
|
-
a === "light" ? { saturation: 85, lightness: 40 } : {}
|
|
421
|
-
)
|
|
422
|
-
};
|
|
423
|
-
}, lt = ({
|
|
424
|
-
name: t,
|
|
425
|
-
className: a,
|
|
426
|
-
slug: s,
|
|
427
|
-
title: n,
|
|
428
|
-
children: r,
|
|
429
|
-
onClick: o
|
|
430
|
-
}) => {
|
|
431
|
-
const l = V(null), c = s == null ? void 0 : s.replace(/[{}]/g, ""), d = t.replace(/[{}]/g, ""), { text: u, background: g } = ya(d), N = `hsl(${u} / 100%)`, y = `hsl(${g} / 10%)`, h = `hsl(${g} / 50%)`;
|
|
432
|
-
return fe(() => {
|
|
433
|
-
if (!c || !l.current) return;
|
|
434
|
-
const x = () => {
|
|
435
|
-
document.querySelectorAll(`[${he}="${c}"]`).forEach((v) => {
|
|
436
|
-
v instanceof HTMLElement && (v.dataset.active = "true");
|
|
437
|
-
});
|
|
438
|
-
}, p = () => {
|
|
439
|
-
document.querySelectorAll(`[${he}="${c}"]`).forEach((v) => {
|
|
440
|
-
v instanceof HTMLElement && (v.dataset.active = "false");
|
|
441
|
-
});
|
|
442
|
-
}, b = l.current;
|
|
443
|
-
return b.addEventListener("mouseenter", x), b.addEventListener("mouseleave", p), () => {
|
|
444
|
-
b.removeEventListener("mouseenter", x), b.removeEventListener("mouseleave", p);
|
|
445
|
-
};
|
|
446
|
-
}, [c]), /* @__PURE__ */ e.jsx(
|
|
447
|
-
"span",
|
|
448
|
-
{
|
|
449
|
-
[he]: c,
|
|
450
|
-
className: m(
|
|
451
|
-
// This may not contain (inline-)flex or (inline-)block otherwise it breaks the browser's full text search
|
|
452
|
-
"relative rounded transition-all duration-100 rounded-lg",
|
|
453
|
-
"border border-[--border-color] p-0.5 text-[--param-color] bg-[--background-color]",
|
|
454
|
-
"data-[active=true]:border-[--param-color] data-[active=true]:shadow data-[active=true]:bottom-px",
|
|
455
|
-
a
|
|
456
|
-
),
|
|
457
|
-
title: n,
|
|
458
|
-
suppressHydrationWarning: !0,
|
|
459
|
-
ref: l,
|
|
460
|
-
onClick: o,
|
|
461
|
-
style: {
|
|
462
|
-
"--param-color": N,
|
|
463
|
-
"--border-color": h,
|
|
464
|
-
"--background-color": y
|
|
465
|
-
},
|
|
466
|
-
children: r ?? t
|
|
467
|
-
}
|
|
468
|
-
);
|
|
469
|
-
}, va = (t, a, s) => {
|
|
470
|
-
const n = a.replace(/(:\w+|\{\w+})/g, (o) => {
|
|
471
|
-
var d;
|
|
472
|
-
const l = o.replace(/[:{}]/g, "");
|
|
473
|
-
return ((d = s.pathParams.find((u) => u.name === l)) == null ? void 0 : d.value) ?? o;
|
|
474
|
-
}), r = new URL(
|
|
475
|
-
n.replace(/^\//, ""),
|
|
476
|
-
t.endsWith("/") ? t : `${t}/`
|
|
477
|
-
);
|
|
478
|
-
return s.queryParams.filter((o) => o.active).forEach((o) => {
|
|
479
|
-
r.searchParams.set(o.name, o.value);
|
|
480
|
-
}), r;
|
|
481
|
-
}, dt = j.Root, ct = j.Trigger, ja = j.Group, ba = f.forwardRef(({ className: t, inset: a, children: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
|
|
482
|
-
j.SubTrigger,
|
|
483
|
-
{
|
|
484
|
-
ref: r,
|
|
485
|
-
className: m(
|
|
486
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
487
|
-
a && "pl-8",
|
|
488
|
-
t
|
|
489
|
-
),
|
|
490
|
-
...n,
|
|
491
|
-
children: [
|
|
492
|
-
s,
|
|
493
|
-
/* @__PURE__ */ e.jsx(Q, { className: "ml-auto h-4 w-4" })
|
|
494
|
-
]
|
|
495
|
-
}
|
|
496
|
-
));
|
|
497
|
-
ba.displayName = j.SubTrigger.displayName;
|
|
498
|
-
const Na = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
499
|
-
j.SubContent,
|
|
500
|
-
{
|
|
501
|
-
ref: s,
|
|
502
|
-
className: m(
|
|
503
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
504
|
-
t
|
|
505
|
-
),
|
|
506
|
-
...a
|
|
507
|
-
}
|
|
508
|
-
));
|
|
509
|
-
Na.displayName = j.SubContent.displayName;
|
|
510
|
-
const Te = f.forwardRef(({ className: t, sideOffset: a = 4, ...s }, n) => /* @__PURE__ */ e.jsx(j.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
511
|
-
j.Content,
|
|
512
|
-
{
|
|
513
|
-
ref: n,
|
|
514
|
-
sideOffset: a,
|
|
515
|
-
className: m(
|
|
516
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
517
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
518
|
-
t
|
|
519
|
-
),
|
|
520
|
-
...s
|
|
521
|
-
}
|
|
522
|
-
) }));
|
|
523
|
-
Te.displayName = j.Content.displayName;
|
|
524
|
-
const $e = f.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
525
|
-
j.Item,
|
|
526
|
-
{
|
|
527
|
-
ref: n,
|
|
528
|
-
className: m(
|
|
529
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
530
|
-
a && "pl-8",
|
|
531
|
-
t
|
|
532
|
-
),
|
|
533
|
-
...s
|
|
534
|
-
}
|
|
535
|
-
));
|
|
536
|
-
$e.displayName = j.Item.displayName;
|
|
537
|
-
const wa = f.forwardRef(({ className: t, children: a, checked: s, ...n }, r) => /* @__PURE__ */ e.jsxs(
|
|
538
|
-
j.CheckboxItem,
|
|
539
|
-
{
|
|
540
|
-
ref: r,
|
|
541
|
-
className: m(
|
|
542
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
543
|
-
t
|
|
544
|
-
),
|
|
545
|
-
checked: s,
|
|
546
|
-
...n,
|
|
547
|
-
children: [
|
|
548
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(j.ItemIndicator, { children: /* @__PURE__ */ e.jsx(wt, { className: "h-4 w-4" }) }) }),
|
|
549
|
-
a
|
|
550
|
-
]
|
|
551
|
-
}
|
|
552
|
-
));
|
|
553
|
-
wa.displayName = j.CheckboxItem.displayName;
|
|
554
|
-
const Ca = f.forwardRef(({ className: t, children: a, ...s }, n) => /* @__PURE__ */ e.jsxs(
|
|
555
|
-
j.RadioItem,
|
|
556
|
-
{
|
|
557
|
-
ref: n,
|
|
558
|
-
className: m(
|
|
559
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
560
|
-
t
|
|
561
|
-
),
|
|
562
|
-
...s,
|
|
563
|
-
children: [
|
|
564
|
-
/* @__PURE__ */ e.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e.jsx(j.ItemIndicator, { children: /* @__PURE__ */ e.jsx(Ct, { className: "h-4 w-4 fill-current" }) }) }),
|
|
565
|
-
a
|
|
566
|
-
]
|
|
567
|
-
}
|
|
568
|
-
));
|
|
569
|
-
Ca.displayName = j.RadioItem.displayName;
|
|
570
|
-
const mt = f.forwardRef(({ className: t, inset: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
571
|
-
j.Label,
|
|
572
|
-
{
|
|
573
|
-
ref: n,
|
|
574
|
-
className: m(
|
|
575
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
576
|
-
a && "pl-8",
|
|
577
|
-
t
|
|
578
|
-
),
|
|
579
|
-
...s
|
|
580
|
-
}
|
|
581
|
-
));
|
|
582
|
-
mt.displayName = j.Label.displayName;
|
|
583
|
-
const ut = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
584
|
-
j.Separator,
|
|
585
|
-
{
|
|
586
|
-
ref: s,
|
|
587
|
-
className: m("-mx-1 my-1 h-px bg-muted", t),
|
|
588
|
-
...a
|
|
589
|
-
}
|
|
590
|
-
));
|
|
591
|
-
ut.displayName = j.Separator.displayName;
|
|
592
|
-
const Ta = ({
|
|
593
|
-
examples: t,
|
|
594
|
-
onSelect: a
|
|
595
|
-
}) => /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2 mt-2 items-end", children: /* @__PURE__ */ e.jsxs(dt, { children: [
|
|
596
|
-
/* @__PURE__ */ e.jsx(ct, { asChild: !0, children: /* @__PURE__ */ e.jsx(q, { variant: "outline", children: "Use Example" }) }),
|
|
597
|
-
/* @__PURE__ */ e.jsx(Te, { className: "w-56", children: t.map((s) => {
|
|
598
|
-
var n;
|
|
599
|
-
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
600
|
-
/* @__PURE__ */ e.jsx(mt, { children: s.mediaType }),
|
|
601
|
-
/* @__PURE__ */ e.jsx(ut, {}),
|
|
602
|
-
/* @__PURE__ */ e.jsx(ja, { children: (n = s.examples) == null ? void 0 : n.map((r) => /* @__PURE__ */ e.jsx(
|
|
603
|
-
$e,
|
|
604
|
-
{
|
|
605
|
-
onSelect: () => a(r),
|
|
606
|
-
className: "line-clamp-1",
|
|
607
|
-
children: r.summary ?? r.name
|
|
608
|
-
},
|
|
609
|
-
r.name
|
|
610
|
-
)) })
|
|
611
|
-
] }, s.mediaType);
|
|
612
|
-
}) })
|
|
613
|
-
] }) }), ie = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
614
|
-
"div",
|
|
615
|
-
{
|
|
616
|
-
ref: s,
|
|
617
|
-
className: m(
|
|
618
|
-
"rounded-xl border bg-card text-card-foreground shadow-sm",
|
|
619
|
-
t
|
|
620
|
-
),
|
|
621
|
-
...a
|
|
622
|
-
}
|
|
623
|
-
));
|
|
624
|
-
ie.displayName = "Card";
|
|
625
|
-
const $a = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
626
|
-
"div",
|
|
627
|
-
{
|
|
628
|
-
ref: s,
|
|
629
|
-
className: m("flex flex-col space-y-1.5 p-6", t),
|
|
630
|
-
...a
|
|
631
|
-
}
|
|
632
|
-
));
|
|
633
|
-
$a.displayName = "CardHeader";
|
|
634
|
-
const Sa = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
635
|
-
"h3",
|
|
636
|
-
{
|
|
637
|
-
ref: s,
|
|
638
|
-
className: m("font-semibold leading-none tracking-tight", t),
|
|
639
|
-
...a
|
|
640
|
-
}
|
|
641
|
-
));
|
|
642
|
-
Sa.displayName = "CardTitle";
|
|
643
|
-
const Pa = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
644
|
-
"p",
|
|
645
|
-
{
|
|
646
|
-
ref: s,
|
|
647
|
-
className: m("text-sm text-muted-foreground", t),
|
|
648
|
-
...a
|
|
649
|
-
}
|
|
650
|
-
));
|
|
651
|
-
Pa.displayName = "CardDescription";
|
|
652
|
-
const ka = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx("div", { ref: s, className: m("p-6 pt-0", t), ...a }));
|
|
653
|
-
ka.displayName = "CardContent";
|
|
654
|
-
const Oa = f.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e.jsx(
|
|
655
|
-
"div",
|
|
656
|
-
{
|
|
657
|
-
ref: s,
|
|
658
|
-
className: m("flex items-center p-6 pt-0", t),
|
|
659
|
-
...a
|
|
660
|
-
}
|
|
661
|
-
));
|
|
662
|
-
Oa.displayName = "CardFooter";
|
|
663
|
-
const Ra = je(
|
|
664
|
-
"peer h-4 w-4 shrink-0 rounded-sm ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary",
|
|
665
|
-
{
|
|
666
|
-
variants: {
|
|
667
|
-
variant: {
|
|
668
|
-
default: "border border-primary data-[state=checked]:bg-primary",
|
|
669
|
-
outline: "border border-input data-[state=checked]:bg-accent"
|
|
670
|
-
}
|
|
671
|
-
},
|
|
672
|
-
defaultVariants: {
|
|
673
|
-
variant: "default"
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
), Se = f.forwardRef(({ className: t, variant: a, ...s }, n) => /* @__PURE__ */ e.jsx(
|
|
677
|
-
xe.Root,
|
|
678
|
-
{
|
|
679
|
-
ref: n,
|
|
680
|
-
className: m(Ra({ variant: a, className: t })),
|
|
681
|
-
...s,
|
|
682
|
-
children: /* @__PURE__ */ e.jsx(
|
|
683
|
-
xe.Indicator,
|
|
684
|
-
{
|
|
685
|
-
className: m("flex items-center justify-center text-current"),
|
|
686
|
-
children: /* @__PURE__ */ e.jsx(Tt, { className: "h-4 w-4" })
|
|
687
|
-
}
|
|
688
|
-
)
|
|
689
|
-
}
|
|
690
|
-
));
|
|
691
|
-
Se.displayName = xe.Root.displayName;
|
|
692
|
-
const Ia = ae.Root, pt = f.forwardRef(({ className: t, align: a = "center", sideOffset: s = 4, ...n }, r) => /* @__PURE__ */ e.jsx(ae.Portal, { children: /* @__PURE__ */ e.jsx(
|
|
693
|
-
ae.Content,
|
|
694
|
-
{
|
|
695
|
-
ref: r,
|
|
696
|
-
align: a,
|
|
697
|
-
sideOffset: s,
|
|
698
|
-
className: m(
|
|
699
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
700
|
-
t
|
|
701
|
-
),
|
|
702
|
-
...n
|
|
703
|
-
}
|
|
704
|
-
) }));
|
|
705
|
-
pt.displayName = ae.Content.displayName;
|
|
706
|
-
const Aa = ({
|
|
707
|
-
value: t,
|
|
708
|
-
options: a,
|
|
709
|
-
onChange: s,
|
|
710
|
-
className: n,
|
|
711
|
-
placeholder: r = "Enter value",
|
|
712
|
-
onEnterPress: o,
|
|
713
|
-
ref: l
|
|
714
|
-
}) => {
|
|
715
|
-
const [c, d] = F(!1), [u, g] = F(!1), N = Kt((h) => h.filtered.count), y = V(null);
|
|
716
|
-
return /* @__PURE__ */ e.jsxs(Ia, { open: c, children: [
|
|
717
|
-
/* @__PURE__ */ e.jsx(Zt, { children: /* @__PURE__ */ e.jsx(
|
|
718
|
-
Yt,
|
|
719
|
-
{
|
|
720
|
-
ref: (h) => {
|
|
721
|
-
y.current = h, typeof l == "function" ? l(h) : l && (l.current = h);
|
|
722
|
-
},
|
|
723
|
-
value: t,
|
|
724
|
-
placeholder: r,
|
|
725
|
-
className: m("h-9 bg-transparent", n),
|
|
726
|
-
onFocus: () => d(!0),
|
|
727
|
-
onBlur: () => {
|
|
728
|
-
u || d(!1);
|
|
729
|
-
},
|
|
730
|
-
onKeyDown: (h) => {
|
|
731
|
-
var x;
|
|
732
|
-
h.key === "Enter" && (d(!1), (x = y.current) == null || x.blur(), o == null || o(h));
|
|
733
|
-
},
|
|
734
|
-
onValueChange: (h) => s(h)
|
|
735
|
-
}
|
|
736
|
-
) }),
|
|
737
|
-
/* @__PURE__ */ e.jsx(
|
|
738
|
-
pt,
|
|
739
|
-
{
|
|
740
|
-
onMouseEnter: () => g(!0),
|
|
741
|
-
onMouseLeave: () => g(!1),
|
|
742
|
-
onOpenAutoFocus: (h) => h.preventDefault(),
|
|
743
|
-
className: m("p-0 w-[--radix-popover-trigger-width]", {
|
|
744
|
-
"border-0": N === 0
|
|
745
|
-
}),
|
|
746
|
-
align: "start",
|
|
747
|
-
side: "bottom",
|
|
748
|
-
onWheel: (h) => {
|
|
749
|
-
h.stopPropagation();
|
|
750
|
-
},
|
|
751
|
-
onTouchMove: (h) => {
|
|
752
|
-
h.stopPropagation();
|
|
753
|
-
},
|
|
754
|
-
children: /* @__PURE__ */ e.jsx(ea, { className: "max-h-[140px]", children: a.map((h) => /* @__PURE__ */ e.jsx(
|
|
755
|
-
ta,
|
|
756
|
-
{
|
|
757
|
-
value: h,
|
|
758
|
-
onSelect: (x) => {
|
|
759
|
-
s(x), d(!1);
|
|
760
|
-
},
|
|
761
|
-
className: "cursor-pointer",
|
|
762
|
-
children: h
|
|
763
|
-
},
|
|
764
|
-
h
|
|
765
|
-
)) })
|
|
766
|
-
}
|
|
767
|
-
)
|
|
768
|
-
] });
|
|
769
|
-
}, ne = ({ shouldFilter: t, ...a }) => /* @__PURE__ */ e.jsx(Xt, { className: "bg-transparent", shouldFilter: t, children: /* @__PURE__ */ e.jsx(Aa, { ...a }) }), Pe = (t, a) => {
|
|
770
|
-
const s = f.forwardRef(({ className: n, asChild: r, ...o }, l) => {
|
|
771
|
-
const c = r ? aa : t;
|
|
772
|
-
return f.createElement(c, {
|
|
773
|
-
...o,
|
|
774
|
-
ref: l,
|
|
775
|
-
className: typeof a == "function" ? a({ className: n }) : m(a, n)
|
|
776
|
-
});
|
|
777
|
-
});
|
|
778
|
-
return s.displayName = `VariantComponent(${t})`, s;
|
|
779
|
-
}, ke = Pe(
|
|
780
|
-
"div",
|
|
781
|
-
"grid grid-cols-[2fr_3fr] gap-2 items-center"
|
|
782
|
-
), Oe = Pe(
|
|
783
|
-
"div",
|
|
784
|
-
"group hover:bg-accent px-3 grid col-span-full grid-cols-subgrid"
|
|
785
|
-
), Ea = Object.freeze([
|
|
786
|
-
"Accept",
|
|
787
|
-
"Accept-Encoding",
|
|
788
|
-
"Accept-Language",
|
|
789
|
-
"Authorization",
|
|
790
|
-
"Cache-Control",
|
|
791
|
-
"Connection",
|
|
792
|
-
"Content-Disposition",
|
|
793
|
-
"Content-Encoding",
|
|
794
|
-
"Content-Language",
|
|
795
|
-
"Content-Length",
|
|
796
|
-
"Content-Range",
|
|
797
|
-
"Content-Security-Policy",
|
|
798
|
-
"Content-Type",
|
|
799
|
-
"Cookie",
|
|
800
|
-
"Date",
|
|
801
|
-
"ETag",
|
|
802
|
-
"Expires",
|
|
803
|
-
"Host",
|
|
804
|
-
"If-Modified-Since",
|
|
805
|
-
"Location",
|
|
806
|
-
"Origin",
|
|
807
|
-
"Pragma",
|
|
808
|
-
"Referer",
|
|
809
|
-
"Set-Cookie",
|
|
810
|
-
"User-Agent",
|
|
811
|
-
"X-Requested-With"
|
|
812
|
-
]), qa = ({
|
|
813
|
-
control: t,
|
|
814
|
-
headers: a
|
|
815
|
-
}) => {
|
|
816
|
-
const { fields: s, append: n, remove: r } = ye({
|
|
817
|
-
control: t,
|
|
818
|
-
name: "headers"
|
|
819
|
-
}), { setValue: o, watch: l } = ve(), c = V([]), d = V([]), u = l("headers"), g = Dt(() => {
|
|
820
|
-
n({ name: "", value: "", active: !1 });
|
|
821
|
-
}, [n]);
|
|
822
|
-
fe(() => {
|
|
823
|
-
u.length === 0 && g();
|
|
824
|
-
}, [u, g]);
|
|
825
|
-
const N = (x) => {
|
|
826
|
-
var p;
|
|
827
|
-
(p = c.current[x]) == null || p.focus();
|
|
828
|
-
}, y = (x) => {
|
|
829
|
-
g(), requestAnimationFrame(() => {
|
|
830
|
-
var p;
|
|
831
|
-
return (p = d.current[x + 1]) == null ? void 0 : p.focus();
|
|
832
|
-
});
|
|
833
|
-
}, h = a.filter((x) => !u.some((p) => p.name === x.name)).map(({ name: x }) => x);
|
|
834
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
835
|
-
/* @__PURE__ */ e.jsx(ie, { className: "overflow-hidden", children: /* @__PURE__ */ e.jsx(ke, { children: s.map((x, p) => {
|
|
836
|
-
const b = a.find(
|
|
837
|
-
(v) => v.name === l(`headers.${p}.name`)
|
|
838
|
-
);
|
|
839
|
-
return /* @__PURE__ */ e.jsxs(Oe, { children: [
|
|
840
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 ", children: [
|
|
841
|
-
/* @__PURE__ */ e.jsx(
|
|
842
|
-
I,
|
|
843
|
-
{
|
|
844
|
-
control: t,
|
|
845
|
-
name: `headers.${p}.active`,
|
|
846
|
-
render: ({ field: v }) => /* @__PURE__ */ e.jsx(
|
|
847
|
-
Se,
|
|
848
|
-
{
|
|
849
|
-
variant: "outline",
|
|
850
|
-
id: `headers.${p}.active`,
|
|
851
|
-
checked: v.value,
|
|
852
|
-
onCheckedChange: (C) => {
|
|
853
|
-
v.onChange(C);
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
)
|
|
857
|
-
}
|
|
858
|
-
),
|
|
859
|
-
/* @__PURE__ */ e.jsx(
|
|
860
|
-
I,
|
|
861
|
-
{
|
|
862
|
-
control: t,
|
|
863
|
-
name: `headers.${p}.name`,
|
|
864
|
-
render: ({ field: v }) => /* @__PURE__ */ e.jsx(
|
|
865
|
-
ne,
|
|
866
|
-
{
|
|
867
|
-
...v,
|
|
868
|
-
placeholder: "Name",
|
|
869
|
-
className: "border-0 shadow-none bg-transparent text-xs font-mono",
|
|
870
|
-
options: [...h, ...Ea],
|
|
871
|
-
onEnterPress: () => N(p),
|
|
872
|
-
onChange: (C) => {
|
|
873
|
-
v.onChange(C), o(`headers.${p}.active`, !0);
|
|
874
|
-
},
|
|
875
|
-
ref: (C) => {
|
|
876
|
-
d.current[p] = C;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
)
|
|
880
|
-
}
|
|
881
|
-
)
|
|
882
|
-
] }),
|
|
883
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
884
|
-
/* @__PURE__ */ e.jsx(
|
|
885
|
-
I,
|
|
886
|
-
{
|
|
887
|
-
control: t,
|
|
888
|
-
name: `headers.${p}.value`,
|
|
889
|
-
render: ({ field: v }) => (b == null ? void 0 : b.enum) && b.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
890
|
-
ne,
|
|
891
|
-
{
|
|
892
|
-
shouldFilter: !1,
|
|
893
|
-
value: v.value,
|
|
894
|
-
options: b.enum ?? [],
|
|
895
|
-
onChange: (T) => {
|
|
896
|
-
v.onChange(T), o(`headers.${p}.active`, !0);
|
|
897
|
-
},
|
|
898
|
-
className: "font-mono text-xs border-0"
|
|
899
|
-
}
|
|
900
|
-
) : /* @__PURE__ */ e.jsx(
|
|
901
|
-
Ne,
|
|
902
|
-
{
|
|
903
|
-
placeholder: "Value",
|
|
904
|
-
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0",
|
|
905
|
-
...v,
|
|
906
|
-
ref: (T) => {
|
|
907
|
-
c.current[p] = T;
|
|
908
|
-
},
|
|
909
|
-
onKeyDown: (T) => {
|
|
910
|
-
T.key === "Enter" && T.currentTarget.value.trim() && y(p);
|
|
911
|
-
},
|
|
912
|
-
autoComplete: "off"
|
|
913
|
-
}
|
|
914
|
-
)
|
|
915
|
-
}
|
|
916
|
-
),
|
|
917
|
-
/* @__PURE__ */ e.jsx(
|
|
918
|
-
te,
|
|
919
|
-
{
|
|
920
|
-
size: "icon",
|
|
921
|
-
variant: "ghost",
|
|
922
|
-
className: "text-muted-foreground opacity-0 group-hover:opacity-100 rounded-full w-8 h-7",
|
|
923
|
-
onClick: () => r(p),
|
|
924
|
-
type: "button",
|
|
925
|
-
children: /* @__PURE__ */ e.jsx($t, { size: 16 })
|
|
926
|
-
}
|
|
927
|
-
)
|
|
928
|
-
] })
|
|
929
|
-
] }, x.id);
|
|
930
|
-
}) }) }),
|
|
931
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-end", children: /* @__PURE__ */ e.jsx(
|
|
932
|
-
te,
|
|
933
|
-
{
|
|
934
|
-
className: "",
|
|
935
|
-
onClick: g,
|
|
936
|
-
type: "button",
|
|
937
|
-
variant: "secondary",
|
|
938
|
-
children: "Add header"
|
|
939
|
-
}
|
|
940
|
-
) })
|
|
941
|
-
] });
|
|
942
|
-
}, Da = ({
|
|
943
|
-
control: t,
|
|
944
|
-
url: a
|
|
945
|
-
}) => {
|
|
946
|
-
const { fields: s } = ye({
|
|
947
|
-
control: t,
|
|
948
|
-
name: "pathParams"
|
|
949
|
-
}), n = [...s].sort(
|
|
950
|
-
(r, o) => a.indexOf(`{${r.name}}`) - a.indexOf(`{${o.name}}`)
|
|
951
|
-
);
|
|
952
|
-
return /* @__PURE__ */ e.jsx(ie, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx(ke, { children: n.map((r, o) => /* @__PURE__ */ e.jsxs(Oe, { children: [
|
|
953
|
-
/* @__PURE__ */ e.jsx(
|
|
954
|
-
I,
|
|
955
|
-
{
|
|
956
|
-
control: t,
|
|
957
|
-
name: `pathParams.${o}.name`,
|
|
958
|
-
render: () => /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsx(
|
|
959
|
-
lt,
|
|
960
|
-
{
|
|
961
|
-
slug: r.name,
|
|
962
|
-
name: r.name,
|
|
963
|
-
className: "font-mono text-xs px-2"
|
|
964
|
-
}
|
|
965
|
-
) })
|
|
966
|
-
}
|
|
967
|
-
),
|
|
968
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
|
|
969
|
-
I,
|
|
970
|
-
{
|
|
971
|
-
control: t,
|
|
972
|
-
name: `pathParams.${o}.value`,
|
|
973
|
-
render: ({ field: l }) => /* @__PURE__ */ e.jsx(
|
|
974
|
-
Ne,
|
|
975
|
-
{
|
|
976
|
-
...l,
|
|
977
|
-
required: !0,
|
|
978
|
-
placeholder: "Enter value",
|
|
979
|
-
className: "w-full border-0 shadow-none text-xs font-mono focus-visible:ring-0"
|
|
980
|
-
}
|
|
981
|
-
)
|
|
982
|
-
}
|
|
983
|
-
) })
|
|
984
|
-
] }, r.id)) }) });
|
|
985
|
-
}, La = Pe(
|
|
986
|
-
"input",
|
|
987
|
-
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
988
|
-
), Va = ({
|
|
989
|
-
control: t,
|
|
990
|
-
queryParams: a
|
|
991
|
-
}) => {
|
|
992
|
-
const { fields: s } = ye({
|
|
993
|
-
control: t,
|
|
994
|
-
name: "queryParams"
|
|
995
|
-
}), n = ve(), r = a.map((o) => !!o.isRequired);
|
|
996
|
-
return /* @__PURE__ */ e.jsx(ie, { className: "rounded-lg", children: /* @__PURE__ */ e.jsx("div", { className: "w-full ", children: /* @__PURE__ */ e.jsx(ke, { children: s.map((o, l) => {
|
|
997
|
-
const c = a.find(
|
|
998
|
-
(d) => d.name === n.watch(`queryParams.${l}.name`)
|
|
999
|
-
);
|
|
1000
|
-
return /* @__PURE__ */ e.jsxs(Oe, { children: [
|
|
1001
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1002
|
-
/* @__PURE__ */ e.jsx(
|
|
1003
|
-
I,
|
|
1004
|
-
{
|
|
1005
|
-
control: t,
|
|
1006
|
-
name: `queryParams.${l}.active`,
|
|
1007
|
-
render: ({ field: d }) => /* @__PURE__ */ e.jsx(
|
|
1008
|
-
Se,
|
|
1009
|
-
{
|
|
1010
|
-
variant: "outline",
|
|
1011
|
-
id: `queryParams.${l}.active`,
|
|
1012
|
-
className: "mr-2",
|
|
1013
|
-
checked: d.value,
|
|
1014
|
-
onCheckedChange: d.onChange
|
|
1015
|
-
}
|
|
1016
|
-
)
|
|
1017
|
-
}
|
|
1018
|
-
),
|
|
1019
|
-
/* @__PURE__ */ e.jsx(
|
|
1020
|
-
I,
|
|
1021
|
-
{
|
|
1022
|
-
control: t,
|
|
1023
|
-
render: ({ field: d }) => r[l] ? /* @__PURE__ */ e.jsx(La, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
1024
|
-
"label",
|
|
1025
|
-
{
|
|
1026
|
-
className: "flex items-center cursor-pointer gap-1",
|
|
1027
|
-
htmlFor: `queryParams.${l}.active`,
|
|
1028
|
-
title: r[l] ? "Required field" : void 0,
|
|
1029
|
-
children: [
|
|
1030
|
-
d.value,
|
|
1031
|
-
r[l] && /* @__PURE__ */ e.jsx("sup", { children: " *" })
|
|
1032
|
-
]
|
|
1033
|
-
}
|
|
1034
|
-
) }) : /* @__PURE__ */ e.jsx(
|
|
1035
|
-
ne,
|
|
1036
|
-
{
|
|
1037
|
-
value: d.value,
|
|
1038
|
-
options: a.map((u) => u.name),
|
|
1039
|
-
onChange: (u) => {
|
|
1040
|
-
d.onChange(u);
|
|
1041
|
-
},
|
|
1042
|
-
className: "border-0 font-mono text-xs bg-transparent hover:bg-transparent"
|
|
1043
|
-
}
|
|
1044
|
-
),
|
|
1045
|
-
name: `queryParams.${l}.name`
|
|
1046
|
-
}
|
|
1047
|
-
)
|
|
1048
|
-
] }, o.id),
|
|
1049
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ e.jsx(
|
|
1050
|
-
I,
|
|
1051
|
-
{
|
|
1052
|
-
control: t,
|
|
1053
|
-
render: ({ field: d }) => (c == null ? void 0 : c.enum) && c.enum.length > 0 ? /* @__PURE__ */ e.jsx(
|
|
1054
|
-
ne,
|
|
1055
|
-
{
|
|
1056
|
-
value: d.value,
|
|
1057
|
-
options: c.enum ?? [],
|
|
1058
|
-
onChange: (g) => {
|
|
1059
|
-
d.onChange(g), n.setValue(`queryParams.${l}.active`, !0);
|
|
1060
|
-
},
|
|
1061
|
-
className: "font-mono text-xs border-0 ring-1 ring-ring"
|
|
1062
|
-
}
|
|
1063
|
-
) : /* @__PURE__ */ e.jsx(
|
|
1064
|
-
Ne,
|
|
1065
|
-
{
|
|
1066
|
-
...d,
|
|
1067
|
-
onChange: (g) => {
|
|
1068
|
-
d.onChange(g.target.value), g.target.value.length > 0 && n.setValue(`queryParams.${l}.active`, !0);
|
|
1069
|
-
},
|
|
1070
|
-
placeholder: "Enter value",
|
|
1071
|
-
className: "w-full border-0 shadow-none focus-visible:ring-0 text-xs font-mono"
|
|
1072
|
-
}
|
|
1073
|
-
),
|
|
1074
|
-
name: `queryParams.${l}.value`
|
|
1075
|
-
}
|
|
1076
|
-
) })
|
|
1077
|
-
] }, o.id);
|
|
1078
|
-
}) }) }) });
|
|
1079
|
-
}, P = {
|
|
1080
|
-
green: "text-green-600",
|
|
1081
|
-
blue: "text-sky-600",
|
|
1082
|
-
yellow: "text-yellow-600",
|
|
1083
|
-
red: "text-red-600",
|
|
1084
|
-
purple: "text-purple-600",
|
|
1085
|
-
indigo: "text-indigo-600",
|
|
1086
|
-
gray: "text-gray-600"
|
|
1087
|
-
}, Fa = {
|
|
1088
|
-
get: P.green,
|
|
1089
|
-
post: P.blue,
|
|
1090
|
-
put: P.yellow,
|
|
1091
|
-
delete: P.red,
|
|
1092
|
-
patch: P.purple,
|
|
1093
|
-
options: P.indigo,
|
|
1094
|
-
head: P.gray,
|
|
1095
|
-
trace: P.gray
|
|
1096
|
-
}, za = (t) => Fa[t.toLocaleLowerCase()] ?? P.gray, Ha = ({
|
|
1097
|
-
method: t,
|
|
1098
|
-
url: a,
|
|
1099
|
-
headers: s,
|
|
1100
|
-
body: n
|
|
1101
|
-
}) => /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 font-mono text-xs", children: [
|
|
1102
|
-
/* @__PURE__ */ e.jsxs("div", { className: "gap-2 p-2 bg-muted rounded-md", children: [
|
|
1103
|
-
/* @__PURE__ */ e.jsx("span", { className: m(za(t), "font-semibold"), children: t }),
|
|
1104
|
-
" ",
|
|
1105
|
-
/* @__PURE__ */ e.jsx("span", { className: "break-all", children: a }),
|
|
1106
|
-
" ",
|
|
1107
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "HTTP/1.1" })
|
|
1108
|
-
] }),
|
|
1109
|
-
/* @__PURE__ */ e.jsxs("div", { className: "mx-1.5 flex flex-col gap-3", children: [
|
|
1110
|
-
/* @__PURE__ */ e.jsxs(Me, { defaultOpen: !0, children: [
|
|
1111
|
-
/* @__PURE__ */ e.jsxs(Ge, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1112
|
-
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1113
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1114
|
-
] }),
|
|
1115
|
-
/* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2", children: s.map(([r, o]) => /* @__PURE__ */ e.jsxs(R, { children: [
|
|
1116
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary", children: r }),
|
|
1117
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: o })
|
|
1118
|
-
] }, r)) }) })
|
|
1119
|
-
] }),
|
|
1120
|
-
/* @__PURE__ */ e.jsxs(Me, { defaultOpen: !0, children: [
|
|
1121
|
-
/* @__PURE__ */ e.jsxs(Ge, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1122
|
-
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1123
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Body" })
|
|
1124
|
-
] }),
|
|
1125
|
-
/* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx("div", { className: "pl-0 pt-2", children: /* @__PURE__ */ e.jsx(
|
|
1126
|
-
"div",
|
|
1127
|
-
{
|
|
1128
|
-
className: m(
|
|
1129
|
-
"whitespace-pre-wrap break-all bg-muted p-2 rounded-md",
|
|
1130
|
-
!n && "text-muted-foreground"
|
|
1131
|
-
),
|
|
1132
|
-
children: n ?? "Empty body"
|
|
1133
|
-
}
|
|
1134
|
-
) }) })
|
|
1135
|
-
] })
|
|
1136
|
-
] })
|
|
1137
|
-
] }), _e = we.Root, We = we.CollapsibleTrigger, Ze = we.CollapsibleContent;
|
|
1138
|
-
function Re(t) {
|
|
1139
|
-
if (t === null) return "null";
|
|
1140
|
-
if (Array.isArray(t)) {
|
|
1141
|
-
if (t.length === 0) return "any[]";
|
|
1142
|
-
const a = t[0];
|
|
1143
|
-
return a === void 0 ? "any[]" : `${Re(a)}[]`;
|
|
1144
|
-
}
|
|
1145
|
-
return typeof t == "object" ? Ba(t) : typeof t;
|
|
1146
|
-
}
|
|
1147
|
-
function Ba(t, a = "") {
|
|
1148
|
-
const s = ["{"];
|
|
1149
|
-
for (const [n, r] of Object.entries(t)) {
|
|
1150
|
-
const o = Re(r);
|
|
1151
|
-
s.push(` ${n}: ${o};`);
|
|
1152
|
-
}
|
|
1153
|
-
return s.push("}"), s.join(`
|
|
1154
|
-
`);
|
|
1155
|
-
}
|
|
1156
|
-
function Ua(t) {
|
|
1157
|
-
return { lines: [`type GeneratedType = ${Re(t)};`] };
|
|
1158
|
-
}
|
|
1159
|
-
const Ma = {
|
|
1160
|
-
200: "OK",
|
|
1161
|
-
201: "Created",
|
|
1162
|
-
202: "Accepted",
|
|
1163
|
-
204: "No Content",
|
|
1164
|
-
400: "Bad Request",
|
|
1165
|
-
401: "Unauthorized",
|
|
1166
|
-
403: "Forbidden",
|
|
1167
|
-
404: "Not Found",
|
|
1168
|
-
405: "Method Not Allowed",
|
|
1169
|
-
500: "Internal Server Error"
|
|
1170
|
-
}, Ga = (t) => {
|
|
1171
|
-
var s;
|
|
1172
|
-
return (s = Object.entries({
|
|
1173
|
-
"application/json": "json",
|
|
1174
|
-
"text/json": "json",
|
|
1175
|
-
"text/html": "html",
|
|
1176
|
-
"text/css": "css",
|
|
1177
|
-
"text/javascript": "javascript",
|
|
1178
|
-
"application/xml": "xml",
|
|
1179
|
-
"application/xhtml+xml": "xhtml"
|
|
1180
|
-
}).find(
|
|
1181
|
-
([n]) => t.includes(n)
|
|
1182
|
-
)) == null ? void 0 : s[1];
|
|
1183
|
-
}, Ja = (t) => {
|
|
1184
|
-
var s;
|
|
1185
|
-
const a = ((s = t.find(([n, r]) => n === "Content-Type")) == null ? void 0 : s[1]) || "";
|
|
1186
|
-
return Ga(a);
|
|
1187
|
-
}, Qa = (t) => {
|
|
1188
|
-
try {
|
|
1189
|
-
return JSON.stringify(JSON.parse(t), null, 2);
|
|
1190
|
-
} catch {
|
|
1191
|
-
return null;
|
|
1192
|
-
}
|
|
1193
|
-
}, _a = (t) => {
|
|
1194
|
-
const a = [
|
|
1195
|
-
"Content-Type",
|
|
1196
|
-
"Content-Length",
|
|
1197
|
-
"Authorization",
|
|
1198
|
-
"X-RateLimit-Remaining",
|
|
1199
|
-
"X-RateLimit-Limit",
|
|
1200
|
-
"Cache-Control",
|
|
1201
|
-
"ETag"
|
|
1202
|
-
].map((s) => s.toLowerCase());
|
|
1203
|
-
return [...t].sort(([s], [n]) => {
|
|
1204
|
-
const r = a.indexOf(s.toLowerCase()), o = a.indexOf(n.toLowerCase());
|
|
1205
|
-
return r === o ? 0 : r === -1 ? 1 : o === -1 ? -1 : r - o;
|
|
1206
|
-
});
|
|
1207
|
-
}, Wa = ({
|
|
1208
|
-
body: t = "",
|
|
1209
|
-
headers: a,
|
|
1210
|
-
status: s,
|
|
1211
|
-
time: n,
|
|
1212
|
-
size: r,
|
|
1213
|
-
url: o
|
|
1214
|
-
}) => {
|
|
1215
|
-
var h;
|
|
1216
|
-
const l = Ja(a), c = Qa(t), d = c || t, [u, g] = F(
|
|
1217
|
-
c ? "formatted" : "raw"
|
|
1218
|
-
), N = na({
|
|
1219
|
-
queryKey: ["types", d],
|
|
1220
|
-
queryFn: async () => Ua(JSON.parse(d)),
|
|
1221
|
-
enabled: u === "types"
|
|
1222
|
-
}), y = _a([...a]);
|
|
1223
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 h-full overflow-y-scroll max-h-[calc(100vh-220px)] py-4", children: [
|
|
1224
|
-
/* @__PURE__ */ e.jsxs(_e, { defaultOpen: !0, children: [
|
|
1225
|
-
/* @__PURE__ */ e.jsxs(We, { className: "flex items-center gap-2 hover:text-primary group", children: [
|
|
1226
|
-
/* @__PURE__ */ e.jsx(Q, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1227
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Headers" })
|
|
1228
|
-
] }),
|
|
1229
|
-
/* @__PURE__ */ e.jsx(Ze, { children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-[auto,1fr] gap-x-8 gap-y-1 pl-1.5 pt-2 font-mono text-xs", children: [
|
|
1230
|
-
y.slice(0, 5).map(([x, p]) => /* @__PURE__ */ e.jsxs(R, { children: [
|
|
1231
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: x }),
|
|
1232
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: p })
|
|
1233
|
-
] }, x)),
|
|
1234
|
-
y.length > 5 && /* @__PURE__ */ e.jsxs(_e, { className: "col-span-full grid-cols-subgrid grid", children: [
|
|
1235
|
-
/* @__PURE__ */ e.jsxs(We, { className: "col-span-2 text-xs text-muted-foreground hover:text-primary flex items-center gap-1 py-1", children: [
|
|
1236
|
-
/* @__PURE__ */ e.jsx(Q, { className: "h-3 w-3 transition-transform duration-200 group-data-[state=open]:rotate-[90deg]" }),
|
|
1237
|
-
"Show ",
|
|
1238
|
-
y.length - 5,
|
|
1239
|
-
" more headers"
|
|
1240
|
-
] }),
|
|
1241
|
-
/* @__PURE__ */ e.jsx(Ze, { className: "col-span-full grid grid-cols-subgrid gap-x-8 gap-y-1 ", children: y.slice(5).map(([x, p]) => /* @__PURE__ */ e.jsxs(R, { children: [
|
|
1242
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-primary whitespace-pre", children: x }),
|
|
1243
|
-
/* @__PURE__ */ e.jsx("div", { className: "break-all", children: p })
|
|
1244
|
-
] }, x)) })
|
|
1245
|
-
] })
|
|
1246
|
-
] }) })
|
|
1247
|
-
] }),
|
|
1248
|
-
/* @__PURE__ */ e.jsx(be, { className: "shadow-none", children: /* @__PURE__ */ e.jsx(
|
|
1249
|
-
ra,
|
|
1250
|
-
{
|
|
1251
|
-
language: u === "types" ? "typescript" : u === "raw" ? c ? "plain" : l : "json",
|
|
1252
|
-
noBackground: !0,
|
|
1253
|
-
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
1254
|
-
code: (u === "raw" ? t : u === "types" ? (h = N.data) == null ? void 0 : h.lines.join(`
|
|
1255
|
-
`) : d) ?? ""
|
|
1256
|
-
}
|
|
1257
|
-
) }),
|
|
1258
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 justify-between", children: [
|
|
1259
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex text-xs gap-2 border bg-muted rounded-md p-2 items-center h-8 font-mono divide-x", children: [
|
|
1260
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1261
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Status" }),
|
|
1262
|
-
" ",
|
|
1263
|
-
s,
|
|
1264
|
-
" ",
|
|
1265
|
-
Ma[s] ?? ""
|
|
1266
|
-
] }),
|
|
1267
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1268
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Time" }),
|
|
1269
|
-
" ",
|
|
1270
|
-
n.toFixed(0),
|
|
1271
|
-
"ms"
|
|
1272
|
-
] }),
|
|
1273
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
1274
|
-
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Size" }),
|
|
1275
|
-
" ",
|
|
1276
|
-
r,
|
|
1277
|
-
"B"
|
|
1278
|
-
] })
|
|
1279
|
-
] }),
|
|
1280
|
-
c && /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
1281
|
-
Ye,
|
|
1282
|
-
{
|
|
1283
|
-
value: u,
|
|
1284
|
-
onValueChange: (x) => g(x),
|
|
1285
|
-
children: [
|
|
1286
|
-
/* @__PURE__ */ e.jsx(et, { className: "min-w-32", children: /* @__PURE__ */ e.jsx(tt, { placeholder: "View" }) }),
|
|
1287
|
-
/* @__PURE__ */ e.jsxs(at, { children: [
|
|
1288
|
-
/* @__PURE__ */ e.jsx(Z, { value: "formatted", children: "Formatted" }),
|
|
1289
|
-
/* @__PURE__ */ e.jsx(Z, { value: "raw", children: "Raw" }),
|
|
1290
|
-
/* @__PURE__ */ e.jsx(Z, { value: "types", children: "Types" })
|
|
1291
|
-
] })
|
|
1292
|
-
]
|
|
1293
|
-
}
|
|
1294
|
-
) })
|
|
1295
|
-
] })
|
|
1296
|
-
] });
|
|
1297
|
-
}, Za = ({
|
|
1298
|
-
queryMutation: t,
|
|
1299
|
-
showPathParamsWarning: a
|
|
1300
|
-
}) => {
|
|
1301
|
-
var n;
|
|
1302
|
-
const s = ((((n = t.data) == null ? void 0 : n.status) ?? 0) / 100).toFixed(0);
|
|
1303
|
-
return /* @__PURE__ */ e.jsx("div", { className: "min-w-0 p-8 bg-muted/70 overflow-y-auto", children: t.error ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1304
|
-
a && /* @__PURE__ */ e.jsx(sa, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
1305
|
-
/* @__PURE__ */ e.jsxs(be, { children: [
|
|
1306
|
-
/* @__PURE__ */ e.jsx(Jt, { children: /* @__PURE__ */ e.jsx(Qt, { children: "Request failed" }) }),
|
|
1307
|
-
/* @__PURE__ */ e.jsxs(_t, { children: [
|
|
1308
|
-
"Error:",
|
|
1309
|
-
" ",
|
|
1310
|
-
t.error.message || String(t.error) || "Unexpected error"
|
|
1311
|
-
] })
|
|
1312
|
-
] })
|
|
1313
|
-
] }) : t.data ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs(nt, { defaultValue: "response", children: [
|
|
1314
|
-
/* @__PURE__ */ e.jsxs(rt, { children: [
|
|
1315
|
-
/* @__PURE__ */ e.jsx(D, { value: "request", children: "Request" }),
|
|
1316
|
-
/* @__PURE__ */ e.jsxs(D, { value: "response", children: [
|
|
1317
|
-
"Response",
|
|
1318
|
-
/* @__PURE__ */ e.jsxs(
|
|
1319
|
-
"span",
|
|
1320
|
-
{
|
|
1321
|
-
className: m(
|
|
1322
|
-
"text-xs font-mono ml-1",
|
|
1323
|
-
s === "2" && "text-green-500",
|
|
1324
|
-
s === "3" && "text-blue-500",
|
|
1325
|
-
s === "4" && "text-yellow-500",
|
|
1326
|
-
s === "5" && "text-red-500"
|
|
1327
|
-
),
|
|
1328
|
-
children: [
|
|
1329
|
-
"(",
|
|
1330
|
-
t.data.status,
|
|
1331
|
-
")"
|
|
1332
|
-
]
|
|
1333
|
-
}
|
|
1334
|
-
)
|
|
1335
|
-
] })
|
|
1336
|
-
] }),
|
|
1337
|
-
/* @__PURE__ */ e.jsx(L, { value: "request", children: /* @__PURE__ */ e.jsx(Ha, { ...t.data.request }) }),
|
|
1338
|
-
/* @__PURE__ */ e.jsx(L, { value: "response", children: /* @__PURE__ */ e.jsx(
|
|
1339
|
-
Wa,
|
|
1340
|
-
{
|
|
1341
|
-
status: t.data.status,
|
|
1342
|
-
time: t.data.time,
|
|
1343
|
-
size: t.data.size,
|
|
1344
|
-
headers: t.data.headers,
|
|
1345
|
-
body: t.data.body,
|
|
1346
|
-
url: t.data.request.url
|
|
1347
|
-
}
|
|
1348
|
-
) })
|
|
1349
|
-
] }) }) : /* @__PURE__ */ e.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ e.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: t.isPending ? /* @__PURE__ */ e.jsx(Gt, {}) : "Send a request first to see the response here" }) }) });
|
|
1350
|
-
}, Ka = ({
|
|
1351
|
-
identities: t,
|
|
1352
|
-
formRef: a,
|
|
1353
|
-
disabled: s
|
|
1354
|
-
}) => {
|
|
1355
|
-
const { setValue: n } = ve(), [r, o] = F();
|
|
1356
|
-
return t.length === 0 ? /* @__PURE__ */ e.jsx(q, { disabled: s, children: "Send" }) : /* @__PURE__ */ e.jsxs("div", { className: "flex", children: [
|
|
1357
|
-
/* @__PURE__ */ e.jsx(
|
|
1358
|
-
q,
|
|
1359
|
-
{
|
|
1360
|
-
className: "rounded-r-none inset-shadow-sm",
|
|
1361
|
-
disabled: s,
|
|
1362
|
-
onClick: () => {
|
|
1363
|
-
var l;
|
|
1364
|
-
return (l = a == null ? void 0 : a.current) == null ? void 0 : l.requestSubmit();
|
|
1365
|
-
},
|
|
1366
|
-
children: "Send"
|
|
1367
|
-
}
|
|
1368
|
-
),
|
|
1369
|
-
/* @__PURE__ */ e.jsxs(dt, { children: [
|
|
1370
|
-
/* @__PURE__ */ e.jsx(ct, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1371
|
-
q,
|
|
1372
|
-
{
|
|
1373
|
-
disabled: s,
|
|
1374
|
-
className: "rounded-l-none border-l border-border/40 inset-shadow-sm w-6",
|
|
1375
|
-
size: "icon",
|
|
1376
|
-
children: /* @__PURE__ */ e.jsx(St, { className: "w-4 h-4" })
|
|
1377
|
-
}
|
|
1378
|
-
) }),
|
|
1379
|
-
/* @__PURE__ */ e.jsx(Ce, { value: r, children: /* @__PURE__ */ e.jsx(Te, { className: "w-56", align: "end", alignOffset: -150, children: [{ id: G, label: "None" }, ...t].map(
|
|
1380
|
-
(l) => /* @__PURE__ */ e.jsxs(
|
|
1381
|
-
$e,
|
|
1382
|
-
{
|
|
1383
|
-
onClick: () => {
|
|
1384
|
-
var c;
|
|
1385
|
-
o(l.id), n("identity", l.id), (c = a == null ? void 0 : a.current) == null || c.requestSubmit();
|
|
1386
|
-
},
|
|
1387
|
-
onMouseEnter: () => o(l.id),
|
|
1388
|
-
onMouseLeave: () => o(void 0),
|
|
1389
|
-
children: [
|
|
1390
|
-
/* @__PURE__ */ e.jsx(se, { value: l.id, className: "mr-2" }),
|
|
1391
|
-
l.label
|
|
1392
|
-
]
|
|
1393
|
-
},
|
|
1394
|
-
l.id
|
|
1395
|
-
)
|
|
1396
|
-
) }) })
|
|
1397
|
-
] })
|
|
1398
|
-
] });
|
|
1399
|
-
}, G = "__none", Xa = ({
|
|
1400
|
-
server: t,
|
|
1401
|
-
servers: a = [],
|
|
1402
|
-
url: s,
|
|
1403
|
-
method: n,
|
|
1404
|
-
headers: r = [],
|
|
1405
|
-
queryParams: o = [],
|
|
1406
|
-
pathParams: l = [],
|
|
1407
|
-
defaultBody: c = "",
|
|
1408
|
-
examples: d,
|
|
1409
|
-
requiresLogin: u = !1,
|
|
1410
|
-
onLogin: g,
|
|
1411
|
-
onSignUp: N
|
|
1412
|
-
}) => {
|
|
1413
|
-
var Le, Ve, Fe;
|
|
1414
|
-
const { selectedServer: y, setSelectedServer: h } = Rt(
|
|
1415
|
-
a.map((i) => ({ url: i }))
|
|
1416
|
-
), [, x] = Lt(), [p, b] = F(!1), { register: v, control: C, handleSubmit: T, watch: H, setValue: k, ...B } = Ut({
|
|
1417
|
-
defaultValues: {
|
|
1418
|
-
body: c,
|
|
1419
|
-
queryParams: o.map((i) => ({
|
|
1420
|
-
name: i.name,
|
|
1421
|
-
value: i.defaultValue ?? "",
|
|
1422
|
-
active: i.defaultActive ?? !1,
|
|
1423
|
-
enum: i.enum ?? []
|
|
1424
|
-
})).concat([
|
|
1425
|
-
{
|
|
1426
|
-
name: "",
|
|
1427
|
-
value: "",
|
|
1428
|
-
active: !1,
|
|
1429
|
-
enum: []
|
|
1430
|
-
}
|
|
1431
|
-
]),
|
|
1432
|
-
pathParams: l.map((i) => ({
|
|
1433
|
-
name: i.name,
|
|
1434
|
-
value: i.defaultValue ?? ""
|
|
1435
|
-
})),
|
|
1436
|
-
headers: r.map((i) => ({
|
|
1437
|
-
name: i.name,
|
|
1438
|
-
value: i.defaultValue ?? "",
|
|
1439
|
-
active: i.defaultActive ?? !1
|
|
1440
|
-
})).concat([
|
|
1441
|
-
{
|
|
1442
|
-
name: "",
|
|
1443
|
-
value: "",
|
|
1444
|
-
active: !1
|
|
1445
|
-
}
|
|
1446
|
-
]),
|
|
1447
|
-
identity: G
|
|
1448
|
-
}
|
|
1449
|
-
}), S = H(), A = It(), Ie = V(!1);
|
|
1450
|
-
fe(() => {
|
|
1451
|
-
var O;
|
|
1452
|
-
if (Ie.current) return;
|
|
1453
|
-
const i = (O = A.data) == null ? void 0 : O.at(0);
|
|
1454
|
-
i && (k("identity", i.id), Ie.current = !0);
|
|
1455
|
-
}, [k, A.data]);
|
|
1456
|
-
const Ae = V(null), Ee = Bt({
|
|
1457
|
-
mutationFn: async (i) => {
|
|
1458
|
-
var W, U;
|
|
1459
|
-
const O = performance.now(), $ = new Request(
|
|
1460
|
-
va(t ?? y, s, i),
|
|
1461
|
-
{
|
|
1462
|
-
method: n.toUpperCase(),
|
|
1463
|
-
headers: Object.fromEntries(
|
|
1464
|
-
i.headers.filter((w) => w.name && w.active).map((w) => [w.name, w.value])
|
|
1465
|
-
),
|
|
1466
|
-
body: i.body ? i.body : void 0
|
|
1467
|
-
}
|
|
1468
|
-
);
|
|
1469
|
-
i.identity !== G && await ((U = (W = A.data) == null ? void 0 : W.find((w) => w.id === i.identity)) == null ? void 0 : U.authorizeRequest($));
|
|
1470
|
-
try {
|
|
1471
|
-
const w = await fetch($, {
|
|
1472
|
-
signal: AbortSignal.timeout(5e3)
|
|
1473
|
-
}), ft = performance.now() - O, ze = await w.text(), yt = new URL($.url);
|
|
1474
|
-
return {
|
|
1475
|
-
status: w.status,
|
|
1476
|
-
headers: Array.from(w.headers.entries()),
|
|
1477
|
-
size: ze.length,
|
|
1478
|
-
body: ze,
|
|
1479
|
-
time: ft,
|
|
1480
|
-
request: {
|
|
1481
|
-
method: $.method.toUpperCase(),
|
|
1482
|
-
url: $.url,
|
|
1483
|
-
headers: [
|
|
1484
|
-
["Host", yt.host],
|
|
1485
|
-
["User-Agent", "Zudoku Playground"],
|
|
1486
|
-
...Array.from($.headers.entries())
|
|
1487
|
-
],
|
|
1488
|
-
body: i.body ? i.body : void 0
|
|
1489
|
-
}
|
|
1490
|
-
};
|
|
1491
|
-
} catch (w) {
|
|
1492
|
-
throw w instanceof TypeError ? new Error(
|
|
1493
|
-
"The request failed, possibly due to network issues or CORS policy."
|
|
1494
|
-
) : w;
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
}), xt = /* @__PURE__ */ e.jsx(
|
|
1498
|
-
ga,
|
|
1499
|
-
{
|
|
1500
|
-
path: s,
|
|
1501
|
-
renderParam: ({ name: i, originalValue: O, index: $ }) => {
|
|
1502
|
-
var U;
|
|
1503
|
-
const W = (U = S.pathParams.find(
|
|
1504
|
-
(w) => w.name === i
|
|
1505
|
-
)) == null ? void 0 : U.value;
|
|
1506
|
-
return /* @__PURE__ */ e.jsx(
|
|
1507
|
-
lt,
|
|
1508
|
-
{
|
|
1509
|
-
name: i,
|
|
1510
|
-
backgroundOpacity: "0",
|
|
1511
|
-
slug: i,
|
|
1512
|
-
onClick: () => B.setFocus(`pathParams.${$}.value`),
|
|
1513
|
-
children: W || O
|
|
1514
|
-
}
|
|
1515
|
-
);
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
), qe = S.queryParams.filter((i) => i.active).map((i, O, $) => /* @__PURE__ */ e.jsxs(R, { children: [
|
|
1519
|
-
i.name,
|
|
1520
|
-
"=",
|
|
1521
|
-
encodeURIComponent(i.value).replaceAll("%20", "+"),
|
|
1522
|
-
O < $.length - 1 && "&",
|
|
1523
|
-
/* @__PURE__ */ e.jsx("wbr", {})
|
|
1524
|
-
] }, i.name)), gt = /* @__PURE__ */ e.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition translate-y-[4px]", children: t ? /* @__PURE__ */ e.jsx("span", { children: t.replace(/^https?:\/\//, "") }) : a.length > 1 && /* @__PURE__ */ e.jsxs(
|
|
1525
|
-
Ye,
|
|
1526
|
-
{
|
|
1527
|
-
onValueChange: (i) => {
|
|
1528
|
-
x(() => h(i));
|
|
1529
|
-
},
|
|
1530
|
-
value: y,
|
|
1531
|
-
defaultValue: y,
|
|
1532
|
-
children: [
|
|
1533
|
-
/* @__PURE__ */ e.jsx(et, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ e.jsx(tt, {}) }),
|
|
1534
|
-
/* @__PURE__ */ e.jsx(at, { children: a.map((i) => /* @__PURE__ */ e.jsx(Z, { value: i, children: i.replace(/^https?:\/\//, "") }, i)) })
|
|
1535
|
-
]
|
|
1536
|
-
}
|
|
1537
|
-
) }), De = u && !p;
|
|
1538
|
-
return /* @__PURE__ */ e.jsx(
|
|
1539
|
-
Mt,
|
|
1540
|
-
{
|
|
1541
|
-
register: v,
|
|
1542
|
-
control: C,
|
|
1543
|
-
handleSubmit: T,
|
|
1544
|
-
watch: H,
|
|
1545
|
-
setValue: k,
|
|
1546
|
-
...B,
|
|
1547
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
1548
|
-
"form",
|
|
1549
|
-
{
|
|
1550
|
-
onSubmit: T((i) => Ee.mutateAsync(i)),
|
|
1551
|
-
ref: Ae,
|
|
1552
|
-
className: "relative",
|
|
1553
|
-
children: [
|
|
1554
|
-
De && /* @__PURE__ */ e.jsx("div", { className: "absolute top-1/2 right-1/2 -translate-y-1/2 translate-x-1/2 z-50 max-w-md", children: /* @__PURE__ */ e.jsxs(K, { children: [
|
|
1555
|
-
/* @__PURE__ */ e.jsx(X, { className: "mb-2", children: "Welcome to the Playground!" }),
|
|
1556
|
-
/* @__PURE__ */ e.jsxs(Y, { className: "flex flex-col gap-2", children: [
|
|
1557
|
-
/* @__PURE__ */ e.jsx("div", { className: "mb-2", children: "The Playground is a tool for developers to test and explore our APIs. To use the Playground, you need to login." }),
|
|
1558
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 justify-between", children: [
|
|
1559
|
-
/* @__PURE__ */ e.jsx(
|
|
1560
|
-
q,
|
|
1561
|
-
{
|
|
1562
|
-
type: "button",
|
|
1563
|
-
variant: "ghost",
|
|
1564
|
-
onClick: () => b(!0),
|
|
1565
|
-
children: "Skip"
|
|
1566
|
-
}
|
|
1567
|
-
),
|
|
1568
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
1569
|
-
N && /* @__PURE__ */ e.jsx(
|
|
1570
|
-
q,
|
|
1571
|
-
{
|
|
1572
|
-
type: "button",
|
|
1573
|
-
variant: "outline",
|
|
1574
|
-
onClick: N,
|
|
1575
|
-
children: "Sign Up"
|
|
1576
|
-
}
|
|
1577
|
-
),
|
|
1578
|
-
g && /* @__PURE__ */ e.jsx(q, { type: "button", variant: "default", onClick: g, children: "Login" })
|
|
1579
|
-
] })
|
|
1580
|
-
] })
|
|
1581
|
-
] })
|
|
1582
|
-
] }) }),
|
|
1583
|
-
/* @__PURE__ */ e.jsxs(
|
|
1584
|
-
"div",
|
|
1585
|
-
{
|
|
1586
|
-
className: m(
|
|
1587
|
-
"grid grid-cols-2 text-sm h-full",
|
|
1588
|
-
De && "opacity-30 pointer-events-none"
|
|
1589
|
-
),
|
|
1590
|
-
children: [
|
|
1591
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 p-4 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
|
|
1592
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
1593
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
1594
|
-
/* @__PURE__ */ e.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono flex items-center", children: n.toUpperCase() }),
|
|
1595
|
-
/* @__PURE__ */ e.jsxs("div", { className: "items-center px-2 py-0.5 font-mono text-xs break-all leading-6", children: [
|
|
1596
|
-
gt,
|
|
1597
|
-
xt,
|
|
1598
|
-
qe.length > 0 ? "?" : "",
|
|
1599
|
-
qe
|
|
1600
|
-
] })
|
|
1601
|
-
] }),
|
|
1602
|
-
/* @__PURE__ */ e.jsx(
|
|
1603
|
-
Ka,
|
|
1604
|
-
{
|
|
1605
|
-
identities: A.data ?? [],
|
|
1606
|
-
formRef: Ae,
|
|
1607
|
-
disabled: B.formState.isSubmitting
|
|
1608
|
-
}
|
|
1609
|
-
)
|
|
1610
|
-
] }),
|
|
1611
|
-
/* @__PURE__ */ e.jsxs(nt, { defaultValue: "parameters", children: [
|
|
1612
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-wrap gap-1 justify-between", children: /* @__PURE__ */ e.jsxs(rt, { children: [
|
|
1613
|
-
/* @__PURE__ */ e.jsxs(D, { value: "parameters", children: [
|
|
1614
|
-
"Parameters",
|
|
1615
|
-
(S.pathParams.some((i) => i.value !== "") || S.queryParams.some((i) => i.active)) && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1616
|
-
] }),
|
|
1617
|
-
/* @__PURE__ */ e.jsxs(D, { value: "headers", children: [
|
|
1618
|
-
"Headers",
|
|
1619
|
-
S.headers.filter((i) => i.active).length > 0 && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1620
|
-
] }),
|
|
1621
|
-
/* @__PURE__ */ e.jsxs(D, { value: "auth", children: [
|
|
1622
|
-
"Auth",
|
|
1623
|
-
S.identity !== G && /* @__PURE__ */ e.jsx("div", { className: "w-2 h-2 rounded-full bg-blue-400 ml-2" })
|
|
1624
|
-
] }),
|
|
1625
|
-
/* @__PURE__ */ e.jsx(D, { value: "body", children: "Body" })
|
|
1626
|
-
] }) }),
|
|
1627
|
-
/* @__PURE__ */ e.jsx(L, { value: "headers", children: /* @__PURE__ */ e.jsx(qa, { control: C, headers: r }) }),
|
|
1628
|
-
/* @__PURE__ */ e.jsxs(L, { value: "parameters", children: [
|
|
1629
|
-
l.length > 0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1630
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1631
|
-
/* @__PURE__ */ e.jsx(Da, { url: s, control: C })
|
|
1632
|
-
] }),
|
|
1633
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1634
|
-
/* @__PURE__ */ e.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1635
|
-
/* @__PURE__ */ e.jsx(Va, { control: C, queryParams: o })
|
|
1636
|
-
] })
|
|
1637
|
-
] }),
|
|
1638
|
-
/* @__PURE__ */ e.jsxs(L, { value: "body", children: [
|
|
1639
|
-
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1640
|
-
n.toUpperCase()
|
|
1641
|
-
) && /* @__PURE__ */ e.jsxs(K, { className: "mb-2", children: [
|
|
1642
|
-
/* @__PURE__ */ e.jsx(Be, { className: "w-4 h-4" }),
|
|
1643
|
-
/* @__PURE__ */ e.jsx(X, { children: "Body" }),
|
|
1644
|
-
/* @__PURE__ */ e.jsx(Y, { children: "Body is only supported for POST, PUT, PATCH, and DELETE requests" })
|
|
1645
|
-
] }),
|
|
1646
|
-
/* @__PURE__ */ e.jsx(
|
|
1647
|
-
it,
|
|
1648
|
-
{
|
|
1649
|
-
...v("body"),
|
|
1650
|
-
className: m(
|
|
1651
|
-
"border w-full rounded-lg p-2 bg-muted h-40 font-mono",
|
|
1652
|
-
!["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1653
|
-
n.toUpperCase()
|
|
1654
|
-
) && "h-20"
|
|
1655
|
-
),
|
|
1656
|
-
placeholder: ["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1657
|
-
n.toUpperCase()
|
|
1658
|
-
) ? void 0 : "This request does not support a body",
|
|
1659
|
-
disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
1660
|
-
n.toUpperCase()
|
|
1661
|
-
)
|
|
1662
|
-
}
|
|
1663
|
-
),
|
|
1664
|
-
d && /* @__PURE__ */ e.jsx(
|
|
1665
|
-
Ta,
|
|
1666
|
-
{
|
|
1667
|
-
examples: d,
|
|
1668
|
-
onSelect: (i) => k("body", JSON.stringify(i.value, null, 2))
|
|
1669
|
-
}
|
|
1670
|
-
)
|
|
1671
|
-
] }),
|
|
1672
|
-
/* @__PURE__ */ e.jsx(L, { value: "auth", children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1673
|
-
((Le = A.data) == null ? void 0 : Le.length) === 0 && /* @__PURE__ */ e.jsxs(K, { children: [
|
|
1674
|
-
/* @__PURE__ */ e.jsx(Be, { className: "w-4 h-4" }),
|
|
1675
|
-
/* @__PURE__ */ e.jsx(X, { children: "Authentication" }),
|
|
1676
|
-
/* @__PURE__ */ e.jsx(Y, { children: "No identities found. Please create an identity first." })
|
|
1677
|
-
] }),
|
|
1678
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col items-center gap-2", children: /* @__PURE__ */ e.jsx(be, { className: "w-full overflow-hidden", children: /* @__PURE__ */ e.jsxs(
|
|
1679
|
-
Ce,
|
|
1680
|
-
{
|
|
1681
|
-
onValueChange: (i) => k("identity", i),
|
|
1682
|
-
value: S.identity,
|
|
1683
|
-
defaultValue: S.identity,
|
|
1684
|
-
className: "gap-0",
|
|
1685
|
-
disabled: ((Ve = A.data) == null ? void 0 : Ve.length) === 0,
|
|
1686
|
-
children: [
|
|
1687
|
-
/* @__PURE__ */ e.jsxs(
|
|
1688
|
-
M,
|
|
1689
|
-
{
|
|
1690
|
-
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1691
|
-
htmlFor: "none",
|
|
1692
|
-
children: [
|
|
1693
|
-
/* @__PURE__ */ e.jsx(se, { value: G, id: "none", children: "None" }),
|
|
1694
|
-
/* @__PURE__ */ e.jsx(M, { htmlFor: "none", className: "ml-2", children: "None" })
|
|
1695
|
-
]
|
|
1696
|
-
}
|
|
1697
|
-
),
|
|
1698
|
-
(Fe = A.data) == null ? void 0 : Fe.map((i) => /* @__PURE__ */ e.jsxs(
|
|
1699
|
-
M,
|
|
1700
|
-
{
|
|
1701
|
-
className: "h-12 border-b items-center flex p-4 cursor-pointer hover:bg-accent",
|
|
1702
|
-
children: [
|
|
1703
|
-
/* @__PURE__ */ e.jsx(
|
|
1704
|
-
se,
|
|
1705
|
-
{
|
|
1706
|
-
value: i.id,
|
|
1707
|
-
id: i.id,
|
|
1708
|
-
children: i.label
|
|
1709
|
-
}
|
|
1710
|
-
),
|
|
1711
|
-
/* @__PURE__ */ e.jsx(M, { htmlFor: i.id, className: "ml-2", children: i.label })
|
|
1712
|
-
]
|
|
1713
|
-
},
|
|
1714
|
-
i.id
|
|
1715
|
-
))
|
|
1716
|
-
]
|
|
1717
|
-
}
|
|
1718
|
-
) }) })
|
|
1719
|
-
] }) })
|
|
1720
|
-
] })
|
|
1721
|
-
] }),
|
|
1722
|
-
/* @__PURE__ */ e.jsx(
|
|
1723
|
-
Za,
|
|
1724
|
-
{
|
|
1725
|
-
queryMutation: Ee,
|
|
1726
|
-
showPathParamsWarning: S.pathParams.some(
|
|
1727
|
-
(i) => i.value === ""
|
|
1728
|
-
)
|
|
1729
|
-
}
|
|
1730
|
-
)
|
|
1731
|
-
]
|
|
1732
|
-
}
|
|
1733
|
-
)
|
|
1734
|
-
]
|
|
1735
|
-
}
|
|
1736
|
-
)
|
|
1737
|
-
}
|
|
1738
|
-
);
|
|
1739
|
-
}, Ya = ({
|
|
1740
|
-
className: t,
|
|
1741
|
-
size: a = 16
|
|
1742
|
-
}) => /* @__PURE__ */ e.jsx(
|
|
1743
|
-
"svg",
|
|
1744
|
-
{
|
|
1745
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1746
|
-
viewBox: "0 0 24 24",
|
|
1747
|
-
fill: "currentColor",
|
|
1748
|
-
className: t,
|
|
1749
|
-
width: a,
|
|
1750
|
-
height: a,
|
|
1751
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1752
|
-
"path",
|
|
1753
|
-
{
|
|
1754
|
-
fillRule: "evenodd",
|
|
1755
|
-
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm14.024-.983a1.125 1.125 0 0 1 0 1.966l-5.603 3.113A1.125 1.125 0 0 1 9 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113Z",
|
|
1756
|
-
clipRule: "evenodd"
|
|
1757
|
-
}
|
|
1758
|
-
)
|
|
1759
|
-
}
|
|
1760
|
-
), es = (t) => {
|
|
1761
|
-
const [a, s] = F(!1);
|
|
1762
|
-
return /* @__PURE__ */ e.jsxs(Vt, { onOpenChange: (n) => s(n), children: [
|
|
1763
|
-
/* @__PURE__ */ e.jsx(Ft, { asChild: !0, children: t.children ?? /* @__PURE__ */ e.jsxs(
|
|
1764
|
-
"button",
|
|
1765
|
-
{
|
|
1766
|
-
type: "button",
|
|
1767
|
-
className: "flex gap-1 items-center px-2 py-1 rounded-md transition text-xs bg-primary text-primary-foreground shadow-sm hover:bg-primary/80",
|
|
1768
|
-
children: [
|
|
1769
|
-
"Test",
|
|
1770
|
-
/* @__PURE__ */ e.jsx(Ya, { size: 14 })
|
|
1771
|
-
]
|
|
1772
|
-
}
|
|
1773
|
-
) }),
|
|
1774
|
-
/* @__PURE__ */ e.jsxs(
|
|
1775
|
-
zt,
|
|
1776
|
-
{
|
|
1777
|
-
className: "max-w-screen-xl w-full h-5/6 overflow-hidden p-0",
|
|
1778
|
-
"aria-describedby": void 0,
|
|
1779
|
-
children: [
|
|
1780
|
-
/* @__PURE__ */ e.jsx(qt, { children: /* @__PURE__ */ e.jsx(Ht, { children: "Playground" }) }),
|
|
1781
|
-
a && /* @__PURE__ */ e.jsx(Xa, { ...t })
|
|
1782
|
-
]
|
|
1783
|
-
}
|
|
1784
|
-
)
|
|
1785
|
-
] });
|
|
1786
|
-
}, ts = {
|
|
1787
|
-
get: "green",
|
|
1788
|
-
post: "blue",
|
|
1789
|
-
put: "yellow",
|
|
1790
|
-
delete: "red",
|
|
1791
|
-
patch: "purple",
|
|
1792
|
-
options: "gray",
|
|
1793
|
-
head: "gray"
|
|
1794
|
-
}, Ke = ({
|
|
1795
|
-
label: t,
|
|
1796
|
-
path: a,
|
|
1797
|
-
operations: s,
|
|
1798
|
-
collapsible: n,
|
|
1799
|
-
collapsed: r
|
|
1800
|
-
}) => ({
|
|
1801
|
-
type: "category",
|
|
1802
|
-
label: t,
|
|
1803
|
-
link: {
|
|
1804
|
-
type: "doc",
|
|
1805
|
-
id: a,
|
|
1806
|
-
label: t
|
|
1807
|
-
},
|
|
1808
|
-
collapsible: n,
|
|
1809
|
-
collapsed: r,
|
|
1810
|
-
items: s.map((o) => ({
|
|
1811
|
-
type: "link",
|
|
1812
|
-
label: o.summary ?? o.path,
|
|
1813
|
-
href: `${a}#${o.slug}`,
|
|
1814
|
-
...o.method && {
|
|
1815
|
-
badge: {
|
|
1816
|
-
label: o.method,
|
|
1817
|
-
color: ts[o.method.toLowerCase()],
|
|
1818
|
-
invert: !0
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
}))
|
|
1822
|
-
}), Xe = (t) => ({
|
|
1823
|
-
path: t.routePath,
|
|
1824
|
-
async lazy() {
|
|
1825
|
-
const { OasProvider: a } = await import("./OasProvider-HcqBeC4H.js");
|
|
1826
|
-
return {
|
|
1827
|
-
element: /* @__PURE__ */ e.jsx(
|
|
1828
|
-
a,
|
|
1829
|
-
{
|
|
1830
|
-
basePath: t.basePath,
|
|
1831
|
-
version: t.version,
|
|
1832
|
-
client: t.client,
|
|
1833
|
-
config: t.config
|
|
1834
|
-
}
|
|
1835
|
-
)
|
|
1836
|
-
};
|
|
1837
|
-
},
|
|
1838
|
-
children: t.routes
|
|
1839
|
-
}), ge = ({
|
|
1840
|
-
path: t,
|
|
1841
|
-
tag: a,
|
|
1842
|
-
untagged: s
|
|
1843
|
-
}) => ({
|
|
1844
|
-
path: t,
|
|
1845
|
-
async lazy() {
|
|
1846
|
-
const { OperationList: n } = await import("./OperationList-C3wnbFxp.js");
|
|
1847
|
-
return { element: /* @__PURE__ */ e.jsx(n, { tag: a, untagged: s }) };
|
|
1848
|
-
}
|
|
1849
|
-
}), as = (t, a) => {
|
|
1850
|
-
const s = E(
|
|
1851
|
-
t,
|
|
1852
|
-
a[0] ? ee(a[0]) : J
|
|
1853
|
-
);
|
|
1854
|
-
return [
|
|
1855
|
-
// Redirect to first tag on the index route
|
|
1856
|
-
{ index: !0, loader: () => Ot(s) },
|
|
1857
|
-
// Create routes for each tag
|
|
1858
|
-
...a.map(
|
|
1859
|
-
(n) => ge({
|
|
1860
|
-
path: E(t, ee(n)),
|
|
1861
|
-
tag: n
|
|
1862
|
-
})
|
|
1863
|
-
),
|
|
1864
|
-
// Category without tagged operations
|
|
1865
|
-
ge({
|
|
1866
|
-
path: E(t, J),
|
|
1867
|
-
untagged: !0
|
|
1868
|
-
})
|
|
1869
|
-
];
|
|
1870
|
-
}, ht = (t) => t.type === "file" ? Object.keys(t.input) : [], ss = ({
|
|
1871
|
-
basePath: t,
|
|
1872
|
-
config: a,
|
|
1873
|
-
client: s
|
|
1874
|
-
}) => {
|
|
1875
|
-
const n = a.tagPages;
|
|
1876
|
-
if (!n)
|
|
1877
|
-
return [
|
|
1878
|
-
Xe({
|
|
1879
|
-
basePath: t,
|
|
1880
|
-
routePath: t,
|
|
1881
|
-
routes: [ge({ path: t + "/:tag?" })],
|
|
1882
|
-
client: s,
|
|
1883
|
-
config: a
|
|
1884
|
-
})
|
|
1885
|
-
];
|
|
1886
|
-
const r = ht(a);
|
|
1887
|
-
return (r.length > 1 ? [void 0, ...r] : [void 0]).map((l) => {
|
|
1888
|
-
const c = E(t, l);
|
|
1889
|
-
return Xe({
|
|
1890
|
-
basePath: t,
|
|
1891
|
-
version: l,
|
|
1892
|
-
routePath: c,
|
|
1893
|
-
routes: as(c, n),
|
|
1894
|
-
client: s,
|
|
1895
|
-
config: a
|
|
1896
|
-
});
|
|
1897
|
-
});
|
|
1898
|
-
}, ns = ot(`
|
|
1899
|
-
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
1900
|
-
schema(input: $input, type: $type) {
|
|
1901
|
-
url
|
|
1902
|
-
tags {
|
|
1903
|
-
name
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
}
|
|
1907
|
-
`), rs = ot(`
|
|
1908
|
-
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
|
|
1909
|
-
schema(input: $input, type: $type) {
|
|
1910
|
-
operations(tag: $tag) {
|
|
1911
|
-
slug
|
|
1912
|
-
deprecated
|
|
1913
|
-
method
|
|
1914
|
-
summary
|
|
1915
|
-
operationId
|
|
1916
|
-
path
|
|
1917
|
-
tags {
|
|
1918
|
-
name
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
untagged: operations(untagged: true) {
|
|
1922
|
-
slug
|
|
1923
|
-
deprecated
|
|
1924
|
-
method
|
|
1925
|
-
summary
|
|
1926
|
-
operationId
|
|
1927
|
-
path
|
|
1928
|
-
}
|
|
1929
|
-
}
|
|
1930
|
-
}
|
|
1931
|
-
`), J = "~endpoints", qs = (t) => {
|
|
1932
|
-
const a = E(t.navigationId ?? "/reference"), s = new ia(t);
|
|
1933
|
-
return {
|
|
1934
|
-
getHead: () => {
|
|
1935
|
-
if (t.type === "url" && !t.skipPreload)
|
|
1936
|
-
return /* @__PURE__ */ e.jsx(
|
|
1937
|
-
"link",
|
|
1938
|
-
{
|
|
1939
|
-
rel: "preload",
|
|
1940
|
-
href: t.input,
|
|
1941
|
-
as: "fetch",
|
|
1942
|
-
crossOrigin: "anonymous"
|
|
1943
|
-
}
|
|
1944
|
-
);
|
|
1945
|
-
if (t.server)
|
|
1946
|
-
return /* @__PURE__ */ e.jsx("link", { rel: "preconnect", href: t.server });
|
|
1947
|
-
},
|
|
1948
|
-
getMdxComponents: () => ({
|
|
1949
|
-
OpenPlaygroundButton: ({
|
|
1950
|
-
requireAuth: n,
|
|
1951
|
-
server: r,
|
|
1952
|
-
method: o,
|
|
1953
|
-
url: l,
|
|
1954
|
-
children: c,
|
|
1955
|
-
...d
|
|
1956
|
-
}) => {
|
|
1957
|
-
const u = At();
|
|
1958
|
-
if (!r)
|
|
1959
|
-
throw new Error("Server is required");
|
|
1960
|
-
return n && !u.isAuthenticated ? /* @__PURE__ */ e.jsxs(
|
|
1961
|
-
te,
|
|
1962
|
-
{
|
|
1963
|
-
className: "gap-2 items-center",
|
|
1964
|
-
variant: "outline",
|
|
1965
|
-
onClick: u.login,
|
|
1966
|
-
children: [
|
|
1967
|
-
"Login to open in Playground ",
|
|
1968
|
-
/* @__PURE__ */ e.jsx(Pt, { size: 16 })
|
|
1969
|
-
]
|
|
1970
|
-
}
|
|
1971
|
-
) : /* @__PURE__ */ e.jsx(
|
|
1972
|
-
es,
|
|
1973
|
-
{
|
|
1974
|
-
url: l ?? "/",
|
|
1975
|
-
method: o ?? "get",
|
|
1976
|
-
server: r,
|
|
1977
|
-
...d,
|
|
1978
|
-
children: /* @__PURE__ */ e.jsx(te, { className: "gap-2 items-center", variant: "outline", children: c ?? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1979
|
-
"Open in Playground ",
|
|
1980
|
-
/* @__PURE__ */ e.jsx(kt, { size: 16 })
|
|
1981
|
-
] }) })
|
|
1982
|
-
}
|
|
1983
|
-
);
|
|
1984
|
-
}
|
|
1985
|
-
}),
|
|
1986
|
-
getSidebar: async (n) => {
|
|
1987
|
-
var o;
|
|
1988
|
-
if (!Ue({ path: a, end: !1 }, n))
|
|
1989
|
-
return [];
|
|
1990
|
-
const r = Ue(
|
|
1991
|
-
{ path: `${a}/:version?/:tag`, end: !0 },
|
|
1992
|
-
n
|
|
1993
|
-
);
|
|
1994
|
-
try {
|
|
1995
|
-
const l = r == null ? void 0 : r.params.version, c = l ?? ht(t).at(0), d = t.type, u = t.type === "file" ? t.input[c] : t.input, g = t.loadTags === !0 || t.type === "url", N = !t.loadTags && t.type !== "url", y = (o = t.tagPages) == null ? void 0 : o.find(
|
|
1996
|
-
(b) => ee(b) === (r == null ? void 0 : r.params.tag)
|
|
1997
|
-
), [h, x] = await Promise.all([
|
|
1998
|
-
s.fetch(ns, { type: d, input: u }),
|
|
1999
|
-
s.fetch(rs, {
|
|
2000
|
-
type: d,
|
|
2001
|
-
input: u,
|
|
2002
|
-
tag: t.loadTags ? void 0 : y
|
|
2003
|
-
})
|
|
2004
|
-
]), p = h.schema.tags.flatMap((b) => {
|
|
2005
|
-
const v = E(
|
|
2006
|
-
a,
|
|
2007
|
-
l,
|
|
2008
|
-
ee(b.name)
|
|
2009
|
-
), C = x.schema.operations.filter(
|
|
2010
|
-
(T) => {
|
|
2011
|
-
var H, k;
|
|
2012
|
-
return ((H = T.tags) == null ? void 0 : H.length) !== 0 && ((k = T.tags) == null ? void 0 : k.map((B) => B.name).includes(b.name));
|
|
2013
|
-
}
|
|
2014
|
-
);
|
|
2015
|
-
return t.loadTags && C.length === 0 ? [] : Ke({
|
|
2016
|
-
label: b.name,
|
|
2017
|
-
path: v,
|
|
2018
|
-
operations: (r == null ? void 0 : r.params.tag) !== J || t.loadTags ? C : [],
|
|
2019
|
-
collapsible: g,
|
|
2020
|
-
collapsed: N
|
|
2021
|
-
});
|
|
2022
|
-
});
|
|
2023
|
-
return x.schema.untagged.length > 0 && p.push(
|
|
2024
|
-
Ke({
|
|
2025
|
-
label: "Other endpoints",
|
|
2026
|
-
path: E(a, l, J),
|
|
2027
|
-
operations: (r == null ? void 0 : r.params.tag) === J || t.loadTags ? x.schema.untagged : [],
|
|
2028
|
-
collapsible: g,
|
|
2029
|
-
collapsed: N
|
|
2030
|
-
})
|
|
2031
|
-
), p;
|
|
2032
|
-
} catch {
|
|
2033
|
-
return [];
|
|
2034
|
-
}
|
|
2035
|
-
},
|
|
2036
|
-
getRoutes: () => ss({ basePath: a, config: t, client: s })
|
|
2037
|
-
};
|
|
2038
|
-
};
|
|
2039
|
-
export {
|
|
2040
|
-
lt as C,
|
|
2041
|
-
es as P,
|
|
2042
|
-
J as U,
|
|
2043
|
-
ot as a,
|
|
2044
|
-
_e as b,
|
|
2045
|
-
Ze as c,
|
|
2046
|
-
We as d,
|
|
2047
|
-
ga as e,
|
|
2048
|
-
ht as g,
|
|
2049
|
-
za as m,
|
|
2050
|
-
qs as o
|
|
2051
|
-
};
|
|
2052
|
-
//# sourceMappingURL=index-CtkRMvMw.js.map
|