@epam/ai-dial-usage-dashboard 1.2.0-dev.93 → 1.2.0-dev.99

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/index.js CHANGED
@@ -1,27 +1,14 @@
1
- import { DeploymentIcon as e, InitialsAvatar as t, PanelEmptyState as n, buildCssVars as r, formatCost as i, mergeClasses as a } from "@epam/ai-dial-chat-shared";
2
- import { ElementSize as o, EllipsisTooltip as s, ProgressBar as c, Tooltip as l } from "@epam/ai-dial-ui-kit";
3
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
4
- import { createElement as p, forwardRef as m } from "react";
5
- //#region \0rolldown/runtime.js
6
- var h = Object.defineProperty, g = Object.getOwnPropertyDescriptor, _ = Object.getOwnPropertyNames, v = Object.prototype.hasOwnProperty, ee = (e, t) => () => (e && (t = e(e = 0)), t), y = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), te = (e, t) => {
7
- let n = {};
8
- for (var r in e) h(n, r, {
9
- get: e[r],
10
- enumerable: !0
11
- });
12
- return t || h(n, Symbol.toStringTag, { value: "Module" }), n;
13
- }, ne = (e, t, n, r) => {
14
- if (t && typeof t == "object" || typeof t == "function") for (var i = _(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !v.call(e, s) && s !== n && h(e, s, {
15
- get: ((e) => t[e]).bind(null, s),
16
- enumerable: !(r = g(t, s)) || r.enumerable
17
- });
18
- return e;
19
- }, b = (e) => v.call(e, "module.exports") ? e["module.exports"] : ne(h({}, "__esModule", { value: !0 }), e), x = {
1
+ import { DeploymentIcon as e, InitialsAvatar as t, PanelEmptyState as n, buildCssVars as r, mergeClasses as i } from "@epam/ai-dial-chat-shared";
2
+ import { ElementSize as a, EllipsisTooltip as o, ProgressBar as s, Tooltip as c } from "@epam/ai-dial-ui-kit";
3
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
4
+ import { createElement as f, forwardRef as p } from "react";
5
+ //#region src/constants/public-class-names.ts
6
+ var m = {
20
7
  card: "dial-usage-dashboard-card",
21
8
  cardGroup: "dial-usage-dashboard-card-group"
22
- }, S = /* @__PURE__ */ function(e) {
9
+ }, h = /* @__PURE__ */ function(e) {
23
10
  return e.Default = "default", e.RunningLow = "runningLow", e.LimitReached = "limitReached", e;
24
- }({}), C = {
11
+ }({}), g = {
25
12
  card: "_card_97w0r_1",
26
13
  title: "_title_97w0r_5",
27
14
  secondaryAmount: "_secondaryAmount_97w0r_9",
@@ -37,84 +24,84 @@ var h = Object.defineProperty, g = Object.getOwnPropertyDescriptor, _ = Object.g
37
24
  defaultBadge: "_defaultBadge_97w0r_54",
38
25
  warningBadge: "_warningBadge_97w0r_59",
39
26
  errorBadge: "_errorBadge_97w0r_64"
40
- }, re = (e, t) => {
27
+ }, _ = (e, t) => {
41
28
  switch (e) {
42
- case S.RunningLow: return t.runningLowBadgeLabel;
43
- case S.LimitReached: return t.limitReachedBadgeLabel;
44
- case S.Default: return t.defaultBadgeLabel;
45
- }
46
- }, ie = ({ data: e, labels: t, styles: n }) => {
47
- let { colors: i, typography: s } = n ?? {}, { titleClassName: l = "dial-body-semi-text", amountClassName: p = "dial-display1-text", secondaryAmountClassName: m = "dial-small-text", badgeClassName: h = "dial-caption-lead-semi-text", usedPercentLabelClassName: g = "dial-small-text", resetLabelClassName: _ = "dial-tiny-text" } = s ?? {}, v = r({
48
- "--uld-card-bg": i?.cardBackground,
49
- "--uld-title": i?.titleColor,
50
- "--uld-default-accent": i?.defaultAccentColor,
51
- "--uld-default-progress": i?.defaultProgressColor,
52
- "--uld-warning-accent": i?.warningAccentColor,
53
- "--uld-warning-progress": i?.warningProgressColor,
54
- "--uld-error-accent": i?.errorAccentColor,
55
- "--uld-error-progress": i?.errorProgressColor,
56
- "--uld-secondary-amount": i?.secondaryAmountColor,
57
- "--uld-progress-track": i?.progressTrackColor,
58
- "--uld-default-badge-bg": i?.defaultBadgeBackground,
59
- "--uld-default-badge-text": i?.defaultBadgeColor,
60
- "--uld-warning-badge-bg": i?.warningBadgeBackground,
61
- "--uld-warning-badge-text": i?.warningBadgeColor,
62
- "--uld-error-badge-bg": i?.errorBadgeBackground,
63
- "--uld-error-badge-text": i?.errorBadgeColor,
64
- "--uld-used-percent-label": i?.usedPercentLabelColor
65
- }), ee = re(e.status, t);
66
- return /* @__PURE__ */ f("div", {
67
- className: a("flex min-w-0 flex-col gap-4 rounded-xl px-6 py-5 shadow-md", C.card, x.card),
68
- style: v,
29
+ case h.RunningLow: return t.runningLowBadgeLabel;
30
+ case h.LimitReached: return t.limitReachedBadgeLabel;
31
+ case h.Default: return t.defaultBadgeLabel;
32
+ }
33
+ }, v = ({ data: e, labels: t, styles: n }) => {
34
+ let { colors: o, typography: c } = n ?? {}, { titleClassName: f = "dial-body-semi-text", amountClassName: p = "dial-display1-text", secondaryAmountClassName: v = "dial-small-text", badgeClassName: y = "dial-caption-lead-semi-text", usedPercentLabelClassName: b = "dial-small-text", resetLabelClassName: x = "dial-tiny-text" } = c ?? {}, S = r({
35
+ "--uld-card-bg": o?.cardBackground,
36
+ "--uld-title": o?.titleColor,
37
+ "--uld-default-accent": o?.defaultAccentColor,
38
+ "--uld-default-progress": o?.defaultProgressColor,
39
+ "--uld-warning-accent": o?.warningAccentColor,
40
+ "--uld-warning-progress": o?.warningProgressColor,
41
+ "--uld-error-accent": o?.errorAccentColor,
42
+ "--uld-error-progress": o?.errorProgressColor,
43
+ "--uld-secondary-amount": o?.secondaryAmountColor,
44
+ "--uld-progress-track": o?.progressTrackColor,
45
+ "--uld-default-badge-bg": o?.defaultBadgeBackground,
46
+ "--uld-default-badge-text": o?.defaultBadgeColor,
47
+ "--uld-warning-badge-bg": o?.warningBadgeBackground,
48
+ "--uld-warning-badge-text": o?.warningBadgeColor,
49
+ "--uld-error-badge-bg": o?.errorBadgeBackground,
50
+ "--uld-error-badge-text": o?.errorBadgeColor,
51
+ "--uld-used-percent-label": o?.usedPercentLabelColor
52
+ }), C = _(e.status, t);
53
+ return /* @__PURE__ */ d("div", {
54
+ className: i("flex min-w-0 flex-col gap-4 rounded-xl px-6 py-5 shadow-md", g.card, m.card),
55
+ style: S,
69
56
  role: "group",
70
57
  "aria-label": `${e.title}, ${e.periodDescription}`,
71
- children: [/* @__PURE__ */ f("div", {
58
+ children: [/* @__PURE__ */ d("div", {
72
59
  className: "flex items-center justify-between gap-2",
73
- children: [/* @__PURE__ */ d("p", {
74
- className: a("m-0", l, C.title),
60
+ children: [/* @__PURE__ */ u("p", {
61
+ className: i("m-0", f, g.title),
75
62
  children: e.title
76
- }), /* @__PURE__ */ d("span", {
77
- className: a("shrink-0 rounded-full px-2 py-1", h, e.status === S.Default && C.defaultBadge, e.status === S.RunningLow && C.warningBadge, e.status === S.LimitReached && C.errorBadge),
78
- children: ee
63
+ }), /* @__PURE__ */ u("span", {
64
+ className: i("shrink-0 rounded-full px-2 py-1", y, e.status === h.Default && g.defaultBadge, e.status === h.RunningLow && g.warningBadge, e.status === h.LimitReached && g.errorBadge),
65
+ children: C
79
66
  })]
80
- }), /* @__PURE__ */ f("div", {
67
+ }), /* @__PURE__ */ d("div", {
81
68
  className: "flex flex-col gap-2",
82
69
  children: [
83
- /* @__PURE__ */ f("p", {
70
+ /* @__PURE__ */ d("p", {
84
71
  className: "m-0 flex flex-wrap items-baseline gap-2",
85
- children: [/* @__PURE__ */ d("span", {
86
- className: a(p, C.amount, e.status === S.Default && C.defaultAccent, e.status === S.RunningLow && C.warningAccent, e.status === S.LimitReached && C.errorAccent),
72
+ children: [/* @__PURE__ */ u("span", {
73
+ className: i(p, g.amount, e.status === h.Default && g.defaultAccent, e.status === h.RunningLow && g.warningAccent, e.status === h.LimitReached && g.errorAccent),
87
74
  children: e.usedLabel
88
- }), !e.isUnlimited && e.totalLabel != null && /* @__PURE__ */ d("span", {
89
- className: a(m, C.secondaryAmount),
75
+ }), !e.isUnlimited && e.totalLabel != null && /* @__PURE__ */ u("span", {
76
+ className: i(v, g.secondaryAmount),
90
77
  children: t.usedOfTotalLabel({ total: e.totalLabel })
91
78
  })]
92
79
  }),
93
- !e.isUnlimited && e.usedPercent != null && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(c, {
80
+ !e.isUnlimited && e.usedPercent != null && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(s, {
94
81
  value: Math.min(e.usedPercent, 100),
95
82
  max: 100,
96
- size: o.Small,
97
- className: a("!h-1 w-full", C.progressTrack, e.status === S.Default && C.progressFillDefault, e.status === S.RunningLow && C.progressFillWarning, e.status === S.LimitReached && C.progressFillDanger),
83
+ size: a.Small,
84
+ className: i("!h-1 w-full", g.progressTrack, e.status === h.Default && g.progressFillDefault, e.status === h.RunningLow && g.progressFillWarning, e.status === h.LimitReached && g.progressFillDanger),
98
85
  "aria-label": e.title,
99
86
  "aria-valuetext": e.progressAriaLabel
100
- }), /* @__PURE__ */ f("div", {
87
+ }), /* @__PURE__ */ d("div", {
101
88
  className: "flex items-center justify-between gap-2",
102
- children: [e.remainingLabel != null && /* @__PURE__ */ d("span", {
103
- className: a(m, C.secondaryAmount),
89
+ children: [e.remainingLabel != null && /* @__PURE__ */ u("span", {
90
+ className: i(v, g.secondaryAmount),
104
91
  children: t.remainingCaptionLabel({ remaining: e.remainingLabel })
105
- }), /* @__PURE__ */ d("span", {
106
- className: a("ms-auto", g, C.usedPercentLabel),
92
+ }), /* @__PURE__ */ u("span", {
93
+ className: i("ms-auto", b, g.usedPercentLabel),
107
94
  children: t.usedPercentLabel({ percent: Math.min(Math.round(e.usedPercent), 100) })
108
95
  })]
109
96
  })] }),
110
- e.resetLabel != null && /* @__PURE__ */ f("span", {
97
+ e.resetLabel != null && /* @__PURE__ */ d("span", {
111
98
  className: "contents",
112
- children: [/* @__PURE__ */ d("time", {
99
+ children: [/* @__PURE__ */ u("time", {
113
100
  dateTime: e.resetIsoValue,
114
101
  "aria-hidden": e.resetAriaLabel != null || void 0,
115
- className: a("block break-words", _, C.secondaryAmount),
102
+ className: i("block break-words", x, g.secondaryAmount),
116
103
  children: e.resetLabel
117
- }), e.resetAriaLabel != null && /* @__PURE__ */ d("span", {
104
+ }), e.resetAriaLabel != null && /* @__PURE__ */ u("span", {
118
105
  className: "sr-only",
119
106
  children: e.resetAriaLabel
120
107
  })]
@@ -122,19 +109,19 @@ var h = Object.defineProperty, g = Object.getOwnPropertyDescriptor, _ = Object.g
122
109
  ]
123
110
  })]
124
111
  });
125
- }, ae = ({ cards: e, labels: t, styles: n }) => e.length === 0 ? null : /* @__PURE__ */ d("div", {
126
- className: a("grid grid-cols-1 gap-4 desktop:grid-cols-[repeat(var(--uld-card-count),minmax(0,1fr))]", x.cardGroup),
112
+ }, y = ({ cards: e, labels: t, styles: n }) => e.length === 0 ? null : /* @__PURE__ */ u("div", {
113
+ className: i("grid grid-cols-1 gap-4 desktop:grid-cols-[repeat(var(--uld-card-count),minmax(0,1fr))]", m.cardGroup),
127
114
  style: { "--uld-card-count": e.length },
128
- children: e.map((e) => /* @__PURE__ */ d(ie, {
115
+ children: e.map((e) => /* @__PURE__ */ u(v, {
129
116
  data: e,
130
117
  labels: t,
131
118
  styles: n
132
119
  }, e.title))
133
- }), w = /* @__PURE__ */ function(e) {
120
+ }), b = /* @__PURE__ */ function(e) {
134
121
  return e.WithinLimits = "within-limits", e.RunningLow = "running-low", e.LimitReached = "limit-reached", e.NoLimit = "no-limit", e.Unavailable = "unavailable", e;
135
- }({}), T = /* @__PURE__ */ function(e) {
122
+ }({}), x = /* @__PURE__ */ function(e) {
136
123
  return e.Finite = "finite", e.Unlimited = "unlimited", e.Unavailable = "unavailable", e;
137
- }({}), E = {
124
+ }({}), S = {
138
125
  container: "_container_jkj20_1",
139
126
  heading: "_heading_jkj20_5",
140
127
  headingCount: "_headingCount_jkj20_9",
@@ -157,70 +144,70 @@ var h = Object.defineProperty, g = Object.getOwnPropertyDescriptor, _ = Object.g
157
144
  warningBadge: "_warningBadge_jkj20_87",
158
145
  errorBadge: "_errorBadge_jkj20_92",
159
146
  neutralStatus: "_neutralStatus_jkj20_97"
160
- }, oe = (e) => {
147
+ }, C = (e) => {
161
148
  switch (e) {
162
- case w.RunningLow: return E.progressFillWarning;
163
- case w.LimitReached: return E.progressFillError;
164
- default: return E.progressFillDefault;
149
+ case b.RunningLow: return S.progressFillWarning;
150
+ case b.LimitReached: return S.progressFillError;
151
+ default: return S.progressFillDefault;
165
152
  }
166
- }, se = ({ cell: e, label: t, progressAriaLabel: n, showProgress: r, labels: i, typography: s }) => {
167
- let { valueClassName: l = "dial-small-text", secondaryValueClassName: u = "dial-tiny-text" } = s, p = /* @__PURE__ */ d("span", {
168
- className: a(l, E.value),
153
+ }, w = ({ cell: e, label: t, progressAriaLabel: n, showProgress: r, labels: o, typography: c }) => {
154
+ let { valueClassName: l = "dial-small-text", secondaryValueClassName: f = "dial-tiny-text" } = c, p = /* @__PURE__ */ u("span", {
155
+ className: i(l, S.value),
169
156
  children: e.usedLabel
170
157
  });
171
- return /* @__PURE__ */ f("div", {
158
+ return /* @__PURE__ */ d("div", {
172
159
  className: "flex min-w-0 flex-col gap-1",
173
160
  children: [
174
- /* @__PURE__ */ f("span", {
161
+ /* @__PURE__ */ d("span", {
175
162
  className: "sr-only",
176
163
  children: [t, ": "]
177
164
  }),
178
- e.kind === T.Unlimited && /* @__PURE__ */ d("div", {
165
+ e.kind === x.Unlimited && /* @__PURE__ */ u("div", {
179
166
  className: "flex min-w-0 items-start gap-2",
180
167
  role: "group",
181
168
  "aria-label": n,
182
- children: /* @__PURE__ */ f("div", {
169
+ children: /* @__PURE__ */ d("div", {
183
170
  className: "flex min-w-0 flex-col gap-1",
184
- children: [p, /* @__PURE__ */ d("span", {
185
- className: a(u, E.secondaryValue),
186
- children: e.supportingLabel ?? i.noLimitLabel
171
+ children: [p, /* @__PURE__ */ u("span", {
172
+ className: i(f, S.secondaryValue),
173
+ children: e.supportingLabel ?? o.noLimitLabel
187
174
  })]
188
175
  })
189
176
  }),
190
- e.kind === T.Unavailable && /* @__PURE__ */ d("div", {
177
+ e.kind === x.Unavailable && /* @__PURE__ */ u("div", {
191
178
  className: "flex min-w-0 items-baseline gap-2",
192
179
  role: "group",
193
180
  "aria-label": n,
194
- children: /* @__PURE__ */ d("span", {
195
- className: a(u, E.secondaryValue),
196
- children: i.unavailableLabel
181
+ children: /* @__PURE__ */ u("span", {
182
+ className: i(f, S.secondaryValue),
183
+ children: o.unavailableLabel
197
184
  })
198
185
  }),
199
- e.kind === T.Finite && /* @__PURE__ */ f("div", {
186
+ e.kind === x.Finite && /* @__PURE__ */ d("div", {
200
187
  className: "flex min-w-0 flex-col gap-2",
201
- children: [/* @__PURE__ */ d("div", {
188
+ children: [/* @__PURE__ */ u("div", {
202
189
  className: "flex min-w-0 items-baseline gap-2",
203
190
  role: "group",
204
191
  "aria-label": n,
205
- children: /* @__PURE__ */ f("div", {
192
+ children: /* @__PURE__ */ d("div", {
206
193
  className: "flex min-w-0 items-baseline gap-1 whitespace-nowrap",
207
- children: [p, /* @__PURE__ */ f("span", {
208
- className: a(l, E.secondaryValue),
194
+ children: [p, /* @__PURE__ */ d("span", {
195
+ className: i(l, S.secondaryValue),
209
196
  children: ["/ ", e.totalLabel]
210
197
  })]
211
198
  })
212
- }), r && /* @__PURE__ */ d(c, {
199
+ }), r && /* @__PURE__ */ u(s, {
213
200
  value: Math.min(e.usedPercent ?? 0, 100),
214
201
  max: 100,
215
- size: o.Small,
216
- className: a("!h-1 w-full", E.progressTrack, oe(e.status)),
202
+ size: a.Small,
203
+ className: i("!h-1 w-full", S.progressTrack, C(e.status)),
217
204
  "aria-label": n,
218
205
  "aria-valuetext": e.ariaLabel
219
206
  })]
220
207
  })
221
208
  ]
222
209
  });
223
- }, ce = {
210
+ }, T = {
224
211
  outline: {
225
212
  xmlns: "http://www.w3.org/2000/svg",
226
213
  width: 24,
@@ -240,10 +227,10 @@ var h = Object.defineProperty, g = Object.getOwnPropertyDescriptor, _ = Object.g
240
227
  fill: "currentColor",
241
228
  stroke: "none"
242
229
  }
243
- }, le = (e, t, n, r) => {
244
- let i = m(({ color: n = "currentColor", size: i = 24, stroke: a = 2, title: o, className: s, children: c, ...l }, u) => p("svg", {
230
+ }, E = (e, t, n, r) => {
231
+ let i = p(({ color: n = "currentColor", size: i = 24, stroke: a = 2, title: o, className: s, children: c, ...l }, u) => f("svg", {
245
232
  ref: u,
246
- ...ce[e],
233
+ ...T[e],
247
234
  width: i,
248
235
  height: i,
249
236
  className: [
@@ -257,114 +244,114 @@ var h = Object.defineProperty, g = Object.getOwnPropertyDescriptor, _ = Object.g
257
244
  },
258
245
  ...l
259
246
  }, [
260
- o && p("title", { key: "svg-title" }, o),
261
- ...r.map(([e, t]) => p(e, t)),
247
+ o && f("title", { key: "svg-title" }, o),
248
+ ...r.map(([e, t]) => f(e, t)),
262
249
  ...Array.isArray(c) ? c : [c]
263
250
  ]));
264
251
  return i.displayName = `${n}`, i;
265
- }, ue = le("filled", "alert-circle-filled", "AlertCircleFilled", [["path", {
252
+ }, D = E("filled", "alert-circle-filled", "AlertCircleFilled", [["path", {
266
253
  d: "M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm.01 13l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -8a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",
267
254
  key: "svg-0"
268
- }]]), de = le("filled", "alert-triangle-filled", "AlertTriangleFilled", [["path", {
255
+ }]]), O = E("filled", "alert-triangle-filled", "AlertTriangleFilled", [["path", {
269
256
  d: "M12 1.67c.955 0 1.845 .467 2.39 1.247l.105 .16l8.114 13.548a2.914 2.914 0 0 1 -2.307 4.363l-.195 .008h-16.225a2.914 2.914 0 0 1 -2.582 -4.2l.099 -.185l8.11 -13.538a2.914 2.914 0 0 1 2.491 -1.403zm.01 13.33l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007zm-.01 -7a1 1 0 0 0 -.993 .883l-.007 .117v4l.007 .117a1 1 0 0 0 1.986 0l.007 -.117v-4l-.007 -.117a1 1 0 0 0 -.993 -.883z",
270
257
  key: "svg-0"
271
- }]]), fe = ({ periodStatus: e }) => {
258
+ }]]), k = ({ periodStatus: e }) => {
272
259
  let { status: t, tooltipLabel: n } = e;
273
- if (n == null || t !== w.RunningLow && t !== w.LimitReached) return null;
274
- let r = t === w.LimitReached ? ue : de;
275
- return /* @__PURE__ */ d(l, {
260
+ if (n == null || t !== b.RunningLow && t !== b.LimitReached) return null;
261
+ let r = t === b.LimitReached ? D : O;
262
+ return /* @__PURE__ */ u(c, {
276
263
  tooltip: n,
277
264
  asChild: !0,
278
- children: /* @__PURE__ */ d("span", {
265
+ children: /* @__PURE__ */ u("span", {
279
266
  role: "img",
280
267
  "aria-label": n,
281
268
  tabIndex: 0,
282
- className: a("inline-flex size-11 shrink-0 items-center justify-center desktop:size-4", t === w.LimitReached ? E.errorIndicator : E.warningIndicator),
283
- children: /* @__PURE__ */ d(r, {
269
+ className: i("inline-flex size-11 shrink-0 items-center justify-center desktop:size-4", t === b.LimitReached ? S.errorIndicator : S.warningIndicator),
270
+ children: /* @__PURE__ */ u(r, {
284
271
  "aria-hidden": !0,
285
272
  size: 16
286
273
  })
287
274
  })
288
275
  });
289
- }, pe = ({ cell: e, label: t, unavailableLabel: n, typography: r }) => {
290
- let { secondaryValueClassName: i = "dial-tiny-text" } = r, o = e.kind === T.Unavailable;
291
- return /* @__PURE__ */ f("div", {
276
+ }, A = ({ cell: e, label: t, unavailableLabel: n, typography: r }) => {
277
+ let { secondaryValueClassName: a = "dial-tiny-text" } = r, o = e.kind === x.Unavailable;
278
+ return /* @__PURE__ */ d("div", {
292
279
  className: "flex min-w-0 items-baseline gap-1",
293
- children: [/* @__PURE__ */ f("span", {
280
+ children: [/* @__PURE__ */ d("span", {
294
281
  className: "sr-only",
295
282
  children: [t, ": "]
296
- }), /* @__PURE__ */ d("span", {
297
- className: a("min-w-0 break-words", i, E.secondaryValue),
283
+ }), /* @__PURE__ */ u("span", {
284
+ className: i("min-w-0 break-words", a, S.secondaryValue),
298
285
  title: o ? n : e.usedLabel,
299
286
  children: o ? n : e.usedLabel
300
287
  })]
301
288
  });
302
- }, D = ({ cell: e, periodLabel: t, periodStatus: n, labels: r, typography: i, resetLabelClassName: o }) => /* @__PURE__ */ f("div", {
289
+ }, j = ({ cell: e, periodLabel: t, periodStatus: n, labels: r, typography: a, resetLabelClassName: o }) => /* @__PURE__ */ d("div", {
303
290
  role: "cell",
304
291
  className: "flex min-w-0 flex-col gap-2 py-2 desktop:py-0",
305
292
  children: [
306
- /* @__PURE__ */ f("div", {
307
- className: a("dial-caption-lead-semi-text flex min-h-11 items-center justify-between gap-2 desktop:hidden", E.mobileColumnLabel),
308
- children: [/* @__PURE__ */ f("span", {
293
+ /* @__PURE__ */ d("div", {
294
+ className: i("dial-caption-lead-semi-text flex min-h-11 items-center justify-between gap-2 desktop:hidden", S.mobileColumnLabel),
295
+ children: [/* @__PURE__ */ d("span", {
309
296
  className: "flex min-w-0 flex-col",
310
- children: [/* @__PURE__ */ d("span", { children: t }), n.resetLabel != null && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("time", {
297
+ children: [/* @__PURE__ */ u("span", { children: t }), n.resetLabel != null && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("time", {
311
298
  dateTime: n.resetIsoValue,
312
299
  "aria-hidden": n.resetAriaLabel != null || void 0,
313
- className: a("block break-words", o, E.secondaryValue),
300
+ className: i("block break-words", o, S.secondaryValue),
314
301
  children: n.resetLabel
315
- }), n.resetAriaLabel != null && /* @__PURE__ */ d("span", {
302
+ }), n.resetAriaLabel != null && /* @__PURE__ */ u("span", {
316
303
  className: "sr-only",
317
304
  children: n.resetAriaLabel
318
305
  })] })]
319
- }), /* @__PURE__ */ d(fe, { periodStatus: n })]
306
+ }), /* @__PURE__ */ u(k, { periodStatus: n })]
320
307
  }),
321
- /* @__PURE__ */ d(se, {
308
+ /* @__PURE__ */ u(w, {
322
309
  cell: e.tokens,
323
310
  label: r.tokensLabel,
324
311
  progressAriaLabel: `${t} ${r.tokensLabel}`,
325
312
  showProgress: !0,
326
313
  labels: r,
327
- typography: i
314
+ typography: a
328
315
  }),
329
- /* @__PURE__ */ d(pe, {
316
+ /* @__PURE__ */ u(A, {
330
317
  cell: e.cost,
331
318
  label: r.costLabel,
332
319
  unavailableLabel: r.unavailableLabel,
333
- typography: i
320
+ typography: a
334
321
  })
335
322
  ]
336
- }), me = "desktop:grid-cols-[minmax(12rem,1.25fr)_repeat(3,minmax(0,1fr))_minmax(8rem,10rem)]", he = (e) => {
323
+ }), M = "desktop:grid-cols-[minmax(12rem,1.25fr)_repeat(3,minmax(0,1fr))_minmax(8rem,10rem)]", N = (e) => {
337
324
  switch (e) {
338
- case w.WithinLimits: return E.defaultBadge;
339
- case w.RunningLow: return E.warningBadge;
340
- case w.LimitReached: return E.errorBadge;
341
- case w.NoLimit:
342
- case w.Unavailable: return;
325
+ case b.WithinLimits: return S.defaultBadge;
326
+ case b.RunningLow: return S.warningBadge;
327
+ case b.LimitReached: return S.errorBadge;
328
+ case b.NoLimit:
329
+ case b.Unavailable: return;
343
330
  }
344
- }, ge = (e, t) => {
331
+ }, P = (e, t) => {
345
332
  switch (e) {
346
- case w.WithinLimits: return t.withinLimitsBadgeLabel;
347
- case w.RunningLow: return t.runningLowBadgeLabel;
348
- case w.LimitReached: return t.limitReachedBadgeLabel;
349
- case w.NoLimit: return t.noLimitBadgeLabel;
350
- case w.Unavailable: return t.unavailableBadgeLabel;
351
- }
352
- }, _e = ({ row: n, labels: r, periodStatuses: i, typography: o, avatarSize: c }) => {
353
- let { nameClassName: l = "dial-small-semi-text", modelTypeClassName: u = "dial-caption-lead-semi-text", versionClassName: p = "dial-small-text", valueClassName: m = "dial-small-text", badgeClassName: h = "dial-caption-lead-semi-text", resetLabelClassName: g = "dial-tiny-text" } = o, _ = n.status !== w.NoLimit && n.status !== w.Unavailable;
354
- return /* @__PURE__ */ f("div", {
333
+ case b.WithinLimits: return t.withinLimitsBadgeLabel;
334
+ case b.RunningLow: return t.runningLowBadgeLabel;
335
+ case b.LimitReached: return t.limitReachedBadgeLabel;
336
+ case b.NoLimit: return t.noLimitBadgeLabel;
337
+ case b.Unavailable: return t.unavailableBadgeLabel;
338
+ }
339
+ }, F = ({ row: n, labels: r, periodStatuses: a, typography: s, avatarSize: c }) => {
340
+ let { nameClassName: l = "dial-small-semi-text", modelTypeClassName: f = "dial-caption-lead-semi-text", versionClassName: p = "dial-small-text", valueClassName: m = "dial-small-text", badgeClassName: h = "dial-caption-lead-semi-text", resetLabelClassName: g = "dial-tiny-text" } = s, _ = n.status !== b.NoLimit && n.status !== b.Unavailable;
341
+ return /* @__PURE__ */ d("div", {
355
342
  role: "row",
356
- className: a("grid grid-cols-1 gap-2 px-4 py-3 desktop:min-h-16 desktop:items-center desktop:gap-4 desktop:px-6", me, E.row),
343
+ className: i("grid grid-cols-1 gap-2 px-4 py-3 desktop:min-h-16 desktop:items-center desktop:gap-4 desktop:px-6", M, S.row),
357
344
  children: [
358
- /* @__PURE__ */ f("div", {
345
+ /* @__PURE__ */ d("div", {
359
346
  role: "cell",
360
347
  className: "flex min-w-0 items-center gap-3 overflow-hidden",
361
- children: [/* @__PURE__ */ d("div", {
348
+ children: [/* @__PURE__ */ u("div", {
362
349
  className: "shrink-0",
363
- children: /* @__PURE__ */ d(e, {
350
+ children: /* @__PURE__ */ u(e, {
364
351
  src: n.avatarSrc,
365
352
  size: c,
366
353
  initialsName: n.name,
367
- fallback: /* @__PURE__ */ d(t, {
354
+ fallback: /* @__PURE__ */ u(t, {
368
355
  name: n.name,
369
356
  size: c,
370
357
  className: "!rounded-xl",
@@ -372,84 +359,84 @@ var h = Object.defineProperty, g = Object.getOwnPropertyDescriptor, _ = Object.g
372
359
  }),
373
360
  styles: { badgeClassName: "!rounded-xl" }
374
361
  })
375
- }), /* @__PURE__ */ f("div", {
362
+ }), /* @__PURE__ */ d("div", {
376
363
  className: "flex min-w-0 flex-1 flex-col gap-0.5 overflow-hidden",
377
- children: [/* @__PURE__ */ d("span", {
378
- className: a(u, E.modelType),
364
+ children: [/* @__PURE__ */ u("span", {
365
+ className: i(f, S.modelType),
379
366
  children: r.modelTypeLabel
380
- }), /* @__PURE__ */ f("div", {
367
+ }), /* @__PURE__ */ d("div", {
381
368
  className: "flex min-w-0 items-center gap-1 overflow-hidden",
382
- children: [/* @__PURE__ */ d("span", {
383
- className: a("min-w-0 flex-1 truncate", l, E.name),
369
+ children: [/* @__PURE__ */ u("span", {
370
+ className: i("min-w-0 flex-1 truncate", l, S.name),
384
371
  title: n.name,
385
372
  children: n.name
386
- }), n.version != null && /* @__PURE__ */ d(s, {
373
+ }), n.version != null && /* @__PURE__ */ u(o, {
387
374
  text: n.version,
388
- className: a("max-w-[30%] shrink-0", p, E.version)
375
+ className: i("max-w-[30%] shrink-0", p, S.version)
389
376
  })]
390
377
  })]
391
378
  })]
392
379
  }),
393
- /* @__PURE__ */ d(D, {
380
+ /* @__PURE__ */ u(j, {
394
381
  cell: n.day,
395
382
  periodLabel: r.dayColumnLabel,
396
- periodStatus: i.day,
383
+ periodStatus: a.day,
397
384
  labels: r,
398
- typography: o,
385
+ typography: s,
399
386
  resetLabelClassName: g
400
387
  }),
401
- /* @__PURE__ */ d(D, {
388
+ /* @__PURE__ */ u(j, {
402
389
  cell: n.week,
403
390
  periodLabel: r.weekColumnLabel,
404
- periodStatus: i.week,
391
+ periodStatus: a.week,
405
392
  labels: r,
406
- typography: o,
393
+ typography: s,
407
394
  resetLabelClassName: g
408
395
  }),
409
- /* @__PURE__ */ d(D, {
396
+ /* @__PURE__ */ u(j, {
410
397
  cell: n.month,
411
398
  periodLabel: r.monthColumnLabel,
412
- periodStatus: i.month,
399
+ periodStatus: a.month,
413
400
  labels: r,
414
- typography: o,
401
+ typography: s,
415
402
  resetLabelClassName: g
416
403
  }),
417
- /* @__PURE__ */ f("div", {
404
+ /* @__PURE__ */ d("div", {
418
405
  role: "cell",
419
406
  className: "flex min-w-0 flex-col gap-2 py-2 desktop:py-0",
420
- children: [/* @__PURE__ */ d("span", {
421
- className: a("dial-caption-lead-semi-text block desktop:hidden", E.mobileColumnLabel),
407
+ children: [/* @__PURE__ */ u("span", {
408
+ className: i("dial-caption-lead-semi-text block desktop:hidden", S.mobileColumnLabel),
422
409
  children: r.statusColumnLabel
423
- }), _ ? /* @__PURE__ */ d("span", {
424
- className: a("inline-flex h-6 shrink-0 items-center self-start rounded-full px-2", h, he(n.status)),
425
- children: ge(n.status, r)
426
- }) : /* @__PURE__ */ d("span", {
427
- className: a(m, E.neutralStatus),
428
- children: ge(n.status, r)
410
+ }), _ ? /* @__PURE__ */ u("span", {
411
+ className: i("inline-flex h-6 shrink-0 items-center self-start rounded-full px-2", h, N(n.status)),
412
+ children: P(n.status, r)
413
+ }) : /* @__PURE__ */ u("span", {
414
+ className: i(m, S.neutralStatus),
415
+ children: P(n.status, r)
429
416
  })]
430
417
  })
431
418
  ]
432
419
  });
433
- }, ve = 40, O = ({ label: e, periodStatus: t, className: n, resetLabelClassName: r }) => /* @__PURE__ */ f("span", {
420
+ }, I = 40, L = ({ label: e, periodStatus: t, className: n, resetLabelClassName: r }) => /* @__PURE__ */ d("span", {
434
421
  role: "columnheader",
435
- className: a("flex min-w-0 items-center justify-between gap-2", n, E.columnHeader),
436
- children: [/* @__PURE__ */ f("span", {
422
+ className: i("flex min-w-0 items-center justify-between gap-2", n, S.columnHeader),
423
+ children: [/* @__PURE__ */ d("span", {
437
424
  className: "flex min-w-0 flex-col",
438
- children: [/* @__PURE__ */ d("span", {
425
+ children: [/* @__PURE__ */ u("span", {
439
426
  className: "min-w-0 truncate",
440
427
  children: e
441
- }), t.resetLabel != null && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("time", {
428
+ }), t.resetLabel != null && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("time", {
442
429
  dateTime: t.resetIsoValue,
443
430
  "aria-hidden": t.resetAriaLabel != null || void 0,
444
- className: a("block break-words", r, E.secondaryValue),
431
+ className: i("block break-words", r, S.secondaryValue),
445
432
  children: t.resetLabel
446
- }), t.resetAriaLabel != null && /* @__PURE__ */ d("span", {
433
+ }), t.resetAriaLabel != null && /* @__PURE__ */ u("span", {
447
434
  className: "sr-only",
448
435
  children: t.resetAriaLabel
449
436
  })] })]
450
- }), /* @__PURE__ */ d(fe, { periodStatus: t })]
451
- }), ye = ({ rows: e, labels: t, periodStatuses: i, styles: o }) => {
452
- let { colors: s, typography: c = {} } = o ?? {}, { headingClassName: l = "dial-body-semi-text", headingCountClassName: p = "dial-tiny-semi-text", columnHeaderClassName: m = "dial-caption-lead-semi-text", resetLabelClassName: h = "dial-tiny-text" } = c, g = r({
437
+ }), /* @__PURE__ */ u(k, { periodStatus: t })]
438
+ }), R = ({ rows: e, labels: t, periodStatuses: a, styles: o }) => {
439
+ let { colors: s, typography: c = {} } = o ?? {}, { headingClassName: f = "dial-body-semi-text", headingCountClassName: p = "dial-tiny-semi-text", columnHeaderClassName: m = "dial-caption-lead-semi-text", resetLabelClassName: h = "dial-tiny-text" } = c, g = r({
453
440
  "--mls-container-bg": s?.containerBackground,
454
441
  "--mls-heading": s?.headingColor,
455
442
  "--mls-heading-count": s?.headingCountColor,
@@ -474,3388 +461,73 @@ var h = Object.defineProperty, g = Object.getOwnPropertyDescriptor, _ = Object.g
474
461
  "--mls-badge-error-text": s?.errorBadgeColor,
475
462
  "--mls-badge-neutral-text": s?.neutralBadgeColor
476
463
  }), _ = `${t.headingLabel} ${e.length}`;
477
- return /* @__PURE__ */ f("div", {
464
+ return /* @__PURE__ */ d("div", {
478
465
  className: "flex flex-col gap-4",
479
466
  style: g,
480
- children: [/* @__PURE__ */ d("div", {
467
+ children: [/* @__PURE__ */ u("div", {
481
468
  className: "flex min-h-10 items-center",
482
- children: /* @__PURE__ */ f("h3", {
469
+ children: /* @__PURE__ */ d("h3", {
483
470
  className: "m-0 flex items-center gap-2",
484
- children: [/* @__PURE__ */ d("span", {
485
- className: a(l, E.heading),
471
+ children: [/* @__PURE__ */ u("span", {
472
+ className: i(f, S.heading),
486
473
  children: t.headingLabel
487
- }), /* @__PURE__ */ d("span", {
488
- className: a(p, E.headingCount),
474
+ }), /* @__PURE__ */ u("span", {
475
+ className: i(p, S.headingCount),
489
476
  children: e.length
490
477
  })]
491
478
  })
492
- }), /* @__PURE__ */ d("div", {
479
+ }), /* @__PURE__ */ u("div", {
493
480
  role: "table",
494
481
  "aria-label": _,
495
- className: a("overflow-hidden rounded-xl shadow-md", E.container),
496
- children: e.length === 0 ? /* @__PURE__ */ d("div", {
482
+ className: i("overflow-hidden rounded-xl shadow-md", S.container),
483
+ children: e.length === 0 ? /* @__PURE__ */ u("div", {
497
484
  className: "flex items-center justify-center px-6 py-10",
498
- children: /* @__PURE__ */ d(n, { label: t.emptyStateLabel })
499
- }) : /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f("div", {
485
+ children: /* @__PURE__ */ u(n, { label: t.emptyStateLabel })
486
+ }) : /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ d("div", {
500
487
  role: "row",
501
- className: a("hidden gap-4 px-6 py-3 desktop:grid desktop:items-center", me, E.headerRow),
488
+ className: i("hidden gap-4 px-6 py-3 desktop:grid desktop:items-center", M, S.headerRow),
502
489
  children: [
503
- /* @__PURE__ */ d("span", {
490
+ /* @__PURE__ */ u("span", {
504
491
  role: "columnheader",
505
- className: a(m, E.columnHeader),
492
+ className: i(m, S.columnHeader),
506
493
  children: t.itemColumnLabel
507
494
  }),
508
- /* @__PURE__ */ d(O, {
495
+ /* @__PURE__ */ u(L, {
509
496
  label: t.dayColumnLabel,
510
- periodStatus: i.day,
497
+ periodStatus: a.day,
511
498
  className: m,
512
499
  resetLabelClassName: h
513
500
  }),
514
- /* @__PURE__ */ d(O, {
501
+ /* @__PURE__ */ u(L, {
515
502
  label: t.weekColumnLabel,
516
- periodStatus: i.week,
503
+ periodStatus: a.week,
517
504
  className: m,
518
505
  resetLabelClassName: h
519
506
  }),
520
- /* @__PURE__ */ d(O, {
507
+ /* @__PURE__ */ u(L, {
521
508
  label: t.monthColumnLabel,
522
- periodStatus: i.month,
509
+ periodStatus: a.month,
523
510
  className: m,
524
511
  resetLabelClassName: h
525
512
  }),
526
- /* @__PURE__ */ d("span", {
513
+ /* @__PURE__ */ u("span", {
527
514
  role: "columnheader",
528
- className: a(m, E.columnHeader),
515
+ className: i(m, S.columnHeader),
529
516
  children: t.statusColumnLabel
530
517
  })
531
518
  ]
532
- }), /* @__PURE__ */ d("div", {
519
+ }), /* @__PURE__ */ u("div", {
533
520
  role: "rowgroup",
534
- children: e.map((e) => /* @__PURE__ */ d(_e, {
521
+ children: e.map((e) => /* @__PURE__ */ u(F, {
535
522
  row: e,
536
523
  labels: t,
537
- periodStatuses: i,
524
+ periodStatuses: a,
538
525
  typography: c,
539
- avatarSize: ve
526
+ avatarSize: I
540
527
  }, e.id))
541
528
  })] })
542
529
  })]
543
530
  });
544
- }, be = 2 ** 53, xe = 75, Se = (e) => e != null && Number.isFinite(e.total) && Number.isFinite(e.used), Ce = (e) => e >= 100 ? S.LimitReached : e >= xe ? S.RunningLow : S.Default, we = (e) => e ? {
545
- resetLabel: e.label,
546
- resetIsoValue: e.isoValue,
547
- resetAriaLabel: e.ariaLabel
548
- } : {}, Te = (e, t, n, r, a) => {
549
- let o = Math.max(0, e.used), s = i(o), c = we(a);
550
- if (e.total >= be) return {
551
- title: t,
552
- periodDescription: n,
553
- used: o,
554
- total: e.total,
555
- usedLabel: s,
556
- isUnlimited: !0,
557
- status: S.Default,
558
- progressAriaLabel: r(k.unlimitedProgressAriaLabel, { used: s }),
559
- ...c
560
- };
561
- let l = Math.max(e.total, 0), u = Math.max(l - o, 0), d = l > 0 ? o / l * 100 : 100, f = i(l);
562
- return {
563
- title: t,
564
- periodDescription: n,
565
- used: o,
566
- total: l,
567
- usedLabel: s,
568
- totalLabel: f,
569
- remainingLabel: i(u),
570
- usedPercent: d,
571
- status: Ce(d),
572
- progressAriaLabel: r(k.progressAriaLabel, {
573
- used: s,
574
- total: f,
575
- percent: Math.round(d)
576
- }),
577
- ...c
578
- };
579
- }, k = {
580
- todayTitle: "usage.todayTitle",
581
- todayPeriodDescription: "usage.todayPeriodDescription",
582
- thisWeekTitle: "usage.thisWeekTitle",
583
- thisWeekPeriodDescription: "usage.thisWeekPeriodDescription",
584
- thisMonthTitle: "usage.thisMonthTitle",
585
- thisMonthPeriodDescription: "usage.thisMonthPeriodDescription",
586
- unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel",
587
- progressAriaLabel: "usage.progressAriaLabel"
588
- }, Ee = (e, t, n) => [
589
- {
590
- stats: e?.dayCostStats,
591
- titleKey: k.todayTitle,
592
- periodDescriptionKey: k.todayPeriodDescription
593
- },
594
- {
595
- stats: e?.weekCostStats,
596
- titleKey: k.thisWeekTitle,
597
- periodDescriptionKey: k.thisWeekPeriodDescription
598
- },
599
- {
600
- stats: e?.monthCostStats,
601
- titleKey: k.thisMonthTitle,
602
- periodDescriptionKey: k.thisMonthPeriodDescription
603
- }
604
- ].flatMap(({ stats: e, titleKey: r, periodDescriptionKey: i }) => Se(e) ? [Te(e, t(r), t(i), t, n(e.resetsAt))] : []), A = /* @__PURE__ */ te({
605
- __addDisposableResource: () => qe,
606
- __assign: () => z,
607
- __asyncDelegator: () => ze,
608
- __asyncGenerator: () => Re,
609
- __asyncValues: () => Be,
610
- __await: () => L,
611
- __awaiter: () => Me,
612
- __classPrivateFieldGet: () => We,
613
- __classPrivateFieldIn: () => Ke,
614
- __classPrivateFieldSet: () => Ge,
615
- __createBinding: () => B,
616
- __decorate: () => N,
617
- __disposeResources: () => Je,
618
- __esDecorate: () => De,
619
- __exportStar: () => Pe,
620
- __extends: () => j,
621
- __generator: () => Ne,
622
- __importDefault: () => Ue,
623
- __importStar: () => He,
624
- __makeTemplateObject: () => Ve,
625
- __metadata: () => je,
626
- __param: () => P,
627
- __propKey: () => ke,
628
- __read: () => I,
629
- __rest: () => M,
630
- __rewriteRelativeImportExtension: () => Ye,
631
- __runInitializers: () => Oe,
632
- __setFunctionName: () => Ae,
633
- __spread: () => Fe,
634
- __spreadArray: () => Le,
635
- __spreadArrays: () => Ie,
636
- __values: () => F,
637
- default: () => Qe
638
- });
639
- function j(e, t) {
640
- if (typeof t != "function" && t !== null) throw TypeError("Class extends value " + String(t) + " is not a constructor or null");
641
- R(e, t);
642
- function n() {
643
- this.constructor = e;
644
- }
645
- e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
646
- }
647
- function M(e, t) {
648
- var n = {};
649
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
650
- if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
651
- return n;
652
- }
653
- function N(e, t, n, r) {
654
- var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
655
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
656
- else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
657
- return i > 3 && a && Object.defineProperty(t, n, a), a;
658
- }
659
- function P(e, t) {
660
- return function(n, r) {
661
- t(n, r, e);
662
- };
663
- }
664
- function De(e, t, n, r, i, a) {
665
- function o(e) {
666
- if (e !== void 0 && typeof e != "function") throw TypeError("Function expected");
667
- return e;
668
- }
669
- for (var s = r.kind, c = s === "getter" ? "get" : s === "setter" ? "set" : "value", l = !t && e ? r.static ? e : e.prototype : null, u = t || (l ? Object.getOwnPropertyDescriptor(l, r.name) : {}), d, f = !1, p = n.length - 1; p >= 0; p--) {
670
- var m = {};
671
- for (var h in r) m[h] = h === "access" ? {} : r[h];
672
- for (var h in r.access) m.access[h] = r.access[h];
673
- m.addInitializer = function(e) {
674
- if (f) throw TypeError("Cannot add initializers after decoration has completed");
675
- a.push(o(e || null));
676
- };
677
- var g = (0, n[p])(s === "accessor" ? {
678
- get: u.get,
679
- set: u.set
680
- } : u[c], m);
681
- if (s === "accessor") {
682
- if (g === void 0) continue;
683
- if (typeof g != "object" || !g) throw TypeError("Object expected");
684
- (d = o(g.get)) && (u.get = d), (d = o(g.set)) && (u.set = d), (d = o(g.init)) && i.unshift(d);
685
- } else (d = o(g)) && (s === "field" ? i.unshift(d) : u[c] = d);
686
- }
687
- l && Object.defineProperty(l, r.name, u), f = !0;
688
- }
689
- function Oe(e, t, n) {
690
- for (var r = arguments.length > 2, i = 0; i < t.length; i++) n = r ? t[i].call(e, n) : t[i].call(e);
691
- return r ? n : void 0;
692
- }
693
- function ke(e) {
694
- return typeof e == "symbol" ? e : `${e}`;
695
- }
696
- function Ae(e, t, n) {
697
- return typeof t == "symbol" && (t = t.description ? `[${t.description}]` : ""), Object.defineProperty(e, "name", {
698
- configurable: !0,
699
- value: n ? `${n} ${t}` : t
700
- });
701
- }
702
- function je(e, t) {
703
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
704
- }
705
- function Me(e, t, n, r) {
706
- function i(e) {
707
- return e instanceof n ? e : new n(function(t) {
708
- t(e);
709
- });
710
- }
711
- return new (n ||= Promise)(function(n, a) {
712
- function o(e) {
713
- try {
714
- c(r.next(e));
715
- } catch (e) {
716
- a(e);
717
- }
718
- }
719
- function s(e) {
720
- try {
721
- c(r.throw(e));
722
- } catch (e) {
723
- a(e);
724
- }
725
- }
726
- function c(e) {
727
- e.done ? n(e.value) : i(e.value).then(o, s);
728
- }
729
- c((r = r.apply(e, t || [])).next());
730
- });
731
- }
732
- function Ne(e, t) {
733
- var n = {
734
- label: 0,
735
- sent: function() {
736
- if (a[0] & 1) throw a[1];
737
- return a[1];
738
- },
739
- trys: [],
740
- ops: []
741
- }, r, i, a, o = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
742
- return o.next = s(0), o.throw = s(1), o.return = s(2), typeof Symbol == "function" && (o[Symbol.iterator] = function() {
743
- return this;
744
- }), o;
745
- function s(e) {
746
- return function(t) {
747
- return c([e, t]);
748
- };
749
- }
750
- function c(s) {
751
- if (r) throw TypeError("Generator is already executing.");
752
- for (; o && (o = 0, s[0] && (n = 0)), n;) try {
753
- if (r = 1, i && (a = s[0] & 2 ? i.return : s[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, s[1])).done) return a;
754
- switch (i = 0, a && (s = [s[0] & 2, a.value]), s[0]) {
755
- case 0:
756
- case 1:
757
- a = s;
758
- break;
759
- case 4: return n.label++, {
760
- value: s[1],
761
- done: !1
762
- };
763
- case 5:
764
- n.label++, i = s[1], s = [0];
765
- continue;
766
- case 7:
767
- s = n.ops.pop(), n.trys.pop();
768
- continue;
769
- default:
770
- if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
771
- n = 0;
772
- continue;
773
- }
774
- if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) {
775
- n.label = s[1];
776
- break;
777
- }
778
- if (s[0] === 6 && n.label < a[1]) {
779
- n.label = a[1], a = s;
780
- break;
781
- }
782
- if (a && n.label < a[2]) {
783
- n.label = a[2], n.ops.push(s);
784
- break;
785
- }
786
- a[2] && n.ops.pop(), n.trys.pop();
787
- continue;
788
- }
789
- s = t.call(e, n);
790
- } catch (e) {
791
- s = [6, e], i = 0;
792
- } finally {
793
- r = a = 0;
794
- }
795
- if (s[0] & 5) throw s[1];
796
- return {
797
- value: s[0] ? s[1] : void 0,
798
- done: !0
799
- };
800
- }
801
- }
802
- function Pe(e, t) {
803
- for (var n in e) n !== "default" && !Object.prototype.hasOwnProperty.call(t, n) && B(t, e, n);
804
- }
805
- function F(e) {
806
- var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
807
- if (n) return n.call(e);
808
- if (e && typeof e.length == "number") return { next: function() {
809
- return e && r >= e.length && (e = void 0), {
810
- value: e && e[r++],
811
- done: !e
812
- };
813
- } };
814
- throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
815
- }
816
- function I(e, t) {
817
- var n = typeof Symbol == "function" && e[Symbol.iterator];
818
- if (!n) return e;
819
- var r = n.call(e), i, a = [], o;
820
- try {
821
- for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
822
- } catch (e) {
823
- o = { error: e };
824
- } finally {
825
- try {
826
- i && !i.done && (n = r.return) && n.call(r);
827
- } finally {
828
- if (o) throw o.error;
829
- }
830
- }
831
- return a;
832
- }
833
- function Fe() {
834
- for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(I(arguments[t]));
835
- return e;
836
- }
837
- function Ie() {
838
- for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
839
- for (var r = Array(e), i = 0, t = 0; t < n; t++) for (var a = arguments[t], o = 0, s = a.length; o < s; o++, i++) r[i] = a[o];
840
- return r;
841
- }
842
- function Le(e, t, n) {
843
- if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
844
- return e.concat(a || Array.prototype.slice.call(t));
845
- }
846
- function L(e) {
847
- return this instanceof L ? (this.v = e, this) : new L(e);
848
- }
849
- function Re(e, t, n) {
850
- if (!Symbol.asyncIterator) throw TypeError("Symbol.asyncIterator is not defined.");
851
- var r = n.apply(e, t || []), i, a = [];
852
- return i = Object.create((typeof AsyncIterator == "function" ? AsyncIterator : Object).prototype), s("next"), s("throw"), s("return", o), i[Symbol.asyncIterator] = function() {
853
- return this;
854
- }, i;
855
- function o(e) {
856
- return function(t) {
857
- return Promise.resolve(t).then(e, d);
858
- };
859
- }
860
- function s(e, t) {
861
- r[e] && (i[e] = function(t) {
862
- return new Promise(function(n, r) {
863
- a.push([
864
- e,
865
- t,
866
- n,
867
- r
868
- ]) > 1 || c(e, t);
869
- });
870
- }, t && (i[e] = t(i[e])));
871
- }
872
- function c(e, t) {
873
- try {
874
- l(r[e](t));
875
- } catch (e) {
876
- f(a[0][3], e);
877
- }
878
- }
879
- function l(e) {
880
- e.value instanceof L ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
881
- }
882
- function u(e) {
883
- c("next", e);
884
- }
885
- function d(e) {
886
- c("throw", e);
887
- }
888
- function f(e, t) {
889
- e(t), a.shift(), a.length && c(a[0][0], a[0][1]);
890
- }
891
- }
892
- function ze(e) {
893
- var t, n;
894
- return t = {}, r("next"), r("throw", function(e) {
895
- throw e;
896
- }), r("return"), t[Symbol.iterator] = function() {
897
- return this;
898
- }, t;
899
- function r(r, i) {
900
- t[r] = e[r] ? function(t) {
901
- return (n = !n) ? {
902
- value: L(e[r](t)),
903
- done: !1
904
- } : i ? i(t) : t;
905
- } : i;
906
- }
907
- }
908
- function Be(e) {
909
- if (!Symbol.asyncIterator) throw TypeError("Symbol.asyncIterator is not defined.");
910
- var t = e[Symbol.asyncIterator], n;
911
- return t ? t.call(e) : (e = typeof F == "function" ? F(e) : e[Symbol.iterator](), n = {}, r("next"), r("throw"), r("return"), n[Symbol.asyncIterator] = function() {
912
- return this;
913
- }, n);
914
- function r(t) {
915
- n[t] = e[t] && function(n) {
916
- return new Promise(function(r, a) {
917
- n = e[t](n), i(r, a, n.done, n.value);
918
- });
919
- };
920
- }
921
- function i(e, t, n, r) {
922
- Promise.resolve(r).then(function(t) {
923
- e({
924
- value: t,
925
- done: n
926
- });
927
- }, t);
928
- }
929
- }
930
- function Ve(e, t) {
931
- return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
932
- }
933
- function He(e) {
934
- if (e && e.__esModule) return e;
935
- var t = {};
936
- if (e != null) for (var n = V(e), r = 0; r < n.length; r++) n[r] !== "default" && B(t, e, n[r]);
937
- return Xe(t, e), t;
938
- }
939
- function Ue(e) {
940
- return e && e.__esModule ? e : { default: e };
941
- }
942
- function We(e, t, n, r) {
943
- if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
944
- if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw TypeError("Cannot read private member from an object whose class did not declare it");
945
- return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
946
- }
947
- function Ge(e, t, n, r, i) {
948
- if (r === "m") throw TypeError("Private method is not writable");
949
- if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
950
- if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw TypeError("Cannot write private member to an object whose class did not declare it");
951
- return r === "a" ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
952
- }
953
- function Ke(e, t) {
954
- if (t === null || typeof t != "object" && typeof t != "function") throw TypeError("Cannot use 'in' operator on non-object");
955
- return typeof e == "function" ? t === e : e.has(t);
956
- }
957
- function qe(e, t, n) {
958
- if (t != null) {
959
- if (typeof t != "object" && typeof t != "function") throw TypeError("Object expected.");
960
- var r, i;
961
- if (n) {
962
- if (!Symbol.asyncDispose) throw TypeError("Symbol.asyncDispose is not defined.");
963
- r = t[Symbol.asyncDispose];
964
- }
965
- if (r === void 0) {
966
- if (!Symbol.dispose) throw TypeError("Symbol.dispose is not defined.");
967
- r = t[Symbol.dispose], n && (i = r);
968
- }
969
- if (typeof r != "function") throw TypeError("Object not disposable.");
970
- i && (r = function() {
971
- try {
972
- i.call(this);
973
- } catch (e) {
974
- return Promise.reject(e);
975
- }
976
- }), e.stack.push({
977
- value: t,
978
- dispose: r,
979
- async: n
980
- });
981
- } else n && e.stack.push({ async: !0 });
982
- return t;
983
- }
984
- function Je(e) {
985
- function t(t) {
986
- e.error = e.hasError ? new Ze(t, e.error, "An error was suppressed during disposal.") : t, e.hasError = !0;
987
- }
988
- var n, r = 0;
989
- function i() {
990
- for (; n = e.stack.pop();) try {
991
- if (!n.async && r === 1) return r = 0, e.stack.push(n), Promise.resolve().then(i);
992
- if (n.dispose) {
993
- var a = n.dispose.call(n.value);
994
- if (n.async) return r |= 2, Promise.resolve(a).then(i, function(e) {
995
- return t(e), i();
996
- });
997
- } else r |= 1;
998
- } catch (e) {
999
- t(e);
1000
- }
1001
- if (r === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
1002
- if (e.hasError) throw e.error;
1003
- }
1004
- return i();
1005
- }
1006
- function Ye(e, t) {
1007
- return typeof e == "string" && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(e, n, r, i, a) {
1008
- return n ? t ? ".jsx" : ".js" : r && (!i || !a) ? e : r + i + "." + a.toLowerCase() + "js";
1009
- }) : e;
1010
- }
1011
- var R, z, B, Xe, V, Ze, Qe, H = ee((() => {
1012
- R = function(e, t) {
1013
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
1014
- e.__proto__ = t;
1015
- } || function(e, t) {
1016
- for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
1017
- }, R(e, t);
1018
- }, z = function() {
1019
- return z = Object.assign || function(e) {
1020
- for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
1021
- return e;
1022
- }, z.apply(this, arguments);
1023
- }, B = Object.create ? (function(e, t, n, r) {
1024
- r === void 0 && (r = n);
1025
- var i = Object.getOwnPropertyDescriptor(t, n);
1026
- (!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
1027
- enumerable: !0,
1028
- get: function() {
1029
- return t[n];
1030
- }
1031
- }), Object.defineProperty(e, r, i);
1032
- }) : (function(e, t, n, r) {
1033
- r === void 0 && (r = n), e[r] = t[n];
1034
- }), Xe = Object.create ? (function(e, t) {
1035
- Object.defineProperty(e, "default", {
1036
- enumerable: !0,
1037
- value: t
1038
- });
1039
- }) : function(e, t) {
1040
- e.default = t;
1041
- }, V = function(e) {
1042
- return V = Object.getOwnPropertyNames || function(e) {
1043
- var t = [];
1044
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
1045
- return t;
1046
- }, V(e);
1047
- }, Ze = typeof SuppressedError == "function" ? SuppressedError : function(e, t, n) {
1048
- var r = Error(n);
1049
- return r.name = "SuppressedError", r.error = e, r.suppressed = t, r;
1050
- }, Qe = {
1051
- __extends: j,
1052
- __assign: z,
1053
- __rest: M,
1054
- __decorate: N,
1055
- __param: P,
1056
- __esDecorate: De,
1057
- __runInitializers: Oe,
1058
- __propKey: ke,
1059
- __setFunctionName: Ae,
1060
- __metadata: je,
1061
- __awaiter: Me,
1062
- __generator: Ne,
1063
- __createBinding: B,
1064
- __exportStar: Pe,
1065
- __values: F,
1066
- __read: I,
1067
- __spread: Fe,
1068
- __spreadArrays: Ie,
1069
- __spreadArray: Le,
1070
- __await: L,
1071
- __asyncGenerator: Re,
1072
- __asyncDelegator: ze,
1073
- __asyncValues: Be,
1074
- __makeTemplateObject: Ve,
1075
- __importStar: He,
1076
- __importDefault: Ue,
1077
- __classPrivateFieldGet: We,
1078
- __classPrivateFieldSet: Ge,
1079
- __classPrivateFieldIn: Ke,
1080
- __addDisposableResource: qe,
1081
- __disposeResources: Je,
1082
- __rewriteRelativeImportExtension: Ye
1083
- };
1084
- })), U = /* @__PURE__ */ y(((e) => {
1085
- Object.defineProperty(e, "__esModule", { value: !0 }), e.TextApiResponse = e.BlobApiResponse = e.VoidApiResponse = e.JSONApiResponse = e.COLLECTION_FORMATS = e.RequiredError = e.FetchError = e.ResponseError = e.BaseAPI = e.DefaultConfig = e.Configuration = e.BASE_PATH = void 0, e.querystring = o, e.exists = c, e.canConsumeForm = l, e.BASE_PATH = "http://localhost:5000".replace(/\/+$/, "");
1086
- var t = class {
1087
- configuration;
1088
- constructor(e = {}) {
1089
- this.configuration = e;
1090
- }
1091
- set config(e) {
1092
- this.configuration = e;
1093
- }
1094
- get basePath() {
1095
- return this.configuration.basePath == null ? e.BASE_PATH : this.configuration.basePath;
1096
- }
1097
- get fetchApi() {
1098
- return this.configuration.fetchApi;
1099
- }
1100
- get middleware() {
1101
- return this.configuration.middleware || [];
1102
- }
1103
- get queryParamsStringify() {
1104
- return this.configuration.queryParamsStringify || o;
1105
- }
1106
- get username() {
1107
- return this.configuration.username;
1108
- }
1109
- get password() {
1110
- return this.configuration.password;
1111
- }
1112
- get apiKey() {
1113
- let e = this.configuration.apiKey;
1114
- if (e) return typeof e == "function" ? e : () => e;
1115
- }
1116
- get accessToken() {
1117
- let e = this.configuration.accessToken;
1118
- if (e) return typeof e == "function" ? e : async () => e;
1119
- }
1120
- get headers() {
1121
- return this.configuration.headers;
1122
- }
1123
- get credentials() {
1124
- return this.configuration.credentials;
1125
- }
1126
- };
1127
- e.Configuration = t, e.DefaultConfig = new t(), e.BaseAPI = class t {
1128
- configuration;
1129
- static jsonRegex = /* @__PURE__ */ RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i");
1130
- middleware;
1131
- constructor(t = e.DefaultConfig) {
1132
- this.configuration = t, this.middleware = t.middleware;
1133
- }
1134
- withMiddleware(...e) {
1135
- let t = this.clone();
1136
- return t.middleware = t.middleware.concat(...e), t;
1137
- }
1138
- withPreMiddleware(...e) {
1139
- let t = e.map((e) => ({ pre: e }));
1140
- return this.withMiddleware(...t);
1141
- }
1142
- withPostMiddleware(...e) {
1143
- let t = e.map((e) => ({ post: e }));
1144
- return this.withMiddleware(...t);
1145
- }
1146
- isJsonMime(e) {
1147
- return e ? t.jsonRegex.test(e) : !1;
1148
- }
1149
- async request(e, t) {
1150
- let { url: n, init: r } = await this.createFetchParams(e, t), a = await this.fetchApi(n, r);
1151
- if (a && a.status >= 200 && a.status < 300) return a;
1152
- throw new i(a, "Response returned an error code");
1153
- }
1154
- async createFetchParams(e, t) {
1155
- let i = this.configuration.basePath + e.path;
1156
- e.query !== void 0 && Object.keys(e.query).length !== 0 && (i += "?" + this.configuration.queryParamsStringify(e.query));
1157
- let a = Object.assign({}, this.configuration.headers, e.headers);
1158
- Object.keys(a).forEach((e) => a[e] === void 0 ? delete a[e] : {});
1159
- let o = typeof t == "function" ? t : async () => t, s = {
1160
- method: e.method,
1161
- headers: a,
1162
- body: e.body,
1163
- credentials: this.configuration.credentials
1164
- }, c = {
1165
- ...s,
1166
- ...await o({
1167
- init: s,
1168
- context: e
1169
- })
1170
- }, l;
1171
- l = r(c.body) || c.body instanceof URLSearchParams || n(c.body) ? c.body : this.isJsonMime(a["Content-Type"]) ? JSON.stringify(c.body) : c.body;
1172
- let u = {
1173
- ...c,
1174
- body: l
1175
- };
1176
- return {
1177
- url: i,
1178
- init: u
1179
- };
1180
- }
1181
- fetchApi = async (e, t) => {
1182
- let n = {
1183
- url: e,
1184
- init: t
1185
- };
1186
- for (let e of this.middleware) e.pre && (n = await e.pre({
1187
- fetch: this.fetchApi,
1188
- ...n
1189
- }) || n);
1190
- let r;
1191
- try {
1192
- r = await (this.configuration.fetchApi || fetch)(n.url, n.init);
1193
- } catch (e) {
1194
- for (let t of this.middleware) t.onError && (r = await t.onError({
1195
- fetch: this.fetchApi,
1196
- url: n.url,
1197
- init: n.init,
1198
- error: e,
1199
- response: r ? r.clone() : void 0
1200
- }) || r);
1201
- if (r === void 0) throw e instanceof Error ? new a(e, "The request failed and the interceptors did not return an alternative response") : e;
1202
- }
1203
- for (let e of this.middleware) e.post && (r = await e.post({
1204
- fetch: this.fetchApi,
1205
- url: n.url,
1206
- init: n.init,
1207
- response: r.clone()
1208
- }) || r);
1209
- return r;
1210
- };
1211
- clone() {
1212
- let e = this.constructor, t = new e(this.configuration);
1213
- return t.middleware = this.middleware.slice(), t;
1214
- }
1215
- };
1216
- function n(e) {
1217
- return typeof Blob < "u" && e instanceof Blob;
1218
- }
1219
- function r(e) {
1220
- return typeof FormData < "u" && e instanceof FormData;
1221
- }
1222
- var i = class extends Error {
1223
- response;
1224
- name = "ResponseError";
1225
- constructor(e, t) {
1226
- super(t), this.response = e;
1227
- }
1228
- };
1229
- e.ResponseError = i;
1230
- var a = class extends Error {
1231
- cause;
1232
- name = "FetchError";
1233
- constructor(e, t) {
1234
- super(t), this.cause = e;
1235
- }
1236
- };
1237
- e.FetchError = a, e.RequiredError = class extends Error {
1238
- field;
1239
- name = "RequiredError";
1240
- constructor(e, t) {
1241
- super(t), this.field = e;
1242
- }
1243
- }, e.COLLECTION_FORMATS = {
1244
- csv: ",",
1245
- ssv: " ",
1246
- tsv: " ",
1247
- pipes: "|"
1248
- };
1249
- function o(e, t = "") {
1250
- return Object.keys(e).map((n) => s(n, e[n], t)).filter((e) => e.length > 0).join("&");
1251
- }
1252
- function s(e, t, n = "") {
1253
- let r = n + (n.length ? `[${e}]` : e);
1254
- if (t instanceof Array) {
1255
- let e = t.map((e) => encodeURIComponent(String(e))).join(`&${encodeURIComponent(r)}=`);
1256
- return `${encodeURIComponent(r)}=${e}`;
1257
- }
1258
- return t instanceof Set ? s(e, Array.from(t), n) : t instanceof Date ? `${encodeURIComponent(r)}=${encodeURIComponent(t.toISOString())}` : t instanceof Object ? o(t, r) : `${encodeURIComponent(r)}=${encodeURIComponent(String(t))}`;
1259
- }
1260
- function c(e, t) {
1261
- return e[t] != null;
1262
- }
1263
- function l(e) {
1264
- for (let t of e) if (t.contentType === "multipart/form-data") return !0;
1265
- return !1;
1266
- }
1267
- e.JSONApiResponse = class {
1268
- raw;
1269
- transformer;
1270
- constructor(e, t = (e) => e) {
1271
- this.raw = e, this.transformer = t;
1272
- }
1273
- async value() {
1274
- return this.transformer(await this.raw.json());
1275
- }
1276
- }, e.VoidApiResponse = class {
1277
- raw;
1278
- constructor(e) {
1279
- this.raw = e;
1280
- }
1281
- async value() {}
1282
- }, e.BlobApiResponse = class {
1283
- raw;
1284
- constructor(e) {
1285
- this.raw = e;
1286
- }
1287
- async value() {
1288
- return await this.raw.blob();
1289
- }
1290
- }, e.TextApiResponse = class {
1291
- raw;
1292
- constructor(e) {
1293
- this.raw = e;
1294
- }
1295
- async value() {
1296
- return await this.raw.text();
1297
- }
1298
- };
1299
- })), $e = /* @__PURE__ */ y(((e) => {
1300
- Object.defineProperty(e, "__esModule", { value: !0 }), e.AppConfigApi = void 0;
1301
- var t = U();
1302
- e.AppConfigApi = class extends t.BaseAPI {
1303
- async getClientConfigRaw(e, n) {
1304
- if (e.appId == null) throw new t.RequiredError("appId", "Required parameter \"appId\" was null or undefined when calling getClientConfig().");
1305
- let r = {};
1306
- e.appId != null && (r.appId = e.appId);
1307
- let i = await this.request({
1308
- path: "/api/v1/client-config",
1309
- method: "GET",
1310
- headers: {},
1311
- query: r
1312
- }, n);
1313
- return new t.JSONApiResponse(i);
1314
- }
1315
- async getClientConfig(e, t) {
1316
- return await (await this.getClientConfigRaw(e, t)).value();
1317
- }
1318
- };
1319
- })), et = /* @__PURE__ */ y(((e) => {
1320
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ApplicationsApi = void 0;
1321
- var t = U();
1322
- e.ApplicationsApi = class extends t.BaseAPI {
1323
- async createApplicationRaw(e, n) {
1324
- if (e.createApplicationBodyDto == null) throw new t.RequiredError("createApplicationBodyDto", "Required parameter \"createApplicationBodyDto\" was null or undefined when calling createApplication().");
1325
- let r = {}, i = {};
1326
- i["Content-Type"] = "application/json";
1327
- let a = await this.request({
1328
- path: "/api/v1/applications",
1329
- method: "POST",
1330
- headers: i,
1331
- query: r,
1332
- body: e.createApplicationBodyDto
1333
- }, n);
1334
- return new t.JSONApiResponse(a);
1335
- }
1336
- async createApplication(e, t) {
1337
- return await (await this.createApplicationRaw(e, t)).value();
1338
- }
1339
- async deleteApplicationRaw(e, n) {
1340
- if (e.applicationName == null) throw new t.RequiredError("applicationName", "Required parameter \"applicationName\" was null or undefined when calling deleteApplication().");
1341
- let r = {}, i = {}, a = "/api/v1/applications/{applicationName}";
1342
- a = a.replace("{applicationName}", encodeURIComponent(String(e.applicationName)));
1343
- let o = await this.request({
1344
- path: a,
1345
- method: "DELETE",
1346
- headers: i,
1347
- query: r
1348
- }, n);
1349
- return new t.VoidApiResponse(o);
1350
- }
1351
- async deleteApplication(e, t) {
1352
- await this.deleteApplicationRaw(e, t);
1353
- }
1354
- async getApplicationSchemaRaw(e, n) {
1355
- if (e.id == null) throw new t.RequiredError("id", "Required parameter \"id\" was null or undefined when calling getApplicationSchema().");
1356
- let r = {}, i = {}, a = "/api/v1/application-schemas/{id}";
1357
- a = a.replace("{id}", encodeURIComponent(String(e.id)));
1358
- let o = await this.request({
1359
- path: a,
1360
- method: "GET",
1361
- headers: i,
1362
- query: r
1363
- }, n);
1364
- return new t.JSONApiResponse(o);
1365
- }
1366
- async getApplicationSchema(e, t) {
1367
- return await (await this.getApplicationSchemaRaw(e, t)).value();
1368
- }
1369
- async listApplicationSchemasRaw(e) {
1370
- let n = await this.request({
1371
- path: "/api/v1/application-schemas",
1372
- method: "GET",
1373
- headers: {},
1374
- query: {}
1375
- }, e);
1376
- return new t.JSONApiResponse(n);
1377
- }
1378
- async listApplicationSchemas(e) {
1379
- return await (await this.listApplicationSchemasRaw(e)).value();
1380
- }
1381
- async listApplicationsRaw(e) {
1382
- let n = await this.request({
1383
- path: "/api/v1/applications",
1384
- method: "GET",
1385
- headers: {},
1386
- query: {}
1387
- }, e);
1388
- return new t.JSONApiResponse(n);
1389
- }
1390
- async listApplications(e) {
1391
- return await (await this.listApplicationsRaw(e)).value();
1392
- }
1393
- async updateApplicationRaw(e, n) {
1394
- if (e.applicationName == null) throw new t.RequiredError("applicationName", "Required parameter \"applicationName\" was null or undefined when calling updateApplication().");
1395
- if (e.updateApplicationBodyDto == null) throw new t.RequiredError("updateApplicationBodyDto", "Required parameter \"updateApplicationBodyDto\" was null or undefined when calling updateApplication().");
1396
- let r = {}, i = {};
1397
- i["Content-Type"] = "application/json";
1398
- let a = "/api/v1/applications/{applicationName}";
1399
- a = a.replace("{applicationName}", encodeURIComponent(String(e.applicationName)));
1400
- let o = await this.request({
1401
- path: a,
1402
- method: "PATCH",
1403
- headers: i,
1404
- query: r,
1405
- body: e.updateApplicationBodyDto
1406
- }, n);
1407
- return new t.JSONApiResponse(o);
1408
- }
1409
- async updateApplication(e, t) {
1410
- return await (await this.updateApplicationRaw(e, t)).value();
1411
- }
1412
- };
1413
- })), tt = /* @__PURE__ */ y(((e) => {
1414
- Object.defineProperty(e, "__esModule", { value: !0 }), e.AuthApi = void 0;
1415
- var t = U();
1416
- e.AuthApi = class extends t.BaseAPI {
1417
- async callbackRaw(e, n) {
1418
- if (e.providerId == null) throw new t.RequiredError("providerId", "Required parameter \"providerId\" was null or undefined when calling callback().");
1419
- let r = {}, i = {}, a = "/api/v1/auth/callback/{providerId}";
1420
- a = a.replace("{providerId}", encodeURIComponent(String(e.providerId)));
1421
- let o = await this.request({
1422
- path: a,
1423
- method: "GET",
1424
- headers: i,
1425
- query: r
1426
- }, n);
1427
- return new t.VoidApiResponse(o);
1428
- }
1429
- async callback(e, t) {
1430
- await this.callbackRaw(e, t);
1431
- }
1432
- async getCurrentUserRaw(e) {
1433
- let n = {}, r = {};
1434
- if (this.configuration && this.configuration.accessToken) {
1435
- let e = this.configuration.accessToken, t = await e("bearer", []);
1436
- t && (r.Authorization = `Bearer ${t}`);
1437
- }
1438
- let i = await this.request({
1439
- path: "/api/v1/auth/me",
1440
- method: "GET",
1441
- headers: r,
1442
- query: n
1443
- }, e);
1444
- return new t.JSONApiResponse(i);
1445
- }
1446
- async getCurrentUser(e) {
1447
- return await (await this.getCurrentUserRaw(e)).value();
1448
- }
1449
- async listProvidersRaw(e) {
1450
- let n = await this.request({
1451
- path: "/api/v1/auth/providers",
1452
- method: "GET",
1453
- headers: {},
1454
- query: {}
1455
- }, e);
1456
- return new t.JSONApiResponse(n);
1457
- }
1458
- async listProviders(e) {
1459
- return await (await this.listProvidersRaw(e)).value();
1460
- }
1461
- async loginRaw(e, n) {
1462
- if (e.providerId == null) throw new t.RequiredError("providerId", "Required parameter \"providerId\" was null or undefined when calling login().");
1463
- let r = {}, i = {}, a = "/api/v1/auth/login/{providerId}";
1464
- a = a.replace("{providerId}", encodeURIComponent(String(e.providerId)));
1465
- let o = await this.request({
1466
- path: a,
1467
- method: "GET",
1468
- headers: i,
1469
- query: r
1470
- }, n);
1471
- return new t.VoidApiResponse(o);
1472
- }
1473
- async login(e, t) {
1474
- await this.loginRaw(e, t);
1475
- }
1476
- async logoutRaw(e) {
1477
- let n = await this.request({
1478
- path: "/api/v1/auth/logout",
1479
- method: "POST",
1480
- headers: {},
1481
- query: {}
1482
- }, e);
1483
- return new t.VoidApiResponse(n);
1484
- }
1485
- async logout(e) {
1486
- await this.logoutRaw(e);
1487
- }
1488
- };
1489
- })), nt = /* @__PURE__ */ y(((e) => {
1490
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ChatApi = void 0;
1491
- var t = U();
1492
- e.ChatApi = class extends t.BaseAPI {
1493
- async sendCompletionRaw(e, n) {
1494
- if (e.chatCompletionDto == null) throw new t.RequiredError("chatCompletionDto", "Required parameter \"chatCompletionDto\" was null or undefined when calling sendCompletion().");
1495
- let r = {}, i = {};
1496
- i["Content-Type"] = "application/json";
1497
- let a = await this.request({
1498
- path: "/api/v1/chat/completions",
1499
- method: "POST",
1500
- headers: i,
1501
- query: r,
1502
- body: e.chatCompletionDto
1503
- }, n);
1504
- return new t.JSONApiResponse(a);
1505
- }
1506
- async sendCompletion(e, t) {
1507
- return await (await this.sendCompletionRaw(e, t)).value();
1508
- }
1509
- };
1510
- })), rt = /* @__PURE__ */ y(((e) => {
1511
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ClientChannelApi = void 0;
1512
- var t = U();
1513
- e.ClientChannelApi = class extends t.BaseAPI {
1514
- async reportClientChannelRaw(e, n) {
1515
- if (e.xDialClientChannelId == null) throw new t.RequiredError("xDialClientChannelId", "Required parameter \"xDialClientChannelId\" was null or undefined when calling reportClientChannel().");
1516
- if (e.reportClientChannelDto == null) throw new t.RequiredError("reportClientChannelDto", "Required parameter \"reportClientChannelDto\" was null or undefined when calling reportClientChannel().");
1517
- let r = {}, i = {};
1518
- i["Content-Type"] = "application/json", e.xDialClientChannelId != null && (i["x-dial-client-channel-id"] = String(e.xDialClientChannelId));
1519
- let a = await this.request({
1520
- path: "/api/v1/client-channel/report",
1521
- method: "POST",
1522
- headers: i,
1523
- query: r,
1524
- body: e.reportClientChannelDto
1525
- }, n);
1526
- return new t.VoidApiResponse(a);
1527
- }
1528
- async reportClientChannel(e, t) {
1529
- await this.reportClientChannelRaw(e, t);
1530
- }
1531
- async subscribeClientChannelRaw(e, n) {
1532
- let r = {}, i = {};
1533
- e.xDialClientChannelId != null && (i["x-dial-client-channel-id"] = String(e.xDialClientChannelId));
1534
- let a = await this.request({
1535
- path: "/api/v1/client-channel/subscribe",
1536
- method: "POST",
1537
- headers: i,
1538
- query: r
1539
- }, n);
1540
- return new t.VoidApiResponse(a);
1541
- }
1542
- async subscribeClientChannel(e = {}, t) {
1543
- await this.subscribeClientChannelRaw(e, t);
1544
- }
1545
- async unsubscribeClientChannelRaw(e, n) {
1546
- if (e.xDialClientChannelId == null) throw new t.RequiredError("xDialClientChannelId", "Required parameter \"xDialClientChannelId\" was null or undefined when calling unsubscribeClientChannel().");
1547
- let r = {}, i = {};
1548
- e.xDialClientChannelId != null && (i["x-dial-client-channel-id"] = String(e.xDialClientChannelId));
1549
- let a = await this.request({
1550
- path: "/api/v1/client-channel/unsubscribe",
1551
- method: "POST",
1552
- headers: i,
1553
- query: r
1554
- }, n);
1555
- return new t.VoidApiResponse(a);
1556
- }
1557
- async unsubscribeClientChannel(e, t) {
1558
- await this.unsubscribeClientChannelRaw(e, t);
1559
- }
1560
- };
1561
- })), it = /* @__PURE__ */ y(((e) => {
1562
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ConversationsApi = void 0;
1563
- var t = U();
1564
- e.ConversationsApi = class extends t.BaseAPI {
1565
- async attachToGenerationRaw(e, n) {
1566
- if (e.attachGenerationDto == null) throw new t.RequiredError("attachGenerationDto", "Required parameter \"attachGenerationDto\" was null or undefined when calling attachToGeneration().");
1567
- let r = {}, i = {};
1568
- i["Content-Type"] = "application/json";
1569
- let a = await this.request({
1570
- path: "/api/v1/conversations/completions/attach",
1571
- method: "POST",
1572
- headers: i,
1573
- query: r,
1574
- body: e.attachGenerationDto
1575
- }, n);
1576
- return new t.VoidApiResponse(a);
1577
- }
1578
- async attachToGeneration(e, t) {
1579
- await this.attachToGenerationRaw(e, t);
1580
- }
1581
- async createConversationRaw(e, n) {
1582
- if (e.createConversationDto == null) throw new t.RequiredError("createConversationDto", "Required parameter \"createConversationDto\" was null or undefined when calling createConversation().");
1583
- let r = {}, i = {};
1584
- i["Content-Type"] = "application/json";
1585
- let a = await this.request({
1586
- path: "/api/v1/conversations",
1587
- method: "POST",
1588
- headers: i,
1589
- query: r,
1590
- body: e.createConversationDto
1591
- }, n);
1592
- return new t.JSONApiResponse(a);
1593
- }
1594
- async createConversation(e, t) {
1595
- return await (await this.createConversationRaw(e, t)).value();
1596
- }
1597
- async deleteAllConversationsRaw(e, n) {
1598
- if (e.deleteAllConversationsBodyDto == null) throw new t.RequiredError("deleteAllConversationsBodyDto", "Required parameter \"deleteAllConversationsBodyDto\" was null or undefined when calling deleteAllConversations().");
1599
- let r = {}, i = {};
1600
- i["Content-Type"] = "application/json";
1601
- let a = await this.request({
1602
- path: "/api/v1/conversations/deletions/all",
1603
- method: "POST",
1604
- headers: i,
1605
- query: r,
1606
- body: e.deleteAllConversationsBodyDto
1607
- }, n);
1608
- return new t.JSONApiResponse(a);
1609
- }
1610
- async deleteAllConversations(e, t) {
1611
- return await (await this.deleteAllConversationsRaw(e, t)).value();
1612
- }
1613
- async deleteConversationRaw(e, n) {
1614
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling deleteConversation().");
1615
- let r = {};
1616
- e.path != null && (r.path = e.path);
1617
- let i = await this.request({
1618
- path: "/api/v1/conversations",
1619
- method: "DELETE",
1620
- headers: {},
1621
- query: r
1622
- }, n);
1623
- return new t.VoidApiResponse(i);
1624
- }
1625
- async deleteConversation(e, t) {
1626
- await this.deleteConversationRaw(e, t);
1627
- }
1628
- async deleteConversationsRaw(e, n) {
1629
- if (e.deleteConversationsBodyDto == null) throw new t.RequiredError("deleteConversationsBodyDto", "Required parameter \"deleteConversationsBodyDto\" was null or undefined when calling deleteConversations().");
1630
- let r = {}, i = {};
1631
- i["Content-Type"] = "application/json";
1632
- let a = await this.request({
1633
- path: "/api/v1/conversations/deletions",
1634
- method: "POST",
1635
- headers: i,
1636
- query: r,
1637
- body: e.deleteConversationsBodyDto
1638
- }, n);
1639
- return new t.JSONApiResponse(a);
1640
- }
1641
- async deleteConversations(e, t) {
1642
- return await (await this.deleteConversationsRaw(e, t)).value();
1643
- }
1644
- async duplicateConversationRaw(e, n) {
1645
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling duplicateConversation().");
1646
- let r = {};
1647
- e.path != null && (r.path = e.path);
1648
- let i = await this.request({
1649
- path: "/api/v1/conversations/duplicate",
1650
- method: "POST",
1651
- headers: {},
1652
- query: r
1653
- }, n);
1654
- return new t.JSONApiResponse(i);
1655
- }
1656
- async duplicateConversation(e, t) {
1657
- return await (await this.duplicateConversationRaw(e, t)).value();
1658
- }
1659
- async generateConversationTitleRaw(e, n) {
1660
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling generateConversationTitle().");
1661
- let r = {};
1662
- e.path != null && (r.path = e.path);
1663
- let i = await this.request({
1664
- path: "/api/v1/conversations/generate-title",
1665
- method: "POST",
1666
- headers: {},
1667
- query: r
1668
- }, n);
1669
- return new t.JSONApiResponse(i);
1670
- }
1671
- async generateConversationTitle(e, t) {
1672
- return await (await this.generateConversationTitleRaw(e, t)).value();
1673
- }
1674
- async getConversationRaw(e, n) {
1675
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling getConversation().");
1676
- let r = {};
1677
- e.path != null && (r.path = e.path);
1678
- let i = await this.request({
1679
- path: "/api/v1/conversations",
1680
- method: "GET",
1681
- headers: {},
1682
- query: r
1683
- }, n);
1684
- return new t.JSONApiResponse(i);
1685
- }
1686
- async getConversation(e, t) {
1687
- return await (await this.getConversationRaw(e, t)).value();
1688
- }
1689
- async getConversationMetadataRaw(e, n) {
1690
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling getConversationMetadata().");
1691
- let r = {};
1692
- e.path != null && (r.path = e.path), e.permissions != null && (r.permissions = e.permissions);
1693
- let i = await this.request({
1694
- path: "/api/v1/conversations/metadata",
1695
- method: "GET",
1696
- headers: {},
1697
- query: r
1698
- }, n);
1699
- return new t.JSONApiResponse(i);
1700
- }
1701
- async getConversationMetadata(e, t) {
1702
- return await (await this.getConversationMetadataRaw(e, t)).value();
1703
- }
1704
- async getConversationPublishHistoryRaw(e, n) {
1705
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling getConversationPublishHistory().");
1706
- let r = {};
1707
- e.path != null && (r.path = e.path);
1708
- let i = await this.request({
1709
- path: "/api/v1/conversations/publish-history",
1710
- method: "GET",
1711
- headers: {},
1712
- query: r
1713
- }, n);
1714
- return new t.JSONApiResponse(i);
1715
- }
1716
- async getConversationPublishHistory(e, t) {
1717
- return await (await this.getConversationPublishHistoryRaw(e, t)).value();
1718
- }
1719
- async listConversationsRaw(e, n) {
1720
- let r = {};
1721
- e.limit != null && (r.limit = e.limit), e.nextToken != null && (r.nextToken = e.nextToken);
1722
- let i = await this.request({
1723
- path: "/api/v1/conversations/list",
1724
- method: "GET",
1725
- headers: {},
1726
- query: r
1727
- }, n);
1728
- return new t.JSONApiResponse(i);
1729
- }
1730
- async listConversations(e = {}, t) {
1731
- return await (await this.listConversationsRaw(e, t)).value();
1732
- }
1733
- async markConversationViewedRaw(e, n) {
1734
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling markConversationViewed().");
1735
- let r = {};
1736
- e.path != null && (r.path = e.path);
1737
- let i = await this.request({
1738
- path: "/api/v1/conversations/viewed",
1739
- method: "PATCH",
1740
- headers: {},
1741
- query: r
1742
- }, n);
1743
- return new t.VoidApiResponse(i);
1744
- }
1745
- async markConversationViewed(e, t) {
1746
- await this.markConversationViewedRaw(e, t);
1747
- }
1748
- async publishConversationRaw(e, n) {
1749
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling publishConversation().");
1750
- if (e.publishConversationDto == null) throw new t.RequiredError("publishConversationDto", "Required parameter \"publishConversationDto\" was null or undefined when calling publishConversation().");
1751
- let r = {};
1752
- e.path != null && (r.path = e.path);
1753
- let i = {};
1754
- i["Content-Type"] = "application/json";
1755
- let a = await this.request({
1756
- path: "/api/v1/conversations/publish",
1757
- method: "POST",
1758
- headers: i,
1759
- query: r,
1760
- body: e.publishConversationDto
1761
- }, n);
1762
- return new t.JSONApiResponse(a);
1763
- }
1764
- async publishConversation(e, t) {
1765
- return await (await this.publishConversationRaw(e, t)).value();
1766
- }
1767
- async renameConversationRaw(e, n) {
1768
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling renameConversation().");
1769
- if (e.renameConversationBodyDto == null) throw new t.RequiredError("renameConversationBodyDto", "Required parameter \"renameConversationBodyDto\" was null or undefined when calling renameConversation().");
1770
- let r = {};
1771
- e.path != null && (r.path = e.path);
1772
- let i = {};
1773
- i["Content-Type"] = "application/json";
1774
- let a = await this.request({
1775
- path: "/api/v1/conversations",
1776
- method: "PATCH",
1777
- headers: i,
1778
- query: r,
1779
- body: e.renameConversationBodyDto
1780
- }, n);
1781
- return new t.JSONApiResponse(a);
1782
- }
1783
- async renameConversation(e, t) {
1784
- return await (await this.renameConversationRaw(e, t)).value();
1785
- }
1786
- async saveConversationRaw(e, n) {
1787
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling saveConversation().");
1788
- if (e.saveConversationBodyDto == null) throw new t.RequiredError("saveConversationBodyDto", "Required parameter \"saveConversationBodyDto\" was null or undefined when calling saveConversation().");
1789
- let r = {};
1790
- e.path != null && (r.path = e.path);
1791
- let i = {};
1792
- i["Content-Type"] = "application/json";
1793
- let a = await this.request({
1794
- path: "/api/v1/conversations",
1795
- method: "PUT",
1796
- headers: i,
1797
- query: r,
1798
- body: e.saveConversationBodyDto
1799
- }, n);
1800
- return new t.JSONApiResponse(a);
1801
- }
1802
- async saveConversation(e, t) {
1803
- return await (await this.saveConversationRaw(e, t)).value();
1804
- }
1805
- async stopCompletionRaw(e, n) {
1806
- if (e.stopCompletionDto == null) throw new t.RequiredError("stopCompletionDto", "Required parameter \"stopCompletionDto\" was null or undefined when calling stopCompletion().");
1807
- let r = {}, i = {};
1808
- i["Content-Type"] = "application/json";
1809
- let a = await this.request({
1810
- path: "/api/v1/conversations/completions/stop",
1811
- method: "POST",
1812
- headers: i,
1813
- query: r,
1814
- body: e.stopCompletionDto
1815
- }, n);
1816
- return new t.VoidApiResponse(a);
1817
- }
1818
- async stopCompletion(e, t) {
1819
- await this.stopCompletionRaw(e, t);
1820
- }
1821
- async streamCompletionRaw(e, n) {
1822
- if (e.sendCompletionDto == null) throw new t.RequiredError("sendCompletionDto", "Required parameter \"sendCompletionDto\" was null or undefined when calling streamCompletion().");
1823
- let r = {}, i = {};
1824
- i["Content-Type"] = "application/json", e.xTimezone != null && (i["X-Timezone"] = String(e.xTimezone));
1825
- let a = await this.request({
1826
- path: "/api/v1/conversations/completions",
1827
- method: "POST",
1828
- headers: i,
1829
- query: r,
1830
- body: e.sendCompletionDto
1831
- }, n);
1832
- return new t.VoidApiResponse(a);
1833
- }
1834
- async streamCompletion(e, t) {
1835
- await this.streamCompletionRaw(e, t);
1836
- }
1837
- async unpublishConversationRaw(e, n) {
1838
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling unpublishConversation().");
1839
- if (e.unpublishConversationDto == null) throw new t.RequiredError("unpublishConversationDto", "Required parameter \"unpublishConversationDto\" was null or undefined when calling unpublishConversation().");
1840
- let r = {};
1841
- e.path != null && (r.path = e.path);
1842
- let i = {};
1843
- i["Content-Type"] = "application/json";
1844
- let a = await this.request({
1845
- path: "/api/v1/conversations/unpublish",
1846
- method: "POST",
1847
- headers: i,
1848
- query: r,
1849
- body: e.unpublishConversationDto
1850
- }, n);
1851
- return new t.JSONApiResponse(a);
1852
- }
1853
- async unpublishConversation(e, t) {
1854
- return await (await this.unpublishConversationRaw(e, t)).value();
1855
- }
1856
- async watchConversationRaw(e, n) {
1857
- if (e.watchConversationBodyDto == null) throw new t.RequiredError("watchConversationBodyDto", "Required parameter \"watchConversationBodyDto\" was null or undefined when calling watchConversation().");
1858
- let r = {}, i = {};
1859
- i["Content-Type"] = "application/json";
1860
- let a = await this.request({
1861
- path: "/api/v1/conversations/watch",
1862
- method: "POST",
1863
- headers: i,
1864
- query: r,
1865
- body: e.watchConversationBodyDto
1866
- }, n);
1867
- return new t.VoidApiResponse(a);
1868
- }
1869
- async watchConversation(e, t) {
1870
- await this.watchConversationRaw(e, t);
1871
- }
1872
- };
1873
- })), at = /* @__PURE__ */ y(((e) => {
1874
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ListDeploymentsInterfaceTypeEnum = e.DeploymentsApi = void 0;
1875
- var t = U();
1876
- e.DeploymentsApi = class extends t.BaseAPI {
1877
- async getDeploymentConfigurationRaw(e, n) {
1878
- if (e.deployment == null) throw new t.RequiredError("deployment", "Required parameter \"deployment\" was null or undefined when calling getDeploymentConfiguration().");
1879
- let r = {}, i = {}, a = "/api/v1/deployments/{deployment}/configuration";
1880
- a = a.replace("{deployment}", encodeURIComponent(String(e.deployment)));
1881
- let o = await this.request({
1882
- path: a,
1883
- method: "GET",
1884
- headers: i,
1885
- query: r
1886
- }, n);
1887
- return new t.JSONApiResponse(o);
1888
- }
1889
- async getDeploymentConfiguration(e, t) {
1890
- return await (await this.getDeploymentConfigurationRaw(e, t)).value();
1891
- }
1892
- async getDeploymentDetailsRaw(e, n) {
1893
- if (e.deployment == null) throw new t.RequiredError("deployment", "Required parameter \"deployment\" was null or undefined when calling getDeploymentDetails().");
1894
- let r = {}, i = {}, a = "/api/v1/deployments/{deployment}/details";
1895
- a = a.replace("{deployment}", encodeURIComponent(String(e.deployment)));
1896
- let o = await this.request({
1897
- path: a,
1898
- method: "GET",
1899
- headers: i,
1900
- query: r
1901
- }, n);
1902
- return new t.JSONApiResponse(o);
1903
- }
1904
- async getDeploymentDetails(e, t) {
1905
- return await (await this.getDeploymentDetailsRaw(e, t)).value();
1906
- }
1907
- async getDeploymentLimitsRaw(e, n) {
1908
- if (e.deployment == null) throw new t.RequiredError("deployment", "Required parameter \"deployment\" was null or undefined when calling getDeploymentLimits().");
1909
- let r = {}, i = {}, a = "/api/v1/deployments/{deployment}/limits";
1910
- a = a.replace("{deployment}", encodeURIComponent(String(e.deployment)));
1911
- let o = await this.request({
1912
- path: a,
1913
- method: "GET",
1914
- headers: i,
1915
- query: r
1916
- }, n);
1917
- return new t.JSONApiResponse(o);
1918
- }
1919
- async getDeploymentLimits(e, t) {
1920
- return await (await this.getDeploymentLimitsRaw(e, t)).value();
1921
- }
1922
- async listDeploymentsRaw(e, n) {
1923
- let r = {};
1924
- e.refresh != null && (r.refresh = e.refresh), e.interfaceType != null && (r.interface_type = e.interfaceType);
1925
- let i = await this.request({
1926
- path: "/api/v1/deployments",
1927
- method: "GET",
1928
- headers: {},
1929
- query: r
1930
- }, n);
1931
- return new t.JSONApiResponse(i);
1932
- }
1933
- async listDeployments(e = {}, t) {
1934
- return await (await this.listDeploymentsRaw(e, t)).value();
1935
- }
1936
- }, e.ListDeploymentsInterfaceTypeEnum = {
1937
- Chat: "chat",
1938
- Embedding: "embedding",
1939
- Mcp: "mcp",
1940
- CustomUi: "custom_ui",
1941
- All: "all"
1942
- };
1943
- })), ot = /* @__PURE__ */ y(((e) => {
1944
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ExternalServicesApi = void 0;
1945
- var t = U();
1946
- e.ExternalServicesApi = class extends t.BaseAPI {
1947
- async getExternalServiceRaw(e, n) {
1948
- if (e.appId == null) throw new t.RequiredError("appId", "Required parameter \"appId\" was null or undefined when calling getExternalService().");
1949
- if (e.serviceId == null) throw new t.RequiredError("serviceId", "Required parameter \"serviceId\" was null or undefined when calling getExternalService().");
1950
- let r = {}, i = {}, a = "/api/v1/external-services/{appId}/{serviceId}";
1951
- a = a.replace("{appId}", encodeURIComponent(String(e.appId))), a = a.replace("{serviceId}", encodeURIComponent(String(e.serviceId)));
1952
- let o = await this.request({
1953
- path: a,
1954
- method: "GET",
1955
- headers: i,
1956
- query: r
1957
- }, n);
1958
- return new t.JSONApiResponse(o);
1959
- }
1960
- async getExternalService(e, t) {
1961
- return await (await this.getExternalServiceRaw(e, t)).value();
1962
- }
1963
- async listExternalServicesRaw(e, n) {
1964
- if (e.appId == null) throw new t.RequiredError("appId", "Required parameter \"appId\" was null or undefined when calling listExternalServices().");
1965
- let r = {}, i = {}, a = "/api/v1/external-services/{appId}";
1966
- a = a.replace("{appId}", encodeURIComponent(String(e.appId)));
1967
- let o = await this.request({
1968
- path: a,
1969
- method: "GET",
1970
- headers: i,
1971
- query: r
1972
- }, n);
1973
- return new t.JSONApiResponse(o);
1974
- }
1975
- async listExternalServices(e, t) {
1976
- return await (await this.listExternalServicesRaw(e, t)).value();
1977
- }
1978
- async signInExternalServiceRaw(e, n) {
1979
- if (e.appId == null) throw new t.RequiredError("appId", "Required parameter \"appId\" was null or undefined when calling signInExternalService().");
1980
- if (e.serviceId == null) throw new t.RequiredError("serviceId", "Required parameter \"serviceId\" was null or undefined when calling signInExternalService().");
1981
- if (e.externalServiceSigninBodyDto == null) throw new t.RequiredError("externalServiceSigninBodyDto", "Required parameter \"externalServiceSigninBodyDto\" was null or undefined when calling signInExternalService().");
1982
- let r = {}, i = {};
1983
- i["Content-Type"] = "application/json";
1984
- let a = "/api/v1/external-services/{appId}/{serviceId}/signin";
1985
- a = a.replace("{appId}", encodeURIComponent(String(e.appId))), a = a.replace("{serviceId}", encodeURIComponent(String(e.serviceId)));
1986
- let o = await this.request({
1987
- path: a,
1988
- method: "POST",
1989
- headers: i,
1990
- query: r,
1991
- body: e.externalServiceSigninBodyDto
1992
- }, n);
1993
- return new t.JSONApiResponse(o);
1994
- }
1995
- async signInExternalService(e, t) {
1996
- return await (await this.signInExternalServiceRaw(e, t)).value();
1997
- }
1998
- async signOutExternalServiceRaw(e, n) {
1999
- if (e.appId == null) throw new t.RequiredError("appId", "Required parameter \"appId\" was null or undefined when calling signOutExternalService().");
2000
- if (e.serviceId == null) throw new t.RequiredError("serviceId", "Required parameter \"serviceId\" was null or undefined when calling signOutExternalService().");
2001
- if (e.externalServiceLogoutBodyDto == null) throw new t.RequiredError("externalServiceLogoutBodyDto", "Required parameter \"externalServiceLogoutBodyDto\" was null or undefined when calling signOutExternalService().");
2002
- let r = {}, i = {};
2003
- i["Content-Type"] = "application/json";
2004
- let a = "/api/v1/external-services/{appId}/{serviceId}/signout";
2005
- a = a.replace("{appId}", encodeURIComponent(String(e.appId))), a = a.replace("{serviceId}", encodeURIComponent(String(e.serviceId)));
2006
- let o = await this.request({
2007
- path: a,
2008
- method: "POST",
2009
- headers: i,
2010
- query: r,
2011
- body: e.externalServiceLogoutBodyDto
2012
- }, n);
2013
- return new t.JSONApiResponse(o);
2014
- }
2015
- async signOutExternalService(e, t) {
2016
- return await (await this.signOutExternalServiceRaw(e, t)).value();
2017
- }
2018
- };
2019
- })), st = /* @__PURE__ */ y(((e) => {
2020
- Object.defineProperty(e, "__esModule", { value: !0 }), e.UploadFileUploadModeEnum = e.FilesApi = void 0;
2021
- var t = U();
2022
- e.FilesApi = class extends t.BaseAPI {
2023
- async copyFilesRaw(e, n) {
2024
- if (e.copyFilesDto == null) throw new t.RequiredError("copyFilesDto", "Required parameter \"copyFilesDto\" was null or undefined when calling copyFiles().");
2025
- let r = {}, i = {};
2026
- i["Content-Type"] = "application/json";
2027
- let a = await this.request({
2028
- path: "/api/v1/files/copy",
2029
- method: "POST",
2030
- headers: i,
2031
- query: r,
2032
- body: e.copyFilesDto
2033
- }, n);
2034
- return new t.JSONApiResponse(a);
2035
- }
2036
- async copyFiles(e, t) {
2037
- return await (await this.copyFilesRaw(e, t)).value();
2038
- }
2039
- async createFolderRaw(e, n) {
2040
- if (e.createFolderDto == null) throw new t.RequiredError("createFolderDto", "Required parameter \"createFolderDto\" was null or undefined when calling createFolder().");
2041
- let r = {}, i = {};
2042
- i["Content-Type"] = "application/json";
2043
- let a = await this.request({
2044
- path: "/api/v1/files/folders",
2045
- method: "POST",
2046
- headers: i,
2047
- query: r,
2048
- body: e.createFolderDto
2049
- }, n);
2050
- return new t.JSONApiResponse(a);
2051
- }
2052
- async createFolder(e, t) {
2053
- return await (await this.createFolderRaw(e, t)).value();
2054
- }
2055
- async deleteFilesRaw(e, n) {
2056
- if (e.deleteFilesDto == null) throw new t.RequiredError("deleteFilesDto", "Required parameter \"deleteFilesDto\" was null or undefined when calling deleteFiles().");
2057
- let r = {}, i = {};
2058
- i["Content-Type"] = "application/json";
2059
- let a = await this.request({
2060
- path: "/api/v1/files/delete",
2061
- method: "POST",
2062
- headers: i,
2063
- query: r,
2064
- body: e.deleteFilesDto
2065
- }, n);
2066
- return new t.JSONApiResponse(a);
2067
- }
2068
- async deleteFiles(e, t) {
2069
- return await (await this.deleteFilesRaw(e, t)).value();
2070
- }
2071
- async discardSharedRaw(e, n) {
2072
- if (e.discardSharedDto == null) throw new t.RequiredError("discardSharedDto", "Required parameter \"discardSharedDto\" was null or undefined when calling discardShared().");
2073
- let r = {}, i = {};
2074
- i["Content-Type"] = "application/json";
2075
- let a = await this.request({
2076
- path: "/api/v1/files/discard-shared",
2077
- method: "POST",
2078
- headers: i,
2079
- query: r,
2080
- body: e.discardSharedDto
2081
- }, n);
2082
- return new t.JSONApiResponse(a);
2083
- }
2084
- async discardShared(e, t) {
2085
- return await (await this.discardSharedRaw(e, t)).value();
2086
- }
2087
- async downloadArchiveRaw(e, n) {
2088
- if (e.downloadArchiveDto == null) throw new t.RequiredError("downloadArchiveDto", "Required parameter \"downloadArchiveDto\" was null or undefined when calling downloadArchive().");
2089
- let r = {}, i = {};
2090
- i["Content-Type"] = "application/json";
2091
- let a = await this.request({
2092
- path: "/api/v1/files/download-archive",
2093
- method: "POST",
2094
- headers: i,
2095
- query: r,
2096
- body: e.downloadArchiveDto
2097
- }, n);
2098
- return new t.BlobApiResponse(a);
2099
- }
2100
- async downloadArchive(e, t) {
2101
- return await (await this.downloadArchiveRaw(e, t)).value();
2102
- }
2103
- async downloadFileRaw(e, n) {
2104
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling downloadFile().");
2105
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling downloadFile().");
2106
- let r = {};
2107
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path);
2108
- let i = await this.request({
2109
- path: "/api/v1/files/download",
2110
- method: "GET",
2111
- headers: {},
2112
- query: r
2113
- }, n);
2114
- return new t.BlobApiResponse(i);
2115
- }
2116
- async downloadFile(e, t) {
2117
- return await (await this.downloadFileRaw(e, t)).value();
2118
- }
2119
- async getFileMetadataRaw(e, n) {
2120
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling getFileMetadata().");
2121
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling getFileMetadata().");
2122
- let r = {};
2123
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path);
2124
- let i = await this.request({
2125
- path: "/api/v1/files/metadata",
2126
- method: "GET",
2127
- headers: {},
2128
- query: r
2129
- }, n);
2130
- return new t.JSONApiResponse(i);
2131
- }
2132
- async getFileMetadata(e, t) {
2133
- return await (await this.getFileMetadataRaw(e, t)).value();
2134
- }
2135
- async listFilesRaw(e, n) {
2136
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling listFiles().");
2137
- let r = {};
2138
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path), e.token != null && (r.token = e.token), e.limit != null && (r.limit = e.limit), e.recursive != null && (r.recursive = e.recursive), e.permissions != null && (r.permissions = e.permissions);
2139
- let i = await this.request({
2140
- path: "/api/v1/files/list",
2141
- method: "GET",
2142
- headers: {},
2143
- query: r
2144
- }, n);
2145
- return new t.JSONApiResponse(i);
2146
- }
2147
- async listFiles(e, t) {
2148
- return await (await this.listFilesRaw(e, t)).value();
2149
- }
2150
- async listPublicFilesRaw(e, n) {
2151
- let r = {};
2152
- e.path != null && (r.path = e.path), e.token != null && (r.token = e.token), e.limit != null && (r.limit = e.limit), e.recursive != null && (r.recursive = e.recursive);
2153
- let i = await this.request({
2154
- path: "/api/v1/files/public",
2155
- method: "GET",
2156
- headers: {},
2157
- query: r
2158
- }, n);
2159
- return new t.JSONApiResponse(i);
2160
- }
2161
- async listPublicFiles(e = {}, t) {
2162
- return await (await this.listPublicFilesRaw(e, t)).value();
2163
- }
2164
- async listSharedByMeRaw(e, n) {
2165
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling listSharedByMe().");
2166
- let r = {};
2167
- e.bucket != null && (r.bucket = e.bucket);
2168
- let i = await this.request({
2169
- path: "/api/v1/files/shared-by-me",
2170
- method: "GET",
2171
- headers: {},
2172
- query: r
2173
- }, n);
2174
- return new t.JSONApiResponse(i);
2175
- }
2176
- async listSharedByMe(e, t) {
2177
- return await (await this.listSharedByMeRaw(e, t)).value();
2178
- }
2179
- async listSharedFilesRaw(e, n) {
2180
- let r = {};
2181
- e.path != null && (r.path = e.path), e.token != null && (r.token = e.token), e.limit != null && (r.limit = e.limit);
2182
- let i = await this.request({
2183
- path: "/api/v1/files/shared",
2184
- method: "GET",
2185
- headers: {},
2186
- query: r
2187
- }, n);
2188
- return new t.JSONApiResponse(i);
2189
- }
2190
- async listSharedFiles(e = {}, t) {
2191
- return await (await this.listSharedFilesRaw(e, t)).value();
2192
- }
2193
- async moveFilesRaw(e, n) {
2194
- if (e.moveFilesDto == null) throw new t.RequiredError("moveFilesDto", "Required parameter \"moveFilesDto\" was null or undefined when calling moveFiles().");
2195
- let r = {}, i = {};
2196
- i["Content-Type"] = "application/json";
2197
- let a = await this.request({
2198
- path: "/api/v1/files/move",
2199
- method: "POST",
2200
- headers: i,
2201
- query: r,
2202
- body: e.moveFilesDto
2203
- }, n);
2204
- return new t.JSONApiResponse(a);
2205
- }
2206
- async moveFiles(e, t) {
2207
- return await (await this.moveFilesRaw(e, t)).value();
2208
- }
2209
- async renameFilesRaw(e, n) {
2210
- if (e.renameFilesDto == null) throw new t.RequiredError("renameFilesDto", "Required parameter \"renameFilesDto\" was null or undefined when calling renameFiles().");
2211
- let r = {}, i = {};
2212
- i["Content-Type"] = "application/json";
2213
- let a = await this.request({
2214
- path: "/api/v1/files/rename",
2215
- method: "POST",
2216
- headers: i,
2217
- query: r,
2218
- body: e.renameFilesDto
2219
- }, n);
2220
- return new t.JSONApiResponse(a);
2221
- }
2222
- async renameFiles(e, t) {
2223
- return await (await this.renameFilesRaw(e, t)).value();
2224
- }
2225
- async revokeAccessRaw(e, n) {
2226
- if (e.revokeAccessDto == null) throw new t.RequiredError("revokeAccessDto", "Required parameter \"revokeAccessDto\" was null or undefined when calling revokeAccess().");
2227
- let r = {}, i = {};
2228
- i["Content-Type"] = "application/json";
2229
- let a = await this.request({
2230
- path: "/api/v1/files/revoke-access",
2231
- method: "POST",
2232
- headers: i,
2233
- query: r,
2234
- body: e.revokeAccessDto
2235
- }, n);
2236
- return new t.JSONApiResponse(a);
2237
- }
2238
- async revokeAccess(e, t) {
2239
- return await (await this.revokeAccessRaw(e, t)).value();
2240
- }
2241
- async uploadArchiveRaw(e, n) {
2242
- if (e.file == null) throw new t.RequiredError("file", "Required parameter \"file\" was null or undefined when calling uploadArchive().");
2243
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling uploadArchive().");
2244
- if (e.destinationPath == null) throw new t.RequiredError("destinationPath", "Required parameter \"destinationPath\" was null or undefined when calling uploadArchive().");
2245
- let r = {}, i = {}, a = t.canConsumeForm([{ contentType: "multipart/form-data" }]), o, s = !1;
2246
- s = a, o = s ? new FormData() : new URLSearchParams(), e.file != null && o.append("file", e.file), e.bucket != null && o.append("bucket", e.bucket), e.destinationPath != null && o.append("destinationPath", e.destinationPath);
2247
- let c = await this.request({
2248
- path: "/api/v1/files/upload-archive",
2249
- method: "POST",
2250
- headers: i,
2251
- query: r,
2252
- body: o
2253
- }, n);
2254
- return new t.JSONApiResponse(c);
2255
- }
2256
- async uploadArchive(e, t) {
2257
- return await (await this.uploadArchiveRaw(e, t)).value();
2258
- }
2259
- async uploadFileRaw(e, n) {
2260
- if (e.file == null) throw new t.RequiredError("file", "Required parameter \"file\" was null or undefined when calling uploadFile().");
2261
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling uploadFile().");
2262
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling uploadFile().");
2263
- let r = {}, i = {}, a = t.canConsumeForm([{ contentType: "multipart/form-data" }]), o, s = !1;
2264
- s = a, o = s ? new FormData() : new URLSearchParams(), e.file != null && o.append("file", e.file), e.bucket != null && o.append("bucket", e.bucket), e.path != null && o.append("path", e.path), e.uploadMode != null && o.append("uploadMode", e.uploadMode);
2265
- let c = await this.request({
2266
- path: "/api/v1/files",
2267
- method: "POST",
2268
- headers: i,
2269
- query: r,
2270
- body: o
2271
- }, n);
2272
- return new t.JSONApiResponse(c);
2273
- }
2274
- async uploadFile(e, t) {
2275
- return await (await this.uploadFileRaw(e, t)).value();
2276
- }
2277
- }, e.UploadFileUploadModeEnum = {
2278
- Overwrite: "overwrite",
2279
- CreateOnly: "create-only"
2280
- };
2281
- })), ct = /* @__PURE__ */ y(((e) => {
2282
- Object.defineProperty(e, "__esModule", { value: !0 }), e.HealthApi = void 0;
2283
- var t = U();
2284
- e.HealthApi = class extends t.BaseAPI {
2285
- async checkRaw(e) {
2286
- let n = await this.request({
2287
- path: "/api/health",
2288
- method: "GET",
2289
- headers: {},
2290
- query: {}
2291
- }, e);
2292
- return new t.JSONApiResponse(n);
2293
- }
2294
- async check(e) {
2295
- return await (await this.checkRaw(e)).value();
2296
- }
2297
- };
2298
- })), lt = /* @__PURE__ */ y(((e) => {
2299
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ModelsApi = void 0;
2300
- var t = U();
2301
- e.ModelsApi = class extends t.BaseAPI {
2302
- async getModelRaw(e, n) {
2303
- if (e.modelName == null) throw new t.RequiredError("modelName", "Required parameter \"modelName\" was null or undefined when calling getModel().");
2304
- let r = {}, i = {}, a = "/api/v1/models/{modelName}";
2305
- a = a.replace("{modelName}", encodeURIComponent(String(e.modelName)));
2306
- let o = await this.request({
2307
- path: a,
2308
- method: "GET",
2309
- headers: i,
2310
- query: r
2311
- }, n);
2312
- return new t.JSONApiResponse(o);
2313
- }
2314
- async getModel(e, t) {
2315
- return await (await this.getModelRaw(e, t)).value();
2316
- }
2317
- async listModelsRaw(e) {
2318
- let n = await this.request({
2319
- path: "/api/v1/models",
2320
- method: "GET",
2321
- headers: {},
2322
- query: {}
2323
- }, e);
2324
- return new t.JSONApiResponse(n);
2325
- }
2326
- async listModels(e) {
2327
- return await (await this.listModelsRaw(e)).value();
2328
- }
2329
- };
2330
- })), ut = /* @__PURE__ */ y(((e) => {
2331
- Object.defineProperty(e, "__esModule", { value: !0 }), e.OfflineCredentialsApi = void 0;
2332
- var t = U();
2333
- e.OfflineCredentialsApi = class extends t.BaseAPI {
2334
- async getOfflineCredentialsRaw(e) {
2335
- let n = await this.request({
2336
- path: "/api/v1/offline-credentials",
2337
- method: "GET",
2338
- headers: {},
2339
- query: {}
2340
- }, e);
2341
- return new t.JSONApiResponse(n);
2342
- }
2343
- async getOfflineCredentials(e) {
2344
- return await (await this.getOfflineCredentialsRaw(e)).value();
2345
- }
2346
- async signInOfflineCredentialsRaw(e, n) {
2347
- if (e.offlineCredentialsSigninBodyDto == null) throw new t.RequiredError("offlineCredentialsSigninBodyDto", "Required parameter \"offlineCredentialsSigninBodyDto\" was null or undefined when calling signInOfflineCredentials().");
2348
- let r = {}, i = {};
2349
- i["Content-Type"] = "application/json";
2350
- let a = await this.request({
2351
- path: "/api/v1/offline-credentials/signin",
2352
- method: "POST",
2353
- headers: i,
2354
- query: r,
2355
- body: e.offlineCredentialsSigninBodyDto
2356
- }, n);
2357
- return new t.JSONApiResponse(a);
2358
- }
2359
- async signInOfflineCredentials(e, t) {
2360
- return await (await this.signInOfflineCredentialsRaw(e, t)).value();
2361
- }
2362
- };
2363
- })), dt = /* @__PURE__ */ y(((e) => {
2364
- Object.defineProperty(e, "__esModule", { value: !0 }), e.PromptsApi = void 0;
2365
- var t = U();
2366
- e.PromptsApi = class extends t.BaseAPI {
2367
- async createPromptRaw(e, n) {
2368
- if (e.createPromptDto == null) throw new t.RequiredError("createPromptDto", "Required parameter \"createPromptDto\" was null or undefined when calling createPrompt().");
2369
- let r = {}, i = {};
2370
- i["Content-Type"] = "application/json";
2371
- let a = await this.request({
2372
- path: "/api/v1/prompts",
2373
- method: "POST",
2374
- headers: i,
2375
- query: r,
2376
- body: e.createPromptDto
2377
- }, n);
2378
- return new t.JSONApiResponse(a);
2379
- }
2380
- async createPrompt(e, t) {
2381
- return await (await this.createPromptRaw(e, t)).value();
2382
- }
2383
- async createPromptFolderRaw(e, n) {
2384
- if (e.createPromptFolderDto == null) throw new t.RequiredError("createPromptFolderDto", "Required parameter \"createPromptFolderDto\" was null or undefined when calling createPromptFolder().");
2385
- let r = {}, i = {};
2386
- i["Content-Type"] = "application/json";
2387
- let a = await this.request({
2388
- path: "/api/v1/prompts/folders",
2389
- method: "POST",
2390
- headers: i,
2391
- query: r,
2392
- body: e.createPromptFolderDto
2393
- }, n);
2394
- return new t.JSONApiResponse(a);
2395
- }
2396
- async createPromptFolder(e, t) {
2397
- return await (await this.createPromptFolderRaw(e, t)).value();
2398
- }
2399
- async deletePromptRaw(e, n) {
2400
- if (e.id == null) throw new t.RequiredError("id", "Required parameter \"id\" was null or undefined when calling deletePrompt().");
2401
- let r = {};
2402
- e.id != null && (r.id = e.id);
2403
- let i = await this.request({
2404
- path: "/api/v1/prompts",
2405
- method: "DELETE",
2406
- headers: {},
2407
- query: r
2408
- }, n);
2409
- return new t.VoidApiResponse(i);
2410
- }
2411
- async deletePrompt(e, t) {
2412
- await this.deletePromptRaw(e, t);
2413
- }
2414
- async deletePromptFolderRaw(e, n) {
2415
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling deletePromptFolder().");
2416
- let r = {};
2417
- e.path != null && (r.path = e.path);
2418
- let i = await this.request({
2419
- path: "/api/v1/prompts/folders",
2420
- method: "DELETE",
2421
- headers: {},
2422
- query: r
2423
- }, n);
2424
- return new t.VoidApiResponse(i);
2425
- }
2426
- async deletePromptFolder(e, t) {
2427
- await this.deletePromptFolderRaw(e, t);
2428
- }
2429
- async getPromptRaw(e, n) {
2430
- if (e.id == null) throw new t.RequiredError("id", "Required parameter \"id\" was null or undefined when calling getPrompt().");
2431
- let r = {};
2432
- e.id != null && (r.id = e.id);
2433
- let i = await this.request({
2434
- path: "/api/v1/prompts/item",
2435
- method: "GET",
2436
- headers: {},
2437
- query: r
2438
- }, n);
2439
- return new t.JSONApiResponse(i);
2440
- }
2441
- async getPrompt(e, t) {
2442
- return await (await this.getPromptRaw(e, t)).value();
2443
- }
2444
- async getPublicPromptRaw(e, n) {
2445
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling getPublicPrompt().");
2446
- let r = {};
2447
- e.path != null && (r.path = e.path);
2448
- let i = await this.request({
2449
- path: "/api/v1/prompts/public/item",
2450
- method: "GET",
2451
- headers: {},
2452
- query: r
2453
- }, n);
2454
- return new t.JSONApiResponse(i);
2455
- }
2456
- async getPublicPrompt(e, t) {
2457
- return await (await this.getPublicPromptRaw(e, t)).value();
2458
- }
2459
- async listPromptsRaw(e) {
2460
- let n = await this.request({
2461
- path: "/api/v1/prompts",
2462
- method: "GET",
2463
- headers: {},
2464
- query: {}
2465
- }, e);
2466
- return new t.JSONApiResponse(n);
2467
- }
2468
- async listPrompts(e) {
2469
- return await (await this.listPromptsRaw(e)).value();
2470
- }
2471
- async listPublicPromptsRaw(e) {
2472
- let n = await this.request({
2473
- path: "/api/v1/prompts/public",
2474
- method: "GET",
2475
- headers: {},
2476
- query: {}
2477
- }, e);
2478
- return new t.JSONApiResponse(n);
2479
- }
2480
- async listPublicPrompts(e) {
2481
- return await (await this.listPublicPromptsRaw(e)).value();
2482
- }
2483
- async movePromptRaw(e, n) {
2484
- if (e.id == null) throw new t.RequiredError("id", "Required parameter \"id\" was null or undefined when calling movePrompt().");
2485
- if (e.movePromptDto == null) throw new t.RequiredError("movePromptDto", "Required parameter \"movePromptDto\" was null or undefined when calling movePrompt().");
2486
- let r = {};
2487
- e.id != null && (r.id = e.id);
2488
- let i = {};
2489
- i["Content-Type"] = "application/json";
2490
- let a = await this.request({
2491
- path: "/api/v1/prompts/move",
2492
- method: "POST",
2493
- headers: i,
2494
- query: r,
2495
- body: e.movePromptDto
2496
- }, n);
2497
- return new t.JSONApiResponse(a);
2498
- }
2499
- async movePrompt(e, t) {
2500
- return await (await this.movePromptRaw(e, t)).value();
2501
- }
2502
- async renamePromptFolderRaw(e, n) {
2503
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling renamePromptFolder().");
2504
- if (e.renamePromptFolderDto == null) throw new t.RequiredError("renamePromptFolderDto", "Required parameter \"renamePromptFolderDto\" was null or undefined when calling renamePromptFolder().");
2505
- let r = {};
2506
- e.path != null && (r.path = e.path);
2507
- let i = {};
2508
- i["Content-Type"] = "application/json";
2509
- let a = await this.request({
2510
- path: "/api/v1/prompts/folders",
2511
- method: "PUT",
2512
- headers: i,
2513
- query: r,
2514
- body: e.renamePromptFolderDto
2515
- }, n);
2516
- return new t.JSONApiResponse(a);
2517
- }
2518
- async renamePromptFolder(e, t) {
2519
- return await (await this.renamePromptFolderRaw(e, t)).value();
2520
- }
2521
- async updatePromptRaw(e, n) {
2522
- if (e.id == null) throw new t.RequiredError("id", "Required parameter \"id\" was null or undefined when calling updatePrompt().");
2523
- if (e.updatePromptDto == null) throw new t.RequiredError("updatePromptDto", "Required parameter \"updatePromptDto\" was null or undefined when calling updatePrompt().");
2524
- let r = {};
2525
- e.id != null && (r.id = e.id);
2526
- let i = {};
2527
- i["Content-Type"] = "application/json";
2528
- let a = await this.request({
2529
- path: "/api/v1/prompts",
2530
- method: "PUT",
2531
- headers: i,
2532
- query: r,
2533
- body: e.updatePromptDto
2534
- }, n);
2535
- return new t.JSONApiResponse(a);
2536
- }
2537
- async updatePrompt(e, t) {
2538
- return await (await this.updatePromptRaw(e, t)).value();
2539
- }
2540
- };
2541
- })), ft = /* @__PURE__ */ y(((e) => {
2542
- Object.defineProperty(e, "__esModule", { value: !0 }), e.UnpublishCatalogEntityEntityTypeEnum = e.PublishCatalogEntityEntityTypeEnum = e.GetCatalogPublishHistoryEntityTypeEnum = e.PublishApi = void 0;
2543
- var t = U();
2544
- e.PublishApi = class extends t.BaseAPI {
2545
- async getCatalogPublishHistoryRaw(e, n) {
2546
- if (e.entityType == null) throw new t.RequiredError("entityType", "Required parameter \"entityType\" was null or undefined when calling getCatalogPublishHistory().");
2547
- if (e.entityId == null) throw new t.RequiredError("entityId", "Required parameter \"entityId\" was null or undefined when calling getCatalogPublishHistory().");
2548
- let r = {}, i = {}, a = "/api/v1/catalog/{entityType}/{entityId}/publish-history";
2549
- a = a.replace("{entityType}", encodeURIComponent(String(e.entityType))), a = a.replace("{entityId}", encodeURIComponent(String(e.entityId)));
2550
- let o = await this.request({
2551
- path: a,
2552
- method: "GET",
2553
- headers: i,
2554
- query: r
2555
- }, n);
2556
- return new t.JSONApiResponse(o);
2557
- }
2558
- async getCatalogPublishHistory(e, t) {
2559
- return await (await this.getCatalogPublishHistoryRaw(e, t)).value();
2560
- }
2561
- async getPublishRulesRaw(e, n) {
2562
- if (e.folderPath == null) throw new t.RequiredError("folderPath", "Required parameter \"folderPath\" was null or undefined when calling getPublishRules().");
2563
- let r = {};
2564
- e.folderPath != null && (r.folderPath = e.folderPath);
2565
- let i = await this.request({
2566
- path: "/api/v1/publish/rules",
2567
- method: "GET",
2568
- headers: {},
2569
- query: r
2570
- }, n);
2571
- return new t.JSONApiResponse(i);
2572
- }
2573
- async getPublishRules(e, t) {
2574
- return await (await this.getPublishRulesRaw(e, t)).value();
2575
- }
2576
- async publishCatalogEntityRaw(e, n) {
2577
- if (e.entityType == null) throw new t.RequiredError("entityType", "Required parameter \"entityType\" was null or undefined when calling publishCatalogEntity().");
2578
- if (e.entityId == null) throw new t.RequiredError("entityId", "Required parameter \"entityId\" was null or undefined when calling publishCatalogEntity().");
2579
- if (e.publishCatalogEntityDto == null) throw new t.RequiredError("publishCatalogEntityDto", "Required parameter \"publishCatalogEntityDto\" was null or undefined when calling publishCatalogEntity().");
2580
- let r = {}, i = {};
2581
- i["Content-Type"] = "application/json";
2582
- let a = "/api/v1/catalog/{entityType}/{entityId}/publish";
2583
- a = a.replace("{entityType}", encodeURIComponent(String(e.entityType))), a = a.replace("{entityId}", encodeURIComponent(String(e.entityId)));
2584
- let o = await this.request({
2585
- path: a,
2586
- method: "POST",
2587
- headers: i,
2588
- query: r,
2589
- body: e.publishCatalogEntityDto
2590
- }, n);
2591
- return new t.JSONApiResponse(o);
2592
- }
2593
- async publishCatalogEntity(e, t) {
2594
- return await (await this.publishCatalogEntityRaw(e, t)).value();
2595
- }
2596
- async unpublishCatalogEntityRaw(e, n) {
2597
- if (e.entityType == null) throw new t.RequiredError("entityType", "Required parameter \"entityType\" was null or undefined when calling unpublishCatalogEntity().");
2598
- if (e.entityId == null) throw new t.RequiredError("entityId", "Required parameter \"entityId\" was null or undefined when calling unpublishCatalogEntity().");
2599
- if (e.unpublishCatalogEntityDto == null) throw new t.RequiredError("unpublishCatalogEntityDto", "Required parameter \"unpublishCatalogEntityDto\" was null or undefined when calling unpublishCatalogEntity().");
2600
- let r = {}, i = {};
2601
- i["Content-Type"] = "application/json";
2602
- let a = "/api/v1/catalog/{entityType}/{entityId}/unpublish";
2603
- a = a.replace("{entityType}", encodeURIComponent(String(e.entityType))), a = a.replace("{entityId}", encodeURIComponent(String(e.entityId)));
2604
- let o = await this.request({
2605
- path: a,
2606
- method: "POST",
2607
- headers: i,
2608
- query: r,
2609
- body: e.unpublishCatalogEntityDto
2610
- }, n);
2611
- return new t.JSONApiResponse(o);
2612
- }
2613
- async unpublishCatalogEntity(e, t) {
2614
- return await (await this.unpublishCatalogEntityRaw(e, t)).value();
2615
- }
2616
- }, e.GetCatalogPublishHistoryEntityTypeEnum = {
2617
- Model: "model",
2618
- Toolset: "toolset",
2619
- Application: "application",
2620
- Prompt: "prompt",
2621
- Skill: "skill"
2622
- }, e.PublishCatalogEntityEntityTypeEnum = {
2623
- Model: "model",
2624
- Toolset: "toolset",
2625
- Application: "application",
2626
- Prompt: "prompt",
2627
- Skill: "skill"
2628
- }, e.UnpublishCatalogEntityEntityTypeEnum = {
2629
- Model: "model",
2630
- Toolset: "toolset",
2631
- Application: "application",
2632
- Prompt: "prompt",
2633
- Skill: "skill"
2634
- };
2635
- })), pt = /* @__PURE__ */ y(((e) => {
2636
- Object.defineProperty(e, "__esModule", { value: !0 }), e.RateApi = void 0;
2637
- var t = U();
2638
- e.RateApi = class extends t.BaseAPI {
2639
- async rateMessageRaw(e, n) {
2640
- if (e.rateMessageDto == null) throw new t.RequiredError("rateMessageDto", "Required parameter \"rateMessageDto\" was null or undefined when calling rateMessage().");
2641
- let r = {}, i = {};
2642
- i["Content-Type"] = "application/json";
2643
- let a = await this.request({
2644
- path: "/api/v1/rate",
2645
- method: "POST",
2646
- headers: i,
2647
- query: r,
2648
- body: e.rateMessageDto
2649
- }, n);
2650
- return new t.VoidApiResponse(a);
2651
- }
2652
- async rateMessage(e, t) {
2653
- await this.rateMessageRaw(e, t);
2654
- }
2655
- };
2656
- })), mt = /* @__PURE__ */ y(((e) => {
2657
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ListScheduledTasksSortEnum = e.ScheduledTasksApi = void 0;
2658
- var t = U();
2659
- e.ScheduledTasksApi = class extends t.BaseAPI {
2660
- async createScheduledTaskRaw(e, n) {
2661
- if (e.createScheduledTaskBodyDto == null) throw new t.RequiredError("createScheduledTaskBodyDto", "Required parameter \"createScheduledTaskBodyDto\" was null or undefined when calling createScheduledTask().");
2662
- let r = {}, i = {};
2663
- i["Content-Type"] = "application/json";
2664
- let a = await this.request({
2665
- path: "/api/v1/scheduled-tasks",
2666
- method: "POST",
2667
- headers: i,
2668
- query: r,
2669
- body: e.createScheduledTaskBodyDto
2670
- }, n);
2671
- return new t.JSONApiResponse(a);
2672
- }
2673
- async createScheduledTask(e, t) {
2674
- return await (await this.createScheduledTaskRaw(e, t)).value();
2675
- }
2676
- async deleteScheduledTaskRaw(e, n) {
2677
- if (e.scheduleId == null) throw new t.RequiredError("scheduleId", "Required parameter \"scheduleId\" was null or undefined when calling deleteScheduledTask().");
2678
- let r = {}, i = {}, a = "/api/v1/scheduled-tasks/{scheduleId}";
2679
- a = a.replace("{scheduleId}", encodeURIComponent(String(e.scheduleId)));
2680
- let o = await this.request({
2681
- path: a,
2682
- method: "DELETE",
2683
- headers: i,
2684
- query: r
2685
- }, n);
2686
- return new t.VoidApiResponse(o);
2687
- }
2688
- async deleteScheduledTask(e, t) {
2689
- await this.deleteScheduledTaskRaw(e, t);
2690
- }
2691
- async getScheduledTaskRaw(e, n) {
2692
- if (e.scheduleId == null) throw new t.RequiredError("scheduleId", "Required parameter \"scheduleId\" was null or undefined when calling getScheduledTask().");
2693
- let r = {}, i = {}, a = "/api/v1/scheduled-tasks/{scheduleId}";
2694
- a = a.replace("{scheduleId}", encodeURIComponent(String(e.scheduleId)));
2695
- let o = await this.request({
2696
- path: a,
2697
- method: "GET",
2698
- headers: i,
2699
- query: r
2700
- }, n);
2701
- return new t.JSONApiResponse(o);
2702
- }
2703
- async getScheduledTask(e, t) {
2704
- return await (await this.getScheduledTaskRaw(e, t)).value();
2705
- }
2706
- async listScheduledTaskRunsRaw(e, n) {
2707
- if (e.scheduleId == null) throw new t.RequiredError("scheduleId", "Required parameter \"scheduleId\" was null or undefined when calling listScheduledTaskRuns().");
2708
- let r = {};
2709
- e.limit != null && (r.limit = e.limit), e.offset != null && (r.offset = e.offset);
2710
- let i = {}, a = "/api/v1/scheduled-tasks/{scheduleId}/runs";
2711
- a = a.replace("{scheduleId}", encodeURIComponent(String(e.scheduleId)));
2712
- let o = await this.request({
2713
- path: a,
2714
- method: "GET",
2715
- headers: i,
2716
- query: r
2717
- }, n);
2718
- return new t.JSONApiResponse(o);
2719
- }
2720
- async listScheduledTaskRuns(e, t) {
2721
- return await (await this.listScheduledTaskRunsRaw(e, t)).value();
2722
- }
2723
- async listScheduledTasksRaw(e, n) {
2724
- let r = {};
2725
- e.limit != null && (r.limit = e.limit), e.offset != null && (r.offset = e.offset), e.search != null && (r.search = e.search), e.sort != null && (r.sort = e.sort);
2726
- let i = await this.request({
2727
- path: "/api/v1/scheduled-tasks",
2728
- method: "GET",
2729
- headers: {},
2730
- query: r
2731
- }, n);
2732
- return new t.JSONApiResponse(i);
2733
- }
2734
- async listScheduledTasks(e = {}, t) {
2735
- return await (await this.listScheduledTasksRaw(e, t)).value();
2736
- }
2737
- async pauseScheduledTaskRaw(e, n) {
2738
- if (e.scheduleId == null) throw new t.RequiredError("scheduleId", "Required parameter \"scheduleId\" was null or undefined when calling pauseScheduledTask().");
2739
- let r = {}, i = {}, a = "/api/v1/scheduled-tasks/{scheduleId}/pause";
2740
- a = a.replace("{scheduleId}", encodeURIComponent(String(e.scheduleId)));
2741
- let o = await this.request({
2742
- path: a,
2743
- method: "POST",
2744
- headers: i,
2745
- query: r
2746
- }, n);
2747
- return new t.JSONApiResponse(o);
2748
- }
2749
- async pauseScheduledTask(e, t) {
2750
- return await (await this.pauseScheduledTaskRaw(e, t)).value();
2751
- }
2752
- async resumeScheduledTaskRaw(e, n) {
2753
- if (e.scheduleId == null) throw new t.RequiredError("scheduleId", "Required parameter \"scheduleId\" was null or undefined when calling resumeScheduledTask().");
2754
- let r = {}, i = {}, a = "/api/v1/scheduled-tasks/{scheduleId}/resume";
2755
- a = a.replace("{scheduleId}", encodeURIComponent(String(e.scheduleId)));
2756
- let o = await this.request({
2757
- path: a,
2758
- method: "POST",
2759
- headers: i,
2760
- query: r
2761
- }, n);
2762
- return new t.JSONApiResponse(o);
2763
- }
2764
- async resumeScheduledTask(e, t) {
2765
- return await (await this.resumeScheduledTaskRaw(e, t)).value();
2766
- }
2767
- async updateScheduledTaskRaw(e, n) {
2768
- if (e.scheduleId == null) throw new t.RequiredError("scheduleId", "Required parameter \"scheduleId\" was null or undefined when calling updateScheduledTask().");
2769
- if (e.updateScheduledTaskBodyDto == null) throw new t.RequiredError("updateScheduledTaskBodyDto", "Required parameter \"updateScheduledTaskBodyDto\" was null or undefined when calling updateScheduledTask().");
2770
- let r = {}, i = {};
2771
- i["Content-Type"] = "application/json";
2772
- let a = "/api/v1/scheduled-tasks/{scheduleId}";
2773
- a = a.replace("{scheduleId}", encodeURIComponent(String(e.scheduleId)));
2774
- let o = await this.request({
2775
- path: a,
2776
- method: "PUT",
2777
- headers: i,
2778
- query: r,
2779
- body: e.updateScheduledTaskBodyDto
2780
- }, n);
2781
- return new t.JSONApiResponse(o);
2782
- }
2783
- async updateScheduledTask(e, t) {
2784
- return await (await this.updateScheduledTaskRaw(e, t)).value();
2785
- }
2786
- }, e.ListScheduledTasksSortEnum = {
2787
- FirstToRun: "firstToRun",
2788
- LastToRun: "lastToRun",
2789
- Newest: "newest",
2790
- NameAz: "nameAZ"
2791
- };
2792
- })), ht = /* @__PURE__ */ y(((e) => {
2793
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ShareApi = void 0;
2794
- var t = U();
2795
- e.ShareApi = class extends t.BaseAPI {
2796
- async acceptInvitationRaw(e, n) {
2797
- if (e.invitationId == null) throw new t.RequiredError("invitationId", "Required parameter \"invitationId\" was null or undefined when calling acceptInvitation().");
2798
- let r = {}, i = {}, a = "/api/v1/share/invitations/{invitationId}";
2799
- a = a.replace("{invitationId}", encodeURIComponent(String(e.invitationId)));
2800
- let o = await this.request({
2801
- path: a,
2802
- method: "GET",
2803
- headers: i,
2804
- query: r
2805
- }, n);
2806
- return new t.JSONApiResponse(o);
2807
- }
2808
- async acceptInvitation(e, t) {
2809
- return await (await this.acceptInvitationRaw(e, t)).value();
2810
- }
2811
- async createShareLinkRaw(e, n) {
2812
- if (e.createShareLinkDto == null) throw new t.RequiredError("createShareLinkDto", "Required parameter \"createShareLinkDto\" was null or undefined when calling createShareLink().");
2813
- let r = {}, i = {};
2814
- i["Content-Type"] = "application/json";
2815
- let a = await this.request({
2816
- path: "/api/v1/share",
2817
- method: "POST",
2818
- headers: i,
2819
- query: r,
2820
- body: e.createShareLinkDto
2821
- }, n);
2822
- return new t.JSONApiResponse(a);
2823
- }
2824
- async createShareLink(e, t) {
2825
- return await (await this.createShareLinkRaw(e, t)).value();
2826
- }
2827
- async discardSharedCatalogItemRaw(e, n) {
2828
- if (e.discardSharedCatalogItemDto == null) throw new t.RequiredError("discardSharedCatalogItemDto", "Required parameter \"discardSharedCatalogItemDto\" was null or undefined when calling discardSharedCatalogItem().");
2829
- let r = {}, i = {};
2830
- i["Content-Type"] = "application/json";
2831
- let a = await this.request({
2832
- path: "/api/v1/share/discard",
2833
- method: "POST",
2834
- headers: i,
2835
- query: r,
2836
- body: e.discardSharedCatalogItemDto
2837
- }, n);
2838
- return new t.JSONApiResponse(a);
2839
- }
2840
- async discardSharedCatalogItem(e, t) {
2841
- return await (await this.discardSharedCatalogItemRaw(e, t)).value();
2842
- }
2843
- async getShareRecipientsCountRaw(e, n) {
2844
- if (e.itemId == null) throw new t.RequiredError("itemId", "Required parameter \"itemId\" was null or undefined when calling getShareRecipientsCount().");
2845
- let r = {};
2846
- e.itemId != null && (r.itemId = e.itemId);
2847
- let i = await this.request({
2848
- path: "/api/v1/share/recipients",
2849
- method: "GET",
2850
- headers: {},
2851
- query: r
2852
- }, n);
2853
- return new t.JSONApiResponse(i);
2854
- }
2855
- async getShareRecipientsCount(e, t) {
2856
- return await (await this.getShareRecipientsCountRaw(e, t)).value();
2857
- }
2858
- async revokeSharedAccessRaw(e, n) {
2859
- if (e.revokeSharedAccessDto == null) throw new t.RequiredError("revokeSharedAccessDto", "Required parameter \"revokeSharedAccessDto\" was null or undefined when calling revokeSharedAccess().");
2860
- let r = {}, i = {};
2861
- i["Content-Type"] = "application/json";
2862
- let a = await this.request({
2863
- path: "/api/v1/share/revoke",
2864
- method: "POST",
2865
- headers: i,
2866
- query: r,
2867
- body: e.revokeSharedAccessDto
2868
- }, n);
2869
- return new t.JSONApiResponse(a);
2870
- }
2871
- async revokeSharedAccess(e, t) {
2872
- return await (await this.revokeSharedAccessRaw(e, t)).value();
2873
- }
2874
- };
2875
- })), gt = /* @__PURE__ */ y(((e) => {
2876
- Object.defineProperty(e, "__esModule", { value: !0 }), e.SkillsApi = void 0;
2877
- var t = U();
2878
- e.SkillsApi = class extends t.BaseAPI {
2879
- async createSkillRaw(e, n) {
2880
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling createSkill().");
2881
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling createSkill().");
2882
- if (e.skillManifest == null) throw new t.RequiredError("skillManifest", "Required parameter \"skillManifest\" was null or undefined when calling createSkill().");
2883
- if (e.filePaths == null) throw new t.RequiredError("filePaths", "Required parameter \"filePaths\" was null or undefined when calling createSkill().");
2884
- let r = {}, i = {}, a = t.canConsumeForm([{ contentType: "multipart/form-data" }]), o, s = !1;
2885
- s = a, o = s ? new FormData() : new URLSearchParams(), e.bucket != null && o.append("bucket", e.bucket), e.path != null && o.append("path", e.path), e.skillManifest != null && o.append("skillManifest", e.skillManifest), e.filePaths != null && o.append("filePaths", e.filePaths), e.files != null && e.files.forEach((e) => {
2886
- o.append("files", e);
2887
- });
2888
- let c = await this.request({
2889
- path: "/api/v1/skills",
2890
- method: "POST",
2891
- headers: i,
2892
- query: r,
2893
- body: o
2894
- }, n);
2895
- return new t.JSONApiResponse(c);
2896
- }
2897
- async createSkill(e, t) {
2898
- return await (await this.createSkillRaw(e, t)).value();
2899
- }
2900
- async createSkillGroupingFolderRaw(e, n) {
2901
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling createSkillGroupingFolder().");
2902
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling createSkillGroupingFolder().");
2903
- let r = {};
2904
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path);
2905
- let i = await this.request({
2906
- path: "/api/v1/skills/grouping-folders",
2907
- method: "POST",
2908
- headers: {},
2909
- query: r
2910
- }, n);
2911
- return new t.JSONApiResponse(i);
2912
- }
2913
- async createSkillGroupingFolder(e, t) {
2914
- return await (await this.createSkillGroupingFolderRaw(e, t)).value();
2915
- }
2916
- async deleteSkillRaw(e, n) {
2917
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling deleteSkill().");
2918
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling deleteSkill().");
2919
- let r = {};
2920
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path);
2921
- let i = {};
2922
- e.ifMatch != null && (i["If-Match"] = String(e.ifMatch));
2923
- let a = await this.request({
2924
- path: "/api/v1/skills",
2925
- method: "DELETE",
2926
- headers: i,
2927
- query: r
2928
- }, n);
2929
- return new t.JSONApiResponse(a);
2930
- }
2931
- async deleteSkill(e, t) {
2932
- return await (await this.deleteSkillRaw(e, t)).value();
2933
- }
2934
- async deleteSkillFileRaw(e, n) {
2935
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling deleteSkillFile().");
2936
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling deleteSkillFile().");
2937
- if (e.filePath == null) throw new t.RequiredError("filePath", "Required parameter \"filePath\" was null or undefined when calling deleteSkillFile().");
2938
- let r = {};
2939
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path), e.filePath != null && (r.filePath = e.filePath);
2940
- let i = {};
2941
- e.ifMatch != null && (i["If-Match"] = String(e.ifMatch));
2942
- let a = await this.request({
2943
- path: "/api/v1/skills/files",
2944
- method: "DELETE",
2945
- headers: i,
2946
- query: r
2947
- }, n);
2948
- return new t.JSONApiResponse(a);
2949
- }
2950
- async deleteSkillFile(e, t) {
2951
- return await (await this.deleteSkillFileRaw(e, t)).value();
2952
- }
2953
- async deleteSkillGroupingFolderRaw(e, n) {
2954
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling deleteSkillGroupingFolder().");
2955
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling deleteSkillGroupingFolder().");
2956
- let r = {};
2957
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path);
2958
- let i = {};
2959
- e.ifMatch != null && (i["If-Match"] = String(e.ifMatch));
2960
- let a = await this.request({
2961
- path: "/api/v1/skills/grouping-folders",
2962
- method: "DELETE",
2963
- headers: i,
2964
- query: r
2965
- }, n);
2966
- return new t.JSONApiResponse(a);
2967
- }
2968
- async deleteSkillGroupingFolder(e, t) {
2969
- return await (await this.deleteSkillGroupingFolderRaw(e, t)).value();
2970
- }
2971
- async downloadSkillRaw(e, n) {
2972
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling downloadSkill().");
2973
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling downloadSkill().");
2974
- let r = {};
2975
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path);
2976
- let i = await this.request({
2977
- path: "/api/v1/skills/download",
2978
- method: "GET",
2979
- headers: {},
2980
- query: r
2981
- }, n);
2982
- return new t.BlobApiResponse(i);
2983
- }
2984
- async downloadSkill(e, t) {
2985
- return await (await this.downloadSkillRaw(e, t)).value();
2986
- }
2987
- async downloadSkillFileRaw(e, n) {
2988
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling downloadSkillFile().");
2989
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling downloadSkillFile().");
2990
- if (e.filePath == null) throw new t.RequiredError("filePath", "Required parameter \"filePath\" was null or undefined when calling downloadSkillFile().");
2991
- let r = {};
2992
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path), e.filePath != null && (r.filePath = e.filePath);
2993
- let i = await this.request({
2994
- path: "/api/v1/skills/files/download",
2995
- method: "GET",
2996
- headers: {},
2997
- query: r
2998
- }, n);
2999
- return new t.BlobApiResponse(i);
3000
- }
3001
- async downloadSkillFile(e, t) {
3002
- return await (await this.downloadSkillFileRaw(e, t)).value();
3003
- }
3004
- async getSkillMetadataRaw(e, n) {
3005
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling getSkillMetadata().");
3006
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling getSkillMetadata().");
3007
- let r = {};
3008
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path);
3009
- let i = await this.request({
3010
- path: "/api/v1/skills/metadata",
3011
- method: "GET",
3012
- headers: {},
3013
- query: r
3014
- }, n);
3015
- return new t.JSONApiResponse(i);
3016
- }
3017
- async getSkillMetadata(e, t) {
3018
- return await (await this.getSkillMetadataRaw(e, t)).value();
3019
- }
3020
- async importSkillArchiveRaw(e, n) {
3021
- if (e.file == null) throw new t.RequiredError("file", "Required parameter \"file\" was null or undefined when calling importSkillArchive().");
3022
- let r = {}, i = {}, a = t.canConsumeForm([{ contentType: "multipart/form-data" }]), o, s = !1;
3023
- s = a, o = s ? new FormData() : new URLSearchParams(), e.file != null && o.append("file", e.file);
3024
- let c = await this.request({
3025
- path: "/api/v1/skills/import",
3026
- method: "POST",
3027
- headers: i,
3028
- query: r,
3029
- body: o
3030
- }, n);
3031
- return new t.JSONApiResponse(c);
3032
- }
3033
- async importSkillArchive(e, t) {
3034
- return await (await this.importSkillArchiveRaw(e, t)).value();
3035
- }
3036
- async listCatalogSkillsRaw(e) {
3037
- let n = await this.request({
3038
- path: "/api/v1/skills/catalog",
3039
- method: "GET",
3040
- headers: {},
3041
- query: {}
3042
- }, e);
3043
- return new t.JSONApiResponse(n);
3044
- }
3045
- async listCatalogSkills(e) {
3046
- return await (await this.listCatalogSkillsRaw(e)).value();
3047
- }
3048
- async listSkillFilesRaw(e, n) {
3049
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling listSkillFiles().");
3050
- if (e.filePath == null) throw new t.RequiredError("filePath", "Required parameter \"filePath\" was null or undefined when calling listSkillFiles().");
3051
- let r = {};
3052
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path), e.token != null && (r.token = e.token), e.limit != null && (r.limit = e.limit), e.recursive != null && (r.recursive = e.recursive), e.filePath != null && (r.filePath = e.filePath);
3053
- let i = await this.request({
3054
- path: "/api/v1/skills/files",
3055
- method: "GET",
3056
- headers: {},
3057
- query: r
3058
- }, n);
3059
- return new t.JSONApiResponse(i);
3060
- }
3061
- async listSkillFiles(e, t) {
3062
- return await (await this.listSkillFilesRaw(e, t)).value();
3063
- }
3064
- async listSkillsRaw(e, n) {
3065
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling listSkills().");
3066
- let r = {};
3067
- e.bucket != null && (r.bucket = e.bucket), e.path != null && (r.path = e.path), e.token != null && (r.token = e.token), e.limit != null && (r.limit = e.limit), e.recursive != null && (r.recursive = e.recursive);
3068
- let i = await this.request({
3069
- path: "/api/v1/skills",
3070
- method: "GET",
3071
- headers: {},
3072
- query: r
3073
- }, n);
3074
- return new t.JSONApiResponse(i);
3075
- }
3076
- async listSkills(e, t) {
3077
- return await (await this.listSkillsRaw(e, t)).value();
3078
- }
3079
- async updateSkillRaw(e, n) {
3080
- if (e.ifMatch == null) throw new t.RequiredError("ifMatch", "Required parameter \"ifMatch\" was null or undefined when calling updateSkill().");
3081
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling updateSkill().");
3082
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling updateSkill().");
3083
- if (e.skillManifest == null) throw new t.RequiredError("skillManifest", "Required parameter \"skillManifest\" was null or undefined when calling updateSkill().");
3084
- if (e.filePaths == null) throw new t.RequiredError("filePaths", "Required parameter \"filePaths\" was null or undefined when calling updateSkill().");
3085
- let r = {}, i = {};
3086
- e.ifMatch != null && (i["If-Match"] = String(e.ifMatch));
3087
- let a = t.canConsumeForm([{ contentType: "multipart/form-data" }]), o, s = !1;
3088
- s = a, o = s ? new FormData() : new URLSearchParams(), e.bucket != null && o.append("bucket", e.bucket), e.path != null && o.append("path", e.path), e.skillManifest != null && o.append("skillManifest", e.skillManifest), e.filePaths != null && o.append("filePaths", e.filePaths), e.files != null && e.files.forEach((e) => {
3089
- o.append("files", e);
3090
- });
3091
- let c = await this.request({
3092
- path: "/api/v1/skills",
3093
- method: "PUT",
3094
- headers: i,
3095
- query: r,
3096
- body: o
3097
- }, n);
3098
- return new t.JSONApiResponse(c);
3099
- }
3100
- async updateSkill(e, t) {
3101
- return await (await this.updateSkillRaw(e, t)).value();
3102
- }
3103
- async uploadSkillFileRaw(e, n) {
3104
- if (e.file == null) throw new t.RequiredError("file", "Required parameter \"file\" was null or undefined when calling uploadSkillFile().");
3105
- if (e.bucket == null) throw new t.RequiredError("bucket", "Required parameter \"bucket\" was null or undefined when calling uploadSkillFile().");
3106
- if (e.path == null) throw new t.RequiredError("path", "Required parameter \"path\" was null or undefined when calling uploadSkillFile().");
3107
- if (e.filePath == null) throw new t.RequiredError("filePath", "Required parameter \"filePath\" was null or undefined when calling uploadSkillFile().");
3108
- let r = {}, i = {};
3109
- e.ifMatch != null && (i["If-Match"] = String(e.ifMatch));
3110
- let a = t.canConsumeForm([{ contentType: "multipart/form-data" }]), o, s = !1;
3111
- s = a, o = s ? new FormData() : new URLSearchParams(), e.file != null && o.append("file", e.file), e.bucket != null && o.append("bucket", e.bucket), e.path != null && o.append("path", e.path), e.filePath != null && o.append("filePath", e.filePath);
3112
- let c = await this.request({
3113
- path: "/api/v1/skills/files",
3114
- method: "PUT",
3115
- headers: i,
3116
- query: r,
3117
- body: o
3118
- }, n);
3119
- return new t.JSONApiResponse(c);
3120
- }
3121
- async uploadSkillFile(e, t) {
3122
- return await (await this.uploadSkillFileRaw(e, t)).value();
3123
- }
3124
- };
3125
- })), _t = /* @__PURE__ */ y(((e) => {
3126
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ThemesApi = void 0;
3127
- var t = U();
3128
- e.ThemesApi = class extends t.BaseAPI {
3129
- async getThemeIconRaw(e, n) {
3130
- if (e.iconName == null) throw new t.RequiredError("iconName", "Required parameter \"iconName\" was null or undefined when calling getThemeIcon().");
3131
- let r = {};
3132
- e.iconName != null && (r.iconName = e.iconName);
3133
- let i = await this.request({
3134
- path: "/api/themes/icon",
3135
- method: "GET",
3136
- headers: {},
3137
- query: r
3138
- }, n);
3139
- return this.isJsonMime(i.headers.get("content-type")) ? new t.JSONApiResponse(i) : new t.TextApiResponse(i);
3140
- }
3141
- async getThemeIcon(e, t) {
3142
- return await (await this.getThemeIconRaw(e, t)).value();
3143
- }
3144
- async getThemesRaw(e) {
3145
- let n = await this.request({
3146
- path: "/api/themes",
3147
- method: "GET",
3148
- headers: {},
3149
- query: {}
3150
- }, e);
3151
- return new t.JSONApiResponse(n);
3152
- }
3153
- async getThemes(e) {
3154
- return await (await this.getThemesRaw(e)).value();
3155
- }
3156
- };
3157
- })), vt = /* @__PURE__ */ y(((e) => {
3158
- Object.defineProperty(e, "__esModule", { value: !0 }), e.ListMcpToolNamesKindEnum = e.ListMcpAppToolsKindEnum = e.ToolsetsApi = void 0;
3159
- var t = U();
3160
- e.ToolsetsApi = class extends t.BaseAPI {
3161
- async callToolsetMcpAppToolRaw(e, n) {
3162
- if (e.toolsetName == null) throw new t.RequiredError("toolsetName", "Required parameter \"toolsetName\" was null or undefined when calling callToolsetMcpAppTool().");
3163
- if (e.mcpAppToolCallRequestDto == null) throw new t.RequiredError("mcpAppToolCallRequestDto", "Required parameter \"mcpAppToolCallRequestDto\" was null or undefined when calling callToolsetMcpAppTool().");
3164
- let r = {}, i = {};
3165
- i["Content-Type"] = "application/json";
3166
- let a = "/api/v1/toolsets/{toolsetName}/mcp-app-tool-call";
3167
- a = a.replace("{toolsetName}", encodeURIComponent(String(e.toolsetName)));
3168
- let o = await this.request({
3169
- path: a,
3170
- method: "POST",
3171
- headers: i,
3172
- query: r,
3173
- body: e.mcpAppToolCallRequestDto
3174
- }, n);
3175
- return new t.JSONApiResponse(o);
3176
- }
3177
- async callToolsetMcpAppTool(e, t) {
3178
- return await (await this.callToolsetMcpAppToolRaw(e, t)).value();
3179
- }
3180
- async createToolsetRaw(e, n) {
3181
- if (e.toolsetBodyDto == null) throw new t.RequiredError("toolsetBodyDto", "Required parameter \"toolsetBodyDto\" was null or undefined when calling createToolset().");
3182
- let r = {}, i = {};
3183
- i["Content-Type"] = "application/json";
3184
- let a = await this.request({
3185
- path: "/api/v1/toolsets",
3186
- method: "POST",
3187
- headers: i,
3188
- query: r,
3189
- body: e.toolsetBodyDto
3190
- }, n);
3191
- return new t.JSONApiResponse(a);
3192
- }
3193
- async createToolset(e, t) {
3194
- return await (await this.createToolsetRaw(e, t)).value();
3195
- }
3196
- async deleteToolsetRaw(e, n) {
3197
- if (e.toolsetName == null) throw new t.RequiredError("toolsetName", "Required parameter \"toolsetName\" was null or undefined when calling deleteToolset().");
3198
- let r = {}, i = {}, a = "/api/v1/toolsets/{toolsetName}";
3199
- a = a.replace("{toolsetName}", encodeURIComponent(String(e.toolsetName)));
3200
- let o = await this.request({
3201
- path: a,
3202
- method: "DELETE",
3203
- headers: i,
3204
- query: r
3205
- }, n);
3206
- return new t.VoidApiResponse(o);
3207
- }
3208
- async deleteToolset(e, t) {
3209
- await this.deleteToolsetRaw(e, t);
3210
- }
3211
- async getToolsetRaw(e, n) {
3212
- if (e.toolsetName == null) throw new t.RequiredError("toolsetName", "Required parameter \"toolsetName\" was null or undefined when calling getToolset().");
3213
- let r = {}, i = {}, a = "/api/v1/toolsets/{toolsetName}";
3214
- a = a.replace("{toolsetName}", encodeURIComponent(String(e.toolsetName)));
3215
- let o = await this.request({
3216
- path: a,
3217
- method: "GET",
3218
- headers: i,
3219
- query: r
3220
- }, n);
3221
- return new t.JSONApiResponse(o);
3222
- }
3223
- async getToolset(e, t) {
3224
- return await (await this.getToolsetRaw(e, t)).value();
3225
- }
3226
- async getToolsetMcpAppResourceRaw(e, n) {
3227
- if (e.toolsetName == null) throw new t.RequiredError("toolsetName", "Required parameter \"toolsetName\" was null or undefined when calling getToolsetMcpAppResource().");
3228
- if (e.resourceUri == null) throw new t.RequiredError("resourceUri", "Required parameter \"resourceUri\" was null or undefined when calling getToolsetMcpAppResource().");
3229
- let r = {};
3230
- e.resourceUri != null && (r.resourceUri = e.resourceUri);
3231
- let i = {}, a = "/api/v1/toolsets/{toolsetName}/mcp-app-resource";
3232
- a = a.replace("{toolsetName}", encodeURIComponent(String(e.toolsetName)));
3233
- let o = await this.request({
3234
- path: a,
3235
- method: "GET",
3236
- headers: i,
3237
- query: r
3238
- }, n);
3239
- return new t.VoidApiResponse(o);
3240
- }
3241
- async getToolsetMcpAppResource(e, t) {
3242
- await this.getToolsetMcpAppResourceRaw(e, t);
3243
- }
3244
- async listMcpAppToolsRaw(e, n) {
3245
- if (e.deploymentId == null) throw new t.RequiredError("deploymentId", "Required parameter \"deploymentId\" was null or undefined when calling listMcpAppTools().");
3246
- if (e.kind == null) throw new t.RequiredError("kind", "Required parameter \"kind\" was null or undefined when calling listMcpAppTools().");
3247
- let r = {};
3248
- e.deploymentId != null && (r.deploymentId = e.deploymentId), e.kind != null && (r.kind = e.kind);
3249
- let i = await this.request({
3250
- path: "/api/v1/toolsets/mcp-apps/tools",
3251
- method: "GET",
3252
- headers: {},
3253
- query: r
3254
- }, n);
3255
- return new t.JSONApiResponse(i);
3256
- }
3257
- async listMcpAppTools(e, t) {
3258
- return await (await this.listMcpAppToolsRaw(e, t)).value();
3259
- }
3260
- async listMcpToolNamesRaw(e, n) {
3261
- if (e.deploymentId == null) throw new t.RequiredError("deploymentId", "Required parameter \"deploymentId\" was null or undefined when calling listMcpToolNames().");
3262
- if (e.kind == null) throw new t.RequiredError("kind", "Required parameter \"kind\" was null or undefined when calling listMcpToolNames().");
3263
- let r = {};
3264
- e.deploymentId != null && (r.deploymentId = e.deploymentId), e.kind != null && (r.kind = e.kind);
3265
- let i = await this.request({
3266
- path: "/api/v1/toolsets/mcp-apps/tool-names",
3267
- method: "GET",
3268
- headers: {},
3269
- query: r
3270
- }, n);
3271
- return new t.JSONApiResponse(i);
3272
- }
3273
- async listMcpToolNames(e, t) {
3274
- return await (await this.listMcpToolNamesRaw(e, t)).value();
3275
- }
3276
- async listToolsetsRaw(e) {
3277
- let n = await this.request({
3278
- path: "/api/v1/toolsets",
3279
- method: "GET",
3280
- headers: {},
3281
- query: {}
3282
- }, e);
3283
- return new t.JSONApiResponse(n);
3284
- }
3285
- async listToolsets(e) {
3286
- return await (await this.listToolsetsRaw(e)).value();
3287
- }
3288
- async loginToolsetRaw(e, n) {
3289
- if (e.toolsetName == null) throw new t.RequiredError("toolsetName", "Required parameter \"toolsetName\" was null or undefined when calling loginToolset().");
3290
- if (e.toolsetLoginBodyDto == null) throw new t.RequiredError("toolsetLoginBodyDto", "Required parameter \"toolsetLoginBodyDto\" was null or undefined when calling loginToolset().");
3291
- let r = {}, i = {};
3292
- i["Content-Type"] = "application/json";
3293
- let a = "/api/v1/toolsets/{toolsetName}/login";
3294
- a = a.replace("{toolsetName}", encodeURIComponent(String(e.toolsetName)));
3295
- let o = await this.request({
3296
- path: a,
3297
- method: "POST",
3298
- headers: i,
3299
- query: r,
3300
- body: e.toolsetLoginBodyDto
3301
- }, n);
3302
- return new t.JSONApiResponse(o);
3303
- }
3304
- async loginToolset(e, t) {
3305
- return await (await this.loginToolsetRaw(e, t)).value();
3306
- }
3307
- async logoutToolsetRaw(e, n) {
3308
- if (e.toolsetName == null) throw new t.RequiredError("toolsetName", "Required parameter \"toolsetName\" was null or undefined when calling logoutToolset().");
3309
- if (e.toolsetLogoutBodyDto == null) throw new t.RequiredError("toolsetLogoutBodyDto", "Required parameter \"toolsetLogoutBodyDto\" was null or undefined when calling logoutToolset().");
3310
- let r = {}, i = {};
3311
- i["Content-Type"] = "application/json";
3312
- let a = "/api/v1/toolsets/{toolsetName}/logout";
3313
- a = a.replace("{toolsetName}", encodeURIComponent(String(e.toolsetName)));
3314
- let o = await this.request({
3315
- path: a,
3316
- method: "POST",
3317
- headers: i,
3318
- query: r,
3319
- body: e.toolsetLogoutBodyDto
3320
- }, n);
3321
- return new t.JSONApiResponse(o);
3322
- }
3323
- async logoutToolset(e, t) {
3324
- return await (await this.logoutToolsetRaw(e, t)).value();
3325
- }
3326
- async updateToolsetRaw(e, n) {
3327
- if (e.toolsetName == null) throw new t.RequiredError("toolsetName", "Required parameter \"toolsetName\" was null or undefined when calling updateToolset().");
3328
- if (e.toolsetBodyDto == null) throw new t.RequiredError("toolsetBodyDto", "Required parameter \"toolsetBodyDto\" was null or undefined when calling updateToolset().");
3329
- let r = {}, i = {};
3330
- i["Content-Type"] = "application/json";
3331
- let a = "/api/v1/toolsets/{toolsetName}";
3332
- a = a.replace("{toolsetName}", encodeURIComponent(String(e.toolsetName)));
3333
- let o = await this.request({
3334
- path: a,
3335
- method: "PATCH",
3336
- headers: i,
3337
- query: r,
3338
- body: e.toolsetBodyDto
3339
- }, n);
3340
- return new t.JSONApiResponse(o);
3341
- }
3342
- async updateToolset(e, t) {
3343
- return await (await this.updateToolsetRaw(e, t)).value();
3344
- }
3345
- }, e.ListMcpAppToolsKindEnum = {
3346
- Toolset: "toolset",
3347
- Application: "application"
3348
- }, e.ListMcpToolNamesKindEnum = {
3349
- Toolset: "toolset",
3350
- Application: "application"
3351
- };
3352
- })), yt = /* @__PURE__ */ y(((e) => {
3353
- Object.defineProperty(e, "__esModule", { value: !0 }), e.TranscriptionApi = void 0;
3354
- var t = U();
3355
- e.TranscriptionApi = class extends t.BaseAPI {
3356
- async transcribeAudioRaw(e, n) {
3357
- if (e.transcribeAudioDto == null) throw new t.RequiredError("transcribeAudioDto", "Required parameter \"transcribeAudioDto\" was null or undefined when calling transcribeAudio().");
3358
- let r = {}, i = {};
3359
- i["Content-Type"] = "application/json";
3360
- let a = await this.request({
3361
- path: "/api/v1/transcription",
3362
- method: "POST",
3363
- headers: i,
3364
- query: r,
3365
- body: e.transcribeAudioDto
3366
- }, n);
3367
- return new t.JSONApiResponse(a);
3368
- }
3369
- async transcribeAudio(e, t) {
3370
- return await (await this.transcribeAudioRaw(e, t)).value();
3371
- }
3372
- };
3373
- })), bt = /* @__PURE__ */ y(((e) => {
3374
- Object.defineProperty(e, "__esModule", { value: !0 }), e.UserApi = void 0;
3375
- var t = U();
3376
- e.UserApi = class extends t.BaseAPI {
3377
- async getUserLimitsRaw(e) {
3378
- let n = await this.request({
3379
- path: "/api/v1/user/limits",
3380
- method: "GET",
3381
- headers: {},
3382
- query: {}
3383
- }, e);
3384
- return new t.JSONApiResponse(n);
3385
- }
3386
- async getUserLimits(e) {
3387
- return await (await this.getUserLimitsRaw(e)).value();
3388
- }
3389
- async getUserUsageRaw(e) {
3390
- let n = await this.request({
3391
- path: "/api/v1/user/usage",
3392
- method: "GET",
3393
- headers: {},
3394
- query: {}
3395
- }, e);
3396
- return new t.JSONApiResponse(n);
3397
- }
3398
- async getUserUsage(e) {
3399
- return await (await this.getUserUsageRaw(e)).value();
3400
- }
3401
- };
3402
- })), xt = /* @__PURE__ */ y(((e) => {
3403
- Object.defineProperty(e, "__esModule", { value: !0 }), e.UserConfigApi = void 0;
3404
- var t = U();
3405
- e.UserConfigApi = class extends t.BaseAPI {
3406
- async getUserConfigRaw(e) {
3407
- let n = await this.request({
3408
- path: "/api/v1/user-config",
3409
- method: "GET",
3410
- headers: {},
3411
- query: {}
3412
- }, e);
3413
- return new t.JSONApiResponse(n);
3414
- }
3415
- async getUserConfig(e) {
3416
- return await (await this.getUserConfigRaw(e)).value();
3417
- }
3418
- async updateInstalledDeploymentRaw(e, n) {
3419
- if (e.updateInstalledDto == null) throw new t.RequiredError("updateInstalledDto", "Required parameter \"updateInstalledDto\" was null or undefined when calling updateInstalledDeployment().");
3420
- let r = {}, i = {};
3421
- i["Content-Type"] = "application/json";
3422
- let a = await this.request({
3423
- path: "/api/v1/user-config/deployments",
3424
- method: "PATCH",
3425
- headers: i,
3426
- query: r,
3427
- body: e.updateInstalledDto
3428
- }, n);
3429
- return new t.VoidApiResponse(a);
3430
- }
3431
- async updateInstalledDeployment(e, t) {
3432
- await this.updateInstalledDeploymentRaw(e, t);
3433
- }
3434
- async updateInstalledPromptRaw(e, n) {
3435
- if (e.updateInstalledPromptDto == null) throw new t.RequiredError("updateInstalledPromptDto", "Required parameter \"updateInstalledPromptDto\" was null or undefined when calling updateInstalledPrompt().");
3436
- let r = {}, i = {};
3437
- i["Content-Type"] = "application/json";
3438
- let a = await this.request({
3439
- path: "/api/v1/user-config/prompts",
3440
- method: "PATCH",
3441
- headers: i,
3442
- query: r,
3443
- body: e.updateInstalledPromptDto
3444
- }, n);
3445
- return new t.VoidApiResponse(a);
3446
- }
3447
- async updateInstalledPrompt(e, t) {
3448
- await this.updateInstalledPromptRaw(e, t);
3449
- }
3450
- async updateInstalledSkillRaw(e, n) {
3451
- if (e.updateInstalledSkillDto == null) throw new t.RequiredError("updateInstalledSkillDto", "Required parameter \"updateInstalledSkillDto\" was null or undefined when calling updateInstalledSkill().");
3452
- let r = {}, i = {};
3453
- i["Content-Type"] = "application/json";
3454
- let a = await this.request({
3455
- path: "/api/v1/user-config/skills",
3456
- method: "PATCH",
3457
- headers: i,
3458
- query: r,
3459
- body: e.updateInstalledSkillDto
3460
- }, n);
3461
- return new t.VoidApiResponse(a);
3462
- }
3463
- async updateInstalledSkill(e, t) {
3464
- await this.updateInstalledSkillRaw(e, t);
3465
- }
3466
- async updateInstalledToolsetRaw(e, n) {
3467
- if (e.updateInstalledDto == null) throw new t.RequiredError("updateInstalledDto", "Required parameter \"updateInstalledDto\" was null or undefined when calling updateInstalledToolset().");
3468
- let r = {}, i = {};
3469
- i["Content-Type"] = "application/json";
3470
- let a = await this.request({
3471
- path: "/api/v1/user-config/toolsets",
3472
- method: "PATCH",
3473
- headers: i,
3474
- query: r,
3475
- body: e.updateInstalledDto
3476
- }, n);
3477
- return new t.VoidApiResponse(a);
3478
- }
3479
- async updateInstalledToolset(e, t) {
3480
- await this.updateInstalledToolsetRaw(e, t);
3481
- }
3482
- async updatePinRaw(e, n) {
3483
- if (e.updatePinsDto == null) throw new t.RequiredError("updatePinsDto", "Required parameter \"updatePinsDto\" was null or undefined when calling updatePin().");
3484
- let r = {}, i = {};
3485
- i["Content-Type"] = "application/json";
3486
- let a = await this.request({
3487
- path: "/api/v1/user-config/pins",
3488
- method: "PATCH",
3489
- headers: i,
3490
- query: r,
3491
- body: e.updatePinsDto
3492
- }, n);
3493
- return new t.VoidApiResponse(a);
3494
- }
3495
- async updatePin(e, t) {
3496
- await this.updatePinRaw(e, t);
3497
- }
3498
- async updateSelectedDeploymentRaw(e, n) {
3499
- if (e.updateSelectedDeploymentDto == null) throw new t.RequiredError("updateSelectedDeploymentDto", "Required parameter \"updateSelectedDeploymentDto\" was null or undefined when calling updateSelectedDeployment().");
3500
- let r = {}, i = {};
3501
- i["Content-Type"] = "application/json";
3502
- let a = await this.request({
3503
- path: "/api/v1/user-config/deployments/selected",
3504
- method: "PATCH",
3505
- headers: i,
3506
- query: r,
3507
- body: e.updateSelectedDeploymentDto
3508
- }, n);
3509
- return new t.VoidApiResponse(a);
3510
- }
3511
- async updateSelectedDeployment(e, t) {
3512
- await this.updateSelectedDeploymentRaw(e, t);
3513
- }
3514
- };
3515
- })), St = /* @__PURE__ */ y(((e) => {
3516
- Object.defineProperty(e, "__esModule", { value: !0 });
3517
- var t = (H(), b(A));
3518
- t.__exportStar($e(), e), t.__exportStar(et(), e), t.__exportStar(tt(), e), t.__exportStar(nt(), e), t.__exportStar(rt(), e), t.__exportStar(it(), e), t.__exportStar(at(), e), t.__exportStar(ot(), e), t.__exportStar(st(), e), t.__exportStar(ct(), e), t.__exportStar(lt(), e), t.__exportStar(ut(), e), t.__exportStar(dt(), e), t.__exportStar(ft(), e), t.__exportStar(pt(), e), t.__exportStar(mt(), e), t.__exportStar(ht(), e), t.__exportStar(gt(), e), t.__exportStar(_t(), e), t.__exportStar(vt(), e), t.__exportStar(yt(), e), t.__exportStar(bt(), e), t.__exportStar(xt(), e);
3519
- })), Ct = /* @__PURE__ */ y(((e) => {
3520
- Object.defineProperty(e, "__esModule", { value: !0 }), e.UpdatedScheduledTaskDtoTriggerTypeEnum = e.UnpublishResultDtoEntityTypeEnum = e.ToolsetLogoutBodyDtoAuthenticationTypeEnum = e.ToolsetLogoutBodyDtoCredentialsLevelEnum = e.ToolsetLoginBodyDtoAuthenticationTypeEnum = e.ToolsetLoginBodyDtoCredentialsLevelEnum = e.ToolsetBodyDtoTransportEnum = e.ToolsetAuthSettingsDtoUserLevelAuthStatusEnum = e.ToolsetAuthSettingsDtoAppLevelAuthStatusEnum = e.ToolsetAuthSettingsDtoGlobalAuthStatusEnum = e.ToolsetAuthSettingsDtoAuthenticationTypeEnum = e.ToolsetAuthSettingsBodyDtoAuthenticationTypeEnum = e.StageDtoStatusEnum = e.SkillMetadataItemDtoNodeTypeEnum = e.ShareLinkResponseDtoAccessEnum = e.SendCompletionDtoModeEnum = e.ScheduledTaskRunDtoStatusEnum = e.ScheduledTaskDtoTriggerTypeEnum = e.ReportClientChannelDtoResultEnum = e.RenameItemDtoNodeTypeEnum = e.RateMessageDtoRateEnum = e.PublishRuleDtoFunctionEnum = e.PublishResultDtoEntityTypeEnum = e.PublishHistoryEntryDtoEntityTypeEnum = e.MoveItemDtoNodeTypeEnum = e.MessageDtoRoleEnum = e.McpAppToolCallRequestDtoKindEnum = e.ListFilesItemDtoNodeTypeEnum = e.GetExternalServiceResponseDtoAuthenticationTypeEnum = e.ExternalServiceSigninBodyDtoAuthenticationTypeEnum = e.ExternalServiceSigninBodyDtoCredentialsLevelEnum = e.ExternalServiceLogoutBodyDtoAuthenticationTypeEnum = e.ExternalServiceLogoutBodyDtoCredentialsLevelEnum = e.DialToolsetAuthSettingsDtoUserLevelAuthStatusEnum = e.DialToolsetAuthSettingsDtoGlobalAuthStatusEnum = e.DialToolsetAuthSettingsDtoAuthenticationTypeEnum = e.DeploymentItemDtoTypeEnum = e.DeploymentDetailsDtoTypeEnum = e.DeleteItemDtoNodeTypeEnum = e.CreatedScheduledTaskDtoTriggerTypeEnum = e.CreateShareLinkDtoAccessEnum = e.CopyItemDtoNodeTypeEnum = e.ConversationResponseDtoResponseFormatEnum = e.ConversationMessageDtoRoleEnum = e.ConversationMessageCustomContentDtoEventTypeEnum = e.ConversationDeletionFailureDtoCodeEnum = e.ClientConfigDtoMcpAppThemeEnum = e.ArchiveItemDtoNodeTypeEnum = e.ApplicationExternalServiceDtoAuthenticationTypeEnum = void 0, e.ApplicationExternalServiceDtoAuthenticationTypeEnum = {
3521
- None: "NONE",
3522
- ApiKey: "API_KEY",
3523
- Oauth: "OAUTH",
3524
- DialNative: "DIAL_NATIVE"
3525
- }, e.ArchiveItemDtoNodeTypeEnum = {
3526
- Item: "item",
3527
- Folder: "folder"
3528
- }, e.ClientConfigDtoMcpAppThemeEnum = {
3529
- Light: "light",
3530
- Dark: "dark"
3531
- }, e.ConversationDeletionFailureDtoCodeEnum = {
3532
- NotFound: "NOT_FOUND",
3533
- Forbidden: "FORBIDDEN",
3534
- UpstreamError: "UPSTREAM_ERROR",
3535
- Unknown: "UNKNOWN"
3536
- }, e.ConversationMessageCustomContentDtoEventTypeEnum = { ModelChanged: "model_changed" }, e.ConversationMessageDtoRoleEnum = {
3537
- User: "user",
3538
- Assistant: "assistant",
3539
- Status: "status"
3540
- }, e.ConversationResponseDtoResponseFormatEnum = {
3541
- Markdown: "markdown",
3542
- PlainText: "plain_text"
3543
- }, e.CopyItemDtoNodeTypeEnum = {
3544
- Item: "item",
3545
- Folder: "folder"
3546
- }, e.CreateShareLinkDtoAccessEnum = {
3547
- View: "view",
3548
- Edit: "edit"
3549
- }, e.CreatedScheduledTaskDtoTriggerTypeEnum = {
3550
- Cron: "cron",
3551
- Date: "date"
3552
- }, e.DeleteItemDtoNodeTypeEnum = {
3553
- Item: "item",
3554
- Folder: "folder"
3555
- }, e.DeploymentDetailsDtoTypeEnum = {
3556
- Model: "model",
3557
- Application: "application",
3558
- Toolset: "toolset"
3559
- }, e.DeploymentItemDtoTypeEnum = {
3560
- Model: "model",
3561
- Application: "application",
3562
- Toolset: "toolset"
3563
- }, e.DialToolsetAuthSettingsDtoAuthenticationTypeEnum = {
3564
- Oauth: "OAUTH",
3565
- ApiKey: "API_KEY",
3566
- None: "NONE"
3567
- }, e.DialToolsetAuthSettingsDtoGlobalAuthStatusEnum = {
3568
- SignedIn: "SIGNED_IN",
3569
- SignedOut: "SIGNED_OUT"
3570
- }, e.DialToolsetAuthSettingsDtoUserLevelAuthStatusEnum = {
3571
- SignedIn: "SIGNED_IN",
3572
- SignedOut: "SIGNED_OUT"
3573
- }, e.ExternalServiceLogoutBodyDtoCredentialsLevelEnum = {
3574
- Global: "GLOBAL",
3575
- Application: "APPLICATION",
3576
- User: "USER"
3577
- }, e.ExternalServiceLogoutBodyDtoAuthenticationTypeEnum = {
3578
- None: "NONE",
3579
- ApiKey: "API_KEY",
3580
- Oauth: "OAUTH"
3581
- }, e.ExternalServiceSigninBodyDtoCredentialsLevelEnum = {
3582
- Global: "GLOBAL",
3583
- Application: "APPLICATION",
3584
- User: "USER"
3585
- }, e.ExternalServiceSigninBodyDtoAuthenticationTypeEnum = {
3586
- None: "NONE",
3587
- ApiKey: "API_KEY",
3588
- Oauth: "OAUTH"
3589
- }, e.GetExternalServiceResponseDtoAuthenticationTypeEnum = {
3590
- None: "NONE",
3591
- ApiKey: "API_KEY",
3592
- Oauth: "OAUTH",
3593
- DialNative: "DIAL_NATIVE"
3594
- }, e.ListFilesItemDtoNodeTypeEnum = {
3595
- Item: "item",
3596
- Folder: "folder"
3597
- }, e.McpAppToolCallRequestDtoKindEnum = {
3598
- Toolset: "toolset",
3599
- Application: "application"
3600
- }, e.MessageDtoRoleEnum = {
3601
- System: "system",
3602
- User: "user",
3603
- Assistant: "assistant"
3604
- }, e.MoveItemDtoNodeTypeEnum = {
3605
- Item: "item",
3606
- Folder: "folder"
3607
- }, e.PublishHistoryEntryDtoEntityTypeEnum = {
3608
- Model: "model",
3609
- Toolset: "toolset",
3610
- Application: "application",
3611
- Prompt: "prompt",
3612
- Skill: "skill"
3613
- }, e.PublishResultDtoEntityTypeEnum = {
3614
- Model: "model",
3615
- Toolset: "toolset",
3616
- Application: "application",
3617
- Prompt: "prompt",
3618
- Skill: "skill"
3619
- }, e.PublishRuleDtoFunctionEnum = {
3620
- Equal: "EQUAL",
3621
- Contain: "CONTAIN",
3622
- Regex: "REGEX"
3623
- }, e.RateMessageDtoRateEnum = {
3624
- NUMBER_1: 1,
3625
- NUMBER_MINUS_1: -1
3626
- }, e.RenameItemDtoNodeTypeEnum = {
3627
- Item: "item",
3628
- Folder: "folder"
3629
- }, e.ReportClientChannelDtoResultEnum = {
3630
- Success: "success",
3631
- Denied: "denied"
3632
- }, e.ScheduledTaskDtoTriggerTypeEnum = {
3633
- Cron: "cron",
3634
- Date: "date"
3635
- }, e.ScheduledTaskRunDtoStatusEnum = {
3636
- Success: "Success",
3637
- Error: "Error",
3638
- InProgress: "InProgress",
3639
- Missed: "Missed"
3640
- }, e.SendCompletionDtoModeEnum = {
3641
- Append: "append",
3642
- ContinueLastUser: "continue_last_user",
3643
- Regenerate: "regenerate",
3644
- Edit: "edit"
3645
- }, e.ShareLinkResponseDtoAccessEnum = {
3646
- View: "view",
3647
- Edit: "edit"
3648
- }, e.SkillMetadataItemDtoNodeTypeEnum = {
3649
- Folder: "folder",
3650
- Item: "item"
3651
- }, e.StageDtoStatusEnum = {
3652
- Completed: "completed",
3653
- Failed: "failed"
3654
- }, e.ToolsetAuthSettingsBodyDtoAuthenticationTypeEnum = {
3655
- None: "NONE",
3656
- ApiKey: "API_KEY",
3657
- Oauth: "OAUTH"
3658
- }, e.ToolsetAuthSettingsDtoAuthenticationTypeEnum = {
3659
- Oauth: "OAUTH",
3660
- ApiKey: "API_KEY",
3661
- None: "NONE"
3662
- }, e.ToolsetAuthSettingsDtoGlobalAuthStatusEnum = {
3663
- SignedIn: "SIGNED_IN",
3664
- SignedOut: "SIGNED_OUT"
3665
- }, e.ToolsetAuthSettingsDtoAppLevelAuthStatusEnum = {
3666
- SignedIn: "SIGNED_IN",
3667
- SignedOut: "SIGNED_OUT"
3668
- }, e.ToolsetAuthSettingsDtoUserLevelAuthStatusEnum = {
3669
- SignedIn: "SIGNED_IN",
3670
- SignedOut: "SIGNED_OUT"
3671
- }, e.ToolsetBodyDtoTransportEnum = {
3672
- Http: "HTTP",
3673
- Sse: "SSE"
3674
- }, e.ToolsetLoginBodyDtoCredentialsLevelEnum = {
3675
- Global: "GLOBAL",
3676
- User: "USER",
3677
- App: "APP"
3678
- }, e.ToolsetLoginBodyDtoAuthenticationTypeEnum = {
3679
- None: "NONE",
3680
- ApiKey: "API_KEY",
3681
- Oauth: "OAUTH"
3682
- }, e.ToolsetLogoutBodyDtoCredentialsLevelEnum = {
3683
- Global: "GLOBAL",
3684
- User: "USER",
3685
- App: "APP"
3686
- }, e.ToolsetLogoutBodyDtoAuthenticationTypeEnum = {
3687
- None: "NONE",
3688
- ApiKey: "API_KEY",
3689
- Oauth: "OAUTH"
3690
- }, e.UnpublishResultDtoEntityTypeEnum = {
3691
- Model: "model",
3692
- Toolset: "toolset",
3693
- Application: "application",
3694
- Prompt: "prompt",
3695
- Skill: "skill"
3696
- }, e.UpdatedScheduledTaskDtoTriggerTypeEnum = {
3697
- Cron: "cron",
3698
- Date: "date"
3699
- };
3700
- })), wt = /* @__PURE__ */ y(((e) => {
3701
- Object.defineProperty(e, "__esModule", { value: !0 });
3702
- var t = (H(), b(A));
3703
- t.__exportStar(U(), e), t.__exportStar(St(), e), t.__exportStar(Ct(), e);
3704
- })), Tt = (/* @__PURE__ */ y(((e) => {
3705
- Object.defineProperty(e, "__esModule", { value: !0 }), (H(), b(A)).__exportStar(wt(), e);
3706
- })))(), W = 2 ** 53, Et = 75, G = new Intl.NumberFormat(void 0, {
3707
- notation: "compact",
3708
- maximumFractionDigits: 1
3709
- }), K = new Intl.NumberFormat(void 0, { maximumFractionDigits: 2 }), q = {
3710
- todayPeriodDescription: "usage.todayPeriodDescription",
3711
- thisWeekPeriodDescription: "usage.thisWeekPeriodDescription",
3712
- thisMonthPeriodDescription: "usage.thisMonthPeriodDescription",
3713
- overallCostLimitRunningLowTooltip: "usage.overallCostLimitRunningLowTooltip",
3714
- overallCostLimitReachedTooltip: "usage.overallCostLimitReachedTooltip",
3715
- unavailableLabel: "usage.unavailableLabel",
3716
- followsCostLimitLabel: "usage.followsCostLimitLabel",
3717
- noLimitLabel: "usage.noLimitLabel",
3718
- followsCostLimitAriaLabel: "usage.followsCostLimitAriaLabel",
3719
- unlimitedProgressAriaLabel: "usage.unlimitedProgressAriaLabel",
3720
- progressAriaLabel: "usage.progressAriaLabel",
3721
- spentLabel: "usage.spentLabel"
3722
- }, J = {
3723
- day: {
3724
- cost: "dayCostStats",
3725
- tokens: "dayTokenStats"
3726
- },
3727
- week: {
3728
- cost: "weekCostStats",
3729
- tokens: "weekTokenStats"
3730
- },
3731
- month: {
3732
- cost: "monthCostStats",
3733
- tokens: "monthTokenStats"
3734
- }
3735
- }, Y = {
3736
- day: {
3737
- field: "dayCostStats",
3738
- labelKey: q.todayPeriodDescription
3739
- },
3740
- week: {
3741
- field: "weekCostStats",
3742
- labelKey: q.thisWeekPeriodDescription
3743
- },
3744
- month: {
3745
- field: "monthCostStats",
3746
- labelKey: q.thisMonthPeriodDescription
3747
- }
3748
- }, X = (e) => e != null && Number.isFinite(e.total) && Number.isFinite(e.used), Z = (e) => e >= 100 ? w.LimitReached : e >= Et ? w.RunningLow : w.WithinLimits, Dt = (e) => {
3749
- if (!X(e)) return w.Unavailable;
3750
- if (e.total >= W) return w.NoLimit;
3751
- let t = Math.max(0, e.used), n = Math.max(0, e.total);
3752
- return Z(n > 0 ? t / n * 100 : 100);
3753
- }, Ot = (e) => e === w.WithinLimits || e === w.RunningLow || e === w.LimitReached, Q = (e, t, n, r, i) => {
3754
- let a = e?.[t.field], o = Dt(a), s = i(a?.resetsAt), c = r(t.labelKey).toLocaleLowerCase(n);
3755
- return {
3756
- status: o,
3757
- tooltipLabel: o === w.LimitReached ? r(q.overallCostLimitReachedTooltip, { period: c }) : o === w.RunningLow ? r(q.overallCostLimitRunningLowTooltip, { period: c }) : void 0,
3758
- ...s ? {
3759
- resetLabel: s.label,
3760
- resetIsoValue: s.isoValue,
3761
- resetAriaLabel: s.ariaLabel
3762
- } : {}
3763
- };
3764
- }, kt = () => void 0, At = (e, t, n, r = kt) => ({
3765
- day: Q(e, Y.day, t, n, r),
3766
- week: Q(e, Y.week, t, n, r),
3767
- month: Q(e, Y.month, t, n, r)
3768
- }), jt = (e) => ({
3769
- kind: T.Unavailable,
3770
- ariaLabel: e(q.unavailableLabel)
3771
- }), Mt = (e, t, n) => {
3772
- if (!X(e)) return jt(n);
3773
- let r = Math.max(0, e.used), i = G.format(r);
3774
- if (e.total >= W) {
3775
- let e = Ot(t);
3776
- return {
3777
- kind: T.Unlimited,
3778
- usedLabel: i,
3779
- supportingLabel: n(e ? q.followsCostLimitLabel : q.noLimitLabel),
3780
- ariaLabel: n(e ? q.followsCostLimitAriaLabel : q.unlimitedProgressAriaLabel, { used: K.format(r) })
3781
- };
3782
- }
3783
- let a = Math.max(e.total, 0), o = G.format(a), s = a > 0 ? r / a * 100 : 100, c = Z(s);
3784
- return {
3785
- kind: T.Finite,
3786
- usedLabel: i,
3787
- totalLabel: o,
3788
- usedPercent: s,
3789
- status: c,
3790
- ariaLabel: n(q.progressAriaLabel, {
3791
- used: K.format(r),
3792
- total: K.format(a),
3793
- percent: Math.round(s)
3794
- })
3795
- };
3796
- }, Nt = (e, t) => {
3797
- if (!X(e)) return jt(t);
3798
- let n = Math.max(0, e.used), r = t(q.spentLabel, { amount: i(n) });
3799
- if (e.total >= W) return {
3800
- kind: T.Unlimited,
3801
- usedLabel: r,
3802
- ariaLabel: r
3803
- };
3804
- let a = Math.max(e.total, 0), o = a > 0 ? n / a * 100 : 100;
3805
- return {
3806
- kind: T.Finite,
3807
- usedLabel: r,
3808
- totalLabel: i(a),
3809
- usedPercent: o,
3810
- status: Z(o),
3811
- ariaLabel: t(q.progressAriaLabel, {
3812
- used: i(n),
3813
- total: i(a),
3814
- percent: Math.round(o)
3815
- })
3816
- };
3817
- }, $ = (e, t, n, r) => ({
3818
- tokens: Mt(e[t.tokens], n, r),
3819
- cost: Nt(e[t.cost], r)
3820
- }), Pt = (e) => e.filter((e) => e.kind === T.Finite).map((e) => e.status), Ft = (e, t, n) => {
3821
- let r = [
3822
- ...Pt(e),
3823
- ...Pt(t),
3824
- ...n
3825
- ].filter((e) => e != null && Ot(e));
3826
- return r.includes(w.LimitReached) ? w.LimitReached : r.includes(w.RunningLow) ? w.RunningLow : r.includes(w.WithinLimits) ? w.WithinLimits : e.some((e) => e.kind === T.Unlimited) || n.includes(w.NoLimit) ? w.NoLimit : w.Unavailable;
3827
- }, It = (e) => e.some((e) => X(e) && e.used > 0), Lt = (e, t, n, r, i, a) => {
3828
- let o = e?.deployments;
3829
- if (o == null) return [];
3830
- let s = new Map(t.filter((e) => e.type === Tt.DeploymentItemDtoTypeEnum.Model).map((e) => [e.id, e])), c = At(e, n, r);
3831
- return Object.keys(o).map((e) => {
3832
- let t = s.get(e), l = t == null ? e : a(t.displayName, n) || t.id, u = o[e], d = i(t?.iconUrl), f = $(u, J.day, c.day.status, r), p = $(u, J.week, c.week.status, r), m = $(u, J.month, c.month.status, r), h = Object.values(J).flatMap(({ cost: e, tokens: t }) => [u[e], u[t]]);
3833
- return {
3834
- row: {
3835
- id: e,
3836
- name: l,
3837
- version: t?.displayVersion,
3838
- avatarSrc: d,
3839
- day: f,
3840
- week: p,
3841
- month: m,
3842
- status: Ft([
3843
- f.tokens,
3844
- p.tokens,
3845
- m.tokens
3846
- ], [
3847
- f.cost,
3848
- p.cost,
3849
- m.cost
3850
- ], [
3851
- c.day.status,
3852
- c.week.status,
3853
- c.month.status
3854
- ])
3855
- },
3856
- hasUsage: It(h)
3857
- };
3858
- }).filter(({ hasUsage: e }) => e).map(({ row: e }) => e);
3859
531
  };
3860
532
  //#endregion
3861
- export { T as ModelLimitMetricKind, w as ModelLimitStatus, ye as ModelLimitsSection, x as USAGE_DASHBOARD_CLASS, k as USAGE_DATA_I18N_KEYS, q as USAGE_MODEL_LIMITS_I18N_KEYS, ie as UsageLimitCard, ae as UsageLimitCardGroup, S as UsageLimitStatus, At as mapOverallCostLimitsToPeriodStatuses, Ee as mapUsageDataToDashboard, Lt as mapUserUsageToModelLimits };
533
+ export { x as ModelLimitMetricKind, b as ModelLimitStatus, R as ModelLimitsSection, m as USAGE_DASHBOARD_CLASS, v as UsageLimitCard, y as UsageLimitCardGroup, h as UsageLimitStatus };