zudoku 0.53.5 → 0.53.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/validators/InputNavigationSchema.d.ts +64 -0
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +16 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/flat-config.d.ts +323 -0
- package/dist/vite/plugin-docs.js +15 -10
- package/dist/vite/plugin-docs.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +265 -262
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { CircleSlashIcon as M, CheckIcon as W, XIcon as
|
|
3
|
-
import { D as
|
|
4
|
-
import { i as
|
|
5
|
-
import { O as
|
|
6
|
-
import { e as
|
|
7
|
-
import { Button as
|
|
2
|
+
import { CircleSlashIcon as M, CheckIcon as W, XIcon as oe, PencilLineIcon as le, RefreshCwIcon as ce, EyeOffIcon as de, EyeIcon as ue, CopyIcon as he, TrashIcon as fe, KeyRoundIcon as pe } from "lucide-react";
|
|
3
|
+
import { D as me, a as B, R as xe } from "./Slot-B31yZlfB.js";
|
|
4
|
+
import { i as I } from "./invariant-DAFpPywt.js";
|
|
5
|
+
import { O as ye, L as J } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
6
|
+
import { e as ge, d as je, g as Ce, c as we } from "./hook-CZjW2buS.js";
|
|
7
|
+
import { Button as g } from "./ui/Button.js";
|
|
8
8
|
import { u as S, A as q, a as L } from "./Alert-CWApD0CL.js";
|
|
9
9
|
import * as F from "react";
|
|
10
|
-
import
|
|
11
|
-
import { C as
|
|
12
|
-
import { D as Y, e as G, a as V, c as Z, b as ee, d as te, f as se, g as
|
|
13
|
-
import { Input as
|
|
14
|
-
import { c as
|
|
15
|
-
import { u as
|
|
16
|
-
const
|
|
17
|
-
const t =
|
|
18
|
-
return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(
|
|
10
|
+
import ve, { createContext as O, useRef as P, useLayoutEffect as ke, useEffect as X, useId as Q, useContext as H, useInsertionEffect as be, useMemo as $, useCallback as Ee, Children as Ne, isValidElement as Pe, useState as D } from "react";
|
|
11
|
+
import { C as De, a as Ie } from "./Card-CMDQUPM4.js";
|
|
12
|
+
import { D as Y, e as G, a as V, c as Z, b as ee, d as te, f as se, g as T } from "./Dialog-DMWw1doX.js";
|
|
13
|
+
import { Input as Ke } from "./ui/Input.js";
|
|
14
|
+
import { c as N } from "./cn-dYga0KKN.js";
|
|
15
|
+
import { u as Ae } from "./CodeBlock-B-G0eKtw.js";
|
|
16
|
+
const Re = () => {
|
|
17
|
+
const t = ge();
|
|
18
|
+
return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(ye, {}) : t.isAuthEnabled ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
|
|
19
19
|
"Please login first to view this page",
|
|
20
|
-
/* @__PURE__ */ e.jsx(
|
|
21
|
-
] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(
|
|
20
|
+
/* @__PURE__ */ e.jsx(g, { onClick: () => t.login(), children: "Login" })
|
|
21
|
+
] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(me, { className: "max-w-[600px]", children: [
|
|
22
22
|
"Authentication needs to be enabled for API keys to work. Enable it in your Zudoku configuration under ",
|
|
23
23
|
/* @__PURE__ */ e.jsx("code", { children: "authentication" }),
|
|
24
24
|
"."
|
|
25
25
|
] }) });
|
|
26
|
-
},
|
|
26
|
+
}, Te = O({});
|
|
27
27
|
function ne(t) {
|
|
28
|
-
const
|
|
29
|
-
return
|
|
28
|
+
const r = P(null);
|
|
29
|
+
return r.current === null && (r.current = t()), r.current;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
32
|
-
transformPagePoint: (t) => t,
|
|
33
|
-
isStatic: !1,
|
|
34
|
-
reducedMotion: "never"
|
|
35
|
-
});
|
|
31
|
+
const ze = typeof window < "u", Me = ze ? ke : X, ie = /* @__PURE__ */ O(null);
|
|
36
32
|
function Se(t) {
|
|
37
33
|
return typeof t == "object" && t !== null;
|
|
38
34
|
}
|
|
39
35
|
function qe(t) {
|
|
40
36
|
return Se(t) && "offsetHeight" in t;
|
|
41
37
|
}
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
const Le = O({
|
|
39
|
+
transformPagePoint: (t) => t,
|
|
40
|
+
isStatic: !1,
|
|
41
|
+
reducedMotion: "never"
|
|
42
|
+
});
|
|
43
|
+
class $e extends F.Component {
|
|
44
|
+
getSnapshotBeforeUpdate(r) {
|
|
44
45
|
const s = this.props.childRef.current;
|
|
45
|
-
if (s &&
|
|
46
|
-
const n = s.offsetParent, o = qe(n) && n.offsetWidth || 0,
|
|
47
|
-
|
|
46
|
+
if (s && r.isPresent && !this.props.isPresent) {
|
|
47
|
+
const n = s.offsetParent, o = qe(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
|
|
48
|
+
a.height = s.offsetHeight || 0, a.width = s.offsetWidth || 0, a.top = s.offsetTop, a.left = s.offsetLeft, a.right = o - a.width - a.left;
|
|
48
49
|
}
|
|
49
50
|
return null;
|
|
50
51
|
}
|
|
@@ -57,234 +58,236 @@ class Le extends F.Component {
|
|
|
57
58
|
return this.props.children;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
-
const
|
|
61
|
+
function Fe({ children: t, isPresent: r, anchorX: s, root: n }) {
|
|
62
|
+
const o = Q(), a = P(null), u = P({
|
|
62
63
|
width: 0,
|
|
63
64
|
height: 0,
|
|
64
65
|
top: 0,
|
|
65
66
|
left: 0,
|
|
66
67
|
right: 0
|
|
67
|
-
}), { nonce:
|
|
68
|
-
return
|
|
69
|
-
const { width:
|
|
70
|
-
if (
|
|
68
|
+
}), { nonce: m } = H(Le);
|
|
69
|
+
return be(() => {
|
|
70
|
+
const { width: C, height: l, top: j, left: c, right: f } = u.current;
|
|
71
|
+
if (r || !a.current || !C || !l)
|
|
71
72
|
return;
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
const x = s === "left" ? `left: ${c}` : `right: ${f}`;
|
|
74
|
+
a.current.dataset.motionPopId = o;
|
|
75
|
+
const h = document.createElement("style");
|
|
76
|
+
m && (h.nonce = m);
|
|
77
|
+
const i = n ?? document.head;
|
|
78
|
+
return i.appendChild(h), h.sheet && h.sheet.insertRule(`
|
|
79
|
+
[data-motion-pop-id="${o}"] {
|
|
77
80
|
position: absolute !important;
|
|
78
|
-
width: ${
|
|
79
|
-
height: ${
|
|
80
|
-
${
|
|
81
|
-
top: ${
|
|
81
|
+
width: ${C}px !important;
|
|
82
|
+
height: ${l}px !important;
|
|
83
|
+
${x}px !important;
|
|
84
|
+
top: ${j}px !important;
|
|
82
85
|
}
|
|
83
86
|
`), () => {
|
|
84
|
-
|
|
87
|
+
i.removeChild(h), i.contains(h) && i.removeChild(h);
|
|
85
88
|
};
|
|
86
|
-
}, [
|
|
89
|
+
}, [r]), e.jsx($e, { isPresent: r, childRef: a, sizeRef: u, children: F.cloneElement(t, { ref: a }) });
|
|
87
90
|
}
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
let
|
|
91
|
-
id:
|
|
92
|
-
initial:
|
|
91
|
+
const Oe = ({ children: t, initial: r, isPresent: s, onExitComplete: n, custom: o, presenceAffectsLayout: a, mode: u, anchorX: m, root: C }) => {
|
|
92
|
+
const l = ne(Qe), j = Q();
|
|
93
|
+
let c = !0, f = $(() => (c = !1, {
|
|
94
|
+
id: j,
|
|
95
|
+
initial: r,
|
|
93
96
|
isPresent: s,
|
|
94
97
|
custom: o,
|
|
95
|
-
onExitComplete: (
|
|
96
|
-
|
|
97
|
-
for (const
|
|
98
|
-
if (!
|
|
98
|
+
onExitComplete: (x) => {
|
|
99
|
+
l.set(x, !0);
|
|
100
|
+
for (const h of l.values())
|
|
101
|
+
if (!h)
|
|
99
102
|
return;
|
|
100
103
|
n && n();
|
|
101
104
|
},
|
|
102
|
-
register: (
|
|
103
|
-
}), [s,
|
|
104
|
-
return
|
|
105
|
-
|
|
105
|
+
register: (x) => (l.set(x, !1), () => l.delete(x))
|
|
106
|
+
}), [s, l, n]);
|
|
107
|
+
return a && c && (f = { ...f }), $(() => {
|
|
108
|
+
l.forEach((x, h) => l.set(h, !1));
|
|
106
109
|
}, [s]), F.useEffect(() => {
|
|
107
|
-
!s && !
|
|
108
|
-
}, [s]),
|
|
110
|
+
!s && !l.size && n && n();
|
|
111
|
+
}, [s]), u === "popLayout" && (t = e.jsx(Fe, { isPresent: s, anchorX: m, root: C, children: t })), e.jsx(ie.Provider, { value: f, children: t });
|
|
109
112
|
};
|
|
110
|
-
function
|
|
113
|
+
function Qe() {
|
|
111
114
|
return /* @__PURE__ */ new Map();
|
|
112
115
|
}
|
|
113
|
-
function
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
116
|
+
function He(t = !0) {
|
|
117
|
+
const r = H(ie);
|
|
118
|
+
if (r === null)
|
|
116
119
|
return [!0, null];
|
|
117
|
-
const { isPresent: s, onExitComplete: n, register: o } =
|
|
120
|
+
const { isPresent: s, onExitComplete: n, register: o } = r, a = Q();
|
|
118
121
|
X(() => {
|
|
119
122
|
if (t)
|
|
120
|
-
return o(
|
|
123
|
+
return o(a);
|
|
121
124
|
}, [t]);
|
|
122
|
-
const
|
|
123
|
-
return !s && n ? [!1,
|
|
125
|
+
const u = Ee(() => t && n && n(a), [a, n, t]);
|
|
126
|
+
return !s && n ? [!1, u] : [!0];
|
|
124
127
|
}
|
|
125
|
-
const
|
|
128
|
+
const K = (t) => t.key || "";
|
|
126
129
|
function U(t) {
|
|
127
|
-
const
|
|
128
|
-
return
|
|
129
|
-
|
|
130
|
-
}),
|
|
130
|
+
const r = [];
|
|
131
|
+
return Ne.forEach(t, (s) => {
|
|
132
|
+
Pe(s) && r.push(s);
|
|
133
|
+
}), r;
|
|
131
134
|
}
|
|
132
|
-
const
|
|
133
|
-
const [
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
for (let
|
|
137
|
-
const
|
|
138
|
-
|
|
135
|
+
const _e = ({ children: t, custom: r, initial: s = !0, onExitComplete: n, presenceAffectsLayout: o = !0, mode: a = "sync", propagate: u = !1, anchorX: m = "left", root: C }) => {
|
|
136
|
+
const [l, j] = He(u), c = $(() => U(t), [t]), f = u && !l ? [] : c.map(K), x = P(!0), h = P(c), i = ne(() => /* @__PURE__ */ new Map()), [d, w] = D(c), [p, v] = D(c);
|
|
137
|
+
Me(() => {
|
|
138
|
+
x.current = !1, h.current = c;
|
|
139
|
+
for (let k = 0; k < p.length; k++) {
|
|
140
|
+
const y = K(p[k]);
|
|
141
|
+
f.includes(y) ? i.delete(y) : i.get(y) !== !0 && i.set(y, !1);
|
|
139
142
|
}
|
|
140
|
-
}, [
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
143
|
-
let
|
|
144
|
-
for (let
|
|
145
|
-
const b =
|
|
146
|
-
|
|
143
|
+
}, [p, f.length, f.join("-")]);
|
|
144
|
+
const E = [];
|
|
145
|
+
if (c !== d) {
|
|
146
|
+
let k = [...c];
|
|
147
|
+
for (let y = 0; y < p.length; y++) {
|
|
148
|
+
const b = p[y], z = K(b);
|
|
149
|
+
f.includes(z) || (k.splice(y, 0, b), E.push(b));
|
|
147
150
|
}
|
|
148
|
-
return
|
|
151
|
+
return a === "wait" && E.length && (k = E), v(U(k)), w(c), null;
|
|
149
152
|
}
|
|
150
|
-
process.env.NODE_ENV !== "production" &&
|
|
151
|
-
const { forceRender:
|
|
152
|
-
return e.jsx(e.Fragment, { children:
|
|
153
|
-
const
|
|
154
|
-
if (
|
|
155
|
-
|
|
153
|
+
process.env.NODE_ENV !== "production" && a === "wait" && p.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
154
|
+
const { forceRender: re } = H(Te);
|
|
155
|
+
return e.jsx(e.Fragment, { children: p.map((k) => {
|
|
156
|
+
const y = K(k), b = u && !l ? !1 : c === p || f.includes(y), z = () => {
|
|
157
|
+
if (i.has(y))
|
|
158
|
+
i.set(y, !0);
|
|
156
159
|
else
|
|
157
160
|
return;
|
|
158
161
|
let _ = !0;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}), _ && (
|
|
162
|
+
i.forEach((ae) => {
|
|
163
|
+
ae || (_ = !1);
|
|
164
|
+
}), _ && (re?.(), v(h.current), u && j?.(), n && n());
|
|
162
165
|
};
|
|
163
|
-
return e.jsx(
|
|
166
|
+
return e.jsx(Oe, { isPresent: b, initial: !x.current || s ? void 0 : !1, custom: r, presenceAffectsLayout: o, mode: a, root: C, onExitComplete: b ? void 0 : z, anchorX: m, children: k }, y);
|
|
164
167
|
}) });
|
|
165
|
-
},
|
|
166
|
-
const
|
|
168
|
+
}, Be = ({ service: t }) => {
|
|
169
|
+
const r = je(), s = Ce(), [n, o] = D(
|
|
167
170
|
null
|
|
168
|
-
), [
|
|
169
|
-
queryFn: () => t.getConsumers(
|
|
171
|
+
), [a, u] = D(""), { data: m, isFetching: C } = we({
|
|
172
|
+
queryFn: () => t.getConsumers(r),
|
|
170
173
|
queryKey: ["api-keys"],
|
|
171
174
|
retry: !1
|
|
172
|
-
}),
|
|
175
|
+
}), l = S({
|
|
173
176
|
mutationFn: ({
|
|
174
|
-
consumerId:
|
|
175
|
-
keyId:
|
|
177
|
+
consumerId: i,
|
|
178
|
+
keyId: d
|
|
176
179
|
}) => {
|
|
177
180
|
if (!t.deleteKey)
|
|
178
181
|
throw new Error("deleteKey not implemented");
|
|
179
|
-
return t.deleteKey(
|
|
182
|
+
return t.deleteKey(i, d, r);
|
|
180
183
|
},
|
|
181
|
-
onMutate: async ({ consumerId:
|
|
184
|
+
onMutate: async ({ consumerId: i, keyId: d }) => {
|
|
182
185
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
183
|
-
const
|
|
186
|
+
const w = s.getQueryData([
|
|
184
187
|
"api-keys"
|
|
185
188
|
]);
|
|
186
|
-
return s.setQueryData(["api-keys"], (
|
|
187
|
-
...
|
|
188
|
-
apiKeys:
|
|
189
|
-
} :
|
|
189
|
+
return s.setQueryData(["api-keys"], (p) => p && p.map((v) => v.id === i ? {
|
|
190
|
+
...v,
|
|
191
|
+
apiKeys: v.apiKeys.filter((E) => E.id !== d)
|
|
192
|
+
} : v)), { previousData: w };
|
|
190
193
|
},
|
|
191
|
-
onError: (
|
|
192
|
-
|
|
194
|
+
onError: (i, d, w) => {
|
|
195
|
+
w?.previousData && s.setQueryData(["api-keys"], w.previousData);
|
|
193
196
|
},
|
|
194
197
|
onSuccess: () => {
|
|
195
198
|
s.invalidateQueries({ queryKey: ["api-keys"] });
|
|
196
199
|
}
|
|
197
|
-
}),
|
|
200
|
+
}), j = S({
|
|
198
201
|
mutationFn: ({
|
|
199
|
-
consumerId:
|
|
200
|
-
label:
|
|
202
|
+
consumerId: i,
|
|
203
|
+
label: d
|
|
201
204
|
}) => {
|
|
202
205
|
if (!t.updateConsumer)
|
|
203
206
|
throw new Error("updateConsumer not implemented");
|
|
204
|
-
return t.updateConsumer({ id:
|
|
207
|
+
return t.updateConsumer({ id: i, label: d }, r);
|
|
205
208
|
},
|
|
206
|
-
onMutate: async ({ consumerId:
|
|
209
|
+
onMutate: async ({ consumerId: i, label: d }) => {
|
|
207
210
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
208
|
-
const
|
|
209
|
-
return s.setQueryData(["api-keys"], (
|
|
210
|
-
...
|
|
211
|
-
label:
|
|
212
|
-
} :
|
|
211
|
+
const w = s.getQueryData(["api-keys"]);
|
|
212
|
+
return s.setQueryData(["api-keys"], (p) => p && p.map((v) => v.id === i ? {
|
|
213
|
+
...v,
|
|
214
|
+
label: d
|
|
215
|
+
} : v)), { previousData: w };
|
|
213
216
|
},
|
|
214
|
-
onError: (
|
|
215
|
-
|
|
217
|
+
onError: (i, d, w) => {
|
|
218
|
+
w?.previousData && s.setQueryData(["api-keys"], w.previousData);
|
|
216
219
|
},
|
|
217
220
|
onSuccess: () => {
|
|
218
221
|
s.invalidateQueries({ queryKey: ["api-keys"] });
|
|
219
222
|
}
|
|
220
|
-
}),
|
|
221
|
-
mutationFn: (
|
|
223
|
+
}), c = S({
|
|
224
|
+
mutationFn: (i) => {
|
|
222
225
|
if (!t.rollKey)
|
|
223
226
|
throw new Error("rollKey not implemented");
|
|
224
|
-
return t.rollKey(
|
|
227
|
+
return t.rollKey(i, r);
|
|
225
228
|
},
|
|
226
229
|
onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
|
|
227
|
-
}),
|
|
228
|
-
o(
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
consumerId:
|
|
232
|
-
label:
|
|
233
|
-
}), o(null),
|
|
234
|
-
},
|
|
235
|
-
o(null),
|
|
230
|
+
}), f = (i, d) => {
|
|
231
|
+
o(i), u(d);
|
|
232
|
+
}, x = (i) => {
|
|
233
|
+
a.trim() && j.mutate({
|
|
234
|
+
consumerId: i,
|
|
235
|
+
label: a.trim()
|
|
236
|
+
}), o(null), u("");
|
|
237
|
+
}, h = () => {
|
|
238
|
+
o(null), u("");
|
|
236
239
|
};
|
|
237
240
|
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
|
|
238
241
|
/* @__PURE__ */ e.jsx(B.Target, { name: "api-keys-list-page" }),
|
|
239
242
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
|
|
240
243
|
/* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
|
|
241
|
-
t.createKey && /* @__PURE__ */ e.jsx(
|
|
244
|
+
t.createKey && /* @__PURE__ */ e.jsx(g, { asChild: !0, children: /* @__PURE__ */ e.jsx(J, { to: "/settings/api-keys/new", children: "Create API Key" }) })
|
|
242
245
|
] }),
|
|
243
246
|
/* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
|
|
244
247
|
/* @__PURE__ */ e.jsx(B.Target, { name: "api-keys-list-page-before-keys" }),
|
|
245
248
|
/* @__PURE__ */ e.jsx("div", { className: "h-8" }),
|
|
246
|
-
|
|
249
|
+
c.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
|
|
247
250
|
/* @__PURE__ */ e.jsx(M, { size: 16 }),
|
|
248
|
-
/* @__PURE__ */ e.jsx(L, { children:
|
|
251
|
+
/* @__PURE__ */ e.jsx(L, { children: c.error.message })
|
|
249
252
|
] }),
|
|
250
|
-
|
|
253
|
+
j.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
|
|
251
254
|
/* @__PURE__ */ e.jsx(M, { size: 16 }),
|
|
252
|
-
/* @__PURE__ */ e.jsx(L, { children:
|
|
255
|
+
/* @__PURE__ */ e.jsx(L, { children: j.error.message })
|
|
253
256
|
] }),
|
|
254
|
-
|
|
257
|
+
l.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
|
|
255
258
|
/* @__PURE__ */ e.jsx(M, { size: 16 }),
|
|
256
|
-
/* @__PURE__ */ e.jsx(L, { children:
|
|
259
|
+
/* @__PURE__ */ e.jsx(L, { children: l.error.message })
|
|
257
260
|
] }),
|
|
258
|
-
/* @__PURE__ */ e.jsx("div", { className: "", children:
|
|
261
|
+
/* @__PURE__ */ e.jsx("div", { className: "", children: m.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex col-span-full flex-col justify-center gap-4 items-center p-8 border rounded-sm bg-muted/30 text-muted-foreground", children: [
|
|
259
262
|
/* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
|
|
260
263
|
"You have no API keys yet.",
|
|
261
264
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
262
265
|
t.createKey && "Get started and create your first key."
|
|
263
266
|
] }),
|
|
264
|
-
t.createKey && /* @__PURE__ */ e.jsx(
|
|
267
|
+
t.createKey && /* @__PURE__ */ e.jsx(g, { asChild: !0, variant: "outline", children: /* @__PURE__ */ e.jsx(J, { to: "/settings/api-keys/new", children: "Create API Key" }) })
|
|
265
268
|
] }) : /* @__PURE__ */ e.jsx(
|
|
266
269
|
"ul",
|
|
267
270
|
{
|
|
268
|
-
className:
|
|
271
|
+
className: N(
|
|
269
272
|
"grid grid-cols-[1fr_min-content] divide-y divide-border col-span-6"
|
|
270
273
|
),
|
|
271
|
-
children:
|
|
272
|
-
|
|
274
|
+
children: m.map((i) => /* @__PURE__ */ e.jsxs(
|
|
275
|
+
De,
|
|
273
276
|
{
|
|
274
277
|
className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
|
|
275
278
|
children: [
|
|
276
|
-
/* @__PURE__ */ e.jsxs(
|
|
279
|
+
/* @__PURE__ */ e.jsxs(Ie, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
|
|
277
280
|
/* @__PURE__ */ e.jsxs("div", { className: "h-10 flex flex-col text-sm justify-center", children: [
|
|
278
281
|
/* @__PURE__ */ e.jsxs("div", { className: "font-medium text-lg flex items-center gap-2", children: [
|
|
279
|
-
n ===
|
|
282
|
+
n === i.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
280
283
|
/* @__PURE__ */ e.jsx(
|
|
281
|
-
|
|
284
|
+
Ke,
|
|
282
285
|
{
|
|
283
286
|
maxLength: 32,
|
|
284
|
-
value:
|
|
285
|
-
onChange: (
|
|
286
|
-
onKeyDown: (
|
|
287
|
-
|
|
287
|
+
value: a,
|
|
288
|
+
onChange: (d) => u(d.target.value),
|
|
289
|
+
onKeyDown: (d) => {
|
|
290
|
+
d.key === "Enter" ? x(i.id) : d.key === "Escape" && h();
|
|
288
291
|
},
|
|
289
292
|
className: "text-lg font-medium",
|
|
290
293
|
autoFocus: !0
|
|
@@ -292,72 +295,72 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
292
295
|
),
|
|
293
296
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
294
297
|
/* @__PURE__ */ e.jsx(
|
|
295
|
-
|
|
298
|
+
g,
|
|
296
299
|
{
|
|
297
300
|
size: "icon",
|
|
298
301
|
variant: "ghost",
|
|
299
|
-
onClick: () =>
|
|
300
|
-
disabled: !
|
|
302
|
+
onClick: () => x(i.id),
|
|
303
|
+
disabled: !a.trim(),
|
|
301
304
|
children: /* @__PURE__ */ e.jsx(W, { size: 16 })
|
|
302
305
|
}
|
|
303
306
|
),
|
|
304
307
|
/* @__PURE__ */ e.jsx(
|
|
305
|
-
|
|
308
|
+
g,
|
|
306
309
|
{
|
|
307
310
|
size: "icon",
|
|
308
311
|
variant: "ghost",
|
|
309
|
-
onClick:
|
|
310
|
-
children: /* @__PURE__ */ e.jsx(
|
|
312
|
+
onClick: h,
|
|
313
|
+
children: /* @__PURE__ */ e.jsx(oe, { size: 16 })
|
|
311
314
|
}
|
|
312
315
|
)
|
|
313
316
|
] })
|
|
314
|
-
] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children:
|
|
315
|
-
/* @__PURE__ */ e.jsx("div", { className: "text-muted-foreground text-xs", children:
|
|
317
|
+
] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: i.label }),
|
|
318
|
+
/* @__PURE__ */ e.jsx("div", { className: "text-muted-foreground text-xs", children: i.createdOn })
|
|
316
319
|
] }),
|
|
317
320
|
/* @__PURE__ */ e.jsxs("div", { className: "text-muted-foreground text-xs", children: [
|
|
318
|
-
|
|
321
|
+
i.createdOn && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
319
322
|
"Created on",
|
|
320
323
|
" ",
|
|
321
|
-
new Date(
|
|
324
|
+
new Date(i.createdOn).toLocaleDateString()
|
|
322
325
|
] }),
|
|
323
|
-
|
|
326
|
+
i.expiresOn && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
324
327
|
"Expires on",
|
|
325
328
|
" ",
|
|
326
|
-
new Date(
|
|
329
|
+
new Date(i.expiresOn).toLocaleDateString()
|
|
327
330
|
] })
|
|
328
331
|
] })
|
|
329
332
|
] }),
|
|
330
333
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-end", children: [
|
|
331
334
|
t.updateConsumer && /* @__PURE__ */ e.jsxs(
|
|
332
|
-
|
|
335
|
+
g,
|
|
333
336
|
{
|
|
334
337
|
variant: "ghost",
|
|
335
|
-
onClick: () =>
|
|
336
|
-
className:
|
|
338
|
+
onClick: () => f(i.id, i.label),
|
|
339
|
+
className: N(
|
|
337
340
|
"flex gap-2",
|
|
338
|
-
n ===
|
|
341
|
+
n === i.id && "opacity-0! pointer-events-none"
|
|
339
342
|
),
|
|
340
|
-
disabled: n ===
|
|
343
|
+
disabled: n === i.id,
|
|
341
344
|
children: [
|
|
342
|
-
/* @__PURE__ */ e.jsx(
|
|
345
|
+
/* @__PURE__ */ e.jsx(le, { size: 16 }),
|
|
343
346
|
/* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Edit label" })
|
|
344
347
|
]
|
|
345
348
|
}
|
|
346
349
|
),
|
|
347
350
|
t.rollKey && /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
348
351
|
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
349
|
-
|
|
352
|
+
g,
|
|
350
353
|
{
|
|
351
354
|
title: "Roll this key",
|
|
352
355
|
variant: "ghost",
|
|
353
|
-
disabled:
|
|
356
|
+
disabled: c.isPending,
|
|
354
357
|
className: "flex items-center gap-2",
|
|
355
358
|
children: [
|
|
356
359
|
/* @__PURE__ */ e.jsx(
|
|
357
|
-
|
|
360
|
+
ce,
|
|
358
361
|
{
|
|
359
362
|
size: 16,
|
|
360
|
-
className:
|
|
363
|
+
className: c.isPending ? "animate-spin" : void 0
|
|
361
364
|
}
|
|
362
365
|
),
|
|
363
366
|
/* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Roll key" })
|
|
@@ -370,12 +373,12 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
370
373
|
/* @__PURE__ */ e.jsx(te, { children: "Are you sure you want to roll this API key?" })
|
|
371
374
|
] }),
|
|
372
375
|
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
373
|
-
/* @__PURE__ */ e.jsx(
|
|
374
|
-
/* @__PURE__ */ e.jsx(
|
|
375
|
-
|
|
376
|
+
/* @__PURE__ */ e.jsx(T, { asChild: !0, children: /* @__PURE__ */ e.jsx(g, { variant: "outline", children: "Cancel" }) }),
|
|
377
|
+
/* @__PURE__ */ e.jsx(T, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
378
|
+
g,
|
|
376
379
|
{
|
|
377
380
|
onClick: () => {
|
|
378
|
-
|
|
381
|
+
c.mutate(i.id);
|
|
379
382
|
},
|
|
380
383
|
children: "Roll Key"
|
|
381
384
|
}
|
|
@@ -385,50 +388,50 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
385
388
|
] })
|
|
386
389
|
] })
|
|
387
390
|
] }),
|
|
388
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(
|
|
391
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(_e, { children: i.apiKeys.map((d) => /* @__PURE__ */ e.jsxs(ve.Fragment, { children: [
|
|
389
392
|
/* @__PURE__ */ e.jsx(
|
|
390
|
-
|
|
393
|
+
Ue,
|
|
391
394
|
{
|
|
392
|
-
apiKey:
|
|
395
|
+
apiKey: d,
|
|
393
396
|
onDeleteKey: () => {
|
|
394
|
-
|
|
395
|
-
consumerId:
|
|
396
|
-
keyId:
|
|
397
|
+
l.mutate({
|
|
398
|
+
consumerId: i.id,
|
|
399
|
+
keyId: d.id
|
|
397
400
|
});
|
|
398
401
|
},
|
|
399
|
-
className:
|
|
402
|
+
className: l.variables?.keyId === d.id && (l.isPending || C) ? "opacity-10!" : void 0
|
|
400
403
|
}
|
|
401
404
|
),
|
|
402
405
|
/* @__PURE__ */ e.jsx("div", { className: "col-span-full h-px bg-border" })
|
|
403
|
-
] },
|
|
406
|
+
] }, d.id)) }) })
|
|
404
407
|
]
|
|
405
408
|
},
|
|
406
|
-
|
|
409
|
+
i.id
|
|
407
410
|
))
|
|
408
411
|
}
|
|
409
412
|
) })
|
|
410
413
|
] });
|
|
411
|
-
},
|
|
412
|
-
const
|
|
414
|
+
}, Je = (t) => {
|
|
415
|
+
const r = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((r.getTime() - s.getTime()) / 1e3), o = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
|
|
413
416
|
return n < 60 ? o.format(-n, "second") : n < 3600 ? o.format(-Math.floor(n / 60), "minute") : n < 86400 ? o.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? o.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? o.format(-Math.floor(n / 2592e3), "month") : o.format(-Math.floor(n / 31536e3), "year");
|
|
414
|
-
},
|
|
417
|
+
}, Ue = ({
|
|
415
418
|
apiKey: t,
|
|
416
|
-
onDeleteKey:
|
|
419
|
+
onDeleteKey: r,
|
|
417
420
|
className: s
|
|
418
421
|
}) => {
|
|
419
|
-
const [n, o] =
|
|
420
|
-
(new Date(
|
|
421
|
-
) : 1 / 0,
|
|
422
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
422
|
+
const [n, o] = D(!1), [a, u] = Ae(), { key: m, createdOn: C, expiresOn: l } = t, j = l && new Date(l) < /* @__PURE__ */ new Date(), c = l ? Math.ceil(
|
|
423
|
+
(new Date(l).getTime() - (/* @__PURE__ */ new Date()).getTime()) / (1e3 * 60 * 60 * 24)
|
|
424
|
+
) : 1 / 0, f = c <= 7 && !j;
|
|
425
|
+
return /* @__PURE__ */ e.jsxs("div", { className: N("grid col-span-full grid-cols-subgrid p-6", s), children: [
|
|
423
426
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
424
427
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm border rounded-md w-full max-w-fit px-1", children: [
|
|
425
428
|
/* @__PURE__ */ e.jsxs("div", { className: "font-mono w-full h-9 items-center flex px-2 text-xs gap-2", children: [
|
|
426
429
|
/* @__PURE__ */ e.jsx(
|
|
427
430
|
"div",
|
|
428
431
|
{
|
|
429
|
-
className:
|
|
432
|
+
className: N(
|
|
430
433
|
"rounded-full w-2 h-2 bg-emerald-400 mr-2",
|
|
431
|
-
(
|
|
434
|
+
(f || j) && "bg-neutral-200"
|
|
432
435
|
)
|
|
433
436
|
}
|
|
434
437
|
),
|
|
@@ -436,70 +439,70 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
436
439
|
/* @__PURE__ */ e.jsx(
|
|
437
440
|
"div",
|
|
438
441
|
{
|
|
439
|
-
className:
|
|
442
|
+
className: N(
|
|
440
443
|
"w-40 inline-block md:w-full truncate",
|
|
441
444
|
n ? "" : "opacity-20"
|
|
442
445
|
),
|
|
443
|
-
children: n ?
|
|
446
|
+
children: n ? m.slice(0, -5) : "**** ".repeat(m.slice(0, -5).length / 5) + "*".repeat(m.slice(0, -5).length % 5)
|
|
444
447
|
}
|
|
445
448
|
),
|
|
446
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
449
|
+
/* @__PURE__ */ e.jsx("span", { children: m.slice(-5) })
|
|
447
450
|
] })
|
|
448
451
|
] }),
|
|
449
452
|
/* @__PURE__ */ e.jsx(
|
|
450
|
-
|
|
453
|
+
g,
|
|
451
454
|
{
|
|
452
455
|
variant: "ghost",
|
|
453
|
-
onClick: () => o((
|
|
456
|
+
onClick: () => o((x) => !x),
|
|
454
457
|
size: "icon",
|
|
455
|
-
children: n ? /* @__PURE__ */ e.jsx(
|
|
458
|
+
children: n ? /* @__PURE__ */ e.jsx(de, { size: 16 }) : /* @__PURE__ */ e.jsx(ue, { size: 16 })
|
|
456
459
|
}
|
|
457
460
|
),
|
|
458
461
|
/* @__PURE__ */ e.jsx(
|
|
459
|
-
|
|
462
|
+
g,
|
|
460
463
|
{
|
|
461
464
|
variant: "ghost",
|
|
462
|
-
onClick: () =>
|
|
465
|
+
onClick: () => u(m),
|
|
463
466
|
size: "icon",
|
|
464
|
-
children:
|
|
467
|
+
children: a ? /* @__PURE__ */ e.jsx(W, { size: 16 }) : /* @__PURE__ */ e.jsx(he, { size: 16 })
|
|
465
468
|
}
|
|
466
469
|
)
|
|
467
470
|
] }),
|
|
468
471
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
|
|
469
|
-
|
|
472
|
+
C && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
470
473
|
"Created ",
|
|
471
|
-
|
|
474
|
+
Je(C),
|
|
472
475
|
"."
|
|
473
476
|
] }),
|
|
474
477
|
" ",
|
|
475
|
-
|
|
478
|
+
l && f && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
|
|
476
479
|
"Expires in ",
|
|
477
|
-
|
|
480
|
+
c,
|
|
478
481
|
" ",
|
|
479
|
-
|
|
482
|
+
c === 1 ? "day" : "days",
|
|
480
483
|
"."
|
|
481
484
|
] }),
|
|
482
|
-
|
|
485
|
+
l && j && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
|
|
483
486
|
"Expired",
|
|
484
487
|
" ",
|
|
485
|
-
|
|
488
|
+
c === 0 ? "today." : `${c * -1} days ago.`
|
|
486
489
|
] })
|
|
487
490
|
] })
|
|
488
491
|
] }),
|
|
489
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children:
|
|
490
|
-
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
492
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: l && r && /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
493
|
+
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(g, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(fe, { size: 16 }) }) }),
|
|
491
494
|
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
492
495
|
/* @__PURE__ */ e.jsxs(Z, { children: [
|
|
493
496
|
/* @__PURE__ */ e.jsx(ee, { children: "Delete API Key" }),
|
|
494
497
|
/* @__PURE__ */ e.jsx(te, { children: "Are you sure you want to delete this API key?" })
|
|
495
498
|
] }),
|
|
496
499
|
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
497
|
-
/* @__PURE__ */ e.jsx(
|
|
498
|
-
/* @__PURE__ */ e.jsx(
|
|
499
|
-
|
|
500
|
+
/* @__PURE__ */ e.jsx(T, { asChild: !0, children: /* @__PURE__ */ e.jsx(g, { variant: "outline", children: "Cancel" }) }),
|
|
501
|
+
/* @__PURE__ */ e.jsx(T, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
502
|
+
g,
|
|
500
503
|
{
|
|
501
504
|
onClick: () => {
|
|
502
|
-
|
|
505
|
+
r();
|
|
503
506
|
},
|
|
504
507
|
children: "Delete"
|
|
505
508
|
}
|
|
@@ -508,55 +511,55 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
508
511
|
] })
|
|
509
512
|
] }) })
|
|
510
513
|
] });
|
|
511
|
-
},
|
|
514
|
+
}, A = "https://api.zuploedge.com/v2/client", We = async (t) => {
|
|
512
515
|
try {
|
|
513
516
|
return await t.json();
|
|
514
517
|
} catch {
|
|
515
518
|
return;
|
|
516
519
|
}
|
|
517
|
-
},
|
|
518
|
-
const
|
|
519
|
-
if (!t.ok &&
|
|
520
|
-
const s = await
|
|
520
|
+
}, R = async (t) => {
|
|
521
|
+
const r = t.headers.get("content-type");
|
|
522
|
+
if (!t.ok && r?.includes("application/problem+json")) {
|
|
523
|
+
const s = await We(t);
|
|
521
524
|
if (s.type && s.title)
|
|
522
525
|
throw new Error(s.detail ?? s.title);
|
|
523
526
|
}
|
|
524
|
-
},
|
|
525
|
-
deleteKey: async (
|
|
527
|
+
}, Xe = (t) => ({
|
|
528
|
+
deleteKey: async (r, s, n) => {
|
|
526
529
|
const o = new Request(
|
|
527
|
-
|
|
530
|
+
A + `/${t}/consumers/${r}/keys/${s}`,
|
|
528
531
|
{
|
|
529
532
|
method: "DELETE"
|
|
530
533
|
}
|
|
531
534
|
);
|
|
532
535
|
await n.signRequest(o);
|
|
533
|
-
const
|
|
534
|
-
await
|
|
536
|
+
const a = await fetch(o);
|
|
537
|
+
await R(a), I(a.ok, "Failed to delete API key");
|
|
535
538
|
},
|
|
536
|
-
updateConsumer: async (
|
|
539
|
+
updateConsumer: async (r, s) => {
|
|
537
540
|
const n = await fetch(
|
|
538
541
|
await s.signRequest(
|
|
539
542
|
new Request(
|
|
540
|
-
|
|
543
|
+
A + `/${t}/consumers/${r.id}`,
|
|
541
544
|
{
|
|
542
545
|
method: "PATCH",
|
|
543
546
|
headers: {
|
|
544
547
|
"Content-Type": "application/json"
|
|
545
548
|
},
|
|
546
549
|
body: JSON.stringify({
|
|
547
|
-
label:
|
|
550
|
+
label: r.label
|
|
548
551
|
})
|
|
549
552
|
}
|
|
550
553
|
)
|
|
551
554
|
)
|
|
552
555
|
);
|
|
553
|
-
await
|
|
556
|
+
await R(n), I(n.ok, "Failed to update API key description");
|
|
554
557
|
},
|
|
555
|
-
rollKey: async (
|
|
558
|
+
rollKey: async (r, s) => {
|
|
556
559
|
const n = await fetch(
|
|
557
560
|
await s.signRequest(
|
|
558
561
|
new Request(
|
|
559
|
-
|
|
562
|
+
A + `/${t}/consumers/${r}/roll-key`,
|
|
560
563
|
{
|
|
561
564
|
method: "POST",
|
|
562
565
|
headers: {
|
|
@@ -567,39 +570,39 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
567
570
|
)
|
|
568
571
|
)
|
|
569
572
|
);
|
|
570
|
-
await
|
|
573
|
+
await R(n), I(n.ok, "Failed to delete API key");
|
|
571
574
|
},
|
|
572
|
-
getConsumers: async (
|
|
575
|
+
getConsumers: async (r) => {
|
|
573
576
|
const s = new Request(
|
|
574
|
-
|
|
577
|
+
A + `/${t}/consumers`
|
|
575
578
|
);
|
|
576
|
-
await
|
|
579
|
+
await r.signRequest(s);
|
|
577
580
|
const n = await fetch(s);
|
|
578
|
-
return await
|
|
579
|
-
id:
|
|
580
|
-
label:
|
|
581
|
-
apiKeys:
|
|
582
|
-
key:
|
|
581
|
+
return await R(n), I(n.ok, "Failed to fetch API keys"), (await n.json()).data.map((a) => ({
|
|
582
|
+
id: a.id,
|
|
583
|
+
label: a.label || a.subject || "API Key",
|
|
584
|
+
apiKeys: a.apiKeys.data,
|
|
585
|
+
key: a.apiKeys.data.at(0)
|
|
583
586
|
}));
|
|
584
587
|
}
|
|
585
|
-
}),
|
|
586
|
-
const
|
|
588
|
+
}), dt = (t) => t, ut = (t) => {
|
|
589
|
+
const r = "deploymentName" in t ? Xe(t.deploymentName) : t;
|
|
587
590
|
return {
|
|
588
591
|
getProfileMenuItems: () => [
|
|
589
592
|
{
|
|
590
593
|
label: "API Keys",
|
|
591
594
|
path: "/settings/api-keys",
|
|
592
595
|
category: "middle",
|
|
593
|
-
icon:
|
|
596
|
+
icon: pe
|
|
594
597
|
}
|
|
595
598
|
],
|
|
596
599
|
getIdentities: async (s) => {
|
|
597
600
|
try {
|
|
598
|
-
return (await
|
|
599
|
-
authorizeRequest: (
|
|
601
|
+
return (await r.getConsumers(s)).map((o) => ({
|
|
602
|
+
authorizeRequest: (a) => (a.headers.set(
|
|
600
603
|
"Authorization",
|
|
601
604
|
`Bearer ${o.apiKeys.at(0)?.key}`
|
|
602
|
-
),
|
|
605
|
+
), a),
|
|
603
606
|
id: o.id,
|
|
604
607
|
label: o.label
|
|
605
608
|
}));
|
|
@@ -609,12 +612,12 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
609
612
|
},
|
|
610
613
|
getRoutes: () => [
|
|
611
614
|
{
|
|
612
|
-
element: /* @__PURE__ */ e.jsx(
|
|
613
|
-
errorElement: /* @__PURE__ */ e.jsx(
|
|
615
|
+
element: /* @__PURE__ */ e.jsx(Re, {}),
|
|
616
|
+
errorElement: /* @__PURE__ */ e.jsx(xe, {}),
|
|
614
617
|
children: [
|
|
615
618
|
{
|
|
616
619
|
path: "/settings/api-keys",
|
|
617
|
-
element: /* @__PURE__ */ e.jsx(
|
|
620
|
+
element: /* @__PURE__ */ e.jsx(Be, { service: r })
|
|
618
621
|
}
|
|
619
622
|
// {
|
|
620
623
|
// path: "/settings/api-keys/new",
|
|
@@ -626,7 +629,7 @@ const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
626
629
|
};
|
|
627
630
|
};
|
|
628
631
|
export {
|
|
629
|
-
|
|
630
|
-
|
|
632
|
+
ut as apiKeyPlugin,
|
|
633
|
+
dt as createApiKeyService
|
|
631
634
|
};
|
|
632
635
|
//# sourceMappingURL=zudoku.plugin-api-keys.js.map
|