@epam/ai-dial-usage-dashboard 1.2.0-dev.3 → 1.2.0-dev.300

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