@epam/ai-dial-usage-dashboard 1.0.0 → 1.0.2

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