@vc-shell/framework 2.0.3-pr227.0c4f2c3 → 2.0.4-pr228.833ff5f
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/CHANGELOG.md +10 -0
- package/dist/ai-agent/index.js +2 -2
- package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-CTHTF63Q.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-D5HgEXFw.js} +1578 -952
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-D5HgEXFw.js.map +1 -0
- package/dist/chunks/{VcTableAdapter.vue_vue_type_style_index_0_lang-dJW2U276.js → VcTableAdapter.vue_vue_type_style_index_0_lang-HqgHfIV-.js} +1 -1
- package/dist/chunks/{VcTableAdapter.vue_vue_type_style_index_0_lang-dJW2U276.js.map → VcTableAdapter.vue_vue_type_style_index_0_lang-HqgHfIV-.js.map} +1 -1
- package/dist/chunks/{index-CYv6y-92.js → index-CacTeJdd.js} +1 -1
- package/dist/chunks/{index-CYv6y-92.js.map → index-CacTeJdd.js.map} +1 -1
- package/dist/core/api/platform.d.ts +334 -104
- package/dist/core/api/platform.d.ts.map +1 -1
- package/dist/framework.js +315 -320
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +4 -4
- package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-CTHTF63Q.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as D, computed as h, shallowRef as
|
|
1
|
+
import { ref as D, computed as h, shallowRef as ze, watch as H, getCurrentInstance as ee, inject as J, isRef as ke, provide as Se, defineComponent as L, openBlock as w, createElementBlock as N, createElementVNode as $, createCommentVNode as Z, createStaticVNode as Ge, onMounted as le, normalizeStyle as Q, normalizeClass as K, toDisplayString as pe, markRaw as we, createBlock as Y, resolveDynamicComponent as fe, mergeProps as se, resolveComponent as ce, createVNode as W, unref as ie, Transition as Ae, withCtx as Pe, onUnmounted as Fe } from "vue";
|
|
2
2
|
import { c as te } from "./vendor-lodash-es-CfnUOh0o.js";
|
|
3
3
|
import { u as De } from "./vendor-vueuse-core-CEdpDfzx.js";
|
|
4
|
-
import { j as
|
|
5
|
-
import { L as
|
|
4
|
+
import { j as Me } from "./vendor-vueuse-shared-BlCOXw5g.js";
|
|
5
|
+
import { L as Le } from "./vendor-lucide-vue-next-CwUrzD6N.js";
|
|
6
6
|
const Je = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?$/;
|
|
7
|
-
function We(
|
|
7
|
+
function We(i, e) {
|
|
8
8
|
if (typeof e == "string" && Je.test(e)) {
|
|
9
9
|
const t = new Date(e);
|
|
10
10
|
if (!isNaN(t.getTime()))
|
|
@@ -12,7 +12,7 @@ function We(s, e) {
|
|
|
12
12
|
}
|
|
13
13
|
return e;
|
|
14
14
|
}
|
|
15
|
-
class
|
|
15
|
+
class F {
|
|
16
16
|
authToken = "";
|
|
17
17
|
/**
|
|
18
18
|
* JSON parse reviver for converting date strings to Date objects.
|
|
@@ -33,49 +33,56 @@ class G {
|
|
|
33
33
|
return this.authToken && (e.headers.authorization = `Bearer ${this.authToken}`), Promise.resolve(e);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
class
|
|
36
|
+
class Ve extends F {
|
|
37
37
|
http;
|
|
38
38
|
baseUrl;
|
|
39
39
|
constructor(e, t) {
|
|
40
40
|
super(), this.http = t || window, this.baseUrl = this.getBaseUrl("", e);
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* @param authenticationType (optional)
|
|
44
|
-
* @param returnUrl (optional)
|
|
45
|
-
* @param storeId (optional)
|
|
46
|
-
* @param oidcUrl (optional)
|
|
47
|
-
* @param callbackUrl (optional)
|
|
43
|
+
* @param authenticationType (optional)
|
|
44
|
+
* @param returnUrl (optional)
|
|
45
|
+
* @param storeId (optional)
|
|
46
|
+
* @param oidcUrl (optional)
|
|
47
|
+
* @param callbackUrl (optional)
|
|
48
48
|
* @return OK
|
|
49
49
|
*/
|
|
50
50
|
signIn(e, t, n, r, a) {
|
|
51
51
|
let o = this.baseUrl + "/externalsignin?";
|
|
52
|
-
if (e === null)
|
|
53
|
-
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
if (
|
|
52
|
+
if (e === null)
|
|
53
|
+
throw new globalThis.Error("The parameter 'authenticationType' cannot be null.");
|
|
54
|
+
if (e !== void 0 && (o += "AuthenticationType=" + encodeURIComponent("" + e) + "&"), t === null)
|
|
55
|
+
throw new globalThis.Error("The parameter 'returnUrl' cannot be null.");
|
|
56
|
+
if (t !== void 0 && (o += "ReturnUrl=" + encodeURIComponent("" + t) + "&"), n === null)
|
|
57
|
+
throw new globalThis.Error("The parameter 'storeId' cannot be null.");
|
|
58
|
+
if (n !== void 0 && (o += "StoreId=" + encodeURIComponent("" + n) + "&"), r === null)
|
|
59
|
+
throw new globalThis.Error("The parameter 'oidcUrl' cannot be null.");
|
|
60
|
+
if (r !== void 0 && (o += "OidcUrl=" + encodeURIComponent("" + r) + "&"), a === null)
|
|
61
|
+
throw new globalThis.Error("The parameter 'callbackUrl' cannot be null.");
|
|
57
62
|
a !== void 0 && (o += "CallbackUrl=" + encodeURIComponent("" + a) + "&"), o = o.replace(/[?&]$/, "");
|
|
58
|
-
let
|
|
63
|
+
let l = {
|
|
59
64
|
method: "GET",
|
|
60
65
|
headers: {}
|
|
61
66
|
};
|
|
62
|
-
return this.transformOptions(
|
|
67
|
+
return this.transformOptions(l).then((c) => this.http.fetch(o, c)).then((c) => this.processSignIn(c));
|
|
63
68
|
}
|
|
64
69
|
processSignIn(e) {
|
|
65
70
|
const t = e.status;
|
|
66
71
|
let n = {};
|
|
67
72
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
68
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
73
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
69
74
|
}
|
|
70
75
|
/**
|
|
71
|
-
* @param authenticationType (optional)
|
|
72
|
-
* @param returnUrl (optional)
|
|
76
|
+
* @param authenticationType (optional)
|
|
77
|
+
* @param returnUrl (optional)
|
|
73
78
|
* @return OK
|
|
74
79
|
*/
|
|
75
80
|
signOut(e, t) {
|
|
76
81
|
let n = this.baseUrl + "/externalsignin/signout?";
|
|
77
|
-
if (e === null)
|
|
78
|
-
|
|
82
|
+
if (e === null)
|
|
83
|
+
throw new globalThis.Error("The parameter 'authenticationType' cannot be null.");
|
|
84
|
+
if (e !== void 0 && (n += "authenticationType=" + encodeURIComponent("" + e) + "&"), t === null)
|
|
85
|
+
throw new globalThis.Error("The parameter 'returnUrl' cannot be null.");
|
|
79
86
|
t !== void 0 && (n += "returnUrl=" + encodeURIComponent("" + t) + "&"), n = n.replace(/[?&]$/, "");
|
|
80
87
|
let r = {
|
|
81
88
|
method: "GET",
|
|
@@ -87,15 +94,16 @@ class Ke extends G {
|
|
|
87
94
|
const t = e.status;
|
|
88
95
|
let n = {};
|
|
89
96
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
90
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
97
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
91
98
|
}
|
|
92
99
|
/**
|
|
93
|
-
* @param returnUrl (optional)
|
|
100
|
+
* @param returnUrl (optional)
|
|
94
101
|
* @return OK
|
|
95
102
|
*/
|
|
96
103
|
signInCallback(e) {
|
|
97
104
|
let t = this.baseUrl + "/externalsignin/callback?";
|
|
98
|
-
if (e === null)
|
|
105
|
+
if (e === null)
|
|
106
|
+
throw new globalThis.Error("The parameter 'returnUrl' cannot be null.");
|
|
99
107
|
e !== void 0 && (t += "returnUrl=" + encodeURIComponent("" + e) + "&"), t = t.replace(/[?&]$/, "");
|
|
100
108
|
let n = {
|
|
101
109
|
method: "GET",
|
|
@@ -107,7 +115,7 @@ class Ke extends G {
|
|
|
107
115
|
const t = e.status;
|
|
108
116
|
let n = {};
|
|
109
117
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
110
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
118
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
111
119
|
}
|
|
112
120
|
/**
|
|
113
121
|
* @return OK
|
|
@@ -129,10 +137,79 @@ class Ke extends G {
|
|
|
129
137
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
130
138
|
let a = null;
|
|
131
139
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
132
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
140
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
133
141
|
}
|
|
134
142
|
}
|
|
135
|
-
class
|
|
143
|
+
class fr extends F {
|
|
144
|
+
http;
|
|
145
|
+
baseUrl;
|
|
146
|
+
constructor(e, t) {
|
|
147
|
+
super(), this.http = t || window, this.baseUrl = this.getBaseUrl("", e);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Returns the host app's plugin manifest.
|
|
151
|
+
|
|
152
|
+
In production: cacheable — responds 304 on matching
|
|
153
|
+
`If-None-Match`. The descriptor is built and hashed once at the
|
|
154
|
+
service layer (VirtoCommerce.Platform.Core.Modularity.IAppManifestService) and cached for the
|
|
155
|
+
process lifetime, so 304 cache-hits short-circuit without touching the
|
|
156
|
+
filesystem.
|
|
157
|
+
In Development: `Cache-Control: no-store` is emitted and the 304
|
|
158
|
+
fast path is skipped — every request returns 200 with a freshly built
|
|
159
|
+
body. This makes `yarn build` in a plugin folder visible on the
|
|
160
|
+
next page reload without restarting the platform.
|
|
161
|
+
* @return OK
|
|
162
|
+
*/
|
|
163
|
+
getManifest(e) {
|
|
164
|
+
let t = this.baseUrl + "/api/apps/{appId}/manifest";
|
|
165
|
+
if (e == null)
|
|
166
|
+
throw new globalThis.Error("The parameter 'appId' must be defined.");
|
|
167
|
+
t = t.replace("{appId}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
168
|
+
let n = {
|
|
169
|
+
method: "GET",
|
|
170
|
+
headers: {
|
|
171
|
+
Accept: "application/json"
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
return this.transformOptions(n).then((r) => this.http.fetch(t, r)).then((r) => this.processGetManifest(r));
|
|
175
|
+
}
|
|
176
|
+
processGetManifest(e) {
|
|
177
|
+
const t = e.status;
|
|
178
|
+
let n = {};
|
|
179
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
180
|
+
let a = null;
|
|
181
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
182
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Force-invalidate the manifest cache for every `appId`. The next
|
|
186
|
+
call to `GET /api/apps/{appId}/manifest` will rebuild the
|
|
187
|
+
descriptor from disk, picking up any plugin changes since the last
|
|
188
|
+
build (new module installs, drop-in plugin replacements, plugin
|
|
189
|
+
rebuilds).
|
|
190
|
+
|
|
191
|
+
In Development this isn't normally needed (the service bypasses its
|
|
192
|
+
cache anyway), but the endpoint works in any environment for
|
|
193
|
+
operators who want to refresh without restarting the platform.
|
|
194
|
+
* @return No Content
|
|
195
|
+
*/
|
|
196
|
+
invalidateManifestCache() {
|
|
197
|
+
let e = this.baseUrl + "/api/apps/manifest/invalidate";
|
|
198
|
+
e = e.replace(/[?&]$/, "");
|
|
199
|
+
let t = {
|
|
200
|
+
method: "POST",
|
|
201
|
+
headers: {}
|
|
202
|
+
};
|
|
203
|
+
return this.transformOptions(t).then((n) => this.http.fetch(e, n)).then((n) => this.processInvalidateManifestCache(n));
|
|
204
|
+
}
|
|
205
|
+
processInvalidateManifestCache(e) {
|
|
206
|
+
const t = e.status;
|
|
207
|
+
let n = {};
|
|
208
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
209
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
class pr extends F {
|
|
136
213
|
http;
|
|
137
214
|
baseUrl;
|
|
138
215
|
constructor(e, t) {
|
|
@@ -159,10 +236,10 @@ class Er extends G {
|
|
|
159
236
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
160
237
|
let a = null;
|
|
161
238
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
162
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
239
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
163
240
|
}
|
|
164
241
|
}
|
|
165
|
-
class
|
|
242
|
+
class mr extends F {
|
|
166
243
|
http;
|
|
167
244
|
baseUrl;
|
|
168
245
|
constructor(e, t) {
|
|
@@ -184,7 +261,7 @@ class _r extends G {
|
|
|
184
261
|
const t = e.status;
|
|
185
262
|
let n = {};
|
|
186
263
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
187
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
264
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
188
265
|
}
|
|
189
266
|
/**
|
|
190
267
|
* @return OK
|
|
@@ -210,8 +287,8 @@ class _r extends G {
|
|
|
210
287
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
211
288
|
}) : t === 400 ? e.text().then((r) => {
|
|
212
289
|
let a = null;
|
|
213
|
-
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver),
|
|
214
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
290
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), s("Bad Request", t, r, n, a);
|
|
291
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
215
292
|
}
|
|
216
293
|
/**
|
|
217
294
|
* @return OK
|
|
@@ -229,7 +306,7 @@ class _r extends G {
|
|
|
229
306
|
const t = e.status;
|
|
230
307
|
let n = {};
|
|
231
308
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
232
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
309
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
233
310
|
}
|
|
234
311
|
/**
|
|
235
312
|
* @return OK
|
|
@@ -247,7 +324,7 @@ class _r extends G {
|
|
|
247
324
|
const t = e.status;
|
|
248
325
|
let n = {};
|
|
249
326
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
250
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
327
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
251
328
|
}
|
|
252
329
|
/**
|
|
253
330
|
* @return OK
|
|
@@ -265,7 +342,7 @@ class _r extends G {
|
|
|
265
342
|
const t = e.status;
|
|
266
343
|
let n = {};
|
|
267
344
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
268
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
345
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
269
346
|
}
|
|
270
347
|
/**
|
|
271
348
|
* @return OK
|
|
@@ -283,7 +360,7 @@ class _r extends G {
|
|
|
283
360
|
const t = e.status;
|
|
284
361
|
let n = {};
|
|
285
362
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
286
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
363
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
287
364
|
}
|
|
288
365
|
/**
|
|
289
366
|
* @return OK
|
|
@@ -301,10 +378,10 @@ class _r extends G {
|
|
|
301
378
|
const t = e.status;
|
|
302
379
|
let n = {};
|
|
303
380
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
304
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
381
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
305
382
|
}
|
|
306
383
|
}
|
|
307
|
-
class
|
|
384
|
+
class vr extends F {
|
|
308
385
|
http;
|
|
309
386
|
baseUrl;
|
|
310
387
|
constructor(e, t) {
|
|
@@ -312,12 +389,13 @@ class Cr extends G {
|
|
|
312
389
|
}
|
|
313
390
|
/**
|
|
314
391
|
* Force set changes last modified date
|
|
315
|
-
* @param scope (optional)
|
|
392
|
+
* @param scope (optional)
|
|
316
393
|
* @return No Content
|
|
317
394
|
*/
|
|
318
395
|
forceChanges(e) {
|
|
319
396
|
let t = this.baseUrl + "/api/changes/force?";
|
|
320
|
-
if (e === null)
|
|
397
|
+
if (e === null)
|
|
398
|
+
throw new globalThis.Error("The parameter 'scope' cannot be null.");
|
|
321
399
|
e !== void 0 && (t += "Scope=" + encodeURIComponent("" + e) + "&"), t = t.replace(/[?&]$/, "");
|
|
322
400
|
let n = {
|
|
323
401
|
method: "POST",
|
|
@@ -329,7 +407,7 @@ class Cr extends G {
|
|
|
329
407
|
const t = e.status;
|
|
330
408
|
let n = {};
|
|
331
409
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
332
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
410
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
333
411
|
}
|
|
334
412
|
/**
|
|
335
413
|
* @return No Content
|
|
@@ -347,17 +425,18 @@ class Cr extends G {
|
|
|
347
425
|
const t = e.status;
|
|
348
426
|
let n = {};
|
|
349
427
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
350
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
428
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
351
429
|
}
|
|
352
430
|
/**
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
431
|
+
* Get last modified date for given scope
|
|
432
|
+
Used for signal of what something changed and for cache invalidation in external platform clients
|
|
433
|
+
* @param scope (optional)
|
|
434
|
+
* @return OK
|
|
435
|
+
*/
|
|
358
436
|
getLastModifiedDate(e) {
|
|
359
437
|
let t = this.baseUrl + "/api/changes/lastmodifieddate?";
|
|
360
|
-
if (e === null)
|
|
438
|
+
if (e === null)
|
|
439
|
+
throw new globalThis.Error("The parameter 'scope' cannot be null.");
|
|
361
440
|
e !== void 0 && (t += "scope=" + encodeURIComponent("" + e) + "&"), t = t.replace(/[?&]$/, "");
|
|
362
441
|
let n = {
|
|
363
442
|
method: "GET",
|
|
@@ -373,10 +452,10 @@ class Cr extends G {
|
|
|
373
452
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
374
453
|
let a = null;
|
|
375
454
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
376
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
455
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
377
456
|
}
|
|
378
457
|
/**
|
|
379
|
-
* @param body (optional)
|
|
458
|
+
* @param body (optional)
|
|
380
459
|
* @return OK
|
|
381
460
|
*/
|
|
382
461
|
getChangedEntities(e) {
|
|
@@ -398,10 +477,10 @@ class Cr extends G {
|
|
|
398
477
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
399
478
|
let a = null;
|
|
400
479
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
401
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
480
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
402
481
|
}
|
|
403
482
|
/**
|
|
404
|
-
* @param body (optional)
|
|
483
|
+
* @param body (optional)
|
|
405
484
|
* @return No Content
|
|
406
485
|
*/
|
|
407
486
|
resetChangedEntities(e) {
|
|
@@ -420,10 +499,10 @@ class Cr extends G {
|
|
|
420
499
|
const t = e.status;
|
|
421
500
|
let n = {};
|
|
422
501
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
423
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
502
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
424
503
|
}
|
|
425
504
|
/**
|
|
426
|
-
* @param body (optional)
|
|
505
|
+
* @param body (optional)
|
|
427
506
|
* @return OK
|
|
428
507
|
*/
|
|
429
508
|
searchChanges(e) {
|
|
@@ -445,18 +524,46 @@ class Cr extends G {
|
|
|
445
524
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
446
525
|
let a = null;
|
|
447
526
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
448
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
527
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* @param body (optional)
|
|
531
|
+
* @return OK
|
|
532
|
+
*/
|
|
533
|
+
searchChangesV2(e) {
|
|
534
|
+
let t = this.baseUrl + "/api/platform/changelog/v2/search";
|
|
535
|
+
t = t.replace(/[?&]$/, "");
|
|
536
|
+
let r = {
|
|
537
|
+
body: JSON.stringify(e),
|
|
538
|
+
method: "POST",
|
|
539
|
+
headers: {
|
|
540
|
+
"Content-Type": "application/json-patch+json",
|
|
541
|
+
Accept: "application/json"
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
return this.transformOptions(r).then((a) => this.http.fetch(t, a)).then((a) => this.processSearchChangesV2(a));
|
|
545
|
+
}
|
|
546
|
+
processSearchChangesV2(e) {
|
|
547
|
+
const t = e.status;
|
|
548
|
+
let n = {};
|
|
549
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
550
|
+
let a = null;
|
|
551
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
552
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
449
553
|
}
|
|
450
554
|
/**
|
|
451
|
-
* @param start (optional)
|
|
452
|
-
* @param end (optional)
|
|
555
|
+
* @param start (optional)
|
|
556
|
+
* @param end (optional)
|
|
453
557
|
* @return OK
|
|
454
558
|
*/
|
|
455
559
|
searchTypeChangeHistory(e, t, n) {
|
|
456
560
|
let r = this.baseUrl + "/api/platform/changelog/{type}/changes?";
|
|
457
|
-
if (e == null)
|
|
458
|
-
|
|
459
|
-
if (
|
|
561
|
+
if (e == null)
|
|
562
|
+
throw new globalThis.Error("The parameter 'type' must be defined.");
|
|
563
|
+
if (r = r.replace("{type}", encodeURIComponent("" + e)), t === null)
|
|
564
|
+
throw new globalThis.Error("The parameter 'start' cannot be null.");
|
|
565
|
+
if (t !== void 0 && (r += "start=" + encodeURIComponent(t ? "" + t.toISOString() : "") + "&"), n === null)
|
|
566
|
+
throw new globalThis.Error("The parameter 'end' cannot be null.");
|
|
460
567
|
n !== void 0 && (r += "end=" + encodeURIComponent(n ? "" + n.toISOString() : "") + "&"), r = r.replace(/[?&]$/, "");
|
|
461
568
|
let a = {
|
|
462
569
|
method: "GET",
|
|
@@ -472,10 +579,10 @@ class Cr extends G {
|
|
|
472
579
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
473
580
|
let a = null;
|
|
474
581
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
475
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
582
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
476
583
|
}
|
|
477
584
|
}
|
|
478
|
-
class
|
|
585
|
+
class gr extends F {
|
|
479
586
|
http;
|
|
480
587
|
baseUrl;
|
|
481
588
|
constructor(e, t) {
|
|
@@ -501,10 +608,10 @@ class Sr extends G {
|
|
|
501
608
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
502
609
|
let a = null;
|
|
503
610
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
504
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
611
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
505
612
|
}
|
|
506
613
|
}
|
|
507
|
-
class
|
|
614
|
+
class br extends F {
|
|
508
615
|
http;
|
|
509
616
|
baseUrl;
|
|
510
617
|
constructor(e, t) {
|
|
@@ -530,7 +637,7 @@ class yr extends G {
|
|
|
530
637
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
531
638
|
let a = null;
|
|
532
639
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
533
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
640
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
534
641
|
}
|
|
535
642
|
/**
|
|
536
643
|
* Get installed modules with errors
|
|
@@ -553,10 +660,10 @@ class yr extends G {
|
|
|
553
660
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
554
661
|
let a = null;
|
|
555
662
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
556
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
663
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
557
664
|
}
|
|
558
665
|
}
|
|
559
|
-
class
|
|
666
|
+
class xr extends F {
|
|
560
667
|
http;
|
|
561
668
|
baseUrl;
|
|
562
669
|
constructor(e, t) {
|
|
@@ -583,15 +690,16 @@ class Ur extends G {
|
|
|
583
690
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
584
691
|
let a = null;
|
|
585
692
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
586
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
693
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
587
694
|
}
|
|
588
695
|
/**
|
|
589
|
-
* @param id (optional)
|
|
696
|
+
* @param id (optional)
|
|
590
697
|
* @return OK
|
|
591
698
|
*/
|
|
592
699
|
getAllDynamicProperties(e) {
|
|
593
700
|
let t = this.baseUrl + "/api/platform/dynamic/properties?";
|
|
594
|
-
if (e === null)
|
|
701
|
+
if (e === null)
|
|
702
|
+
throw new globalThis.Error("The parameter 'id' cannot be null.");
|
|
595
703
|
e !== void 0 && (t += "id=" + encodeURIComponent("" + e) + "&"), t = t.replace(/[?&]$/, "");
|
|
596
704
|
let n = {
|
|
597
705
|
method: "GET",
|
|
@@ -607,11 +715,11 @@ class Ur extends G {
|
|
|
607
715
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
608
716
|
let a = null;
|
|
609
717
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
610
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
718
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
611
719
|
}
|
|
612
720
|
/**
|
|
613
721
|
* Add new dynamic property
|
|
614
|
-
* @param body (optional)
|
|
722
|
+
* @param body (optional)
|
|
615
723
|
* @return OK
|
|
616
724
|
*/
|
|
617
725
|
createProperty(e) {
|
|
@@ -633,11 +741,11 @@ class Ur extends G {
|
|
|
633
741
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
634
742
|
let a = null;
|
|
635
743
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
636
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
744
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
637
745
|
}
|
|
638
746
|
/**
|
|
639
747
|
* Update existing dynamic property
|
|
640
|
-
* @param body (optional)
|
|
748
|
+
* @param body (optional)
|
|
641
749
|
* @return No Content
|
|
642
750
|
*/
|
|
643
751
|
updateProperty(e) {
|
|
@@ -656,16 +764,17 @@ class Ur extends G {
|
|
|
656
764
|
const t = e.status;
|
|
657
765
|
let n = {};
|
|
658
766
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
659
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
767
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
660
768
|
}
|
|
661
769
|
/**
|
|
662
770
|
* Delete dynamic property
|
|
663
|
-
* @param propertyIds (optional)
|
|
771
|
+
* @param propertyIds (optional)
|
|
664
772
|
* @return No Content
|
|
665
773
|
*/
|
|
666
774
|
deleteProperty(e) {
|
|
667
775
|
let t = this.baseUrl + "/api/platform/dynamic/properties?";
|
|
668
|
-
if (e === null)
|
|
776
|
+
if (e === null)
|
|
777
|
+
throw new globalThis.Error("The parameter 'propertyIds' cannot be null.");
|
|
669
778
|
e !== void 0 && e && e.forEach((r) => {
|
|
670
779
|
t += "propertyIds=" + encodeURIComponent("" + r) + "&";
|
|
671
780
|
}), t = t.replace(/[?&]$/, "");
|
|
@@ -679,11 +788,11 @@ class Ur extends G {
|
|
|
679
788
|
const t = e.status;
|
|
680
789
|
let n = {};
|
|
681
790
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
682
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
791
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
683
792
|
}
|
|
684
793
|
/**
|
|
685
794
|
* Get dynamic properties registered for object type
|
|
686
|
-
* @param body (optional)
|
|
795
|
+
* @param body (optional)
|
|
687
796
|
* @return OK
|
|
688
797
|
*/
|
|
689
798
|
searchDynamicProperties(e) {
|
|
@@ -705,7 +814,7 @@ class Ur extends G {
|
|
|
705
814
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
706
815
|
let a = null;
|
|
707
816
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
708
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
817
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
709
818
|
}
|
|
710
819
|
/**
|
|
711
820
|
* Does nothing. Just a way to expose DynamicObjectProperty thru Swagger.
|
|
@@ -728,15 +837,16 @@ class Ur extends G {
|
|
|
728
837
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
729
838
|
let a = null;
|
|
730
839
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
731
|
-
}) : t === 204 ? e.text().then((r) =>
|
|
840
|
+
}) : t === 204 ? e.text().then((r) => s("No Content", t, r, n)) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
732
841
|
}
|
|
733
842
|
/**
|
|
734
|
-
* @param propertyId (optional)
|
|
843
|
+
* @param propertyId (optional)
|
|
735
844
|
* @return OK
|
|
736
845
|
*/
|
|
737
846
|
getAllDictionaryItems(e) {
|
|
738
847
|
let t = this.baseUrl + "/api/platform/dynamic/dictionaryitems?";
|
|
739
|
-
if (e === null)
|
|
848
|
+
if (e === null)
|
|
849
|
+
throw new globalThis.Error("The parameter 'propertyId' cannot be null.");
|
|
740
850
|
e !== void 0 && (t += "propertyId=" + encodeURIComponent("" + e) + "&"), t = t.replace(/[?&]$/, "");
|
|
741
851
|
let n = {
|
|
742
852
|
method: "GET",
|
|
@@ -752,11 +862,11 @@ class Ur extends G {
|
|
|
752
862
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
753
863
|
let a = null;
|
|
754
864
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
755
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
865
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
756
866
|
}
|
|
757
867
|
/**
|
|
758
868
|
* Add or update dictionary items
|
|
759
|
-
* @param body (optional)
|
|
869
|
+
* @param body (optional)
|
|
760
870
|
* @return No Content
|
|
761
871
|
*/
|
|
762
872
|
saveDictionaryItems(e) {
|
|
@@ -775,7 +885,7 @@ class Ur extends G {
|
|
|
775
885
|
const t = e.status;
|
|
776
886
|
let n = {};
|
|
777
887
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
778
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
888
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
779
889
|
}
|
|
780
890
|
/**
|
|
781
891
|
* Delete dictionary items
|
|
@@ -784,7 +894,8 @@ class Ur extends G {
|
|
|
784
894
|
*/
|
|
785
895
|
deleteDictionaryItem(e) {
|
|
786
896
|
let t = this.baseUrl + "/api/platform/dynamic/dictionaryitems?";
|
|
787
|
-
if (e === null)
|
|
897
|
+
if (e === null)
|
|
898
|
+
throw new globalThis.Error("The parameter 'ids' cannot be null.");
|
|
788
899
|
e !== void 0 && e && e.forEach((r) => {
|
|
789
900
|
t += "ids=" + encodeURIComponent("" + r) + "&";
|
|
790
901
|
}), t = t.replace(/[?&]$/, "");
|
|
@@ -798,11 +909,11 @@ class Ur extends G {
|
|
|
798
909
|
const t = e.status;
|
|
799
910
|
let n = {};
|
|
800
911
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
801
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
912
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
802
913
|
}
|
|
803
914
|
/**
|
|
804
915
|
* Get dictionary items
|
|
805
|
-
* @param body (optional)
|
|
916
|
+
* @param body (optional)
|
|
806
917
|
* @return OK
|
|
807
918
|
*/
|
|
808
919
|
searchDictionaryItems(e) {
|
|
@@ -824,10 +935,10 @@ class Ur extends G {
|
|
|
824
935
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
825
936
|
let a = null;
|
|
826
937
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
827
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
938
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
828
939
|
}
|
|
829
940
|
}
|
|
830
|
-
class
|
|
941
|
+
class Er extends F {
|
|
831
942
|
http;
|
|
832
943
|
baseUrl;
|
|
833
944
|
constructor(e, t) {
|
|
@@ -840,7 +951,8 @@ class Ar extends G {
|
|
|
840
951
|
*/
|
|
841
952
|
getStatus(e) {
|
|
842
953
|
let t = this.baseUrl + "/api/platform/jobs/{id}";
|
|
843
|
-
if (e == null)
|
|
954
|
+
if (e == null)
|
|
955
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
844
956
|
t = t.replace("{id}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
845
957
|
let n = {
|
|
846
958
|
method: "GET",
|
|
@@ -856,10 +968,10 @@ class Ar extends G {
|
|
|
856
968
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
857
969
|
let a = null;
|
|
858
970
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
859
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
971
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
860
972
|
}
|
|
861
973
|
}
|
|
862
|
-
class
|
|
974
|
+
class yr extends F {
|
|
863
975
|
http;
|
|
864
976
|
baseUrl;
|
|
865
977
|
constructor(e, t) {
|
|
@@ -885,14 +997,15 @@ class wr extends G {
|
|
|
885
997
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
886
998
|
let a = null;
|
|
887
999
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
888
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1000
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
889
1001
|
}
|
|
890
1002
|
/**
|
|
891
1003
|
* @return OK
|
|
892
1004
|
*/
|
|
893
1005
|
getDictionaryValues(e, t) {
|
|
894
1006
|
let n = this.baseUrl + "/api/platform/localizable-settings/{name}/dictionary-items/{language}/values";
|
|
895
|
-
if (e == null)
|
|
1007
|
+
if (e == null)
|
|
1008
|
+
throw new globalThis.Error("The parameter 'name' must be defined.");
|
|
896
1009
|
if (n = n.replace("{name}", encodeURIComponent("" + e)), t == null)
|
|
897
1010
|
throw new globalThis.Error("The parameter 'language' must be defined.");
|
|
898
1011
|
n = n.replace("{language}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
|
|
@@ -910,15 +1023,16 @@ class wr extends G {
|
|
|
910
1023
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
911
1024
|
let a = null;
|
|
912
1025
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
913
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1026
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
914
1027
|
}
|
|
915
1028
|
/**
|
|
916
|
-
* @param body (optional)
|
|
1029
|
+
* @param body (optional)
|
|
917
1030
|
* @return No Content
|
|
918
1031
|
*/
|
|
919
1032
|
saveDictionaryItems(e, t) {
|
|
920
1033
|
let n = this.baseUrl + "/api/platform/localizable-settings/{name}/dictionary-items";
|
|
921
|
-
if (e == null)
|
|
1034
|
+
if (e == null)
|
|
1035
|
+
throw new globalThis.Error("The parameter 'name' must be defined.");
|
|
922
1036
|
n = n.replace("{name}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
|
|
923
1037
|
let a = {
|
|
924
1038
|
body: JSON.stringify(t),
|
|
@@ -933,16 +1047,18 @@ class wr extends G {
|
|
|
933
1047
|
const t = e.status;
|
|
934
1048
|
let n = {};
|
|
935
1049
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
936
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1050
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
937
1051
|
}
|
|
938
1052
|
/**
|
|
939
|
-
* @param values (optional)
|
|
1053
|
+
* @param values (optional)
|
|
940
1054
|
* @return No Content
|
|
941
1055
|
*/
|
|
942
1056
|
deleteDictionaryItems(e, t) {
|
|
943
1057
|
let n = this.baseUrl + "/api/platform/localizable-settings/{name}/dictionary-items?";
|
|
944
|
-
if (e == null)
|
|
945
|
-
|
|
1058
|
+
if (e == null)
|
|
1059
|
+
throw new globalThis.Error("The parameter 'name' must be defined.");
|
|
1060
|
+
if (n = n.replace("{name}", encodeURIComponent("" + e)), t === null)
|
|
1061
|
+
throw new globalThis.Error("The parameter 'values' cannot be null.");
|
|
946
1062
|
t !== void 0 && t && t.forEach((a) => {
|
|
947
1063
|
n += "values=" + encodeURIComponent("" + a) + "&";
|
|
948
1064
|
}), n = n.replace(/[?&]$/, "");
|
|
@@ -956,17 +1072,17 @@ class wr extends G {
|
|
|
956
1072
|
const t = e.status;
|
|
957
1073
|
let n = {};
|
|
958
1074
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
959
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1075
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
960
1076
|
}
|
|
961
1077
|
}
|
|
962
|
-
class
|
|
1078
|
+
class _r extends F {
|
|
963
1079
|
http;
|
|
964
1080
|
baseUrl;
|
|
965
1081
|
constructor(e, t) {
|
|
966
1082
|
super(), this.http = t || window, this.baseUrl = this.getBaseUrl("", e);
|
|
967
1083
|
}
|
|
968
1084
|
/**
|
|
969
|
-
* Reload
|
|
1085
|
+
* Reload modules
|
|
970
1086
|
* @return No Content
|
|
971
1087
|
*/
|
|
972
1088
|
reloadModules() {
|
|
@@ -982,7 +1098,7 @@ class Tr extends G {
|
|
|
982
1098
|
const t = e.status;
|
|
983
1099
|
let n = {};
|
|
984
1100
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
985
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1101
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
986
1102
|
}
|
|
987
1103
|
/**
|
|
988
1104
|
* Get installed modules
|
|
@@ -1005,10 +1121,10 @@ class Tr extends G {
|
|
|
1005
1121
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1006
1122
|
let a = null;
|
|
1007
1123
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1008
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1124
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1009
1125
|
}
|
|
1010
1126
|
/**
|
|
1011
|
-
* Get all dependent modules for module
|
|
1127
|
+
* Get all dependent modules for a module
|
|
1012
1128
|
* @param body (optional) modules descriptors
|
|
1013
1129
|
* @return OK
|
|
1014
1130
|
*/
|
|
@@ -1031,10 +1147,10 @@ class Tr extends G {
|
|
|
1031
1147
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1032
1148
|
let a = null;
|
|
1033
1149
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1034
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1150
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1035
1151
|
}
|
|
1036
1152
|
/**
|
|
1037
|
-
* Returns a flat expanded
|
|
1153
|
+
* Returns a flat expanded list of modules that depend on passed modules
|
|
1038
1154
|
* @param body (optional) modules descriptors
|
|
1039
1155
|
* @return OK
|
|
1040
1156
|
*/
|
|
@@ -1057,7 +1173,7 @@ class Tr extends G {
|
|
|
1057
1173
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1058
1174
|
let a = null;
|
|
1059
1175
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1060
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1176
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1061
1177
|
}
|
|
1062
1178
|
/**
|
|
1063
1179
|
* Upload module package for installation or update
|
|
@@ -1080,7 +1196,7 @@ class Tr extends G {
|
|
|
1080
1196
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1081
1197
|
let a = null;
|
|
1082
1198
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1083
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1199
|
+
}) : t === 400 ? e.text().then((r) => s("Bad Request", t, r, n)) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1084
1200
|
}
|
|
1085
1201
|
/**
|
|
1086
1202
|
* Install modules
|
|
@@ -1106,7 +1222,33 @@ class Tr extends G {
|
|
|
1106
1222
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1107
1223
|
let a = null;
|
|
1108
1224
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1109
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1225
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Install modules using lightweight requests
|
|
1229
|
+
* @param body (optional) module install requests (id + optional version)
|
|
1230
|
+
* @return OK
|
|
1231
|
+
*/
|
|
1232
|
+
installModuleRequests(e) {
|
|
1233
|
+
let t = this.baseUrl + "/api/platform/modules/install/v2";
|
|
1234
|
+
t = t.replace(/[?&]$/, "");
|
|
1235
|
+
let r = {
|
|
1236
|
+
body: JSON.stringify(e),
|
|
1237
|
+
method: "POST",
|
|
1238
|
+
headers: {
|
|
1239
|
+
"Content-Type": "application/json-patch+json",
|
|
1240
|
+
Accept: "application/json"
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
return this.transformOptions(r).then((a) => this.http.fetch(t, a)).then((a) => this.processInstallModuleRequests(a));
|
|
1244
|
+
}
|
|
1245
|
+
processInstallModuleRequests(e) {
|
|
1246
|
+
const t = e.status;
|
|
1247
|
+
let n = {};
|
|
1248
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1249
|
+
let a = null;
|
|
1250
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1251
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1110
1252
|
}
|
|
1111
1253
|
/**
|
|
1112
1254
|
* Update modules
|
|
@@ -1132,7 +1274,33 @@ class Tr extends G {
|
|
|
1132
1274
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1133
1275
|
let a = null;
|
|
1134
1276
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1135
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1277
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* Update modules using lightweight requests
|
|
1281
|
+
* @param body (optional) module install requests (id + optional version)
|
|
1282
|
+
* @return OK
|
|
1283
|
+
*/
|
|
1284
|
+
updateModuleRequests(e) {
|
|
1285
|
+
let t = this.baseUrl + "/api/platform/modules/update/v2";
|
|
1286
|
+
t = t.replace(/[?&]$/, "");
|
|
1287
|
+
let r = {
|
|
1288
|
+
body: JSON.stringify(e),
|
|
1289
|
+
method: "POST",
|
|
1290
|
+
headers: {
|
|
1291
|
+
"Content-Type": "application/json-patch+json",
|
|
1292
|
+
Accept: "application/json"
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
return this.transformOptions(r).then((a) => this.http.fetch(t, a)).then((a) => this.processUpdateModuleRequests(a));
|
|
1296
|
+
}
|
|
1297
|
+
processUpdateModuleRequests(e) {
|
|
1298
|
+
const t = e.status;
|
|
1299
|
+
let n = {};
|
|
1300
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1301
|
+
let a = null;
|
|
1302
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1303
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1136
1304
|
}
|
|
1137
1305
|
/**
|
|
1138
1306
|
* Uninstall module
|
|
@@ -1158,7 +1326,33 @@ class Tr extends G {
|
|
|
1158
1326
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1159
1327
|
let a = null;
|
|
1160
1328
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1161
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1329
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* Uninstall modules using lightweight requests
|
|
1333
|
+
* @param body (optional) module install requests (id only, version ignored)
|
|
1334
|
+
* @return OK
|
|
1335
|
+
*/
|
|
1336
|
+
uninstallModuleRequests(e) {
|
|
1337
|
+
let t = this.baseUrl + "/api/platform/modules/uninstall/v2";
|
|
1338
|
+
t = t.replace(/[?&]$/, "");
|
|
1339
|
+
let r = {
|
|
1340
|
+
body: JSON.stringify(e),
|
|
1341
|
+
method: "POST",
|
|
1342
|
+
headers: {
|
|
1343
|
+
"Content-Type": "application/json-patch+json",
|
|
1344
|
+
Accept: "application/json"
|
|
1345
|
+
}
|
|
1346
|
+
};
|
|
1347
|
+
return this.transformOptions(r).then((a) => this.http.fetch(t, a)).then((a) => this.processUninstallModuleRequests(a));
|
|
1348
|
+
}
|
|
1349
|
+
processUninstallModuleRequests(e) {
|
|
1350
|
+
const t = e.status;
|
|
1351
|
+
let n = {};
|
|
1352
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1353
|
+
let a = null;
|
|
1354
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1355
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1162
1356
|
}
|
|
1163
1357
|
/**
|
|
1164
1358
|
* Restart web application
|
|
@@ -1177,7 +1371,7 @@ class Tr extends G {
|
|
|
1177
1371
|
const t = e.status;
|
|
1178
1372
|
let n = {};
|
|
1179
1373
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
1180
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1374
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1181
1375
|
}
|
|
1182
1376
|
/**
|
|
1183
1377
|
* Auto-install modules with specified groups
|
|
@@ -1200,9 +1394,10 @@ class Tr extends G {
|
|
|
1200
1394
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1201
1395
|
let a = null;
|
|
1202
1396
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1203
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1397
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1204
1398
|
}
|
|
1205
1399
|
/**
|
|
1400
|
+
* Get module loading order
|
|
1206
1401
|
* @return OK
|
|
1207
1402
|
*/
|
|
1208
1403
|
getModulesLoadingOrder() {
|
|
@@ -1222,10 +1417,121 @@ class Tr extends G {
|
|
|
1222
1417
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1223
1418
|
let a = null;
|
|
1224
1419
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1225
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1420
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Validate that a specific module version package exists at the download URL.
|
|
1424
|
+
* @param moduleId Module identifier
|
|
1425
|
+
* @param version Version to validate
|
|
1426
|
+
* @return OK
|
|
1427
|
+
*/
|
|
1428
|
+
validateModuleVersion(e, t) {
|
|
1429
|
+
let n = this.baseUrl + "/api/platform/modules/{moduleId}/versions/{version}/validate";
|
|
1430
|
+
if (e == null)
|
|
1431
|
+
throw new globalThis.Error("The parameter 'moduleId' must be defined.");
|
|
1432
|
+
if (n = n.replace("{moduleId}", encodeURIComponent("" + e)), t == null)
|
|
1433
|
+
throw new globalThis.Error("The parameter 'version' must be defined.");
|
|
1434
|
+
n = n.replace("{version}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
|
|
1435
|
+
let r = {
|
|
1436
|
+
method: "GET",
|
|
1437
|
+
headers: {
|
|
1438
|
+
Accept: "application/json"
|
|
1439
|
+
}
|
|
1440
|
+
};
|
|
1441
|
+
return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processValidateModuleVersion(a));
|
|
1442
|
+
}
|
|
1443
|
+
processValidateModuleVersion(e) {
|
|
1444
|
+
const t = e.status;
|
|
1445
|
+
let n = {};
|
|
1446
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1447
|
+
let a = null;
|
|
1448
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1449
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Install a specific version of a module.
|
|
1453
|
+
Validates the package URL, registers the custom version, and schedules installation.
|
|
1454
|
+
* @param moduleId Module identifier
|
|
1455
|
+
* @param version Version to install
|
|
1456
|
+
* @return OK
|
|
1457
|
+
*/
|
|
1458
|
+
installModuleVersion(e, t) {
|
|
1459
|
+
let n = this.baseUrl + "/api/platform/modules/{moduleId}/versions/{version}/install";
|
|
1460
|
+
if (e == null)
|
|
1461
|
+
throw new globalThis.Error("The parameter 'moduleId' must be defined.");
|
|
1462
|
+
if (n = n.replace("{moduleId}", encodeURIComponent("" + e)), t == null)
|
|
1463
|
+
throw new globalThis.Error("The parameter 'version' must be defined.");
|
|
1464
|
+
n = n.replace("{version}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
|
|
1465
|
+
let r = {
|
|
1466
|
+
method: "POST",
|
|
1467
|
+
headers: {
|
|
1468
|
+
Accept: "application/json"
|
|
1469
|
+
}
|
|
1470
|
+
};
|
|
1471
|
+
return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processInstallModuleVersion(a));
|
|
1472
|
+
}
|
|
1473
|
+
processInstallModuleVersion(e) {
|
|
1474
|
+
const t = e.status;
|
|
1475
|
+
let n = {};
|
|
1476
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1477
|
+
let a = null;
|
|
1478
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1479
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t === 404 ? e.text().then((r) => s("Not Found", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* Install the latest available version of a module.
|
|
1483
|
+
* @param moduleId Module identifier
|
|
1484
|
+
* @return OK
|
|
1485
|
+
*/
|
|
1486
|
+
installModule(e) {
|
|
1487
|
+
let t = this.baseUrl + "/api/platform/modules/{moduleId}/install";
|
|
1488
|
+
if (e == null)
|
|
1489
|
+
throw new globalThis.Error("The parameter 'moduleId' must be defined.");
|
|
1490
|
+
t = t.replace("{moduleId}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
1491
|
+
let n = {
|
|
1492
|
+
method: "POST",
|
|
1493
|
+
headers: {
|
|
1494
|
+
Accept: "application/json"
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
return this.transformOptions(n).then((r) => this.http.fetch(t, r)).then((r) => this.processInstallModule(r));
|
|
1498
|
+
}
|
|
1499
|
+
processInstallModule(e) {
|
|
1500
|
+
const t = e.status;
|
|
1501
|
+
let n = {};
|
|
1502
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1503
|
+
let a = null;
|
|
1504
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1505
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1506
|
+
}
|
|
1507
|
+
/**
|
|
1508
|
+
* Uninstall a module.
|
|
1509
|
+
* @param moduleId Module identifier
|
|
1510
|
+
* @return OK
|
|
1511
|
+
*/
|
|
1512
|
+
uninstallSingleModule(e) {
|
|
1513
|
+
let t = this.baseUrl + "/api/platform/modules/{moduleId}/uninstall";
|
|
1514
|
+
if (e == null)
|
|
1515
|
+
throw new globalThis.Error("The parameter 'moduleId' must be defined.");
|
|
1516
|
+
t = t.replace("{moduleId}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
1517
|
+
let n = {
|
|
1518
|
+
method: "POST",
|
|
1519
|
+
headers: {
|
|
1520
|
+
Accept: "application/json"
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
return this.transformOptions(n).then((r) => this.http.fetch(t, r)).then((r) => this.processUninstallSingleModule(r));
|
|
1524
|
+
}
|
|
1525
|
+
processUninstallSingleModule(e) {
|
|
1526
|
+
const t = e.status;
|
|
1527
|
+
let n = {};
|
|
1528
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1529
|
+
let a = null;
|
|
1530
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1531
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1226
1532
|
}
|
|
1227
1533
|
}
|
|
1228
|
-
class
|
|
1534
|
+
class Ur extends F {
|
|
1229
1535
|
http;
|
|
1230
1536
|
baseUrl;
|
|
1231
1537
|
constructor(e, t) {
|
|
@@ -1251,10 +1557,10 @@ class Pr extends G {
|
|
|
1251
1557
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1252
1558
|
let a = null;
|
|
1253
1559
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1254
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1560
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1255
1561
|
}
|
|
1256
1562
|
/**
|
|
1257
|
-
* @param body (optional)
|
|
1563
|
+
* @param body (optional)
|
|
1258
1564
|
* @return OK
|
|
1259
1565
|
*/
|
|
1260
1566
|
save(e) {
|
|
@@ -1276,15 +1582,16 @@ class Pr extends G {
|
|
|
1276
1582
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1277
1583
|
let a = null;
|
|
1278
1584
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1279
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1585
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1280
1586
|
}
|
|
1281
1587
|
/**
|
|
1282
|
-
* @param clientIds (optional)
|
|
1588
|
+
* @param clientIds (optional)
|
|
1283
1589
|
* @return OK
|
|
1284
1590
|
*/
|
|
1285
1591
|
delete(e) {
|
|
1286
1592
|
let t = this.baseUrl + "/api/platform/oauthapps?";
|
|
1287
|
-
if (e === null)
|
|
1593
|
+
if (e === null)
|
|
1594
|
+
throw new globalThis.Error("The parameter 'clientIds' cannot be null.");
|
|
1288
1595
|
e !== void 0 && e && e.forEach((r) => {
|
|
1289
1596
|
t += "clientIds=" + encodeURIComponent("" + r) + "&";
|
|
1290
1597
|
}), t = t.replace(/[?&]$/, "");
|
|
@@ -1298,10 +1605,10 @@ class Pr extends G {
|
|
|
1298
1605
|
const t = e.status;
|
|
1299
1606
|
let n = {};
|
|
1300
1607
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1301
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1608
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1302
1609
|
}
|
|
1303
1610
|
/**
|
|
1304
|
-
* @param body (optional)
|
|
1611
|
+
* @param body (optional)
|
|
1305
1612
|
* @return OK
|
|
1306
1613
|
*/
|
|
1307
1614
|
search(e) {
|
|
@@ -1323,10 +1630,10 @@ class Pr extends G {
|
|
|
1323
1630
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1324
1631
|
let a = null;
|
|
1325
1632
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1326
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1633
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1327
1634
|
}
|
|
1328
1635
|
}
|
|
1329
|
-
class
|
|
1636
|
+
class Cr extends F {
|
|
1330
1637
|
http;
|
|
1331
1638
|
baseUrl;
|
|
1332
1639
|
constructor(e, t) {
|
|
@@ -1356,7 +1663,7 @@ class Or extends G {
|
|
|
1356
1663
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1357
1664
|
let a = null;
|
|
1358
1665
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1359
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1666
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1360
1667
|
}
|
|
1361
1668
|
/**
|
|
1362
1669
|
* Mark all notifications as read
|
|
@@ -1379,22 +1686,23 @@ class Or extends G {
|
|
|
1379
1686
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1380
1687
|
let a = null;
|
|
1381
1688
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1382
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1689
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1383
1690
|
}
|
|
1384
1691
|
}
|
|
1385
|
-
class qe extends
|
|
1692
|
+
class qe extends F {
|
|
1386
1693
|
http;
|
|
1387
1694
|
baseUrl;
|
|
1388
1695
|
constructor(e, t) {
|
|
1389
1696
|
super(), this.http = t || window, this.baseUrl = this.getBaseUrl("", e);
|
|
1390
1697
|
}
|
|
1391
1698
|
/**
|
|
1392
|
-
* @param body (optional)
|
|
1699
|
+
* @param body (optional)
|
|
1393
1700
|
* @return OK
|
|
1394
1701
|
*/
|
|
1395
1702
|
searchUserSessions(e, t) {
|
|
1396
1703
|
let n = this.baseUrl + "/api/platform/security/users/{userId}/sessions/search";
|
|
1397
|
-
if (e == null)
|
|
1704
|
+
if (e == null)
|
|
1705
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
1398
1706
|
n = n.replace("{userId}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
|
|
1399
1707
|
let a = {
|
|
1400
1708
|
body: JSON.stringify(t),
|
|
@@ -1412,15 +1720,17 @@ class qe extends G {
|
|
|
1412
1720
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1413
1721
|
let a = null;
|
|
1414
1722
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1415
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1723
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1416
1724
|
}
|
|
1417
1725
|
/**
|
|
1418
1726
|
* @return No Content
|
|
1419
1727
|
*/
|
|
1420
1728
|
terminateUserSession(e, t) {
|
|
1421
1729
|
let n = this.baseUrl + "/api/platform/security/users/{userId}/sessions/{id}";
|
|
1422
|
-
if (e == null)
|
|
1423
|
-
|
|
1730
|
+
if (e == null)
|
|
1731
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
1732
|
+
if (n = n.replace("{userId}", encodeURIComponent("" + e)), t == null)
|
|
1733
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
1424
1734
|
n = n.replace("{id}", encodeURIComponent("" + t)), n = n.replace(/[?&]$/, "");
|
|
1425
1735
|
let r = {
|
|
1426
1736
|
method: "DELETE",
|
|
@@ -1432,14 +1742,15 @@ class qe extends G {
|
|
|
1432
1742
|
const t = e.status;
|
|
1433
1743
|
let n = {};
|
|
1434
1744
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
1435
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1745
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1436
1746
|
}
|
|
1437
1747
|
/**
|
|
1438
1748
|
* @return No Content
|
|
1439
1749
|
*/
|
|
1440
1750
|
terminateAllUserSessions(e) {
|
|
1441
1751
|
let t = this.baseUrl + "/api/platform/security/users/{userId}/sessions";
|
|
1442
|
-
if (e == null)
|
|
1752
|
+
if (e == null)
|
|
1753
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
1443
1754
|
t = t.replace("{userId}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
1444
1755
|
let n = {
|
|
1445
1756
|
method: "DELETE",
|
|
@@ -1451,7 +1762,7 @@ class qe extends G {
|
|
|
1451
1762
|
const t = e.status;
|
|
1452
1763
|
let n = {};
|
|
1453
1764
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
1454
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1765
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1455
1766
|
}
|
|
1456
1767
|
/**
|
|
1457
1768
|
* Sign in with user name and password
|
|
@@ -1477,7 +1788,7 @@ class qe extends G {
|
|
|
1477
1788
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1478
1789
|
let a = null;
|
|
1479
1790
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1480
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
1791
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1481
1792
|
}
|
|
1482
1793
|
/**
|
|
1483
1794
|
* Sign out
|
|
@@ -1496,7 +1807,7 @@ class qe extends G {
|
|
|
1496
1807
|
const t = e.status;
|
|
1497
1808
|
let n = {};
|
|
1498
1809
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
1499
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
1810
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1500
1811
|
}
|
|
1501
1812
|
/**
|
|
1502
1813
|
* Get current user details
|
|
@@ -1519,7 +1830,7 @@ class qe extends G {
|
|
|
1519
1830
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1520
1831
|
let a = null;
|
|
1521
1832
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1522
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
1833
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1523
1834
|
}
|
|
1524
1835
|
/**
|
|
1525
1836
|
* @return OK
|
|
@@ -1541,7 +1852,7 @@ class qe extends G {
|
|
|
1541
1852
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1542
1853
|
let a = null;
|
|
1543
1854
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1544
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1855
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1545
1856
|
}
|
|
1546
1857
|
/**
|
|
1547
1858
|
* Get all registered permissions
|
|
@@ -1564,7 +1875,7 @@ class qe extends G {
|
|
|
1564
1875
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1565
1876
|
let a = null;
|
|
1566
1877
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1567
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1878
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1568
1879
|
}
|
|
1569
1880
|
/**
|
|
1570
1881
|
* SearchAsync roles by keyword
|
|
@@ -1590,7 +1901,7 @@ class qe extends G {
|
|
|
1590
1901
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1591
1902
|
let a = null;
|
|
1592
1903
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1593
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1904
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1594
1905
|
}
|
|
1595
1906
|
/**
|
|
1596
1907
|
* Get role by ID
|
|
@@ -1615,7 +1926,7 @@ class qe extends G {
|
|
|
1615
1926
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1616
1927
|
let a = null;
|
|
1617
1928
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1618
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1929
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1619
1930
|
}
|
|
1620
1931
|
/**
|
|
1621
1932
|
* Delete roles by ID
|
|
@@ -1624,7 +1935,8 @@ class qe extends G {
|
|
|
1624
1935
|
*/
|
|
1625
1936
|
deleteRoles(e) {
|
|
1626
1937
|
let t = this.baseUrl + "/api/platform/security/roles?";
|
|
1627
|
-
if (e === null)
|
|
1938
|
+
if (e === null)
|
|
1939
|
+
throw new globalThis.Error("The parameter 'ids' cannot be null.");
|
|
1628
1940
|
e !== void 0 && e && e.forEach((r) => {
|
|
1629
1941
|
t += "ids=" + encodeURIComponent("" + r) + "&";
|
|
1630
1942
|
}), t = t.replace(/[?&]$/, "");
|
|
@@ -1638,11 +1950,11 @@ class qe extends G {
|
|
|
1638
1950
|
const t = e.status;
|
|
1639
1951
|
let n = {};
|
|
1640
1952
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
1641
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1953
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1642
1954
|
}
|
|
1643
1955
|
/**
|
|
1644
1956
|
* Update an existing role or create new
|
|
1645
|
-
* @param body (optional)
|
|
1957
|
+
* @param body (optional)
|
|
1646
1958
|
* @return OK
|
|
1647
1959
|
*/
|
|
1648
1960
|
updateRole(e) {
|
|
@@ -1664,7 +1976,7 @@ class qe extends G {
|
|
|
1664
1976
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1665
1977
|
let a = null;
|
|
1666
1978
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1667
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
1979
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1668
1980
|
}
|
|
1669
1981
|
/**
|
|
1670
1982
|
* SearchAsync users by keyword
|
|
@@ -1690,7 +2002,85 @@ class qe extends G {
|
|
|
1690
2002
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1691
2003
|
let a = null;
|
|
1692
2004
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1693
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2005
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2006
|
+
}
|
|
2007
|
+
/**
|
|
2008
|
+
* Get users by IDs
|
|
2009
|
+
* @param ids (optional) An array of user IDs.
|
|
2010
|
+
* @return OK
|
|
2011
|
+
*/
|
|
2012
|
+
getUsersByIds(e) {
|
|
2013
|
+
let t = this.baseUrl + "/api/platform/security/users?";
|
|
2014
|
+
if (e === null)
|
|
2015
|
+
throw new globalThis.Error("The parameter 'ids' cannot be null.");
|
|
2016
|
+
e !== void 0 && e && e.forEach((r) => {
|
|
2017
|
+
t += "ids=" + encodeURIComponent("" + r) + "&";
|
|
2018
|
+
}), t = t.replace(/[?&]$/, "");
|
|
2019
|
+
let n = {
|
|
2020
|
+
method: "GET",
|
|
2021
|
+
headers: {
|
|
2022
|
+
Accept: "application/json"
|
|
2023
|
+
}
|
|
2024
|
+
};
|
|
2025
|
+
return this.transformOptions(n).then((r) => this.http.fetch(t, r)).then((r) => this.processGetUsersByIds(r));
|
|
2026
|
+
}
|
|
2027
|
+
processGetUsersByIds(e) {
|
|
2028
|
+
const t = e.status;
|
|
2029
|
+
let n = {};
|
|
2030
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2031
|
+
let a = null;
|
|
2032
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2033
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2034
|
+
}
|
|
2035
|
+
/**
|
|
2036
|
+
* Update user details by user ID
|
|
2037
|
+
* @param body (optional) User details.
|
|
2038
|
+
* @return OK
|
|
2039
|
+
*/
|
|
2040
|
+
update(e) {
|
|
2041
|
+
let t = this.baseUrl + "/api/platform/security/users";
|
|
2042
|
+
t = t.replace(/[?&]$/, "");
|
|
2043
|
+
let r = {
|
|
2044
|
+
body: JSON.stringify(e),
|
|
2045
|
+
method: "PUT",
|
|
2046
|
+
headers: {
|
|
2047
|
+
"Content-Type": "application/json-patch+json",
|
|
2048
|
+
Accept: "application/json"
|
|
2049
|
+
}
|
|
2050
|
+
};
|
|
2051
|
+
return this.transformOptions(r).then((a) => this.http.fetch(t, a)).then((a) => this.processUpdate(a));
|
|
2052
|
+
}
|
|
2053
|
+
processUpdate(e) {
|
|
2054
|
+
const t = e.status;
|
|
2055
|
+
let n = {};
|
|
2056
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2057
|
+
let a = null;
|
|
2058
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2059
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2060
|
+
}
|
|
2061
|
+
/**
|
|
2062
|
+
* Delete users by name
|
|
2063
|
+
* @param names (optional) An array of user names.
|
|
2064
|
+
* @return OK
|
|
2065
|
+
*/
|
|
2066
|
+
delete(e) {
|
|
2067
|
+
let t = this.baseUrl + "/api/platform/security/users?";
|
|
2068
|
+
if (e === null)
|
|
2069
|
+
throw new globalThis.Error("The parameter 'names' cannot be null.");
|
|
2070
|
+
e !== void 0 && e && e.forEach((r) => {
|
|
2071
|
+
t += "names=" + encodeURIComponent("" + r) + "&";
|
|
2072
|
+
}), t = t.replace(/[?&]$/, "");
|
|
2073
|
+
let n = {
|
|
2074
|
+
method: "DELETE",
|
|
2075
|
+
headers: {}
|
|
2076
|
+
};
|
|
2077
|
+
return this.transformOptions(n).then((r) => this.http.fetch(t, r)).then((r) => this.processDelete(r));
|
|
2078
|
+
}
|
|
2079
|
+
processDelete(e) {
|
|
2080
|
+
const t = e.status;
|
|
2081
|
+
let n = {};
|
|
2082
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2083
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1694
2084
|
}
|
|
1695
2085
|
/**
|
|
1696
2086
|
* Get user details by user name
|
|
@@ -1715,7 +2105,7 @@ class qe extends G {
|
|
|
1715
2105
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1716
2106
|
let a = null;
|
|
1717
2107
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1718
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2108
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1719
2109
|
}
|
|
1720
2110
|
/**
|
|
1721
2111
|
* Get user details by user ID
|
|
@@ -1723,7 +2113,8 @@ class qe extends G {
|
|
|
1723
2113
|
*/
|
|
1724
2114
|
getUserById(e) {
|
|
1725
2115
|
let t = this.baseUrl + "/api/platform/security/users/id/{id}";
|
|
1726
|
-
if (e == null)
|
|
2116
|
+
if (e == null)
|
|
2117
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
1727
2118
|
t = t.replace("{id}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
1728
2119
|
let n = {
|
|
1729
2120
|
method: "GET",
|
|
@@ -1739,7 +2130,7 @@ class qe extends G {
|
|
|
1739
2130
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1740
2131
|
let a = null;
|
|
1741
2132
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1742
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2133
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1743
2134
|
}
|
|
1744
2135
|
/**
|
|
1745
2136
|
* Get user details by user email
|
|
@@ -1747,7 +2138,8 @@ class qe extends G {
|
|
|
1747
2138
|
*/
|
|
1748
2139
|
getUserByEmail(e) {
|
|
1749
2140
|
let t = this.baseUrl + "/api/platform/security/users/email/{email}";
|
|
1750
|
-
if (e == null)
|
|
2141
|
+
if (e == null)
|
|
2142
|
+
throw new globalThis.Error("The parameter 'email' must be defined.");
|
|
1751
2143
|
t = t.replace("{email}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
1752
2144
|
let n = {
|
|
1753
2145
|
method: "GET",
|
|
@@ -1763,7 +2155,7 @@ class qe extends G {
|
|
|
1763
2155
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1764
2156
|
let a = null;
|
|
1765
2157
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1766
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2158
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1767
2159
|
}
|
|
1768
2160
|
/**
|
|
1769
2161
|
* Get user details by external login provider
|
|
@@ -1790,11 +2182,11 @@ class qe extends G {
|
|
|
1790
2182
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1791
2183
|
let a = null;
|
|
1792
2184
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1793
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2185
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1794
2186
|
}
|
|
1795
2187
|
/**
|
|
1796
2188
|
* Create new user
|
|
1797
|
-
* @param body (optional)
|
|
2189
|
+
* @param body (optional)
|
|
1798
2190
|
* @return OK
|
|
1799
2191
|
*/
|
|
1800
2192
|
create(e) {
|
|
@@ -1816,7 +2208,7 @@ class qe extends G {
|
|
|
1816
2208
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1817
2209
|
let a = null;
|
|
1818
2210
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1819
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2211
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1820
2212
|
}
|
|
1821
2213
|
/**
|
|
1822
2214
|
* Change password for current user.
|
|
@@ -1842,7 +2234,7 @@ class qe extends G {
|
|
|
1842
2234
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1843
2235
|
let a = null;
|
|
1844
2236
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1845
|
-
}) : t === 400 ? e.text().then((r) =>
|
|
2237
|
+
}) : t === 400 ? e.text().then((r) => s("Bad Request", t, r, n)) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1846
2238
|
}
|
|
1847
2239
|
/**
|
|
1848
2240
|
* Change password
|
|
@@ -1871,7 +2263,7 @@ class qe extends G {
|
|
|
1871
2263
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1872
2264
|
let a = null;
|
|
1873
2265
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1874
|
-
}) : t === 400 ? e.text().then((r) =>
|
|
2266
|
+
}) : t === 400 ? e.text().then((r) => s("Bad Request", t, r, n)) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1875
2267
|
}
|
|
1876
2268
|
/**
|
|
1877
2269
|
* Reset password confirmation
|
|
@@ -1899,7 +2291,7 @@ class qe extends G {
|
|
|
1899
2291
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1900
2292
|
let a = null;
|
|
1901
2293
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1902
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2294
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1903
2295
|
}
|
|
1904
2296
|
/**
|
|
1905
2297
|
* Reset password confirmation
|
|
@@ -1908,7 +2300,8 @@ class qe extends G {
|
|
|
1908
2300
|
*/
|
|
1909
2301
|
resetPasswordByToken(e, t) {
|
|
1910
2302
|
let n = this.baseUrl + "/api/platform/security/users/{userId}/resetpasswordconfirm";
|
|
1911
|
-
if (e == null)
|
|
2303
|
+
if (e == null)
|
|
2304
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
1912
2305
|
n = n.replace("{userId}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
|
|
1913
2306
|
let a = {
|
|
1914
2307
|
body: JSON.stringify(t),
|
|
@@ -1926,16 +2319,17 @@ class qe extends G {
|
|
|
1926
2319
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1927
2320
|
let a = null;
|
|
1928
2321
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1929
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
2322
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1930
2323
|
}
|
|
1931
2324
|
/**
|
|
1932
2325
|
* Validate password reset token
|
|
1933
|
-
* @param body (optional)
|
|
2326
|
+
* @param body (optional)
|
|
1934
2327
|
* @return OK
|
|
1935
2328
|
*/
|
|
1936
2329
|
validatePasswordResetToken(e, t) {
|
|
1937
2330
|
let n = this.baseUrl + "/api/platform/security/users/{userId}/validatepasswordresettoken";
|
|
1938
|
-
if (e == null)
|
|
2331
|
+
if (e == null)
|
|
2332
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
1939
2333
|
n = n.replace("{userId}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
|
|
1940
2334
|
let a = {
|
|
1941
2335
|
body: JSON.stringify(t),
|
|
@@ -1953,7 +2347,7 @@ class qe extends G {
|
|
|
1953
2347
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1954
2348
|
let a = null;
|
|
1955
2349
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
1956
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
2350
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1957
2351
|
}
|
|
1958
2352
|
/**
|
|
1959
2353
|
* Send email with instructions on how to reset user password.
|
|
@@ -1974,10 +2368,10 @@ class qe extends G {
|
|
|
1974
2368
|
const t = e.status;
|
|
1975
2369
|
let n = {};
|
|
1976
2370
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
1977
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
2371
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
1978
2372
|
}
|
|
1979
2373
|
/**
|
|
1980
|
-
* @param body (optional)
|
|
2374
|
+
* @param body (optional)
|
|
1981
2375
|
* @return OK
|
|
1982
2376
|
*/
|
|
1983
2377
|
validatePassword(e) {
|
|
@@ -1999,10 +2393,10 @@ class qe extends G {
|
|
|
1999
2393
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2000
2394
|
let a = null;
|
|
2001
2395
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2002
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
2396
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2003
2397
|
}
|
|
2004
2398
|
/**
|
|
2005
|
-
* @param body (optional)
|
|
2399
|
+
* @param body (optional)
|
|
2006
2400
|
* @return OK
|
|
2007
2401
|
*/
|
|
2008
2402
|
validateUserPassword(e) {
|
|
@@ -2024,56 +2418,7 @@ class qe extends G {
|
|
|
2024
2418
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2025
2419
|
let a = null;
|
|
2026
2420
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2027
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2028
|
-
}
|
|
2029
|
-
/**
|
|
2030
|
-
* Update user details by user ID
|
|
2031
|
-
* @param body (optional) User details.
|
|
2032
|
-
* @return OK
|
|
2033
|
-
*/
|
|
2034
|
-
update(e) {
|
|
2035
|
-
let t = this.baseUrl + "/api/platform/security/users";
|
|
2036
|
-
t = t.replace(/[?&]$/, "");
|
|
2037
|
-
let r = {
|
|
2038
|
-
body: JSON.stringify(e),
|
|
2039
|
-
method: "PUT",
|
|
2040
|
-
headers: {
|
|
2041
|
-
"Content-Type": "application/json-patch+json",
|
|
2042
|
-
Accept: "application/json"
|
|
2043
|
-
}
|
|
2044
|
-
};
|
|
2045
|
-
return this.transformOptions(r).then((a) => this.http.fetch(t, a)).then((a) => this.processUpdate(a));
|
|
2046
|
-
}
|
|
2047
|
-
processUpdate(e) {
|
|
2048
|
-
const t = e.status;
|
|
2049
|
-
let n = {};
|
|
2050
|
-
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2051
|
-
let a = null;
|
|
2052
|
-
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2053
|
-
}) : t === 401 ? e.text().then((r) => i("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => i("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => i("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2054
|
-
}
|
|
2055
|
-
/**
|
|
2056
|
-
* Delete users by name
|
|
2057
|
-
* @param names (optional) An array of user names.
|
|
2058
|
-
* @return OK
|
|
2059
|
-
*/
|
|
2060
|
-
delete(e) {
|
|
2061
|
-
let t = this.baseUrl + "/api/platform/security/users?";
|
|
2062
|
-
if (e === null) throw new globalThis.Error("The parameter 'names' cannot be null.");
|
|
2063
|
-
e !== void 0 && e && e.forEach((r) => {
|
|
2064
|
-
t += "names=" + encodeURIComponent("" + r) + "&";
|
|
2065
|
-
}), t = t.replace(/[?&]$/, "");
|
|
2066
|
-
let n = {
|
|
2067
|
-
method: "DELETE",
|
|
2068
|
-
headers: {}
|
|
2069
|
-
};
|
|
2070
|
-
return this.transformOptions(n).then((r) => this.http.fetch(t, r)).then((r) => this.processDelete(r));
|
|
2071
|
-
}
|
|
2072
|
-
processDelete(e) {
|
|
2073
|
-
const t = e.status;
|
|
2074
|
-
let n = {};
|
|
2075
|
-
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2076
|
-
}) : t === 401 ? e.text().then((r) => i("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => i("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => i("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2421
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2077
2422
|
}
|
|
2078
2423
|
/**
|
|
2079
2424
|
* Checks if user locked
|
|
@@ -2082,7 +2427,8 @@ class qe extends G {
|
|
|
2082
2427
|
*/
|
|
2083
2428
|
isUserLocked(e) {
|
|
2084
2429
|
let t = this.baseUrl + "/api/platform/security/users/{id}/locked";
|
|
2085
|
-
if (e == null)
|
|
2430
|
+
if (e == null)
|
|
2431
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
2086
2432
|
t = t.replace("{id}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2087
2433
|
let n = {
|
|
2088
2434
|
method: "GET",
|
|
@@ -2098,7 +2444,7 @@ class qe extends G {
|
|
|
2098
2444
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2099
2445
|
let a = null;
|
|
2100
2446
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2101
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2447
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2102
2448
|
}
|
|
2103
2449
|
/**
|
|
2104
2450
|
* Checks if manual password change is enabled
|
|
@@ -2121,7 +2467,7 @@ class qe extends G {
|
|
|
2121
2467
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2122
2468
|
let a = null;
|
|
2123
2469
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2124
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2470
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2125
2471
|
}
|
|
2126
2472
|
/**
|
|
2127
2473
|
* Lock user
|
|
@@ -2130,7 +2476,8 @@ class qe extends G {
|
|
|
2130
2476
|
*/
|
|
2131
2477
|
lockUser(e) {
|
|
2132
2478
|
let t = this.baseUrl + "/api/platform/security/users/{id}/lock";
|
|
2133
|
-
if (e == null)
|
|
2479
|
+
if (e == null)
|
|
2480
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
2134
2481
|
t = t.replace("{id}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2135
2482
|
let n = {
|
|
2136
2483
|
method: "POST",
|
|
@@ -2146,7 +2493,7 @@ class qe extends G {
|
|
|
2146
2493
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2147
2494
|
let a = null;
|
|
2148
2495
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2149
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2496
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2150
2497
|
}
|
|
2151
2498
|
/**
|
|
2152
2499
|
* Unlock user
|
|
@@ -2155,7 +2502,8 @@ class qe extends G {
|
|
|
2155
2502
|
*/
|
|
2156
2503
|
unlockUser(e) {
|
|
2157
2504
|
let t = this.baseUrl + "/api/platform/security/users/{id}/unlock";
|
|
2158
|
-
if (e == null)
|
|
2505
|
+
if (e == null)
|
|
2506
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
2159
2507
|
t = t.replace("{id}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2160
2508
|
let n = {
|
|
2161
2509
|
method: "POST",
|
|
@@ -2171,14 +2519,15 @@ class qe extends G {
|
|
|
2171
2519
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2172
2520
|
let a = null;
|
|
2173
2521
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2174
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2522
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2175
2523
|
}
|
|
2176
2524
|
/**
|
|
2177
2525
|
* @return OK
|
|
2178
2526
|
*/
|
|
2179
2527
|
getUserApiKeys(e) {
|
|
2180
2528
|
let t = this.baseUrl + "/api/platform/security/users/{id}/apikeys";
|
|
2181
|
-
if (e == null)
|
|
2529
|
+
if (e == null)
|
|
2530
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
2182
2531
|
t = t.replace("{id}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2183
2532
|
let n = {
|
|
2184
2533
|
method: "GET",
|
|
@@ -2194,10 +2543,10 @@ class qe extends G {
|
|
|
2194
2543
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2195
2544
|
let a = null;
|
|
2196
2545
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2197
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2546
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2198
2547
|
}
|
|
2199
2548
|
/**
|
|
2200
|
-
* @param body (optional)
|
|
2549
|
+
* @param body (optional)
|
|
2201
2550
|
* @return OK
|
|
2202
2551
|
*/
|
|
2203
2552
|
saveUserApiKey(e) {
|
|
@@ -2219,10 +2568,10 @@ class qe extends G {
|
|
|
2219
2568
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2220
2569
|
let a = null;
|
|
2221
2570
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2222
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2571
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2223
2572
|
}
|
|
2224
2573
|
/**
|
|
2225
|
-
* @param body (optional)
|
|
2574
|
+
* @param body (optional)
|
|
2226
2575
|
* @return OK
|
|
2227
2576
|
*/
|
|
2228
2577
|
updateUserApiKey(e) {
|
|
@@ -2244,15 +2593,16 @@ class qe extends G {
|
|
|
2244
2593
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2245
2594
|
let a = null;
|
|
2246
2595
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2247
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2596
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2248
2597
|
}
|
|
2249
2598
|
/**
|
|
2250
|
-
* @param ids (optional)
|
|
2599
|
+
* @param ids (optional)
|
|
2251
2600
|
* @return OK
|
|
2252
2601
|
*/
|
|
2253
2602
|
deleteUserApiKeys(e) {
|
|
2254
2603
|
let t = this.baseUrl + "/api/platform/security/users/apikeys?";
|
|
2255
|
-
if (e === null)
|
|
2604
|
+
if (e === null)
|
|
2605
|
+
throw new globalThis.Error("The parameter 'ids' cannot be null.");
|
|
2256
2606
|
e !== void 0 && e && e.forEach((r) => {
|
|
2257
2607
|
t += "ids=" + encodeURIComponent("" + r) + "&";
|
|
2258
2608
|
}), t = t.replace(/[?&]$/, "");
|
|
@@ -2270,7 +2620,7 @@ class qe extends G {
|
|
|
2270
2620
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2271
2621
|
let a = null;
|
|
2272
2622
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2273
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2623
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2274
2624
|
}
|
|
2275
2625
|
/**
|
|
2276
2626
|
* Get allowed login types
|
|
@@ -2293,7 +2643,7 @@ class qe extends G {
|
|
|
2293
2643
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2294
2644
|
let a = null;
|
|
2295
2645
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2296
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
2646
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2297
2647
|
}
|
|
2298
2648
|
/**
|
|
2299
2649
|
* Verify user email
|
|
@@ -2301,7 +2651,8 @@ class qe extends G {
|
|
|
2301
2651
|
*/
|
|
2302
2652
|
sendVerificationEmail(e) {
|
|
2303
2653
|
let t = this.baseUrl + "/api/platform/security/users/{userId}/sendVerificationEmail";
|
|
2304
|
-
if (e == null)
|
|
2654
|
+
if (e == null)
|
|
2655
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
2305
2656
|
t = t.replace("{userId}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2306
2657
|
let n = {
|
|
2307
2658
|
method: "POST",
|
|
@@ -2313,15 +2664,16 @@ class qe extends G {
|
|
|
2313
2664
|
const t = e.status;
|
|
2314
2665
|
let n = {};
|
|
2315
2666
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2316
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2667
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2317
2668
|
}
|
|
2318
2669
|
/**
|
|
2319
|
-
* @param body (optional)
|
|
2670
|
+
* @param body (optional)
|
|
2320
2671
|
* @return OK
|
|
2321
2672
|
*/
|
|
2322
2673
|
confirmEmail(e, t) {
|
|
2323
2674
|
let n = this.baseUrl + "/api/platform/security/users/{userId}/confirmEmail";
|
|
2324
|
-
if (e == null)
|
|
2675
|
+
if (e == null)
|
|
2676
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
2325
2677
|
n = n.replace("{userId}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
|
|
2326
2678
|
let a = {
|
|
2327
2679
|
body: JSON.stringify(t),
|
|
@@ -2339,16 +2691,18 @@ class qe extends G {
|
|
|
2339
2691
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2340
2692
|
let a = null;
|
|
2341
2693
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2342
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2694
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2343
2695
|
}
|
|
2344
2696
|
/**
|
|
2345
|
-
* @param newEmail (optional)
|
|
2697
|
+
* @param newEmail (optional)
|
|
2346
2698
|
* @return OK
|
|
2347
2699
|
*/
|
|
2348
2700
|
generateChangeEmailToken(e, t) {
|
|
2349
2701
|
let n = this.baseUrl + "/api/platform/security/users/{userId}/generateChangeEmailToken?";
|
|
2350
|
-
if (e == null)
|
|
2351
|
-
|
|
2702
|
+
if (e == null)
|
|
2703
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
2704
|
+
if (n = n.replace("{userId}", encodeURIComponent("" + e)), t === null)
|
|
2705
|
+
throw new globalThis.Error("The parameter 'newEmail' cannot be null.");
|
|
2352
2706
|
t !== void 0 && (n += "newEmail=" + encodeURIComponent("" + t) + "&"), n = n.replace(/[?&]$/, "");
|
|
2353
2707
|
let r = {
|
|
2354
2708
|
method: "GET",
|
|
@@ -2364,14 +2718,15 @@ class qe extends G {
|
|
|
2364
2718
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2365
2719
|
let a = null;
|
|
2366
2720
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2367
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2721
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2368
2722
|
}
|
|
2369
2723
|
/**
|
|
2370
2724
|
* @return OK
|
|
2371
2725
|
*/
|
|
2372
2726
|
generateEmailConfirmationToken(e) {
|
|
2373
2727
|
let t = this.baseUrl + "/api/platform/security/users/{userId}/generateEmailConfirmationToken";
|
|
2374
|
-
if (e == null)
|
|
2728
|
+
if (e == null)
|
|
2729
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
2375
2730
|
t = t.replace("{userId}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2376
2731
|
let n = {
|
|
2377
2732
|
method: "GET",
|
|
@@ -2387,14 +2742,15 @@ class qe extends G {
|
|
|
2387
2742
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2388
2743
|
let a = null;
|
|
2389
2744
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2390
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2745
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2391
2746
|
}
|
|
2392
2747
|
/**
|
|
2393
2748
|
* @return OK
|
|
2394
2749
|
*/
|
|
2395
2750
|
generatePasswordResetToken(e) {
|
|
2396
2751
|
let t = this.baseUrl + "/api/platform/security/users/{userId}/generatePasswordResetToken";
|
|
2397
|
-
if (e == null)
|
|
2752
|
+
if (e == null)
|
|
2753
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
2398
2754
|
t = t.replace("{userId}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2399
2755
|
let n = {
|
|
2400
2756
|
method: "GET",
|
|
@@ -2410,18 +2766,21 @@ class qe extends G {
|
|
|
2410
2766
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2411
2767
|
let a = null;
|
|
2412
2768
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2413
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2769
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2414
2770
|
}
|
|
2415
2771
|
/**
|
|
2416
|
-
* @param tokenProvider (optional)
|
|
2417
|
-
* @param purpose (optional)
|
|
2772
|
+
* @param tokenProvider (optional)
|
|
2773
|
+
* @param purpose (optional)
|
|
2418
2774
|
* @return OK
|
|
2419
2775
|
*/
|
|
2420
2776
|
generateUserToken(e, t, n) {
|
|
2421
2777
|
let r = this.baseUrl + "/api/platform/security/users/{userId}/generateToken?";
|
|
2422
|
-
if (e == null)
|
|
2423
|
-
|
|
2424
|
-
if (
|
|
2778
|
+
if (e == null)
|
|
2779
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
2780
|
+
if (r = r.replace("{userId}", encodeURIComponent("" + e)), t === null)
|
|
2781
|
+
throw new globalThis.Error("The parameter 'tokenProvider' cannot be null.");
|
|
2782
|
+
if (t !== void 0 && (r += "tokenProvider=" + encodeURIComponent("" + t) + "&"), n === null)
|
|
2783
|
+
throw new globalThis.Error("The parameter 'purpose' cannot be null.");
|
|
2425
2784
|
n !== void 0 && (r += "purpose=" + encodeURIComponent("" + n) + "&"), r = r.replace(/[?&]$/, "");
|
|
2426
2785
|
let a = {
|
|
2427
2786
|
method: "GET",
|
|
@@ -2437,15 +2796,16 @@ class qe extends G {
|
|
|
2437
2796
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2438
2797
|
let a = null;
|
|
2439
2798
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2440
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2799
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2441
2800
|
}
|
|
2442
2801
|
/**
|
|
2443
|
-
* @param body (optional)
|
|
2802
|
+
* @param body (optional)
|
|
2444
2803
|
* @return OK
|
|
2445
2804
|
*/
|
|
2446
2805
|
verifyUserToken(e, t) {
|
|
2447
2806
|
let n = this.baseUrl + "/api/platform/security/users/{userId}/verifyToken";
|
|
2448
|
-
if (e == null)
|
|
2807
|
+
if (e == null)
|
|
2808
|
+
throw new globalThis.Error("The parameter 'userId' must be defined.");
|
|
2449
2809
|
n = n.replace("{userId}", encodeURIComponent("" + e)), n = n.replace(/[?&]$/, "");
|
|
2450
2810
|
let a = {
|
|
2451
2811
|
body: JSON.stringify(t),
|
|
@@ -2463,10 +2823,10 @@ class qe extends G {
|
|
|
2463
2823
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2464
2824
|
let a = null;
|
|
2465
2825
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2466
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2826
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2467
2827
|
}
|
|
2468
2828
|
}
|
|
2469
|
-
class
|
|
2829
|
+
class Tr extends F {
|
|
2470
2830
|
http;
|
|
2471
2831
|
baseUrl;
|
|
2472
2832
|
constructor(e, t) {
|
|
@@ -2493,11 +2853,11 @@ class Ir extends G {
|
|
|
2493
2853
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2494
2854
|
let a = null;
|
|
2495
2855
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2496
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2856
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2497
2857
|
}
|
|
2498
2858
|
/**
|
|
2499
2859
|
* Update settings values
|
|
2500
|
-
* @param body (optional)
|
|
2860
|
+
* @param body (optional)
|
|
2501
2861
|
* @return No Content
|
|
2502
2862
|
*/
|
|
2503
2863
|
update(e) {
|
|
@@ -2516,7 +2876,7 @@ class Ir extends G {
|
|
|
2516
2876
|
const t = e.status;
|
|
2517
2877
|
let n = {};
|
|
2518
2878
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
2519
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2879
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2520
2880
|
}
|
|
2521
2881
|
/**
|
|
2522
2882
|
* Get settings registered by specific module
|
|
@@ -2525,7 +2885,8 @@ class Ir extends G {
|
|
|
2525
2885
|
*/
|
|
2526
2886
|
getGlobalModuleSettings(e) {
|
|
2527
2887
|
let t = this.baseUrl + "/api/platform/settings/modules/{id}";
|
|
2528
|
-
if (e == null)
|
|
2888
|
+
if (e == null)
|
|
2889
|
+
throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
2529
2890
|
t = t.replace("{id}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2530
2891
|
let n = {
|
|
2531
2892
|
method: "GET",
|
|
@@ -2541,7 +2902,7 @@ class Ir extends G {
|
|
|
2541
2902
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2542
2903
|
let a = null;
|
|
2543
2904
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2544
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2905
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2545
2906
|
}
|
|
2546
2907
|
/**
|
|
2547
2908
|
* Get setting details by name
|
|
@@ -2550,7 +2911,8 @@ class Ir extends G {
|
|
|
2550
2911
|
*/
|
|
2551
2912
|
getGlobalSetting(e) {
|
|
2552
2913
|
let t = this.baseUrl + "/api/platform/settings/{name}";
|
|
2553
|
-
if (e == null)
|
|
2914
|
+
if (e == null)
|
|
2915
|
+
throw new globalThis.Error("The parameter 'name' must be defined.");
|
|
2554
2916
|
t = t.replace("{name}", encodeURIComponent("" + e)), t = t.replace(/[?&]$/, "");
|
|
2555
2917
|
let n = {
|
|
2556
2918
|
method: "GET",
|
|
@@ -2566,7 +2928,7 @@ class Ir extends G {
|
|
|
2566
2928
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2567
2929
|
let a = null;
|
|
2568
2930
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2569
|
-
}) : t === 401 ? e.text().then((r) =>
|
|
2931
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2570
2932
|
}
|
|
2571
2933
|
/**
|
|
2572
2934
|
* Get UI customization setting
|
|
@@ -2589,11 +2951,280 @@ class Ir extends G {
|
|
|
2589
2951
|
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2590
2952
|
let a = null;
|
|
2591
2953
|
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2592
|
-
}) : t !== 200 && t !== 204 ? e.text().then((r) =>
|
|
2954
|
+
}) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
class Sr extends F {
|
|
2958
|
+
http;
|
|
2959
|
+
baseUrl;
|
|
2960
|
+
constructor(e, t) {
|
|
2961
|
+
super(), this.http = t || window, this.baseUrl = this.getBaseUrl("", e);
|
|
2962
|
+
}
|
|
2963
|
+
/**
|
|
2964
|
+
* Get global settings schema (metadata only, no values)
|
|
2965
|
+
* @param moduleId (optional)
|
|
2966
|
+
* @param keyword (optional)
|
|
2967
|
+
* @return OK
|
|
2968
|
+
*/
|
|
2969
|
+
getGlobalSchema(e, t) {
|
|
2970
|
+
let n = this.baseUrl + "/api/platform/settings/v2/global/schema?";
|
|
2971
|
+
if (e === null)
|
|
2972
|
+
throw new globalThis.Error("The parameter 'moduleId' cannot be null.");
|
|
2973
|
+
if (e !== void 0 && (n += "moduleId=" + encodeURIComponent("" + e) + "&"), t === null)
|
|
2974
|
+
throw new globalThis.Error("The parameter 'keyword' cannot be null.");
|
|
2975
|
+
t !== void 0 && (n += "keyword=" + encodeURIComponent("" + t) + "&"), n = n.replace(/[?&]$/, "");
|
|
2976
|
+
let r = {
|
|
2977
|
+
method: "GET",
|
|
2978
|
+
headers: {
|
|
2979
|
+
Accept: "application/json"
|
|
2980
|
+
}
|
|
2981
|
+
};
|
|
2982
|
+
return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processGetGlobalSchema(a));
|
|
2983
|
+
}
|
|
2984
|
+
processGetGlobalSchema(e) {
|
|
2985
|
+
const t = e.status;
|
|
2986
|
+
let n = {};
|
|
2987
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
2988
|
+
let a = null;
|
|
2989
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
2990
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2991
|
+
}
|
|
2992
|
+
/**
|
|
2993
|
+
* Get global settings values as a flat { name: value } dictionary.
|
|
2994
|
+
Optional moduleId narrows the response to a single
|
|
2995
|
+
module's settings — same filter as M:VirtoCommerce.Platform.Web.Controllers.Api.SettingsV2Controller.GetGlobalSchema(System.String,System.String), so
|
|
2996
|
+
a frontend can read+use one module's values in one round-trip
|
|
2997
|
+
without a follow-up /schema lookup.
|
|
2998
|
+
* @param modifiedOnly (optional)
|
|
2999
|
+
* @param moduleId (optional)
|
|
3000
|
+
* @return OK
|
|
3001
|
+
*/
|
|
3002
|
+
getGlobalValues(e, t) {
|
|
3003
|
+
let n = this.baseUrl + "/api/platform/settings/v2/global/values?";
|
|
3004
|
+
if (e === null)
|
|
3005
|
+
throw new globalThis.Error("The parameter 'modifiedOnly' cannot be null.");
|
|
3006
|
+
if (e !== void 0 && (n += "modifiedOnly=" + encodeURIComponent("" + e) + "&"), t === null)
|
|
3007
|
+
throw new globalThis.Error("The parameter 'moduleId' cannot be null.");
|
|
3008
|
+
t !== void 0 && (n += "moduleId=" + encodeURIComponent("" + t) + "&"), n = n.replace(/[?&]$/, "");
|
|
3009
|
+
let r = {
|
|
3010
|
+
method: "GET",
|
|
3011
|
+
headers: {}
|
|
3012
|
+
};
|
|
3013
|
+
return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processGetGlobalValues(a));
|
|
3014
|
+
}
|
|
3015
|
+
processGetGlobalValues(e) {
|
|
3016
|
+
const t = e.status;
|
|
3017
|
+
let n = {};
|
|
3018
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
3019
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
3020
|
+
}
|
|
3021
|
+
/**
|
|
3022
|
+
* @param replaceAll (optional)
|
|
3023
|
+
* @param body (optional)
|
|
3024
|
+
* @return No Content
|
|
3025
|
+
*/
|
|
3026
|
+
saveGlobalValues(e, t) {
|
|
3027
|
+
let n = this.baseUrl + "/api/platform/settings/v2/global/values?";
|
|
3028
|
+
if (e === null)
|
|
3029
|
+
throw new globalThis.Error("The parameter 'replaceAll' cannot be null.");
|
|
3030
|
+
e !== void 0 && (n += "replaceAll=" + encodeURIComponent("" + e) + "&"), n = n.replace(/[?&]$/, "");
|
|
3031
|
+
let a = {
|
|
3032
|
+
body: JSON.stringify(t),
|
|
3033
|
+
method: "POST",
|
|
3034
|
+
headers: {
|
|
3035
|
+
"Content-Type": "application/json-patch+json"
|
|
3036
|
+
}
|
|
3037
|
+
};
|
|
3038
|
+
return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processSaveGlobalValues(o));
|
|
3039
|
+
}
|
|
3040
|
+
processSaveGlobalValues(e) {
|
|
3041
|
+
const t = e.status;
|
|
3042
|
+
let n = {};
|
|
3043
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
3044
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
3045
|
+
}
|
|
3046
|
+
/**
|
|
3047
|
+
* Get tenant settings schema (metadata only, no values).
|
|
3048
|
+
Schema depends only on tenantType registration, not on a specific tenant instance.
|
|
3049
|
+
* @param moduleId (optional)
|
|
3050
|
+
* @param keyword (optional)
|
|
3051
|
+
* @return OK
|
|
3052
|
+
*/
|
|
3053
|
+
getTenantSchema(e, t, n) {
|
|
3054
|
+
let r = this.baseUrl + "/api/platform/settings/v2/tenant/{tenantType}/schema?";
|
|
3055
|
+
if (e == null)
|
|
3056
|
+
throw new globalThis.Error("The parameter 'tenantType' must be defined.");
|
|
3057
|
+
if (r = r.replace("{tenantType}", encodeURIComponent("" + e)), t === null)
|
|
3058
|
+
throw new globalThis.Error("The parameter 'moduleId' cannot be null.");
|
|
3059
|
+
if (t !== void 0 && (r += "moduleId=" + encodeURIComponent("" + t) + "&"), n === null)
|
|
3060
|
+
throw new globalThis.Error("The parameter 'keyword' cannot be null.");
|
|
3061
|
+
n !== void 0 && (r += "keyword=" + encodeURIComponent("" + n) + "&"), r = r.replace(/[?&]$/, "");
|
|
3062
|
+
let a = {
|
|
3063
|
+
method: "GET",
|
|
3064
|
+
headers: {
|
|
3065
|
+
Accept: "application/json"
|
|
3066
|
+
}
|
|
3067
|
+
};
|
|
3068
|
+
return this.transformOptions(a).then((o) => this.http.fetch(r, o)).then((o) => this.processGetTenantSchema(o));
|
|
3069
|
+
}
|
|
3070
|
+
processGetTenantSchema(e) {
|
|
3071
|
+
const t = e.status;
|
|
3072
|
+
let n = {};
|
|
3073
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
3074
|
+
let a = null;
|
|
3075
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
3076
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
3077
|
+
}
|
|
3078
|
+
/**
|
|
3079
|
+
* Get tenant settings values as a flat { name: value } dictionary.
|
|
3080
|
+
Optional moduleId narrows the response to a single
|
|
3081
|
+
module's settings.
|
|
3082
|
+
* @param modifiedOnly (optional)
|
|
3083
|
+
* @param moduleId (optional)
|
|
3084
|
+
* @return OK
|
|
3085
|
+
*/
|
|
3086
|
+
getTenantValues(e, t, n, r) {
|
|
3087
|
+
let a = this.baseUrl + "/api/platform/settings/v2/tenant/{tenantType}/{tenantId}/values?";
|
|
3088
|
+
if (e == null)
|
|
3089
|
+
throw new globalThis.Error("The parameter 'tenantType' must be defined.");
|
|
3090
|
+
if (a = a.replace("{tenantType}", encodeURIComponent("" + e)), t == null)
|
|
3091
|
+
throw new globalThis.Error("The parameter 'tenantId' must be defined.");
|
|
3092
|
+
if (a = a.replace("{tenantId}", encodeURIComponent("" + t)), n === null)
|
|
3093
|
+
throw new globalThis.Error("The parameter 'modifiedOnly' cannot be null.");
|
|
3094
|
+
if (n !== void 0 && (a += "modifiedOnly=" + encodeURIComponent("" + n) + "&"), r === null)
|
|
3095
|
+
throw new globalThis.Error("The parameter 'moduleId' cannot be null.");
|
|
3096
|
+
r !== void 0 && (a += "moduleId=" + encodeURIComponent("" + r) + "&"), a = a.replace(/[?&]$/, "");
|
|
3097
|
+
let o = {
|
|
3098
|
+
method: "GET",
|
|
3099
|
+
headers: {}
|
|
3100
|
+
};
|
|
3101
|
+
return this.transformOptions(o).then((l) => this.http.fetch(a, l)).then((l) => this.processGetTenantValues(l));
|
|
3102
|
+
}
|
|
3103
|
+
processGetTenantValues(e) {
|
|
3104
|
+
const t = e.status;
|
|
3105
|
+
let n = {};
|
|
3106
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
3107
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
3108
|
+
}
|
|
3109
|
+
/**
|
|
3110
|
+
* @param replaceAll (optional)
|
|
3111
|
+
* @param body (optional)
|
|
3112
|
+
* @return No Content
|
|
3113
|
+
*/
|
|
3114
|
+
saveTenantValues(e, t, n, r) {
|
|
3115
|
+
let a = this.baseUrl + "/api/platform/settings/v2/tenant/{tenantType}/{tenantId}/values?";
|
|
3116
|
+
if (e == null)
|
|
3117
|
+
throw new globalThis.Error("The parameter 'tenantType' must be defined.");
|
|
3118
|
+
if (a = a.replace("{tenantType}", encodeURIComponent("" + e)), t == null)
|
|
3119
|
+
throw new globalThis.Error("The parameter 'tenantId' must be defined.");
|
|
3120
|
+
if (a = a.replace("{tenantId}", encodeURIComponent("" + t)), n === null)
|
|
3121
|
+
throw new globalThis.Error("The parameter 'replaceAll' cannot be null.");
|
|
3122
|
+
n !== void 0 && (a += "replaceAll=" + encodeURIComponent("" + n) + "&"), a = a.replace(/[?&]$/, "");
|
|
3123
|
+
let l = {
|
|
3124
|
+
body: JSON.stringify(r),
|
|
3125
|
+
method: "POST",
|
|
3126
|
+
headers: {
|
|
3127
|
+
"Content-Type": "application/json-patch+json"
|
|
3128
|
+
}
|
|
3129
|
+
};
|
|
3130
|
+
return this.transformOptions(l).then((c) => this.http.fetch(a, c)).then((c) => this.processSaveTenantValues(c));
|
|
3131
|
+
}
|
|
3132
|
+
processSaveTenantValues(e) {
|
|
3133
|
+
const t = e.status;
|
|
3134
|
+
let n = {};
|
|
3135
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
3136
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
3137
|
+
}
|
|
3138
|
+
/**
|
|
3139
|
+
* Get the current user's UserProfile settings schema (metadata only).
|
|
3140
|
+
Schema is the same for every user — it's defined by the
|
|
3141
|
+
platform's UserProfile-tenant registration. Optionally filter
|
|
3142
|
+
by moduleId so a frontend only fetches its own module's
|
|
3143
|
+
per-user settings.
|
|
3144
|
+
* @param moduleId (optional)
|
|
3145
|
+
* @param keyword (optional)
|
|
3146
|
+
* @return OK
|
|
3147
|
+
*/
|
|
3148
|
+
getMeSchema(e, t) {
|
|
3149
|
+
let n = this.baseUrl + "/api/platform/settings/v2/me/schema?";
|
|
3150
|
+
if (e === null)
|
|
3151
|
+
throw new globalThis.Error("The parameter 'moduleId' cannot be null.");
|
|
3152
|
+
if (e !== void 0 && (n += "moduleId=" + encodeURIComponent("" + e) + "&"), t === null)
|
|
3153
|
+
throw new globalThis.Error("The parameter 'keyword' cannot be null.");
|
|
3154
|
+
t !== void 0 && (n += "keyword=" + encodeURIComponent("" + t) + "&"), n = n.replace(/[?&]$/, "");
|
|
3155
|
+
let r = {
|
|
3156
|
+
method: "GET",
|
|
3157
|
+
headers: {
|
|
3158
|
+
Accept: "application/json"
|
|
3159
|
+
}
|
|
3160
|
+
};
|
|
3161
|
+
return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processGetMeSchema(a));
|
|
3162
|
+
}
|
|
3163
|
+
processGetMeSchema(e) {
|
|
3164
|
+
const t = e.status;
|
|
3165
|
+
let n = {};
|
|
3166
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
3167
|
+
let a = null;
|
|
3168
|
+
return a = r === "" ? null : JSON.parse(r, this.jsonParseReviver), a;
|
|
3169
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
3170
|
+
}
|
|
3171
|
+
/**
|
|
3172
|
+
* Get the current user's effective UserProfile settings values
|
|
3173
|
+
as a flat { name: value } dictionary. Optional moduleId
|
|
3174
|
+
narrows the response to a single module's per-user settings — same
|
|
3175
|
+
filter M:VirtoCommerce.Platform.Web.Controllers.Api.SettingsV2Controller.GetMeSchema(System.String,System.String) accepts, so a frontend can do a
|
|
3176
|
+
single round-trip read without a follow-up /me/schema lookup.
|
|
3177
|
+
* @param modifiedOnly (optional)
|
|
3178
|
+
* @param moduleId (optional)
|
|
3179
|
+
* @return OK
|
|
3180
|
+
*/
|
|
3181
|
+
getMeValues(e, t) {
|
|
3182
|
+
let n = this.baseUrl + "/api/platform/settings/v2/me/values?";
|
|
3183
|
+
if (e === null)
|
|
3184
|
+
throw new globalThis.Error("The parameter 'modifiedOnly' cannot be null.");
|
|
3185
|
+
if (e !== void 0 && (n += "modifiedOnly=" + encodeURIComponent("" + e) + "&"), t === null)
|
|
3186
|
+
throw new globalThis.Error("The parameter 'moduleId' cannot be null.");
|
|
3187
|
+
t !== void 0 && (n += "moduleId=" + encodeURIComponent("" + t) + "&"), n = n.replace(/[?&]$/, "");
|
|
3188
|
+
let r = {
|
|
3189
|
+
method: "GET",
|
|
3190
|
+
headers: {}
|
|
3191
|
+
};
|
|
3192
|
+
return this.transformOptions(r).then((a) => this.http.fetch(n, a)).then((a) => this.processGetMeValues(a));
|
|
3193
|
+
}
|
|
3194
|
+
processGetMeValues(e) {
|
|
3195
|
+
const t = e.status;
|
|
3196
|
+
let n = {};
|
|
3197
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 200 ? e.text().then((r) => {
|
|
3198
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
3199
|
+
}
|
|
3200
|
+
/**
|
|
3201
|
+
* @param replaceAll (optional)
|
|
3202
|
+
* @param body (optional)
|
|
3203
|
+
* @return No Content
|
|
3204
|
+
*/
|
|
3205
|
+
saveMeValues(e, t) {
|
|
3206
|
+
let n = this.baseUrl + "/api/platform/settings/v2/me/values?";
|
|
3207
|
+
if (e === null)
|
|
3208
|
+
throw new globalThis.Error("The parameter 'replaceAll' cannot be null.");
|
|
3209
|
+
e !== void 0 && (n += "replaceAll=" + encodeURIComponent("" + e) + "&"), n = n.replace(/[?&]$/, "");
|
|
3210
|
+
let a = {
|
|
3211
|
+
body: JSON.stringify(t),
|
|
3212
|
+
method: "POST",
|
|
3213
|
+
headers: {
|
|
3214
|
+
"Content-Type": "application/json-patch+json"
|
|
3215
|
+
}
|
|
3216
|
+
};
|
|
3217
|
+
return this.transformOptions(a).then((o) => this.http.fetch(n, o)).then((o) => this.processSaveMeValues(o));
|
|
3218
|
+
}
|
|
3219
|
+
processSaveMeValues(e) {
|
|
3220
|
+
const t = e.status;
|
|
3221
|
+
let n = {};
|
|
3222
|
+
return e.headers && e.headers.forEach && e.headers.forEach((r, a) => n[a] = r), t === 204 ? e.text().then((r) => {
|
|
3223
|
+
}) : t === 401 ? e.text().then((r) => s("Unauthorized", t, r, n)) : t === 403 ? e.text().then((r) => s("Forbidden", t, r, n)) : t !== 200 && t !== 204 ? e.text().then((r) => s("An unexpected server error occurred.", t, r, n)) : Promise.resolve(null);
|
|
2593
3224
|
}
|
|
2594
3225
|
}
|
|
2595
|
-
var
|
|
2596
|
-
class
|
|
3226
|
+
var Ke = /* @__PURE__ */ ((i) => (i.AppMenu = "AppMenu", i.MainMenu = "MainMenu", i.Hidden = "Hidden", i))(Ke || {}), He = /* @__PURE__ */ ((i) => (i.Undefined = "Undefined", i.ShortText = "ShortText", i.LongText = "LongText", i.Integer = "Integer", i.Decimal = "Decimal", i.DateTime = "DateTime", i.Boolean = "Boolean", i.Html = "Html", i.Image = "Image", i))(He || {}), Ze = /* @__PURE__ */ ((i) => (i.Detached = "Detached", i.Unchanged = "Unchanged", i.Added = "Added", i.Deleted = "Deleted", i.Modified = "Modified", i))(Ze || {}), Xe = /* @__PURE__ */ ((i) => (i.Undefined = "Undefined", i.Object = "Object", i.Array = "Array", i.String = "String", i.Number = "Number", i.True = "True", i.False = "False", i.Null = "Null", i))(Xe || {}), Ye = /* @__PURE__ */ ((i) => (i.Info = "Info", i.Warning = "Warning", i.Debug = "Debug", i.Error = "Error", i))(Ye || {}), Qe = /* @__PURE__ */ ((i) => (i.ShortText = "ShortText", i.LongText = "LongText", i.Integer = "Integer", i.Decimal = "Decimal", i.DateTime = "DateTime", i.Boolean = "Boolean", i.SecureString = "SecureString", i.Json = "Json", i.PositiveInteger = "PositiveInteger", i))(Qe || {}), et = /* @__PURE__ */ ((i) => (i.Ascending = "Ascending", i.Descending = "Descending", i))(et || {});
|
|
3227
|
+
class tt extends Error {
|
|
2597
3228
|
message;
|
|
2598
3229
|
status;
|
|
2599
3230
|
response;
|
|
@@ -2607,8 +3238,8 @@ class lt extends Error {
|
|
|
2607
3238
|
return e.isApiException === !0;
|
|
2608
3239
|
}
|
|
2609
3240
|
}
|
|
2610
|
-
function i
|
|
2611
|
-
throw r ?? new
|
|
3241
|
+
function s(i, e, t, n, r) {
|
|
3242
|
+
throw r ?? new tt(i, e, t, n, null);
|
|
2612
3243
|
}
|
|
2613
3244
|
const xe = {
|
|
2614
3245
|
debug: 0,
|
|
@@ -2616,13 +3247,13 @@ const xe = {
|
|
|
2616
3247
|
warn: 2,
|
|
2617
3248
|
error: 3,
|
|
2618
3249
|
none: 4
|
|
2619
|
-
},
|
|
3250
|
+
}, rt = {
|
|
2620
3251
|
level: "warn",
|
|
2621
3252
|
prefix: "@vc-shell/framework",
|
|
2622
3253
|
enabled: !0
|
|
2623
3254
|
};
|
|
2624
|
-
function
|
|
2625
|
-
const e = { ...
|
|
3255
|
+
function B(i) {
|
|
3256
|
+
const e = { ...rt }, t = i ? `[${e.prefix}#${i}]` : `[${e.prefix}]`, n = (r) => e.enabled ? xe[r] >= xe[e.level] : !1;
|
|
2626
3257
|
return {
|
|
2627
3258
|
/**
|
|
2628
3259
|
* Log debug messages (only in development)
|
|
@@ -2651,7 +3282,7 @@ function j(s) {
|
|
|
2651
3282
|
/**
|
|
2652
3283
|
* Create a child logger with additional context
|
|
2653
3284
|
*/
|
|
2654
|
-
child: (r) =>
|
|
3285
|
+
child: (r) => B(i ? `${i}:${r}` : r),
|
|
2655
3286
|
/**
|
|
2656
3287
|
* Set the log level for this logger instance
|
|
2657
3288
|
*/
|
|
@@ -2666,16 +3297,16 @@ function j(s) {
|
|
|
2666
3297
|
}
|
|
2667
3298
|
};
|
|
2668
3299
|
}
|
|
2669
|
-
const
|
|
2670
|
-
core:
|
|
2671
|
-
ui:
|
|
2672
|
-
shared:
|
|
2673
|
-
plugins:
|
|
2674
|
-
services:
|
|
2675
|
-
composables:
|
|
2676
|
-
}, he =
|
|
2677
|
-
const
|
|
2678
|
-
|
|
3300
|
+
const wr = B(), Ar = {
|
|
3301
|
+
core: B("core"),
|
|
3302
|
+
ui: B("ui"),
|
|
3303
|
+
shared: B("shared"),
|
|
3304
|
+
plugins: B("plugins"),
|
|
3305
|
+
services: B("services"),
|
|
3306
|
+
composables: B("composables")
|
|
3307
|
+
}, he = B("use-external-provider"), nt = "externalSignIn", at = () => {
|
|
3308
|
+
const i = new Ve(), e = De(
|
|
3309
|
+
nt,
|
|
2679
3310
|
{},
|
|
2680
3311
|
{
|
|
2681
3312
|
listenToStorageChanges: !0,
|
|
@@ -2688,29 +3319,29 @@ const Rr = j(), Br = {
|
|
|
2688
3319
|
}
|
|
2689
3320
|
async function n(o) {
|
|
2690
3321
|
try {
|
|
2691
|
-
const
|
|
3322
|
+
const l = window.location.origin, c = window.location.pathname ?? t() ?? "/";
|
|
2692
3323
|
if (!o)
|
|
2693
3324
|
throw new Error("The parameter 'authenticationType' cannot be null or undefined.");
|
|
2694
|
-
const m = new URL("/externalsignin",
|
|
3325
|
+
const m = new URL("/externalsignin", l);
|
|
2695
3326
|
m.searchParams.set("authenticationType", o), m.searchParams.set("returnUrl", c), e.value = { providerType: o }, window.location.assign(m);
|
|
2696
|
-
} catch (
|
|
2697
|
-
throw he.error("External sign-in failed:",
|
|
3327
|
+
} catch (l) {
|
|
3328
|
+
throw he.error("External sign-in failed:", l), l;
|
|
2698
3329
|
}
|
|
2699
3330
|
}
|
|
2700
3331
|
async function r(o) {
|
|
2701
3332
|
try {
|
|
2702
|
-
const
|
|
3333
|
+
const l = window.location.origin, c = window.location.pathname ?? "/", m = new URL("/externalsignin/signout", l);
|
|
2703
3334
|
m.searchParams.set("authenticationType", o), m.searchParams.set("returnUrl", c), e.value = {}, window.location.assign(m);
|
|
2704
|
-
} catch (
|
|
2705
|
-
throw he.error("External sign-out failed:",
|
|
3335
|
+
} catch (l) {
|
|
3336
|
+
throw he.error("External sign-out failed:", l), l;
|
|
2706
3337
|
}
|
|
2707
3338
|
}
|
|
2708
3339
|
async function a() {
|
|
2709
3340
|
let o;
|
|
2710
3341
|
try {
|
|
2711
|
-
o = await
|
|
2712
|
-
} catch (
|
|
2713
|
-
he.error("Failed to get external login providers:",
|
|
3342
|
+
o = await i.getExternalLoginProviders();
|
|
3343
|
+
} catch (l) {
|
|
3344
|
+
he.error("Failed to get external login providers:", l);
|
|
2714
3345
|
}
|
|
2715
3346
|
return o;
|
|
2716
3347
|
}
|
|
@@ -2720,34 +3351,34 @@ const Rr = j(), Br = {
|
|
|
2720
3351
|
signOut: r,
|
|
2721
3352
|
getProviders: a
|
|
2722
3353
|
};
|
|
2723
|
-
}, me = "vc_auth_data",
|
|
2724
|
-
function
|
|
3354
|
+
}, me = "vc_auth_data", A = B("use-user");
|
|
3355
|
+
function st() {
|
|
2725
3356
|
try {
|
|
2726
|
-
const
|
|
2727
|
-
if (
|
|
2728
|
-
return JSON.parse(
|
|
2729
|
-
} catch (
|
|
2730
|
-
|
|
3357
|
+
const i = localStorage.getItem(me);
|
|
3358
|
+
if (i)
|
|
3359
|
+
return JSON.parse(i);
|
|
3360
|
+
} catch (i) {
|
|
3361
|
+
A.error("Failed to read auth data from storage:", i);
|
|
2731
3362
|
}
|
|
2732
3363
|
return null;
|
|
2733
3364
|
}
|
|
2734
|
-
function Ee(
|
|
3365
|
+
function Ee(i) {
|
|
2735
3366
|
try {
|
|
2736
|
-
|
|
3367
|
+
A.debug("storeAuthData - Saving:", i), localStorage.setItem(me, JSON.stringify(i)), A.debug("storeAuthData - Saved successfully");
|
|
2737
3368
|
} catch (e) {
|
|
2738
|
-
|
|
3369
|
+
A.error("Failed to store auth data:", e);
|
|
2739
3370
|
}
|
|
2740
3371
|
}
|
|
2741
|
-
function
|
|
3372
|
+
function it() {
|
|
2742
3373
|
try {
|
|
2743
3374
|
localStorage.removeItem(me);
|
|
2744
|
-
} catch (
|
|
2745
|
-
|
|
3375
|
+
} catch (i) {
|
|
3376
|
+
A.error("Failed to clear auth data:", i);
|
|
2746
3377
|
}
|
|
2747
3378
|
}
|
|
2748
|
-
async function
|
|
3379
|
+
async function ye(i) {
|
|
2749
3380
|
try {
|
|
2750
|
-
const e = new URLSearchParams(
|
|
3381
|
+
const e = new URLSearchParams(i).toString(), t = await fetch("/connect/token", {
|
|
2751
3382
|
method: "POST",
|
|
2752
3383
|
headers: {
|
|
2753
3384
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -2756,240 +3387,240 @@ async function _e(s) {
|
|
|
2756
3387
|
});
|
|
2757
3388
|
if (!t.ok) {
|
|
2758
3389
|
const c = await t.text();
|
|
2759
|
-
return
|
|
3390
|
+
return A.error("fetchToken - HTTP error:", t.status, t.statusText, c), null;
|
|
2760
3391
|
}
|
|
2761
3392
|
const n = await t.json();
|
|
2762
|
-
|
|
3393
|
+
A.debug("fetchToken - Response:", n);
|
|
2763
3394
|
const r = n.access_token, a = n.refresh_token, o = n.expires_in;
|
|
2764
3395
|
if (n.error || !r)
|
|
2765
|
-
return
|
|
2766
|
-
const
|
|
3396
|
+
return A.error("fetchToken - Error:", n.error_description || n.error || "No access token"), null;
|
|
3397
|
+
const l = o ? Date.now() + o * 1e3 : null;
|
|
2767
3398
|
return {
|
|
2768
3399
|
token: r,
|
|
2769
3400
|
access_token: r,
|
|
2770
3401
|
refresh_token: a ?? null,
|
|
2771
|
-
expires_at:
|
|
3402
|
+
expires_at: l
|
|
2772
3403
|
};
|
|
2773
3404
|
} catch (e) {
|
|
2774
|
-
return
|
|
3405
|
+
return A.error("fetchToken - Exception:", e), null;
|
|
2775
3406
|
}
|
|
2776
3407
|
}
|
|
2777
|
-
function
|
|
2778
|
-
const
|
|
2779
|
-
async function
|
|
2780
|
-
let
|
|
3408
|
+
function ot() {
|
|
3409
|
+
const i = D(!1), e = D(), t = D(null), { storage: n, signOut: r } = at(), a = new qe(), o = h(() => e.value?.userName != null);
|
|
3410
|
+
async function l(_, E) {
|
|
3411
|
+
let S = !1;
|
|
2781
3412
|
try {
|
|
2782
|
-
|
|
3413
|
+
i.value = !0, S = await a.validatePasswordResetToken(_, {
|
|
2783
3414
|
token: E
|
|
2784
3415
|
});
|
|
2785
3416
|
} catch {
|
|
2786
3417
|
} finally {
|
|
2787
|
-
|
|
3418
|
+
i.value = !1;
|
|
2788
3419
|
}
|
|
2789
|
-
return
|
|
3420
|
+
return S;
|
|
2790
3421
|
}
|
|
2791
|
-
async function c(
|
|
2792
|
-
return a.validatePassword(
|
|
3422
|
+
async function c(_) {
|
|
3423
|
+
return a.validatePassword(_);
|
|
2793
3424
|
}
|
|
2794
|
-
async function m(
|
|
2795
|
-
return a.resetPasswordByToken(
|
|
3425
|
+
async function m(_, E, S) {
|
|
3426
|
+
return a.resetPasswordByToken(_, {
|
|
2796
3427
|
newPassword: E,
|
|
2797
|
-
token:
|
|
3428
|
+
token: S
|
|
2798
3429
|
});
|
|
2799
3430
|
}
|
|
2800
|
-
async function
|
|
2801
|
-
|
|
3431
|
+
async function U(_, E) {
|
|
3432
|
+
A.debug("signIn - Entry point");
|
|
2802
3433
|
try {
|
|
2803
|
-
|
|
2804
|
-
const
|
|
2805
|
-
if (
|
|
2806
|
-
return
|
|
2807
|
-
|
|
2808
|
-
const P = await
|
|
3434
|
+
i.value = !0;
|
|
3435
|
+
const S = await a.login({ userName: _, password: E });
|
|
3436
|
+
if (A.debug("signIn - Cookie login completed:", S), !S.succeeded)
|
|
3437
|
+
return S;
|
|
3438
|
+
A.debug("signIn - Requesting token...");
|
|
3439
|
+
const P = await ye({
|
|
2809
3440
|
grant_type: "password",
|
|
2810
|
-
username:
|
|
3441
|
+
username: _,
|
|
2811
3442
|
password: E,
|
|
2812
3443
|
scope: "offline_access"
|
|
2813
3444
|
});
|
|
2814
|
-
P && (t.value = P, Ee(t.value),
|
|
2815
|
-
const
|
|
2816
|
-
if (
|
|
2817
|
-
return e.value =
|
|
3445
|
+
P && (t.value = P, Ee(t.value), A.debug("signIn - Token saved:", t.value));
|
|
3446
|
+
const M = await a.getCurrentUser();
|
|
3447
|
+
if (M)
|
|
3448
|
+
return e.value = M, S;
|
|
2818
3449
|
throw { succeeded: !1 };
|
|
2819
|
-
} catch (
|
|
2820
|
-
|
|
2821
|
-
let P =
|
|
2822
|
-
if (
|
|
3450
|
+
} catch (S) {
|
|
3451
|
+
A.error("signIn failed:", S);
|
|
3452
|
+
let P = S.message;
|
|
3453
|
+
if (S.response)
|
|
2823
3454
|
try {
|
|
2824
|
-
const
|
|
2825
|
-
P =
|
|
3455
|
+
const M = JSON.parse(S.response);
|
|
3456
|
+
P = M.errorDescription || M.errors?.[0]?.description || M.error || P;
|
|
2826
3457
|
} catch {
|
|
2827
3458
|
}
|
|
2828
|
-
return { succeeded: !1, error: P, status:
|
|
3459
|
+
return { succeeded: !1, error: P, status: S.status };
|
|
2829
3460
|
} finally {
|
|
2830
|
-
|
|
3461
|
+
i.value = !1;
|
|
2831
3462
|
}
|
|
2832
3463
|
}
|
|
2833
3464
|
async function p() {
|
|
2834
|
-
|
|
3465
|
+
A.debug("signOut - Entry point"), e.value = void 0, it(), t.value = null, n.value?.providerType ? await r(n.value.providerType) : a.logout();
|
|
2835
3466
|
}
|
|
2836
3467
|
let d = null;
|
|
2837
3468
|
async function v() {
|
|
2838
3469
|
return d || (d = (async () => {
|
|
2839
|
-
|
|
3470
|
+
A.debug("loadUser - Entry point");
|
|
2840
3471
|
try {
|
|
2841
|
-
|
|
2842
|
-
const [
|
|
2843
|
-
e.value =
|
|
2844
|
-
} catch (
|
|
2845
|
-
|
|
3472
|
+
i.value = !0, performance.mark("vc:auth-start");
|
|
3473
|
+
const [_] = await Promise.all([a.getCurrentUser(), g()]);
|
|
3474
|
+
e.value = _, performance.mark("vc:auth-done"), A.debug("User details loaded:", e.value);
|
|
3475
|
+
} catch (_) {
|
|
3476
|
+
A.error("loadUser failed:", _);
|
|
2846
3477
|
} finally {
|
|
2847
|
-
|
|
3478
|
+
i.value = !1, d = null;
|
|
2848
3479
|
}
|
|
2849
3480
|
return { ...e.value };
|
|
2850
3481
|
})(), d);
|
|
2851
3482
|
}
|
|
2852
|
-
async function
|
|
3483
|
+
async function C(_) {
|
|
2853
3484
|
try {
|
|
2854
|
-
return
|
|
3485
|
+
return i.value = !0, await a.requestPasswordReset(_), { succeeded: !0 };
|
|
2855
3486
|
} catch (E) {
|
|
2856
3487
|
return { succeeded: !1, error: E };
|
|
2857
3488
|
} finally {
|
|
2858
|
-
|
|
3489
|
+
i.value = !1;
|
|
2859
3490
|
}
|
|
2860
3491
|
}
|
|
2861
|
-
async function I(
|
|
2862
|
-
let
|
|
3492
|
+
async function I(_, E) {
|
|
3493
|
+
let S;
|
|
2863
3494
|
try {
|
|
2864
|
-
|
|
3495
|
+
i.value = !0;
|
|
2865
3496
|
const P = {
|
|
2866
|
-
oldPassword:
|
|
3497
|
+
oldPassword: _,
|
|
2867
3498
|
newPassword: E
|
|
2868
3499
|
};
|
|
2869
|
-
|
|
3500
|
+
S = await a.changeCurrentUserPassword(P);
|
|
2870
3501
|
} catch (P) {
|
|
2871
3502
|
return { succeeded: !1, errors: [P.message] };
|
|
2872
3503
|
} finally {
|
|
2873
|
-
|
|
3504
|
+
i.value = !1;
|
|
2874
3505
|
}
|
|
2875
|
-
return
|
|
3506
|
+
return S;
|
|
2876
3507
|
}
|
|
2877
3508
|
async function x() {
|
|
2878
|
-
let
|
|
3509
|
+
let _ = null;
|
|
2879
3510
|
try {
|
|
2880
|
-
|
|
3511
|
+
_ = await a.getLoginTypes();
|
|
2881
3512
|
} catch (E) {
|
|
2882
|
-
throw
|
|
3513
|
+
throw A.error("getLoginType failed:", E), E;
|
|
2883
3514
|
}
|
|
2884
|
-
return
|
|
3515
|
+
return _;
|
|
2885
3516
|
}
|
|
2886
3517
|
const R = 60 * 1e3;
|
|
2887
3518
|
async function g() {
|
|
2888
|
-
if (
|
|
2889
|
-
return
|
|
2890
|
-
const
|
|
2891
|
-
if (
|
|
3519
|
+
if (A.debug("getAccessToken - Entry point"), t.value || (t.value = st()), !t.value)
|
|
3520
|
+
return A.debug("getAccessToken - No auth data available"), null;
|
|
3521
|
+
const _ = Date.now(), E = t.value.expires_at, S = E ? _ >= E - R : !1;
|
|
3522
|
+
if (A.debug("getAccessToken - Token status:", {
|
|
2892
3523
|
hasToken: !!t.value.access_token,
|
|
2893
3524
|
expiresAt: E ? new Date(E).toISOString() : "not set",
|
|
2894
|
-
now: new Date(
|
|
2895
|
-
shouldRefresh:
|
|
3525
|
+
now: new Date(_).toISOString(),
|
|
3526
|
+
shouldRefresh: S,
|
|
2896
3527
|
hasRefreshToken: !!t.value.refresh_token
|
|
2897
|
-
}),
|
|
2898
|
-
|
|
2899
|
-
const P = await
|
|
3528
|
+
}), S && t.value.refresh_token) {
|
|
3529
|
+
A.debug("getAccessToken - Token expired or expiring soon, attempting refresh");
|
|
3530
|
+
const P = await ye({
|
|
2900
3531
|
grant_type: "refresh_token",
|
|
2901
3532
|
refresh_token: t.value.refresh_token,
|
|
2902
3533
|
scope: "offline_access"
|
|
2903
3534
|
});
|
|
2904
|
-
P ? (P.refresh_token = P.refresh_token ?? t.value.refresh_token, t.value = P, Ee(t.value),
|
|
3535
|
+
P ? (P.refresh_token = P.refresh_token ?? t.value.refresh_token, t.value = P, Ee(t.value), A.debug("getAccessToken - Token refreshed successfully, new expiry:", {
|
|
2905
3536
|
expiresAt: P.expires_at ? new Date(P.expires_at).toISOString() : "not set"
|
|
2906
|
-
})) :
|
|
3537
|
+
})) : A.warn("getAccessToken - Failed to refresh token, returning existing token");
|
|
2907
3538
|
}
|
|
2908
3539
|
return t.value?.access_token ?? t.value?.token ?? null;
|
|
2909
3540
|
}
|
|
2910
3541
|
return {
|
|
2911
3542
|
user: h(() => e.value),
|
|
2912
|
-
loading: h(() =>
|
|
3543
|
+
loading: h(() => i.value),
|
|
2913
3544
|
isAdministrator: h(() => e.value?.isAdministrator),
|
|
2914
3545
|
isAuthenticated: o,
|
|
2915
3546
|
loadUser: v,
|
|
2916
|
-
signIn:
|
|
3547
|
+
signIn: U,
|
|
2917
3548
|
signOut: p,
|
|
2918
|
-
validateToken:
|
|
3549
|
+
validateToken: l,
|
|
2919
3550
|
validatePassword: c,
|
|
2920
3551
|
resetPasswordByToken: m,
|
|
2921
|
-
requestPasswordReset:
|
|
3552
|
+
requestPasswordReset: C,
|
|
2922
3553
|
changeUserPassword: I,
|
|
2923
3554
|
getLoginType: x,
|
|
2924
3555
|
getAccessToken: g
|
|
2925
3556
|
};
|
|
2926
3557
|
}
|
|
2927
|
-
const
|
|
2928
|
-
const
|
|
3558
|
+
const lt = Me(ot), ut = () => {
|
|
3559
|
+
const i = lt();
|
|
2929
3560
|
return {
|
|
2930
|
-
user:
|
|
2931
|
-
loading:
|
|
2932
|
-
isAuthenticated:
|
|
2933
|
-
isAdministrator:
|
|
2934
|
-
loadUser:
|
|
2935
|
-
signOut:
|
|
2936
|
-
getAccessToken:
|
|
3561
|
+
user: i.user,
|
|
3562
|
+
loading: i.loading,
|
|
3563
|
+
isAuthenticated: i.isAuthenticated,
|
|
3564
|
+
isAdministrator: i.isAdministrator,
|
|
3565
|
+
loadUser: i.loadUser,
|
|
3566
|
+
signOut: i.signOut,
|
|
3567
|
+
getAccessToken: i.getAccessToken
|
|
2937
3568
|
};
|
|
2938
|
-
}, Oe = Symbol("BladeStack"),
|
|
3569
|
+
}, Oe = Symbol("BladeStack"), ct = Symbol("BladeMessaging"), ht = Symbol("BladeDescriptor"), Pr = Symbol("BladeMaximized"), dt = Symbol("BladeData"), ft = Symbol("BladeBanners"), Or = Symbol("BladeBackButton"), Ir = Symbol("NotificationStore"), Rr = Symbol("WidgetService"), jr = Symbol("DashboardService"), $r = Symbol("MenuService"), Nr = Symbol("SettingsMenuService"), Br = Symbol("AppBarWidgetService"), zr = Symbol("AppBarMobileButtonsService"), pt = Symbol("LanguageService"), mt = Symbol("ToolbarService"), kr = Symbol("DynamicModules"), Gr = Symbol("ModulesReady"), Fr = Symbol("ModulesLoadError"), Dr = Symbol("AppRootElement"), vt = Symbol("EmbeddedMode"), Mr = Symbol("ShellIndicators"), ve = Symbol("AiAgentService"), Lr = Symbol("IsMobile"), Jr = Symbol("IsDesktop"), Wr = Symbol("IsPhone"), Vr = Symbol("IsTablet"), qr = Symbol("IsTouch"), Kr = Symbol("BladeRoutes"), Hr = Symbol("InternalRoutes"), Zr = Symbol("CloseSettingsMenu"), Xr = Symbol("BladeContext"), Yr = Symbol("WidgetScope"), Qr = Symbol("BladeForm"), en = Symbol("BladeLoading"), gt = {
|
|
2939
3570
|
url: "",
|
|
2940
3571
|
title: "Virto OZ",
|
|
2941
3572
|
width: 362,
|
|
2942
3573
|
expandedWidth: 500,
|
|
2943
3574
|
allowedOrigins: ["*"]
|
|
2944
|
-
},
|
|
3575
|
+
}, tn = "APP_AI_AGENT_URL", rn = {
|
|
2945
3576
|
EMBEDDED_APP_READY: "EMBEDDED_APP_READY",
|
|
2946
3577
|
AI_TOGGLE_PANEL: "AI_TOGGLE_PANEL",
|
|
2947
3578
|
AI_CONTEXT_UPDATE: "AI_CONTEXT_UPDATE",
|
|
2948
3579
|
AI_CONTEXT_CLEAR: "AI_CONTEXT_CLEAR"
|
|
2949
|
-
},
|
|
3580
|
+
}, nn = {
|
|
2950
3581
|
EMBEDDED_HOST_READY: "EMBEDDED_HOST_READY",
|
|
2951
3582
|
AI_CHAT_MESSAGE: "AI_CHAT_MESSAGE"
|
|
2952
|
-
},
|
|
2953
|
-
function
|
|
2954
|
-
const
|
|
2955
|
-
|
|
3583
|
+
}, bt = "ai-agent-toggle", xt = "lucide-sparkles", Et = "AI Assistant", re = B("ai-agent-panel");
|
|
3584
|
+
function yt() {
|
|
3585
|
+
const i = D("closed"), e = D(!1), t = h(() => i.value !== "closed"), n = h(() => i.value === "expanded"), r = () => {
|
|
3586
|
+
i.value === "closed" && (i.value = "open", re.debug("Panel opened"));
|
|
2956
3587
|
}, a = () => {
|
|
2957
|
-
|
|
3588
|
+
i.value = "closed", e.value = !1, re.debug("Panel closed, reset initialized state");
|
|
2958
3589
|
};
|
|
2959
3590
|
return {
|
|
2960
|
-
panelState:
|
|
3591
|
+
panelState: i,
|
|
2961
3592
|
isOpen: t,
|
|
2962
3593
|
isExpanded: n,
|
|
2963
3594
|
isInitialized: e,
|
|
2964
3595
|
open: r,
|
|
2965
3596
|
close: a,
|
|
2966
3597
|
toggle: () => {
|
|
2967
|
-
|
|
3598
|
+
i.value === "closed" ? r() : a();
|
|
2968
3599
|
},
|
|
2969
3600
|
expand: () => {
|
|
2970
|
-
|
|
3601
|
+
i.value === "open" && (i.value = "expanded", re.debug("Panel expanded"));
|
|
2971
3602
|
},
|
|
2972
3603
|
collapse: () => {
|
|
2973
|
-
|
|
3604
|
+
i.value === "expanded" && (i.value = "open", re.debug("Panel collapsed"));
|
|
2974
3605
|
},
|
|
2975
3606
|
resetInitialized: () => {
|
|
2976
3607
|
e.value = !1;
|
|
2977
3608
|
}
|
|
2978
3609
|
};
|
|
2979
3610
|
}
|
|
2980
|
-
const de =
|
|
2981
|
-
function
|
|
2982
|
-
return
|
|
2983
|
-
id:
|
|
2984
|
-
name:
|
|
2985
|
-
title:
|
|
2986
|
-
param:
|
|
3611
|
+
const de = B("ai-agent-context");
|
|
3612
|
+
function _e(i) {
|
|
3613
|
+
return i ? {
|
|
3614
|
+
id: i.id,
|
|
3615
|
+
name: i.name,
|
|
3616
|
+
title: i.title || i.name,
|
|
3617
|
+
param: i.param
|
|
2987
3618
|
} : { id: "unknown", name: "unknown", title: "Unknown" };
|
|
2988
3619
|
}
|
|
2989
|
-
function
|
|
2990
|
-
const { userGetter: e, bladeGetter: t, localeGetter: n, tokenGetter: r } =
|
|
2991
|
-
const
|
|
2992
|
-
return
|
|
3620
|
+
function _t(i) {
|
|
3621
|
+
const { userGetter: e, bladeGetter: t, localeGetter: n, tokenGetter: r } = i, a = D(/* @__PURE__ */ new Map()), o = () => {
|
|
3622
|
+
const C = t();
|
|
3623
|
+
return C ? a.value.get(C.id) ?? {
|
|
2993
3624
|
items: [],
|
|
2994
3625
|
type: "list",
|
|
2995
3626
|
suggestions: void 0
|
|
@@ -2998,102 +3629,102 @@ function Pt(s) {
|
|
|
2998
3629
|
type: "list",
|
|
2999
3630
|
suggestions: void 0
|
|
3000
3631
|
};
|
|
3001
|
-
},
|
|
3632
|
+
}, l = h(() => o().items), c = h(() => o().type), m = h(() => o().suggestions), U = h(() => l.value.length);
|
|
3002
3633
|
return {
|
|
3003
|
-
contextItems:
|
|
3634
|
+
contextItems: l,
|
|
3004
3635
|
contextType: c,
|
|
3005
3636
|
contextSuggestions: m,
|
|
3006
|
-
totalItemsCount:
|
|
3007
|
-
setContextData: (
|
|
3637
|
+
totalItemsCount: U,
|
|
3638
|
+
setContextData: (C, I, x, R) => {
|
|
3008
3639
|
const g = t()?.id || R;
|
|
3009
|
-
return g ?
|
|
3640
|
+
return g ? C.length === 0 && !x ? (a.value.delete(g), de.debug(`Context cleared for blade: ${g}`), { cleared: !0 }) : (a.value.set(g, { items: C, type: I, suggestions: x }), de.debug(`Context set for blade: ${g}, items: ${C.length}, type: ${I}`), { cleared: !1 }) : (de.warn("Cannot set context data: no blade id available"), { cleared: !1 });
|
|
3010
3641
|
},
|
|
3011
3642
|
buildInitPayload: async () => {
|
|
3012
|
-
const
|
|
3643
|
+
const C = r ? await r() ?? void 0 : void 0;
|
|
3013
3644
|
return {
|
|
3014
3645
|
userId: e()?.id || "",
|
|
3015
3646
|
locale: n(),
|
|
3016
|
-
blade:
|
|
3647
|
+
blade: _e(t()),
|
|
3017
3648
|
contextType: c.value,
|
|
3018
|
-
items: te(
|
|
3649
|
+
items: te(l.value),
|
|
3019
3650
|
suggestions: m.value ? te(m.value) : void 0,
|
|
3020
|
-
accessToken:
|
|
3651
|
+
accessToken: C
|
|
3021
3652
|
};
|
|
3022
3653
|
},
|
|
3023
3654
|
buildUpdatePayload: async () => {
|
|
3024
|
-
const
|
|
3655
|
+
const C = r ? await r() ?? void 0 : void 0;
|
|
3025
3656
|
return {
|
|
3026
|
-
blade:
|
|
3657
|
+
blade: _e(t()),
|
|
3027
3658
|
contextType: c.value,
|
|
3028
|
-
items: te(
|
|
3659
|
+
items: te(l.value),
|
|
3029
3660
|
suggestions: m.value ? te(m.value) : void 0,
|
|
3030
3661
|
locale: n(),
|
|
3031
|
-
accessToken:
|
|
3662
|
+
accessToken: C
|
|
3032
3663
|
};
|
|
3033
3664
|
}
|
|
3034
3665
|
};
|
|
3035
3666
|
}
|
|
3036
|
-
const
|
|
3037
|
-
function
|
|
3667
|
+
const G = B("ai-agent-transport");
|
|
3668
|
+
function Ut(i) {
|
|
3038
3669
|
try {
|
|
3039
|
-
const e = atob(
|
|
3670
|
+
const e = atob(i.content), t = new Array(e.length);
|
|
3040
3671
|
for (let o = 0; o < e.length; o++)
|
|
3041
3672
|
t[o] = e.charCodeAt(o);
|
|
3042
|
-
const n = new Blob([new Uint8Array(t)], { type:
|
|
3043
|
-
a.href = r, a.download =
|
|
3673
|
+
const n = new Blob([new Uint8Array(t)], { type: i.contentType }), r = URL.createObjectURL(n), a = document.createElement("a");
|
|
3674
|
+
a.href = r, a.download = i.filename, document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(r), G.debug(`File downloaded: ${i.filename}`);
|
|
3044
3675
|
} catch (e) {
|
|
3045
|
-
|
|
3676
|
+
G.error("Failed to download file:", e);
|
|
3046
3677
|
}
|
|
3047
3678
|
}
|
|
3048
|
-
function
|
|
3049
|
-
const { getConfig: e, isEmbedded: t, navigateToBlade: n, reloadBlade: r } =
|
|
3050
|
-
function p(v,
|
|
3679
|
+
function Ct(i) {
|
|
3680
|
+
const { getConfig: e, isEmbedded: t, navigateToBlade: n, reloadBlade: r } = i, a = ze(null), o = D(!1), l = D(!1), c = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), U = /* @__PURE__ */ new Set();
|
|
3681
|
+
function p(v, C) {
|
|
3051
3682
|
switch (v) {
|
|
3052
3683
|
case "PREVIEW_CHANGES": {
|
|
3053
|
-
const x =
|
|
3054
|
-
m.size === 0 &&
|
|
3684
|
+
const x = C;
|
|
3685
|
+
m.size === 0 && G.warn("No preview changes handlers registered!"), m.forEach((R) => {
|
|
3055
3686
|
try {
|
|
3056
3687
|
R(x);
|
|
3057
3688
|
} catch (g) {
|
|
3058
|
-
|
|
3689
|
+
G.error("Error in preview handler:", g);
|
|
3059
3690
|
}
|
|
3060
3691
|
});
|
|
3061
3692
|
break;
|
|
3062
3693
|
}
|
|
3063
3694
|
case "NAVIGATE_TO_APP": {
|
|
3064
|
-
const x =
|
|
3065
|
-
n && x?.bladeName && (n(x.bladeName, x.param, x.options),
|
|
3695
|
+
const x = C;
|
|
3696
|
+
n && x?.bladeName && (n(x.bladeName, x.param, x.options), G.debug(`Navigation requested to: ${x.bladeName}`));
|
|
3066
3697
|
break;
|
|
3067
3698
|
}
|
|
3068
3699
|
case "RELOAD_BLADE":
|
|
3069
|
-
r && (r(),
|
|
3700
|
+
r && (r(), G.debug("Blade reload requested"));
|
|
3070
3701
|
break;
|
|
3071
3702
|
case "DOWNLOAD_FILE": {
|
|
3072
|
-
const x =
|
|
3073
|
-
x &&
|
|
3703
|
+
const x = C;
|
|
3704
|
+
x && Ut(x);
|
|
3074
3705
|
break;
|
|
3075
3706
|
}
|
|
3076
3707
|
case "APPLY_CHANGES": {
|
|
3077
|
-
const x =
|
|
3078
|
-
|
|
3708
|
+
const x = C;
|
|
3709
|
+
G.warn("APPLY_CHANGES received but not implemented:", x?.changes);
|
|
3079
3710
|
break;
|
|
3080
3711
|
}
|
|
3081
3712
|
case "CHAT_ERROR": {
|
|
3082
|
-
const x =
|
|
3083
|
-
|
|
3713
|
+
const x = C;
|
|
3714
|
+
G.error(`Chatbot error [${x?.code}]: ${x?.message}`);
|
|
3084
3715
|
break;
|
|
3085
3716
|
}
|
|
3086
3717
|
}
|
|
3087
3718
|
const I = {
|
|
3088
3719
|
type: v,
|
|
3089
|
-
payload:
|
|
3720
|
+
payload: C,
|
|
3090
3721
|
timestamp: Date.now()
|
|
3091
3722
|
};
|
|
3092
3723
|
c.forEach((x) => {
|
|
3093
3724
|
try {
|
|
3094
3725
|
x(I);
|
|
3095
3726
|
} catch (R) {
|
|
3096
|
-
|
|
3727
|
+
G.error("Handler error:", R);
|
|
3097
3728
|
}
|
|
3098
3729
|
});
|
|
3099
3730
|
}
|
|
@@ -3103,7 +3734,7 @@ function It(s) {
|
|
|
3103
3734
|
return;
|
|
3104
3735
|
const x = v.data;
|
|
3105
3736
|
if (!(!x?.type || typeof x.type != "string"))
|
|
3106
|
-
switch (
|
|
3737
|
+
switch (G.debug(`Message received: ${x.type}`), x.type) {
|
|
3107
3738
|
// Embedded: parent forwards chat messages wrapped in AI_CHAT_MESSAGE
|
|
3108
3739
|
case "AI_CHAT_MESSAGE": {
|
|
3109
3740
|
if (t) {
|
|
@@ -3114,11 +3745,11 @@ function It(s) {
|
|
|
3114
3745
|
}
|
|
3115
3746
|
// Normal: chatbot signals it's ready
|
|
3116
3747
|
case "CHAT_READY":
|
|
3117
|
-
|
|
3748
|
+
U.forEach((R) => {
|
|
3118
3749
|
try {
|
|
3119
3750
|
R();
|
|
3120
3751
|
} catch (g) {
|
|
3121
|
-
|
|
3752
|
+
G.error("ChatReady handler error:", g);
|
|
3122
3753
|
}
|
|
3123
3754
|
});
|
|
3124
3755
|
break;
|
|
@@ -3131,34 +3762,34 @@ function It(s) {
|
|
|
3131
3762
|
return {
|
|
3132
3763
|
iframeRef: a,
|
|
3133
3764
|
pendingInitContext: o,
|
|
3134
|
-
isListenerRegistered:
|
|
3765
|
+
isListenerRegistered: l,
|
|
3135
3766
|
setIframeRef(v) {
|
|
3136
|
-
a.value = v,
|
|
3767
|
+
a.value = v, G.debug("Iframe ref set:", v ? "available" : "null");
|
|
3137
3768
|
},
|
|
3138
3769
|
sendToIframe(v) {
|
|
3139
3770
|
if (!a.value?.contentWindow) {
|
|
3140
|
-
|
|
3771
|
+
G.warn("Cannot send message: iframe not available");
|
|
3141
3772
|
return;
|
|
3142
3773
|
}
|
|
3143
3774
|
const I = e().allowedOrigins?.[0] || "*";
|
|
3144
|
-
a.value.contentWindow.postMessage(v, I),
|
|
3775
|
+
a.value.contentWindow.postMessage(v, I), G.debug(`Sent to iframe: ${v.type}`);
|
|
3145
3776
|
},
|
|
3146
3777
|
sendToParent(v) {
|
|
3147
3778
|
if (!window.parent || window.parent === window) {
|
|
3148
|
-
|
|
3779
|
+
G.warn("Cannot send to parent: not in iframe");
|
|
3149
3780
|
return;
|
|
3150
3781
|
}
|
|
3151
|
-
window.parent.postMessage(v, "*"),
|
|
3782
|
+
window.parent.postMessage(v, "*"), G.debug(`Sent to parent: ${v.type}`);
|
|
3152
3783
|
},
|
|
3153
3784
|
startListening() {
|
|
3154
|
-
|
|
3785
|
+
l.value || (window.addEventListener("message", d), l.value = !0);
|
|
3155
3786
|
},
|
|
3156
3787
|
stopListening() {
|
|
3157
|
-
|
|
3788
|
+
l.value && (window.removeEventListener("message", d), l.value = !1);
|
|
3158
3789
|
},
|
|
3159
3790
|
onChatReady(v) {
|
|
3160
|
-
return
|
|
3161
|
-
|
|
3791
|
+
return U.add(v), () => {
|
|
3792
|
+
U.delete(v);
|
|
3162
3793
|
};
|
|
3163
3794
|
},
|
|
3164
3795
|
onPreviewChanges(v) {
|
|
@@ -3173,8 +3804,8 @@ function It(s) {
|
|
|
3173
3804
|
}
|
|
3174
3805
|
};
|
|
3175
3806
|
}
|
|
3176
|
-
const ne =
|
|
3177
|
-
function
|
|
3807
|
+
const ne = B("ai-agent-service");
|
|
3808
|
+
function Tt(i) {
|
|
3178
3809
|
const {
|
|
3179
3810
|
userGetter: e,
|
|
3180
3811
|
bladeGetter: t,
|
|
@@ -3182,14 +3813,14 @@ function Rt(s) {
|
|
|
3182
3813
|
tokenGetter: r,
|
|
3183
3814
|
navigateToBlade: a,
|
|
3184
3815
|
reloadBlade: o,
|
|
3185
|
-
initialConfig:
|
|
3816
|
+
initialConfig: l,
|
|
3186
3817
|
isEmbedded: c = !1
|
|
3187
|
-
} =
|
|
3818
|
+
} = i, m = D({ ...gt, ...l }), U = yt(), p = _t({
|
|
3188
3819
|
userGetter: e,
|
|
3189
3820
|
bladeGetter: t,
|
|
3190
3821
|
localeGetter: n,
|
|
3191
3822
|
tokenGetter: r
|
|
3192
|
-
}), d =
|
|
3823
|
+
}), d = Ct({
|
|
3193
3824
|
getConfig: () => m.value,
|
|
3194
3825
|
isEmbedded: c,
|
|
3195
3826
|
navigateToBlade: a,
|
|
@@ -3198,18 +3829,18 @@ function Rt(s) {
|
|
|
3198
3829
|
user: e(),
|
|
3199
3830
|
currentBlade: t(),
|
|
3200
3831
|
items: p.contextItems.value
|
|
3201
|
-
})),
|
|
3832
|
+
})), C = async () => {
|
|
3202
3833
|
if (d.pendingInitContext.value && d.iframeRef.value?.contentWindow) {
|
|
3203
|
-
d.pendingInitContext.value = !1,
|
|
3834
|
+
d.pendingInitContext.value = !1, U.isInitialized.value = !0;
|
|
3204
3835
|
const E = await p.buildInitPayload();
|
|
3205
3836
|
d.sendToIframe({ type: "INIT_CONTEXT", payload: E }), ne.debug("Flushed pending INIT_CONTEXT");
|
|
3206
3837
|
}
|
|
3207
3838
|
};
|
|
3208
3839
|
d.onChatReady(() => {
|
|
3209
|
-
d.iframeRef.value?.contentWindow ? (
|
|
3840
|
+
d.iframeRef.value?.contentWindow ? (U.isInitialized.value = !0, p.buildInitPayload().then((E) => {
|
|
3210
3841
|
d.sendToIframe({ type: "INIT_CONTEXT", payload: E }), ne.info("Chatbot ready, sent INIT_CONTEXT");
|
|
3211
3842
|
})) : (d.pendingInitContext.value = !0, ne.info("Chatbot ready, iframe ref not available yet — pending INIT_CONTEXT"));
|
|
3212
|
-
}),
|
|
3843
|
+
}), H(d.iframeRef, () => C()), H(
|
|
3213
3844
|
() => ({ currentBlade: v.value.currentBlade, items: v.value.items }),
|
|
3214
3845
|
async () => {
|
|
3215
3846
|
if (c) {
|
|
@@ -3217,43 +3848,43 @@ function Rt(s) {
|
|
|
3217
3848
|
d.sendToParent({ type: "AI_CONTEXT_UPDATE", payload: E });
|
|
3218
3849
|
return;
|
|
3219
3850
|
}
|
|
3220
|
-
if (
|
|
3851
|
+
if (U.isOpen.value && U.isInitialized.value && d.iframeRef.value?.contentWindow) {
|
|
3221
3852
|
const E = await p.buildUpdatePayload();
|
|
3222
3853
|
d.sendToIframe({ type: "UPDATE_CONTEXT", payload: E });
|
|
3223
3854
|
}
|
|
3224
3855
|
},
|
|
3225
3856
|
{ deep: !0 }
|
|
3226
3857
|
);
|
|
3227
|
-
const I = () => c ? d.sendToParent({ type: "AI_TOGGLE_PANEL" }) :
|
|
3228
|
-
d.setIframeRef(E),
|
|
3229
|
-
},
|
|
3230
|
-
const { cleared:
|
|
3231
|
-
c &&
|
|
3858
|
+
const I = () => c ? d.sendToParent({ type: "AI_TOGGLE_PANEL" }) : U.open(), x = () => c ? d.sendToParent({ type: "AI_TOGGLE_PANEL" }) : U.close(), R = () => c ? d.sendToParent({ type: "AI_TOGGLE_PANEL" }) : U.toggle(), g = (E) => {
|
|
3859
|
+
d.setIframeRef(E), C();
|
|
3860
|
+
}, _ = (E, S, P, M) => {
|
|
3861
|
+
const { cleared: X } = p.setContextData(E, S, P, M);
|
|
3862
|
+
c && X && d.sendToParent({ type: "AI_CONTEXT_CLEAR" });
|
|
3232
3863
|
};
|
|
3233
3864
|
return d.startListening(), c && (d.sendToParent({
|
|
3234
3865
|
type: "EMBEDDED_APP_READY",
|
|
3235
3866
|
payload: { supportedFeatures: ["ai-agent"] }
|
|
3236
3867
|
}), ne.info("Embedded mode: sent EMBEDDED_APP_READY to parent")), {
|
|
3237
3868
|
// State
|
|
3238
|
-
panelState:
|
|
3869
|
+
panelState: U.panelState,
|
|
3239
3870
|
config: m,
|
|
3240
3871
|
context: v,
|
|
3241
|
-
isOpen: h(() => !c &&
|
|
3242
|
-
isExpanded:
|
|
3872
|
+
isOpen: h(() => !c && U.isOpen.value),
|
|
3873
|
+
isExpanded: U.isExpanded,
|
|
3243
3874
|
totalItemsCount: p.totalItemsCount,
|
|
3244
3875
|
// Panel control
|
|
3245
3876
|
openPanel: I,
|
|
3246
3877
|
closePanel: x,
|
|
3247
3878
|
togglePanel: R,
|
|
3248
|
-
expandPanel: () =>
|
|
3249
|
-
collapsePanel: () =>
|
|
3879
|
+
expandPanel: () => U.expand(),
|
|
3880
|
+
collapsePanel: () => U.collapse(),
|
|
3250
3881
|
// Configuration
|
|
3251
3882
|
setConfig: (E) => {
|
|
3252
3883
|
m.value = { ...m.value, ...E };
|
|
3253
3884
|
},
|
|
3254
3885
|
// Communication
|
|
3255
|
-
sendMessage: (E,
|
|
3256
|
-
d.sendToIframe({ type: E, payload:
|
|
3886
|
+
sendMessage: (E, S) => {
|
|
3887
|
+
d.sendToIframe({ type: E, payload: S });
|
|
3257
3888
|
},
|
|
3258
3889
|
onMessage: d.onMessage,
|
|
3259
3890
|
// Internal API
|
|
@@ -3261,91 +3892,91 @@ function Rt(s) {
|
|
|
3261
3892
|
_setIframeRef: g,
|
|
3262
3893
|
_startListening: d.startListening,
|
|
3263
3894
|
_stopListening: d.stopListening,
|
|
3264
|
-
_setContextData:
|
|
3895
|
+
_setContextData: _,
|
|
3265
3896
|
_onPreviewChanges: d.onPreviewChanges
|
|
3266
3897
|
};
|
|
3267
3898
|
}
|
|
3268
|
-
let Ie, Re,
|
|
3269
|
-
function
|
|
3270
|
-
Ie =
|
|
3899
|
+
let Ie, Re, je, St;
|
|
3900
|
+
function an(i) {
|
|
3901
|
+
Ie = i;
|
|
3271
3902
|
}
|
|
3272
|
-
function
|
|
3273
|
-
Re =
|
|
3903
|
+
function sn(i) {
|
|
3904
|
+
Re = i;
|
|
3274
3905
|
}
|
|
3275
|
-
function
|
|
3276
|
-
|
|
3906
|
+
function on(i) {
|
|
3907
|
+
je = i;
|
|
3277
3908
|
}
|
|
3278
|
-
function
|
|
3279
|
-
|
|
3909
|
+
function ln(i) {
|
|
3910
|
+
St = i;
|
|
3280
3911
|
}
|
|
3281
|
-
function
|
|
3912
|
+
function Ue(i, e) {
|
|
3282
3913
|
if (e.length === 0)
|
|
3283
|
-
return { path:
|
|
3284
|
-
const t = e[0], n =
|
|
3914
|
+
return { path: i ? `/${i}` : "/", query: {} };
|
|
3915
|
+
const t = e[0], n = Ce(t.url);
|
|
3285
3916
|
let r;
|
|
3286
|
-
for (let
|
|
3287
|
-
if (e[
|
|
3288
|
-
r = e[
|
|
3917
|
+
for (let l = e.length - 1; l >= 1; l--)
|
|
3918
|
+
if (e[l].visible) {
|
|
3919
|
+
r = e[l];
|
|
3289
3920
|
break;
|
|
3290
3921
|
}
|
|
3291
|
-
let a =
|
|
3922
|
+
let a = i ? `/${i}` : "";
|
|
3292
3923
|
if (n && (a += `/${n}`), r) {
|
|
3293
|
-
const
|
|
3294
|
-
|
|
3924
|
+
const l = Ce(r.url);
|
|
3925
|
+
l && (a += `/${l}`), r.param && (a += `/${r.param}`);
|
|
3295
3926
|
}
|
|
3296
3927
|
const o = {};
|
|
3297
|
-
for (const
|
|
3298
|
-
|
|
3928
|
+
for (const l of e)
|
|
3929
|
+
l.visible && l.query && Object.assign(o, l.query);
|
|
3299
3930
|
return { path: a || "/", query: o };
|
|
3300
3931
|
}
|
|
3301
|
-
function
|
|
3302
|
-
let t =
|
|
3932
|
+
function un(i, e) {
|
|
3933
|
+
let t = i.split("/").filter(Boolean);
|
|
3303
3934
|
return e && t.length > 0 && t[0] === e && (t = t.slice(1)), t.length === 0 ? {} : {
|
|
3304
3935
|
workspaceUrl: t[0],
|
|
3305
3936
|
bladeUrl: t[1],
|
|
3306
3937
|
param: t[2]
|
|
3307
3938
|
};
|
|
3308
3939
|
}
|
|
3309
|
-
function
|
|
3310
|
-
if (
|
|
3311
|
-
return
|
|
3940
|
+
function Ce(i) {
|
|
3941
|
+
if (i)
|
|
3942
|
+
return i.replace(/^\/+|\/+$/g, "") || void 0;
|
|
3312
3943
|
}
|
|
3313
|
-
function
|
|
3314
|
-
const e =
|
|
3944
|
+
function Te(i) {
|
|
3945
|
+
const e = i.currentRoute.value.params;
|
|
3315
3946
|
return Object.values(e).find((t) => typeof t == "string" && t) || "";
|
|
3316
3947
|
}
|
|
3317
|
-
function
|
|
3948
|
+
function wt(i, e) {
|
|
3318
3949
|
function t() {
|
|
3319
|
-
const { path: r, query: a } =
|
|
3320
|
-
|
|
3950
|
+
const { path: r, query: a } = Ue(Te(i), e.blades.value);
|
|
3951
|
+
i.push({ path: r, query: a });
|
|
3321
3952
|
}
|
|
3322
3953
|
function n() {
|
|
3323
|
-
const { path: r, query: a } =
|
|
3324
|
-
|
|
3954
|
+
const { path: r, query: a } = Ue(Te(i), e.blades.value);
|
|
3955
|
+
i.replace({ path: r, query: a });
|
|
3325
3956
|
}
|
|
3326
3957
|
return { syncUrlPush: t, syncUrlReplace: n };
|
|
3327
3958
|
}
|
|
3328
|
-
const
|
|
3329
|
-
function
|
|
3330
|
-
throw new Error(`[vc-shell] ${
|
|
3331
|
-
${
|
|
3959
|
+
const At = "useBlade() was called outside a blade. Navigation methods (openBlade) work everywhere, but blade-specific methods require the component to be rendered inside VcBladeSlot.";
|
|
3960
|
+
function j(i) {
|
|
3961
|
+
throw new Error(`[vc-shell] ${i} requires blade context.
|
|
3962
|
+
${At}`);
|
|
3332
3963
|
}
|
|
3333
|
-
function
|
|
3334
|
-
const
|
|
3335
|
-
if (!
|
|
3964
|
+
function Pt() {
|
|
3965
|
+
const i = (ee() ? J(Oe, void 0) : void 0) ?? Re, e = (ee() ? J(ct, void 0) : void 0) ?? je;
|
|
3966
|
+
if (!i || !e)
|
|
3336
3967
|
throw new Error(
|
|
3337
3968
|
"[vc-shell] useBlade() failed: BladeStack or BladeMessaging not available. Ensure BladeNavigationPlugin (plugin-v2) is installed."
|
|
3338
3969
|
);
|
|
3339
|
-
const t =
|
|
3970
|
+
const t = i, n = e, r = ee() ? J(ht, void 0) : void 0, a = ee() ? J(ft, void 0) : void 0;
|
|
3340
3971
|
let o;
|
|
3341
|
-
function
|
|
3972
|
+
function l() {
|
|
3342
3973
|
if (o) return o;
|
|
3343
|
-
const
|
|
3344
|
-
return
|
|
3974
|
+
const y = Ie?.router;
|
|
3975
|
+
return y && (o = wt(y, t)), o;
|
|
3345
3976
|
}
|
|
3346
|
-
const c = h(() => (r ||
|
|
3977
|
+
const c = h(() => (r || j("id"), r.value.id)), m = h(() => (r || j("param"), r.value.param)), U = h(() => (r || j("options"), r.value.options)), p = h(() => (r || j("query"), r.value.query)), d = h(() => (r || j("closable"), r.value.parentId !== void 0)), v = h(() => (r || j("expanded"), t.activeBlade.value?.id === r.value.id)), C = h(() => (r || j("name"), r.value.name));
|
|
3347
3978
|
let I = !1;
|
|
3348
|
-
function x(
|
|
3979
|
+
function x(y) {
|
|
3349
3980
|
if (I) {
|
|
3350
3981
|
console.warn(
|
|
3351
3982
|
"[vc-shell] provideBladeData() called more than once in the same blade. Only the first call takes effect."
|
|
@@ -3353,319 +3984,319 @@ function jt() {
|
|
|
3353
3984
|
return;
|
|
3354
3985
|
}
|
|
3355
3986
|
I = !0;
|
|
3356
|
-
const
|
|
3357
|
-
|
|
3987
|
+
const k = ke(y) ? y : D(y);
|
|
3988
|
+
Se(dt, k);
|
|
3358
3989
|
}
|
|
3359
|
-
async function R(
|
|
3360
|
-
const { isWorkspace:
|
|
3361
|
-
if (
|
|
3990
|
+
async function R(y) {
|
|
3991
|
+
const { isWorkspace: k, ...ue } = y;
|
|
3992
|
+
if (k)
|
|
3362
3993
|
await t.openWorkspace(ue);
|
|
3363
3994
|
else {
|
|
3364
3995
|
const be = r?.value.id;
|
|
3365
3996
|
be ? await t.openBlade({ ...ue, parentId: be }) : await t.openBlade(ue);
|
|
3366
3997
|
}
|
|
3367
|
-
t.activeBlade.value?.url &&
|
|
3998
|
+
t.activeBlade.value?.url && l()?.syncUrlPush();
|
|
3368
3999
|
}
|
|
3369
4000
|
async function g() {
|
|
3370
|
-
r ||
|
|
3371
|
-
const
|
|
3372
|
-
return
|
|
4001
|
+
r || j("closeSelf()");
|
|
4002
|
+
const y = await t.closeBlade(r.value.id);
|
|
4003
|
+
return y || l()?.syncUrlReplace(), y;
|
|
3373
4004
|
}
|
|
3374
|
-
async function
|
|
3375
|
-
r ||
|
|
4005
|
+
async function _() {
|
|
4006
|
+
r || j("closeChildren()"), await t.closeChildren(r.value.id), l()?.syncUrlReplace();
|
|
3376
4007
|
}
|
|
3377
|
-
async function E(
|
|
3378
|
-
r ||
|
|
3379
|
-
...
|
|
4008
|
+
async function E(y) {
|
|
4009
|
+
r || j("replaceWith()"), await t.replaceCurrentBlade({
|
|
4010
|
+
...y,
|
|
3380
4011
|
parentId: r.value.parentId
|
|
3381
|
-
}), t.activeBlade.value?.url &&
|
|
4012
|
+
}), t.activeBlade.value?.url && l()?.syncUrlReplace();
|
|
3382
4013
|
}
|
|
3383
|
-
async function
|
|
3384
|
-
r ||
|
|
3385
|
-
...
|
|
4014
|
+
async function S(y) {
|
|
4015
|
+
r || j("coverWith()"), await t.coverCurrentBlade({
|
|
4016
|
+
...y,
|
|
3386
4017
|
parentId: r.value.parentId
|
|
3387
|
-
}), t.activeBlade.value?.url &&
|
|
4018
|
+
}), t.activeBlade.value?.url && l()?.syncUrlPush();
|
|
3388
4019
|
}
|
|
3389
|
-
async function P(
|
|
3390
|
-
return r ||
|
|
4020
|
+
async function P(y, k) {
|
|
4021
|
+
return r || j("callParent()"), n.callParent(r.value.id, y, k);
|
|
3391
4022
|
}
|
|
3392
|
-
function
|
|
3393
|
-
r ||
|
|
4023
|
+
function M(y) {
|
|
4024
|
+
r || j("exposeToChildren()"), n.exposeToChildren(r.value.id, y);
|
|
3394
4025
|
}
|
|
3395
|
-
function
|
|
3396
|
-
r ||
|
|
4026
|
+
function X(y) {
|
|
4027
|
+
r || j("onBeforeClose()"), t.registerBeforeClose(r.value.id, y);
|
|
3397
4028
|
}
|
|
3398
|
-
function
|
|
3399
|
-
r ||
|
|
4029
|
+
function u(y) {
|
|
4030
|
+
r || j("setError()"), t.setBladeError(r.value.id, y);
|
|
3400
4031
|
}
|
|
3401
4032
|
function f() {
|
|
3402
|
-
r ||
|
|
4033
|
+
r || j("clearError()"), t.clearBladeError(r.value.id);
|
|
3403
4034
|
}
|
|
3404
4035
|
let b = 0;
|
|
3405
|
-
function
|
|
3406
|
-
a ||
|
|
3407
|
-
const
|
|
4036
|
+
function T(y) {
|
|
4037
|
+
a || j("addBanner()");
|
|
4038
|
+
const k = `banner-${r.value.id}-${++b}`;
|
|
3408
4039
|
return a.value.push({
|
|
3409
|
-
...
|
|
3410
|
-
id:
|
|
3411
|
-
dismissible:
|
|
3412
|
-
}),
|
|
4040
|
+
...y,
|
|
4041
|
+
id: k,
|
|
4042
|
+
dismissible: y.dismissible ?? !1
|
|
4043
|
+
}), k;
|
|
3413
4044
|
}
|
|
3414
|
-
function O(
|
|
3415
|
-
a ||
|
|
4045
|
+
function O(y) {
|
|
4046
|
+
a || j("removeBanner()"), a.value = a.value.filter((k) => k.id !== y);
|
|
3416
4047
|
}
|
|
3417
|
-
function
|
|
3418
|
-
a ||
|
|
4048
|
+
function z() {
|
|
4049
|
+
a || j("clearBanners()"), a.value = a.value.filter((y) => y._system);
|
|
3419
4050
|
}
|
|
3420
|
-
let
|
|
3421
|
-
function Ne(
|
|
3422
|
-
if (r ||
|
|
4051
|
+
let V = !1, ge = !1;
|
|
4052
|
+
function Ne(y) {
|
|
4053
|
+
if (r || j("onActivated()"), V) {
|
|
3423
4054
|
console.warn("[useBlade] onActivated() already registered in this blade.");
|
|
3424
4055
|
return;
|
|
3425
4056
|
}
|
|
3426
|
-
|
|
3427
|
-
|
|
4057
|
+
V = !0, H(v, (k) => {
|
|
4058
|
+
k && y();
|
|
3428
4059
|
});
|
|
3429
4060
|
}
|
|
3430
|
-
function
|
|
3431
|
-
if (r ||
|
|
4061
|
+
function Be(y) {
|
|
4062
|
+
if (r || j("onDeactivated()"), ge) {
|
|
3432
4063
|
console.warn("[useBlade] onDeactivated() already registered in this blade.");
|
|
3433
4064
|
return;
|
|
3434
4065
|
}
|
|
3435
|
-
ge = !0,
|
|
3436
|
-
|
|
4066
|
+
ge = !0, H(v, (k) => {
|
|
4067
|
+
k || y();
|
|
3437
4068
|
});
|
|
3438
4069
|
}
|
|
3439
4070
|
return {
|
|
3440
4071
|
id: c,
|
|
3441
4072
|
param: m,
|
|
3442
|
-
options:
|
|
4073
|
+
options: U,
|
|
3443
4074
|
query: p,
|
|
3444
4075
|
closable: d,
|
|
3445
4076
|
expanded: v,
|
|
3446
|
-
name:
|
|
4077
|
+
name: C,
|
|
3447
4078
|
provideBladeData: x,
|
|
3448
4079
|
openBlade: R,
|
|
3449
4080
|
closeSelf: g,
|
|
3450
|
-
closeChildren:
|
|
4081
|
+
closeChildren: _,
|
|
3451
4082
|
replaceWith: E,
|
|
3452
|
-
coverWith:
|
|
4083
|
+
coverWith: S,
|
|
3453
4084
|
callParent: P,
|
|
3454
|
-
exposeToChildren:
|
|
3455
|
-
onBeforeClose:
|
|
4085
|
+
exposeToChildren: M,
|
|
4086
|
+
onBeforeClose: X,
|
|
3456
4087
|
onActivated: Ne,
|
|
3457
|
-
onDeactivated:
|
|
3458
|
-
setError:
|
|
4088
|
+
onDeactivated: Be,
|
|
4089
|
+
setError: u,
|
|
3459
4090
|
clearError: f,
|
|
3460
|
-
addBanner:
|
|
4091
|
+
addBanner: T,
|
|
3461
4092
|
removeBanner: O,
|
|
3462
|
-
clearBanners:
|
|
4093
|
+
clearBanners: z
|
|
3463
4094
|
};
|
|
3464
4095
|
}
|
|
3465
|
-
let
|
|
4096
|
+
let Ot = 0;
|
|
3466
4097
|
function ae() {
|
|
3467
|
-
return `blade_${++
|
|
4098
|
+
return `blade_${++Ot}_${Math.random().toString(36).slice(2, 8)}`;
|
|
3468
4099
|
}
|
|
3469
|
-
function
|
|
3470
|
-
const t = D([]), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = h(() => t.value[0]),
|
|
3471
|
-
for (let
|
|
3472
|
-
if (t.value[
|
|
4100
|
+
function cn(i, e) {
|
|
4101
|
+
const t = D([]), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = h(() => t.value[0]), l = h(() => t.value), c = h(() => {
|
|
4102
|
+
for (let u = t.value.length - 1; u >= 0; u--)
|
|
4103
|
+
if (t.value[u].visible) return t.value[u];
|
|
3473
4104
|
});
|
|
3474
|
-
function m(
|
|
3475
|
-
n.delete(
|
|
4105
|
+
function m(u) {
|
|
4106
|
+
n.delete(u), r.delete(u), a.delete(u);
|
|
3476
4107
|
}
|
|
3477
|
-
function
|
|
3478
|
-
const f =
|
|
4108
|
+
function U(u) {
|
|
4109
|
+
const f = i.getBlade(u);
|
|
3479
4110
|
if (f)
|
|
3480
4111
|
return f.route;
|
|
3481
4112
|
}
|
|
3482
|
-
async function p(
|
|
3483
|
-
for (let f =
|
|
3484
|
-
const b = n.get(
|
|
4113
|
+
async function p(u) {
|
|
4114
|
+
for (let f = u.length - 1; f >= 0; f--) {
|
|
4115
|
+
const b = n.get(u[f].id);
|
|
3485
4116
|
if (b && await b())
|
|
3486
4117
|
return !0;
|
|
3487
4118
|
}
|
|
3488
4119
|
return !1;
|
|
3489
4120
|
}
|
|
3490
|
-
function d(
|
|
3491
|
-
for (const f of
|
|
4121
|
+
function d(u) {
|
|
4122
|
+
for (const f of u)
|
|
3492
4123
|
a.get(f.id)?.(), m(f.id);
|
|
3493
4124
|
}
|
|
3494
|
-
async function v(
|
|
3495
|
-
if (o.value?.name ===
|
|
3496
|
-
const b =
|
|
4125
|
+
async function v(u) {
|
|
4126
|
+
if (o.value?.name === u.name) return;
|
|
4127
|
+
const b = i.getBlade(u.name);
|
|
3497
4128
|
if (!b)
|
|
3498
|
-
throw new Error(`[BladeStack] Blade '${
|
|
4129
|
+
throw new Error(`[BladeStack] Blade '${u.name}' not found in registry`);
|
|
3499
4130
|
if (e && b.permissions && !e(b.permissions)) {
|
|
3500
|
-
console.warn(`[BladeStack] Access denied to workspace '${
|
|
4131
|
+
console.warn(`[BladeStack] Access denied to workspace '${u.name}'`);
|
|
3501
4132
|
return;
|
|
3502
4133
|
}
|
|
3503
4134
|
d([...t.value]);
|
|
3504
|
-
const
|
|
4135
|
+
const T = {
|
|
3505
4136
|
id: ae(),
|
|
3506
|
-
name:
|
|
3507
|
-
url:
|
|
4137
|
+
name: u.name,
|
|
4138
|
+
url: U(u.name),
|
|
3508
4139
|
// workspace blades don't have param when opened first
|
|
3509
|
-
query:
|
|
3510
|
-
options:
|
|
4140
|
+
query: u.query,
|
|
4141
|
+
options: u.options,
|
|
3511
4142
|
visible: !0
|
|
3512
4143
|
};
|
|
3513
|
-
t.value = [
|
|
4144
|
+
t.value = [T], u.onOpen && r.set(T.id, u.onOpen), u.onClose && a.set(T.id, u.onClose), u.onOpen?.();
|
|
3514
4145
|
}
|
|
3515
|
-
async function
|
|
3516
|
-
if (!
|
|
3517
|
-
throw new Error(`[BladeStack] Blade '${
|
|
3518
|
-
const f =
|
|
4146
|
+
async function C(u) {
|
|
4147
|
+
if (!i.getBlade(u.name))
|
|
4148
|
+
throw new Error(`[BladeStack] Blade '${u.name}' not found in registry`);
|
|
4149
|
+
const f = u.parentId ?? c.value?.id ?? o.value?.id;
|
|
3519
4150
|
if (!f)
|
|
3520
4151
|
throw new Error("[BladeStack] Cannot open blade: no parent blade found");
|
|
3521
|
-
const b = t.value.findIndex((
|
|
4152
|
+
const b = t.value.findIndex((z) => z.id === f);
|
|
3522
4153
|
if (b === -1)
|
|
3523
4154
|
throw new Error(`[BladeStack] Parent blade '${f}' not found in stack`);
|
|
3524
|
-
const
|
|
3525
|
-
if (
|
|
4155
|
+
const T = t.value.slice(b + 1);
|
|
4156
|
+
if (T.length > 0 && await p(T))
|
|
3526
4157
|
return;
|
|
3527
|
-
d(
|
|
4158
|
+
d(T);
|
|
3528
4159
|
const O = {
|
|
3529
4160
|
id: ae(),
|
|
3530
|
-
name:
|
|
3531
|
-
url:
|
|
3532
|
-
param:
|
|
3533
|
-
query:
|
|
3534
|
-
options:
|
|
4161
|
+
name: u.name,
|
|
4162
|
+
url: U(u.name),
|
|
4163
|
+
param: u.param,
|
|
4164
|
+
query: u.query,
|
|
4165
|
+
options: u.options,
|
|
3535
4166
|
parentId: f,
|
|
3536
4167
|
visible: !0
|
|
3537
4168
|
};
|
|
3538
|
-
t.value = [...t.value.slice(0, b + 1), O],
|
|
4169
|
+
t.value = [...t.value.slice(0, b + 1), O], u.onOpen && r.set(O.id, u.onOpen), u.onClose && a.set(O.id, u.onClose), u.onOpen?.();
|
|
3539
4170
|
}
|
|
3540
|
-
async function I(
|
|
3541
|
-
const f = t.value.findIndex((
|
|
4171
|
+
async function I(u) {
|
|
4172
|
+
const f = t.value.findIndex((z) => z.id === u);
|
|
3542
4173
|
if (f === -1 || f === 0) return !1;
|
|
3543
4174
|
const b = t.value.slice(f);
|
|
3544
4175
|
if (await p(b)) return !0;
|
|
3545
4176
|
d(b), t.value = t.value.slice(0, f);
|
|
3546
4177
|
const O = t.value.length - 1;
|
|
3547
4178
|
if (O > 0 && !t.value[O].visible) {
|
|
3548
|
-
const
|
|
3549
|
-
|
|
4179
|
+
const z = [...t.value];
|
|
4180
|
+
z[O] = { ...z[O], visible: !0 }, t.value = z;
|
|
3550
4181
|
}
|
|
3551
4182
|
return !1;
|
|
3552
4183
|
}
|
|
3553
|
-
async function x(
|
|
4184
|
+
async function x(u) {
|
|
3554
4185
|
const f = c.value;
|
|
3555
4186
|
if (!f)
|
|
3556
4187
|
throw new Error("[BladeStack] No active blade to replace");
|
|
3557
|
-
if (!
|
|
3558
|
-
throw new Error(`[BladeStack] Blade '${
|
|
3559
|
-
const b = t.value.findIndex((
|
|
4188
|
+
if (!i.getBlade(u.name))
|
|
4189
|
+
throw new Error(`[BladeStack] Blade '${u.name}' not found in registry`);
|
|
4190
|
+
const b = t.value.findIndex((V) => V.id === f.id);
|
|
3560
4191
|
if (b === -1)
|
|
3561
4192
|
throw new Error(`[BladeStack] Active blade '${f.id}' not found in stack`);
|
|
3562
|
-
const
|
|
3563
|
-
if (
|
|
3564
|
-
if (await p(
|
|
3565
|
-
d(
|
|
4193
|
+
const T = t.value.slice(b + 1);
|
|
4194
|
+
if (T.length > 0) {
|
|
4195
|
+
if (await p(T)) return;
|
|
4196
|
+
d(T);
|
|
3566
4197
|
}
|
|
3567
4198
|
const O = {
|
|
3568
4199
|
id: ae(),
|
|
3569
|
-
name:
|
|
3570
|
-
url:
|
|
3571
|
-
param:
|
|
3572
|
-
query:
|
|
3573
|
-
options:
|
|
4200
|
+
name: u.name,
|
|
4201
|
+
url: U(u.name),
|
|
4202
|
+
param: u.param,
|
|
4203
|
+
query: u.query,
|
|
4204
|
+
options: u.options,
|
|
3574
4205
|
parentId: f.parentId,
|
|
3575
4206
|
visible: !0
|
|
3576
4207
|
};
|
|
3577
4208
|
d([f]);
|
|
3578
|
-
const
|
|
3579
|
-
t.value =
|
|
4209
|
+
const z = [...t.value.slice(0, b), O, ...t.value.slice(b + 1)];
|
|
4210
|
+
t.value = z, u.onOpen && r.set(O.id, u.onOpen), u.onClose && a.set(O.id, u.onClose), u.onOpen?.();
|
|
3580
4211
|
}
|
|
3581
|
-
async function R(
|
|
4212
|
+
async function R(u) {
|
|
3582
4213
|
const f = c.value;
|
|
3583
4214
|
if (!f)
|
|
3584
4215
|
throw new Error("[BladeStack] No active blade to cover");
|
|
3585
|
-
if (!
|
|
3586
|
-
throw new Error(`[BladeStack] Blade '${
|
|
3587
|
-
const b = t.value.findIndex((
|
|
4216
|
+
if (!i.getBlade(u.name))
|
|
4217
|
+
throw new Error(`[BladeStack] Blade '${u.name}' not found in registry`);
|
|
4218
|
+
const b = t.value.findIndex((V) => V.id === f.id);
|
|
3588
4219
|
if (b === -1)
|
|
3589
4220
|
throw new Error(`[BladeStack] Active blade '${f.id}' not found in stack`);
|
|
3590
|
-
const
|
|
3591
|
-
if (
|
|
3592
|
-
if (await p(
|
|
3593
|
-
d(
|
|
4221
|
+
const T = t.value.slice(b + 1);
|
|
4222
|
+
if (T.length > 0) {
|
|
4223
|
+
if (await p(T)) return;
|
|
4224
|
+
d(T);
|
|
3594
4225
|
}
|
|
3595
4226
|
const O = {
|
|
3596
4227
|
id: ae(),
|
|
3597
|
-
name:
|
|
3598
|
-
url:
|
|
3599
|
-
param:
|
|
3600
|
-
query:
|
|
3601
|
-
options:
|
|
4228
|
+
name: u.name,
|
|
4229
|
+
url: U(u.name),
|
|
4230
|
+
param: u.param,
|
|
4231
|
+
query: u.query,
|
|
4232
|
+
options: u.options,
|
|
3602
4233
|
parentId: f.id,
|
|
3603
4234
|
visible: !0
|
|
3604
|
-
},
|
|
3605
|
-
|
|
4235
|
+
}, z = t.value.slice(0, b);
|
|
4236
|
+
z.push({ ...f, visible: !1 }), z.push(O), t.value = z, u.onOpen && r.set(O.id, u.onOpen), u.onClose && a.set(O.id, u.onClose), u.onOpen?.();
|
|
3606
4237
|
}
|
|
3607
|
-
async function g(
|
|
3608
|
-
const f = t.value.findIndex((O) => O.id ===
|
|
4238
|
+
async function g(u) {
|
|
4239
|
+
const f = t.value.findIndex((O) => O.id === u);
|
|
3609
4240
|
if (f === -1) return;
|
|
3610
4241
|
const b = t.value.slice(f + 1);
|
|
3611
4242
|
b.length === 0 || await p(b) || (d(b), t.value = t.value.slice(0, f + 1));
|
|
3612
4243
|
}
|
|
3613
|
-
function
|
|
3614
|
-
n.set(
|
|
4244
|
+
function _(u, f) {
|
|
4245
|
+
n.set(u, f);
|
|
3615
4246
|
}
|
|
3616
|
-
function E(
|
|
3617
|
-
n.delete(
|
|
4247
|
+
function E(u) {
|
|
4248
|
+
n.delete(u);
|
|
3618
4249
|
}
|
|
3619
|
-
function
|
|
3620
|
-
const b = t.value.findIndex((O) => O.id ===
|
|
4250
|
+
function S(u, f) {
|
|
4251
|
+
const b = t.value.findIndex((O) => O.id === u);
|
|
3621
4252
|
if (b === -1) return;
|
|
3622
|
-
const
|
|
3623
|
-
|
|
4253
|
+
const T = [...t.value];
|
|
4254
|
+
T[b] = { ...T[b], error: f }, t.value = T;
|
|
3624
4255
|
}
|
|
3625
|
-
function P(
|
|
3626
|
-
const f = t.value.findIndex((
|
|
4256
|
+
function P(u) {
|
|
4257
|
+
const f = t.value.findIndex((T) => T.id === u);
|
|
3627
4258
|
if (f === -1) return;
|
|
3628
4259
|
const b = [...t.value];
|
|
3629
4260
|
b[f] = { ...b[f], error: void 0 }, t.value = b;
|
|
3630
4261
|
}
|
|
3631
|
-
function
|
|
3632
|
-
const b = t.value.findIndex((O) => O.id ===
|
|
4262
|
+
function M(u, f) {
|
|
4263
|
+
const b = t.value.findIndex((O) => O.id === u);
|
|
3633
4264
|
if (b === -1 || t.value[b].title === f) return;
|
|
3634
|
-
const
|
|
3635
|
-
|
|
4265
|
+
const T = [...t.value];
|
|
4266
|
+
T[b] = { ...T[b], title: f }, t.value = T;
|
|
3636
4267
|
}
|
|
3637
|
-
function
|
|
4268
|
+
function X(u) {
|
|
3638
4269
|
for (const f of t.value)
|
|
3639
4270
|
m(f.id);
|
|
3640
|
-
t.value =
|
|
4271
|
+
t.value = u;
|
|
3641
4272
|
}
|
|
3642
4273
|
return {
|
|
3643
4274
|
workspace: o,
|
|
3644
|
-
blades:
|
|
4275
|
+
blades: l,
|
|
3645
4276
|
activeBlade: c,
|
|
3646
4277
|
openWorkspace: v,
|
|
3647
|
-
openBlade:
|
|
4278
|
+
openBlade: C,
|
|
3648
4279
|
closeBlade: I,
|
|
3649
4280
|
closeChildren: g,
|
|
3650
4281
|
replaceCurrentBlade: x,
|
|
3651
4282
|
coverCurrentBlade: R,
|
|
3652
|
-
registerBeforeClose:
|
|
4283
|
+
registerBeforeClose: _,
|
|
3653
4284
|
unregisterBeforeClose: E,
|
|
3654
|
-
setBladeError:
|
|
4285
|
+
setBladeError: S,
|
|
3655
4286
|
clearBladeError: P,
|
|
3656
|
-
setBladeTitle:
|
|
3657
|
-
_restoreStack:
|
|
4287
|
+
setBladeTitle: M,
|
|
4288
|
+
_restoreStack: X
|
|
3658
4289
|
};
|
|
3659
4290
|
}
|
|
3660
|
-
function
|
|
3661
|
-
const
|
|
3662
|
-
if (!
|
|
4291
|
+
function It() {
|
|
4292
|
+
const i = J(Oe);
|
|
4293
|
+
if (!i)
|
|
3663
4294
|
throw new Error("[useBladeStack] BladeStack not found. Ensure BladeNavigationPlugin is installed.");
|
|
3664
|
-
return
|
|
4295
|
+
return i;
|
|
3665
4296
|
}
|
|
3666
|
-
const q =
|
|
3667
|
-
function
|
|
3668
|
-
const e = J(
|
|
4297
|
+
const q = B("use-ai-agent");
|
|
4298
|
+
function hn(i) {
|
|
4299
|
+
const e = J(pt), { user: t, getAccessToken: n } = ut(), { openBlade: r } = Pt(), { blades: a, activeBlade: o, replaceCurrentBlade: l } = It(), c = i?.isEmbedded, m = Tt({
|
|
3669
4300
|
userGetter: () => {
|
|
3670
4301
|
if (t.value)
|
|
3671
4302
|
return {
|
|
@@ -3690,13 +4321,13 @@ function vn(s) {
|
|
|
3690
4321
|
navigateToBlade: (p, d, v) => {
|
|
3691
4322
|
r({ name: p, param: d, options: v }).then(() => {
|
|
3692
4323
|
q.debug(`Navigated to blade: ${p}`);
|
|
3693
|
-
}).catch((
|
|
3694
|
-
q.warn(`Blade not found or cannot be opened: ${p}`,
|
|
4324
|
+
}).catch((C) => {
|
|
4325
|
+
q.warn(`Blade not found or cannot be opened: ${p}`, C);
|
|
3695
4326
|
});
|
|
3696
4327
|
},
|
|
3697
4328
|
reloadBlade: () => {
|
|
3698
4329
|
const p = o.value;
|
|
3699
|
-
p &&
|
|
4330
|
+
p && l({
|
|
3700
4331
|
name: p.name,
|
|
3701
4332
|
param: p.param,
|
|
3702
4333
|
query: p.query,
|
|
@@ -3707,16 +4338,16 @@ function vn(s) {
|
|
|
3707
4338
|
q.warn("Failed to reload current blade", d);
|
|
3708
4339
|
});
|
|
3709
4340
|
},
|
|
3710
|
-
initialConfig:
|
|
4341
|
+
initialConfig: i?.config,
|
|
3711
4342
|
isEmbedded: c
|
|
3712
4343
|
});
|
|
3713
|
-
if (
|
|
3714
|
-
const p = J(
|
|
4344
|
+
if (Se(ve, m), q.debug("AiAgentService provided"), i?.addGlobalToolbarButton ?? !0) {
|
|
4345
|
+
const p = J(mt, null);
|
|
3715
4346
|
p ? (p.registerToolbarItem(
|
|
3716
4347
|
{
|
|
3717
|
-
id:
|
|
3718
|
-
icon:
|
|
3719
|
-
title:
|
|
4348
|
+
id: bt,
|
|
4349
|
+
icon: xt,
|
|
4350
|
+
title: Et,
|
|
3720
4351
|
clickHandler: () => {
|
|
3721
4352
|
m.togglePanel();
|
|
3722
4353
|
}
|
|
@@ -3727,48 +4358,48 @@ function vn(s) {
|
|
|
3727
4358
|
}
|
|
3728
4359
|
return m;
|
|
3729
4360
|
}
|
|
3730
|
-
function
|
|
3731
|
-
const
|
|
3732
|
-
if (!
|
|
4361
|
+
function dn() {
|
|
4362
|
+
const i = J(ve);
|
|
4363
|
+
if (!i) {
|
|
3733
4364
|
q.error("AiAgentService not found. Did you forget to call provideAiAgentService()?");
|
|
3734
4365
|
return;
|
|
3735
4366
|
}
|
|
3736
4367
|
return {
|
|
3737
4368
|
// State
|
|
3738
|
-
panelState:
|
|
3739
|
-
config:
|
|
3740
|
-
context:
|
|
3741
|
-
isOpen:
|
|
3742
|
-
isExpanded:
|
|
3743
|
-
totalItemsCount:
|
|
4369
|
+
panelState: i.panelState,
|
|
4370
|
+
config: i.config,
|
|
4371
|
+
context: i.context,
|
|
4372
|
+
isOpen: i.isOpen,
|
|
4373
|
+
isExpanded: i.isExpanded,
|
|
4374
|
+
totalItemsCount: i.totalItemsCount,
|
|
3744
4375
|
// Panel control
|
|
3745
|
-
openPanel:
|
|
3746
|
-
closePanel:
|
|
3747
|
-
togglePanel:
|
|
3748
|
-
expandPanel:
|
|
3749
|
-
collapsePanel:
|
|
4376
|
+
openPanel: i.openPanel,
|
|
4377
|
+
closePanel: i.closePanel,
|
|
4378
|
+
togglePanel: i.togglePanel,
|
|
4379
|
+
expandPanel: i.expandPanel,
|
|
4380
|
+
collapsePanel: i.collapsePanel,
|
|
3750
4381
|
// Configuration
|
|
3751
|
-
setConfig:
|
|
4382
|
+
setConfig: i.setConfig,
|
|
3752
4383
|
// Communication
|
|
3753
|
-
sendMessage:
|
|
3754
|
-
onMessage:
|
|
4384
|
+
sendMessage: i.sendMessage,
|
|
4385
|
+
onMessage: i.onMessage
|
|
3755
4386
|
};
|
|
3756
4387
|
}
|
|
3757
|
-
function
|
|
4388
|
+
function fn(i) {
|
|
3758
4389
|
return {
|
|
3759
4390
|
id: "ai-agent-toggle",
|
|
3760
|
-
icon:
|
|
3761
|
-
title:
|
|
4391
|
+
icon: i?.icon ?? "lucide-sparkles",
|
|
4392
|
+
title: i?.title ?? "AI Assistant",
|
|
3762
4393
|
clickHandler: () => {
|
|
3763
4394
|
console.warn("[ai-agent] createAiAgentToolbarButton is deprecated. Use useAiAgent().togglePanel instead.");
|
|
3764
4395
|
}
|
|
3765
4396
|
};
|
|
3766
4397
|
}
|
|
3767
|
-
const
|
|
4398
|
+
const Rt = ["width", "height"], jt = ["clip-path"], $t = {
|
|
3768
4399
|
key: 1,
|
|
3769
4400
|
d: "M72.9199 46.4165C73.2527 46.9495 73.5831 47.4996 73.9092 48.0679C78.4022 55.8976 79.0605 66.3551 76.7793 76.6079C74.5635 86.5668 69.6096 96.1504 62.9795 102.692L58.1514 105.48C52.5725 108.701 45.699 108.701 40.1201 105.48L21.665 94.8247C29.1398 95.4723 37.0781 94.4072 44.3848 91.9233C54.5984 88.4512 63.7463 82.1497 68.6807 73.6548C75.124 62.5619 75.4351 53.2694 72.9199 46.4165ZM56.5205 29.5093C65.5697 29.5331 75.1259 33.9964 83.0215 40.8853C89.9848 46.9608 95.5441 54.8286 98.2715 62.9478V71.9058C98.2715 78.3478 94.8348 84.301 89.2559 87.522L69.4658 98.9468C74.0688 92.6731 77.4601 84.9996 79.207 77.1479C81.5723 66.517 80.9666 55.3703 76.0654 46.8296C69.6817 35.7054 61.7917 30.789 54.6006 29.5396C55.2271 29.5179 55.867 29.5076 56.5205 29.5093ZM0 50.688C3.16812 57.476 8.04614 63.7935 13.8389 68.853C21.9305 75.9204 31.9368 80.6465 41.7578 80.6724C54.5833 80.706 62.7851 76.3308 67.4629 70.728C67.1684 71.2812 66.8584 71.8408 66.5303 72.4058C61.9844 80.2318 53.417 86.2251 43.584 89.5679C34.4355 92.6779 24.3375 93.4401 15.6328 91.3423L9.01562 87.522C3.43667 84.301 0 78.3478 0 71.9058V50.688ZM26.7559 10.1313C22.5672 16.2131 19.6599 23.483 18.2695 30.9126C16.3077 41.3962 17.3358 52.3558 22.2188 60.8647C28.6034 71.9905 36.4946 76.9061 43.6865 78.1548C43.0594 78.1765 42.4188 78.1868 41.7646 78.1851C32.7113 78.1612 23.2602 73.7801 15.4746 66.98C8.2197 60.6434 2.52684 52.3035 0 43.7075V35.9897C6.33247e-05 29.5479 3.43687 23.5955 9.01562 20.3745L26.7559 10.1313ZM51.2432 31.6978C54.0287 31.7659 57.0796 32.4389 60.1875 33.9976C58.8529 33.7029 57.5584 33.677 56.3965 33.9722L57.0088 36.3833C58.4774 36.0102 60.6741 36.4134 63.0332 37.8237C65.3553 39.212 67.6865 41.4953 69.375 44.5923C70.7081 47.0376 71.6489 50.015 71.8535 53.4839C71.4414 52.1828 70.818 51.0505 69.9824 50.1929L68.2012 51.9282C69.2585 53.0135 70.0076 55.1176 69.9658 57.8657C69.9246 60.5708 69.1121 63.731 67.2744 66.7417C65.8225 69.1203 63.7129 71.4251 60.8086 73.3374C61.7311 72.329 62.4012 71.2217 62.7266 70.0679L60.333 69.3931C59.9218 70.8514 58.4742 72.5523 56.0732 73.8901C53.71 75.207 50.5672 76.0837 47.041 75.9976C44.2551 75.9294 41.204 75.2549 38.0957 73.6958C39.4307 73.9907 40.7254 74.0184 41.8877 73.7231L41.2754 71.312C39.8069 71.6851 37.6101 71.2818 35.251 69.8716C32.9289 68.4834 30.5977 66.2 28.9092 63.103C27.5754 60.6565 26.6337 57.6775 26.4297 54.2065C26.8418 55.5096 27.4661 56.6438 28.3027 57.5024L30.084 55.7661C29.0267 54.6807 28.2775 52.5767 28.3193 49.8286C28.3606 47.1236 29.173 43.9633 31.0107 40.9526C32.4621 38.5751 34.5702 36.2706 37.4727 34.3589C36.5514 35.3666 35.8827 36.4736 35.5576 37.6265L37.9512 38.3013C38.3625 36.8429 39.8101 35.142 42.2109 33.8042C44.5742 32.4874 47.717 31.6116 51.2432 31.6978ZM40.1201 2.4165C45.6991 -0.804509 52.5724 -0.804509 58.1514 2.4165L75.6777 12.5356C68.4683 12.0708 60.8765 13.1991 53.8691 15.6333C43.6671 19.1774 34.5353 25.5492 29.6035 34.0396C23.1612 45.1305 22.8486 54.4223 25.3623 61.2749C25.0301 60.7429 24.7004 60.1936 24.375 59.6265C19.8639 51.765 18.8286 41.4457 20.7139 31.3706C22.4486 22.1007 26.633 13.1734 32.6709 6.71631L40.1201 2.4165ZM54.6855 17.9829C63.3703 14.966 72.9092 14.0715 81.3008 15.7817L89.2559 20.3745C94.8346 23.5955 98.2714 29.5479 98.2715 35.9897V56.4692C95.0606 49.9731 90.2759 43.9144 84.6562 39.0112C76.4636 31.8632 66.3524 27.0488 56.5273 27.0229C43.6978 26.9893 35.4935 31.3659 30.8164 36.9712C31.1117 36.4161 31.4247 35.8554 31.7539 35.2886C36.3024 27.4582 44.8633 21.395 54.6855 17.9829Z",
|
|
3770
4401
|
fill: "url(#virto-oz-gradient-animated)"
|
|
3771
|
-
},
|
|
4402
|
+
}, Nt = ["id"], Bt = {
|
|
3772
4403
|
key: 1,
|
|
3773
4404
|
id: "virto-oz-gradient-animated",
|
|
3774
4405
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -3776,18 +4407,18 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3776
4407
|
y1: "0",
|
|
3777
4408
|
x2: "99",
|
|
3778
4409
|
y2: "108"
|
|
3779
|
-
}, $e = /* @__PURE__ */
|
|
4410
|
+
}, $e = /* @__PURE__ */ L({
|
|
3780
4411
|
__name: "VcVirtoOzLogo",
|
|
3781
4412
|
props: {
|
|
3782
4413
|
width: { default: 22 },
|
|
3783
4414
|
height: { default: 24 },
|
|
3784
4415
|
animated: { type: Boolean, default: !1 }
|
|
3785
4416
|
},
|
|
3786
|
-
setup(
|
|
4417
|
+
setup(i) {
|
|
3787
4418
|
const e = h(() => `virto-oz-clip-${Math.random().toString(36).substring(2, 11)}`);
|
|
3788
4419
|
return (t, n) => (w(), N("svg", {
|
|
3789
|
-
width:
|
|
3790
|
-
height:
|
|
4420
|
+
width: i.width,
|
|
4421
|
+
height: i.height,
|
|
3791
4422
|
viewBox: "0 0 99 108",
|
|
3792
4423
|
fill: "none",
|
|
3793
4424
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3797,7 +4428,7 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3797
4428
|
d: "M40.1199 2.41576C45.6989 -0.805254 52.5724 -0.805253 58.1514 2.41576L89.2556 20.3738C94.8345 23.5948 98.2713 29.5475 98.2713 35.9895V71.9055C98.2713 78.3475 94.8345 84.3002 89.2556 87.5212L58.1514 105.479C52.5724 108.7 45.6989 108.7 40.1199 105.479L9.01574 87.5212C3.43678 84.3002 0 78.3475 0 71.9055V35.9895C0 29.5475 3.43678 23.5948 9.01574 20.3738L40.1199 2.41576Z",
|
|
3798
4429
|
fill: "white"
|
|
3799
4430
|
}, null, -1)),
|
|
3800
|
-
|
|
4431
|
+
i.animated ? (w(), N("path", $t)) : (w(), N("g", {
|
|
3801
4432
|
key: 0,
|
|
3802
4433
|
"clip-path": `url(#${e.value})`
|
|
3803
4434
|
}, [...n[0] || (n[0] = [
|
|
@@ -3822,7 +4453,7 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3822
4453
|
})
|
|
3823
4454
|
])
|
|
3824
4455
|
], -1)
|
|
3825
|
-
])], 8,
|
|
4456
|
+
])], 8, jt)),
|
|
3826
4457
|
n[4] || (n[4] = $("path", {
|
|
3827
4458
|
d: "M72.1266 54.0945C72.1266 60.0873 74.3028 71.0379 60.6238 82.8517C65.2871 73.0587 55.8339 77.1002 49.1209 77.1002C36.4152 77.1002 26.1152 66.8002 26.1152 54.0945C26.1152 41.3889 36.4152 31.0889 49.1209 31.0889C61.8266 31.0889 72.1266 41.3889 72.1266 54.0945Z",
|
|
3828
4459
|
fill: "white"
|
|
@@ -3849,19 +4480,19 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3849
4480
|
fill: "#6C6C6C"
|
|
3850
4481
|
}, null, -1)),
|
|
3851
4482
|
$("defs", null, [
|
|
3852
|
-
|
|
4483
|
+
i.animated ? Z("", !0) : (w(), N("clipPath", {
|
|
3853
4484
|
key: 0,
|
|
3854
4485
|
id: e.value
|
|
3855
4486
|
}, [...n[1] || (n[1] = [
|
|
3856
4487
|
$("path", { d: "M72.9199 46.4165C73.2527 46.9495 73.5831 47.4996 73.9092 48.0679C78.4022 55.8976 79.0605 66.3551 76.7793 76.6079C74.5635 86.5668 69.6096 96.1504 62.9795 102.692L58.1514 105.48C52.5725 108.701 45.699 108.701 40.1201 105.48L21.665 94.8247C29.1398 95.4723 37.0781 94.4072 44.3848 91.9233C54.5984 88.4512 63.7463 82.1497 68.6807 73.6548C75.124 62.5619 75.4351 53.2694 72.9199 46.4165ZM56.5205 29.5093C65.5697 29.5331 75.1259 33.9964 83.0215 40.8853C89.9848 46.9608 95.5441 54.8286 98.2715 62.9478V71.9058C98.2715 78.3478 94.8348 84.301 89.2559 87.522L69.4658 98.9468C74.0688 92.6731 77.4601 84.9996 79.207 77.1479C81.5723 66.517 80.9666 55.3703 76.0654 46.8296C69.6817 35.7054 61.7917 30.789 54.6006 29.5396C55.2271 29.5179 55.867 29.5076 56.5205 29.5093ZM0 50.688C3.16812 57.476 8.04614 63.7935 13.8389 68.853C21.9305 75.9204 31.9368 80.6465 41.7578 80.6724C54.5833 80.706 62.7851 76.3308 67.4629 70.728C67.1684 71.2812 66.8584 71.8408 66.5303 72.4058C61.9844 80.2318 53.417 86.2251 43.584 89.5679C34.4355 92.6779 24.3375 93.4401 15.6328 91.3423L9.01562 87.522C3.43667 84.301 0 78.3478 0 71.9058V50.688ZM26.7559 10.1313C22.5672 16.2131 19.6599 23.483 18.2695 30.9126C16.3077 41.3962 17.3358 52.3558 22.2188 60.8647C28.6034 71.9905 36.4946 76.9061 43.6865 78.1548C43.0594 78.1765 42.4188 78.1868 41.7646 78.1851C32.7113 78.1612 23.2602 73.7801 15.4746 66.98C8.2197 60.6434 2.52684 52.3035 0 43.7075V35.9897C6.33247e-05 29.5479 3.43687 23.5955 9.01562 20.3745L26.7559 10.1313ZM51.2432 31.6978C54.0287 31.7659 57.0796 32.4389 60.1875 33.9976C58.8529 33.7029 57.5584 33.677 56.3965 33.9722L57.0088 36.3833C58.4774 36.0102 60.6741 36.4134 63.0332 37.8237C65.3553 39.212 67.6865 41.4953 69.375 44.5923C70.7081 47.0376 71.6489 50.015 71.8535 53.4839C71.4414 52.1828 70.818 51.0505 69.9824 50.1929L68.2012 51.9282C69.2585 53.0135 70.0076 55.1176 69.9658 57.8657C69.9246 60.5708 69.1121 63.731 67.2744 66.7417C65.8225 69.1203 63.7129 71.4251 60.8086 73.3374C61.7311 72.329 62.4012 71.2217 62.7266 70.0679L60.333 69.3931C59.9218 70.8514 58.4742 72.5523 56.0732 73.8901C53.71 75.207 50.5672 76.0837 47.041 75.9976C44.2551 75.9294 41.204 75.2549 38.0957 73.6958C39.4307 73.9907 40.7254 74.0184 41.8877 73.7231L41.2754 71.312C39.8069 71.6851 37.6101 71.2818 35.251 69.8716C32.9289 68.4834 30.5977 66.2 28.9092 63.103C27.5754 60.6565 26.6337 57.6775 26.4297 54.2065C26.8418 55.5096 27.4661 56.6438 28.3027 57.5024L30.084 55.7661C29.0267 54.6807 28.2775 52.5767 28.3193 49.8286C28.3606 47.1236 29.173 43.9633 31.0107 40.9526C32.4621 38.5751 34.5702 36.2706 37.4727 34.3589C36.5514 35.3666 35.8827 36.4736 35.5576 37.6265L37.9512 38.3013C38.3625 36.8429 39.8101 35.142 42.2109 33.8042C44.5742 32.4874 47.717 31.6116 51.2432 31.6978ZM40.1201 2.4165C45.6991 -0.804509 52.5724 -0.804509 58.1514 2.4165L75.6777 12.5356C68.4683 12.0708 60.8765 13.1991 53.8691 15.6333C43.6671 19.1774 34.5353 25.5492 29.6035 34.0396C23.1612 45.1305 22.8486 54.4223 25.3623 61.2749C25.0301 60.7429 24.7004 60.1936 24.375 59.6265C19.8639 51.765 18.8286 41.4457 20.7139 31.3706C22.4486 22.1007 26.633 13.1734 32.6709 6.71631L40.1201 2.4165ZM54.6855 17.9829C63.3703 14.966 72.9092 14.0715 81.3008 15.7817L89.2559 20.3745C94.8346 23.5955 98.2714 29.5479 98.2715 35.9897V56.4692C95.0606 49.9731 90.2759 43.9144 84.6562 39.0112C76.4636 31.8632 66.3524 27.0488 56.5273 27.0229C43.6978 26.9893 35.4935 31.3659 30.8164 36.9712C31.1117 36.4161 31.4247 35.8554 31.7539 35.2886C36.3024 27.4582 44.8633 21.395 54.6855 17.9829Z" }, null, -1)
|
|
3857
|
-
])], 8,
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
])])) :
|
|
4488
|
+
])], 8, Nt)),
|
|
4489
|
+
i.animated ? (w(), N("linearGradient", Bt, [...n[2] || (n[2] = [
|
|
4490
|
+
Ge('<stop offset="0%" stop-color="#FF9533"><animate attributeName="stop-color" values="#FF9533;#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8;#FF9533" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="25%" stop-color="#FF4FBB"><animate attributeName="stop-color" values="#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8;#FF9533;#FF4FBB" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="50%" stop-color="#EAFF4F"><animate attributeName="stop-color" values="#EAFF4F;#1C91FC;#9A2DF8;#FF9533;#FF4FBB;#EAFF4F" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="75%" stop-color="#1C91FC"><animate attributeName="stop-color" values="#1C91FC;#9A2DF8;#FF9533;#FF4FBB;#EAFF4F;#1C91FC" dur="4s" repeatCount="indefinite"></animate></stop><stop offset="100%" stop-color="#9A2DF8"><animate attributeName="stop-color" values="#9A2DF8;#FF9533;#FF4FBB;#EAFF4F;#1C91FC;#9A2DF8" dur="4s" repeatCount="indefinite"></animate></stop>', 5)
|
|
4491
|
+
])])) : Z("", !0)
|
|
3861
4492
|
])
|
|
3862
|
-
], 8,
|
|
4493
|
+
], 8, Rt));
|
|
3863
4494
|
}
|
|
3864
|
-
}),
|
|
4495
|
+
}), zt = /* @__PURE__ */ L({
|
|
3865
4496
|
__name: "vc-material-icon",
|
|
3866
4497
|
props: {
|
|
3867
4498
|
icon: {},
|
|
@@ -3870,21 +4501,21 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3870
4501
|
variant: {},
|
|
3871
4502
|
customSize: {}
|
|
3872
4503
|
},
|
|
3873
|
-
setup(
|
|
3874
|
-
const e =
|
|
4504
|
+
setup(i) {
|
|
4505
|
+
const e = i, t = h(() => typeof e.customSize == "number" && e.customSize > 0), n = h(() => e.customSize ? { fontSize: `${e.customSize}px` } : void 0);
|
|
3875
4506
|
return le(() => {
|
|
3876
4507
|
}), (r, a) => (w(), N("span", {
|
|
3877
|
-
class:
|
|
4508
|
+
class: K([
|
|
3878
4509
|
"vc-material-icon",
|
|
3879
|
-
"material-symbols-" +
|
|
3880
|
-
!t.value && `vc-material-icon--${
|
|
3881
|
-
|
|
4510
|
+
"material-symbols-" + i.type,
|
|
4511
|
+
!t.value && `vc-material-icon--${i.size}`,
|
|
4512
|
+
i.variant ? `vc-material-icon--${i.variant}` : ""
|
|
3882
4513
|
]),
|
|
3883
|
-
style:
|
|
4514
|
+
style: Q(n.value),
|
|
3884
4515
|
"aria-hidden": "true"
|
|
3885
|
-
}, pe(
|
|
4516
|
+
}, pe(i.icon), 7));
|
|
3886
4517
|
}
|
|
3887
|
-
}),
|
|
4518
|
+
}), kt = /* @__PURE__ */ L({
|
|
3888
4519
|
__name: "vc-bootstrap-icon",
|
|
3889
4520
|
props: {
|
|
3890
4521
|
icon: {},
|
|
@@ -3892,23 +4523,23 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3892
4523
|
variant: {},
|
|
3893
4524
|
customSize: {}
|
|
3894
4525
|
},
|
|
3895
|
-
setup(
|
|
3896
|
-
const e =
|
|
4526
|
+
setup(i) {
|
|
4527
|
+
const e = i, t = h(() => typeof e.customSize == "number" && e.customSize > 0), n = h(() => e.customSize ? { fontSize: `${e.customSize}px` } : void 0);
|
|
3897
4528
|
le(() => {
|
|
3898
4529
|
});
|
|
3899
4530
|
const r = h(() => e.icon ? `bi-${e.icon.startsWith("bi-") ? e.icon.substring(3) : e.icon}` : "");
|
|
3900
4531
|
return (a, o) => (w(), N("i", {
|
|
3901
|
-
class:
|
|
4532
|
+
class: K([
|
|
3902
4533
|
"vc-bootstrap-icon",
|
|
3903
|
-
!t.value && `vc-bootstrap-icon--${
|
|
4534
|
+
!t.value && `vc-bootstrap-icon--${i.size}`,
|
|
3904
4535
|
r.value,
|
|
3905
|
-
|
|
4536
|
+
i.variant ? `vc-bootstrap-icon--${i.variant}` : ""
|
|
3906
4537
|
]),
|
|
3907
|
-
style:
|
|
4538
|
+
style: Q(n.value),
|
|
3908
4539
|
"aria-hidden": "true"
|
|
3909
4540
|
}, null, 6));
|
|
3910
4541
|
}
|
|
3911
|
-
}),
|
|
4542
|
+
}), Gt = /* @__PURE__ */ L({
|
|
3912
4543
|
__name: "vc-lucide-icon",
|
|
3913
4544
|
props: {
|
|
3914
4545
|
icon: {},
|
|
@@ -3917,36 +4548,36 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3917
4548
|
strokeWidth: { default: 2 },
|
|
3918
4549
|
customSize: {}
|
|
3919
4550
|
},
|
|
3920
|
-
setup(
|
|
3921
|
-
const e =
|
|
4551
|
+
setup(i) {
|
|
4552
|
+
const e = B("vc-lucide-icon"), t = i, n = h(() => typeof t.customSize == "number" && t.customSize > 0), r = h(() => {
|
|
3922
4553
|
if (!t.icon) return "HelpCircleIcon";
|
|
3923
|
-
let
|
|
3924
|
-
return
|
|
4554
|
+
let l = t.icon;
|
|
4555
|
+
return l.startsWith("lucide-") && (l = l.substring(7)), l.toLowerCase().endsWith("icon") && (l = l.slice(0, -4)), l.includes("-") && (l = l.split("-").map((c) => c.charAt(0).toUpperCase() + c.slice(1)).join("")), l.charAt(0).toUpperCase() + l.slice(1) + "Icon";
|
|
3925
4556
|
}), a = h(() => {
|
|
3926
|
-
const
|
|
3927
|
-
return !c || typeof c != "object" && typeof c != "function" ? (e.warn(`Lucide icon not found: ${
|
|
4557
|
+
const l = r.value, c = Le[l];
|
|
4558
|
+
return !c || typeof c != "object" && typeof c != "function" ? (e.warn(`Lucide icon not found: ${l}`), null) : we(c);
|
|
3928
4559
|
}), o = h(() => n.value && t.customSize ? {
|
|
3929
4560
|
width: `${t.customSize}px`,
|
|
3930
4561
|
height: `${t.customSize}px`
|
|
3931
4562
|
} : {});
|
|
3932
|
-
return (
|
|
4563
|
+
return (l, c) => a.value ? (w(), Y(fe(a.value), {
|
|
3933
4564
|
key: 0,
|
|
3934
4565
|
"stroke-width": t.strokeWidth,
|
|
3935
|
-
class:
|
|
4566
|
+
class: K([
|
|
3936
4567
|
"vc-lucide-icon",
|
|
3937
|
-
!n.value && `vc-lucide-icon--${
|
|
3938
|
-
|
|
4568
|
+
!n.value && `vc-lucide-icon--${i.size}`,
|
|
4569
|
+
i.variant ? `vc-lucide-icon--${i.variant}` : ""
|
|
3939
4570
|
]),
|
|
3940
|
-
style:
|
|
4571
|
+
style: Q(o.value),
|
|
3941
4572
|
"aria-hidden": "true"
|
|
3942
4573
|
}, null, 8, ["stroke-width", "class", "style"])) : (w(), N("span", {
|
|
3943
4574
|
key: 1,
|
|
3944
|
-
class:
|
|
4575
|
+
class: K(["vc-lucide-icon", !n.value && `vc-lucide-icon--${i.size}`])
|
|
3945
4576
|
}, [...c[0] || (c[0] = [
|
|
3946
4577
|
$("i", { class: "vc-lucide-icon__fallback" }, null, -1)
|
|
3947
4578
|
])], 2));
|
|
3948
4579
|
}
|
|
3949
|
-
}),
|
|
4580
|
+
}), Ft = /* @__PURE__ */ L({
|
|
3950
4581
|
__name: "vc-fontawesome-icon",
|
|
3951
4582
|
props: {
|
|
3952
4583
|
icon: {},
|
|
@@ -3954,23 +4585,23 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3954
4585
|
variant: {},
|
|
3955
4586
|
customSize: {}
|
|
3956
4587
|
},
|
|
3957
|
-
setup(
|
|
3958
|
-
const e =
|
|
4588
|
+
setup(i) {
|
|
4589
|
+
const e = i, t = h(() => typeof e.customSize == "number" && e.customSize > 0), n = h(() => e.customSize ? { fontSize: `${e.customSize}px` } : void 0);
|
|
3959
4590
|
le(() => {
|
|
3960
4591
|
});
|
|
3961
4592
|
const r = h(() => e.icon.startsWith("fas ") || e.icon.startsWith("far ") || e.icon.startsWith("fal ") || e.icon.startsWith("fab ") || e.icon.startsWith("fad ") ? e.icon : e.icon.startsWith("fa-") ? `fas ${e.icon}` : e.icon.includes("fa-") ? e.icon : `fas fa-${e.icon}`);
|
|
3962
4593
|
return (a, o) => (w(), N("i", {
|
|
3963
|
-
class:
|
|
4594
|
+
class: K([
|
|
3964
4595
|
"vc-fa-icon",
|
|
3965
|
-
!t.value && `vc-fa-icon--${
|
|
4596
|
+
!t.value && `vc-fa-icon--${i.size}`,
|
|
3966
4597
|
r.value,
|
|
3967
|
-
|
|
4598
|
+
i.variant ? `vc-fa-icon--${i.variant}` : ""
|
|
3968
4599
|
]),
|
|
3969
|
-
style:
|
|
4600
|
+
style: Q(n.value),
|
|
3970
4601
|
"aria-hidden": "true"
|
|
3971
4602
|
}, null, 6));
|
|
3972
4603
|
}
|
|
3973
|
-
}),
|
|
4604
|
+
}), Dt = ["xlink:href"], Mt = /* @__PURE__ */ L({
|
|
3974
4605
|
inheritAttrs: !1,
|
|
3975
4606
|
__name: "vc-svg-icon",
|
|
3976
4607
|
props: {
|
|
@@ -3981,14 +4612,14 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3981
4612
|
customSize: {},
|
|
3982
4613
|
strokeWidth: {}
|
|
3983
4614
|
},
|
|
3984
|
-
setup(
|
|
3985
|
-
const e =
|
|
4615
|
+
setup(i) {
|
|
4616
|
+
const e = i, t = h(() => typeof e.customSize == "number" && e.customSize > 0), n = h(() => {
|
|
3986
4617
|
if (e.icon.startsWith("/") || e.icon.includes("://") || e.icon.startsWith("#"))
|
|
3987
4618
|
return e.icon;
|
|
3988
4619
|
const a = e.icon.indexOf("#");
|
|
3989
4620
|
if (a > -1) {
|
|
3990
|
-
const o = e.icon.substring(0, a),
|
|
3991
|
-
return `${e.basePath}/${o}${
|
|
4621
|
+
const o = e.icon.substring(0, a), l = e.icon.substring(a);
|
|
4622
|
+
return `${e.basePath}/${o}${l}`;
|
|
3992
4623
|
}
|
|
3993
4624
|
return `${e.basePath}/${e.icon}`;
|
|
3994
4625
|
}), r = h(() => {
|
|
@@ -3997,16 +4628,16 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
3997
4628
|
});
|
|
3998
4629
|
return (a, o) => (w(), N("svg", se({
|
|
3999
4630
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4000
|
-
class: ["vc-svg-icon", !t.value && `vc-svg-icon--${
|
|
4631
|
+
class: ["vc-svg-icon", !t.value && `vc-svg-icon--${i.size}`, i.variant ? `vc-svg-icon--${i.variant}` : ""],
|
|
4001
4632
|
style: r.value
|
|
4002
4633
|
}, a.$attrs), [
|
|
4003
4634
|
n.value ? (w(), N("use", {
|
|
4004
4635
|
key: 0,
|
|
4005
4636
|
"xlink:href": n.value
|
|
4006
|
-
}, null, 8,
|
|
4637
|
+
}, null, 8, Dt)) : Z("", !0)
|
|
4007
4638
|
], 16));
|
|
4008
4639
|
}
|
|
4009
|
-
}),
|
|
4640
|
+
}), Lt = ["aria-hidden", "aria-label", "role"], oe = /* @__PURE__ */ L({
|
|
4010
4641
|
__name: "vc-icon",
|
|
4011
4642
|
props: {
|
|
4012
4643
|
icon: { default: "lucide-square" },
|
|
@@ -4017,8 +4648,8 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4017
4648
|
basePath: { default: "/assets/icons" },
|
|
4018
4649
|
ariaLabel: {}
|
|
4019
4650
|
},
|
|
4020
|
-
setup(
|
|
4021
|
-
const e =
|
|
4651
|
+
setup(i) {
|
|
4652
|
+
const e = i;
|
|
4022
4653
|
le(() => {
|
|
4023
4654
|
});
|
|
4024
4655
|
const t = {
|
|
@@ -4039,12 +4670,12 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4039
4670
|
return g.endsWith("Icon") ? g : `${g}Icon`;
|
|
4040
4671
|
}
|
|
4041
4672
|
return e.icon;
|
|
4042
|
-
}), a = h(() => n.value === "material"), o = h(() => n.value === "bootstrap"),
|
|
4673
|
+
}), a = h(() => n.value === "material"), o = h(() => n.value === "bootstrap"), l = h(() => n.value === "lucide"), c = h(() => n.value === "fontawesome"), m = h(() => {
|
|
4043
4674
|
if (typeof e.icon != "string")
|
|
4044
4675
|
return !0;
|
|
4045
4676
|
if (["fontawesome", "bootstrap"].includes(n.value) || n.value === "material" && e.icon.startsWith("material-") || n.value === "lucide" && e.icon.startsWith("lucide-"))
|
|
4046
4677
|
return !1;
|
|
4047
|
-
if (
|
|
4678
|
+
if (l.value)
|
|
4048
4679
|
try {
|
|
4049
4680
|
const g = typeof r.value == "string" ? r.value : String(r.value);
|
|
4050
4681
|
return ce(g) !== g;
|
|
@@ -4056,21 +4687,21 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4056
4687
|
} catch {
|
|
4057
4688
|
return !1;
|
|
4058
4689
|
}
|
|
4059
|
-
}),
|
|
4690
|
+
}), U = h(() => {
|
|
4060
4691
|
if (typeof e.icon != "string")
|
|
4061
4692
|
return we(e.icon);
|
|
4062
4693
|
if (["fontawesome", "bootstrap", "material"].includes(n.value))
|
|
4063
4694
|
return "i";
|
|
4064
4695
|
try {
|
|
4065
|
-
const g = typeof r.value == "string" ? r.value : String(r.value),
|
|
4066
|
-
return
|
|
4696
|
+
const g = typeof r.value == "string" ? r.value : String(r.value), _ = ce(g);
|
|
4697
|
+
return _ !== g ? _ : "i";
|
|
4067
4698
|
} catch {
|
|
4068
4699
|
return "i";
|
|
4069
4700
|
}
|
|
4070
|
-
}), p = h(() => a.value ?
|
|
4701
|
+
}), p = h(() => a.value ? zt : o.value ? kt : l.value ? Gt : c.value ? Ft : x.value ? Mt : m.value ? U.value : "i"), d = h(() => e.customSize ? e.customSize : t[e.size]), v = h(() => {
|
|
4071
4702
|
const g = {};
|
|
4072
4703
|
return m.value && e.customSize && (g.width = `${e.customSize}px`, g.height = `${e.customSize}px`), g;
|
|
4073
|
-
}),
|
|
4704
|
+
}), C = h(() => e.customSize ? {
|
|
4074
4705
|
fontSize: `${e.customSize}px`
|
|
4075
4706
|
} : {}), I = h(() => a.value ? {
|
|
4076
4707
|
icon: typeof r.value == "string" ? r.value.replace(/-outlined$|-rounded$|-sharp$/, "") : r.value,
|
|
@@ -4088,7 +4719,7 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4088
4719
|
variant: e.variant,
|
|
4089
4720
|
customSize: e.customSize
|
|
4090
4721
|
// Set custom size without scaling
|
|
4091
|
-
} :
|
|
4722
|
+
} : l.value ? {
|
|
4092
4723
|
icon: typeof r.value == "string" ? r.value : String(r.value),
|
|
4093
4724
|
size: e.size,
|
|
4094
4725
|
variant: e.variant,
|
|
@@ -4113,38 +4744,38 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4113
4744
|
height: d.value,
|
|
4114
4745
|
color: e.variant ? `var(--icon-color-${e.variant})` : "currentColor"
|
|
4115
4746
|
} : {}), x = h(() => n.value === "svg"), R = h(() => !x.value || typeof e.icon != "string" ? "" : e.icon.startsWith("svg:") ? e.icon.substring(4) : e.icon);
|
|
4116
|
-
return (g,
|
|
4747
|
+
return (g, _) => i.useContainer ? (w(), N("div", se({
|
|
4117
4748
|
key: 0,
|
|
4118
|
-
class: ["vc-icon-container", `vc-icon-container--${
|
|
4119
|
-
style:
|
|
4120
|
-
"aria-hidden":
|
|
4121
|
-
"aria-label":
|
|
4122
|
-
role:
|
|
4749
|
+
class: ["vc-icon-container", `vc-icon-container--${i.size}`],
|
|
4750
|
+
style: C.value,
|
|
4751
|
+
"aria-hidden": i.ariaLabel ? void 0 : "true",
|
|
4752
|
+
"aria-label": i.ariaLabel || void 0,
|
|
4753
|
+
role: i.ariaLabel ? "img" : void 0
|
|
4123
4754
|
}, g.$attrs), [
|
|
4124
|
-
(w(),
|
|
4755
|
+
(w(), Y(fe(p.value), se({
|
|
4125
4756
|
class: [
|
|
4126
4757
|
"vc-icon",
|
|
4127
|
-
`vc-icon--${
|
|
4128
|
-
|
|
4129
|
-
!m.value && !a.value && !
|
|
4758
|
+
`vc-icon--${i.size}`,
|
|
4759
|
+
i.variant ? `vc-icon--${i.variant}` : "",
|
|
4760
|
+
!m.value && !a.value && !l.value && !o.value && !c.value ? i.icon.toLowerCase() : ""
|
|
4130
4761
|
],
|
|
4131
4762
|
style: v.value
|
|
4132
4763
|
}, I.value), null, 16, ["class", "style"]))
|
|
4133
|
-
], 16,
|
|
4764
|
+
], 16, Lt)) : (w(), Y(fe(p.value), se({
|
|
4134
4765
|
key: 1,
|
|
4135
4766
|
class: [
|
|
4136
4767
|
"vc-icon",
|
|
4137
|
-
`vc-icon--${
|
|
4138
|
-
|
|
4139
|
-
!m.value && !a.value && !
|
|
4768
|
+
`vc-icon--${i.size}`,
|
|
4769
|
+
i.variant ? `vc-icon--${i.variant}` : "",
|
|
4770
|
+
!m.value && !a.value && !l.value && !o.value && !c.value ? i.icon.toLowerCase() : ""
|
|
4140
4771
|
],
|
|
4141
4772
|
style: v.value,
|
|
4142
|
-
"aria-hidden":
|
|
4143
|
-
"aria-label":
|
|
4144
|
-
role:
|
|
4773
|
+
"aria-hidden": i.ariaLabel ? void 0 : "true",
|
|
4774
|
+
"aria-label": i.ariaLabel || void 0,
|
|
4775
|
+
role: i.ariaLabel ? "img" : void 0
|
|
4145
4776
|
}, { ...I.value, ...g.$attrs }), null, 16, ["class", "style", "aria-hidden", "aria-label", "role"]));
|
|
4146
4777
|
}
|
|
4147
|
-
}),
|
|
4778
|
+
}), Jt = { class: "vc-ai-agent-header" }, Wt = { class: "vc-ai-agent-header__icon" }, Vt = { class: "vc-ai-agent-header__wrapper" }, qt = { class: "vc-ai-agent-header__content" }, Kt = { class: "vc-ai-agent-header__title" }, Ht = { class: "vc-ai-agent-header__controls" }, Zt = /* @__PURE__ */ L({
|
|
4148
4779
|
__name: "VcAiAgentHeader",
|
|
4149
4780
|
props: {
|
|
4150
4781
|
title: {},
|
|
@@ -4152,9 +4783,9 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4152
4783
|
itemsCount: {}
|
|
4153
4784
|
},
|
|
4154
4785
|
emits: ["close", "expand", "collapse"],
|
|
4155
|
-
setup(
|
|
4156
|
-
return (e, t) => (w(), N("div",
|
|
4157
|
-
$("div",
|
|
4786
|
+
setup(i) {
|
|
4787
|
+
return (e, t) => (w(), N("div", Jt, [
|
|
4788
|
+
$("div", Wt, [
|
|
4158
4789
|
W($e, {
|
|
4159
4790
|
width: 22,
|
|
4160
4791
|
height: 24,
|
|
@@ -4162,12 +4793,12 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4162
4793
|
})
|
|
4163
4794
|
]),
|
|
4164
4795
|
$("div", Vt, [
|
|
4165
|
-
$("div",
|
|
4166
|
-
$("div",
|
|
4796
|
+
$("div", qt, [
|
|
4797
|
+
$("div", Kt, pe(i.title), 1)
|
|
4167
4798
|
])
|
|
4168
4799
|
]),
|
|
4169
|
-
$("div",
|
|
4170
|
-
|
|
4800
|
+
$("div", Ht, [
|
|
4801
|
+
i.isExpanded ? (w(), N("div", {
|
|
4171
4802
|
key: 0,
|
|
4172
4803
|
class: "vc-ai-agent-header__button",
|
|
4173
4804
|
title: "Collapse",
|
|
@@ -4192,74 +4823,74 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4192
4823
|
])
|
|
4193
4824
|
]));
|
|
4194
4825
|
}
|
|
4195
|
-
}),
|
|
4826
|
+
}), Xt = { class: "vc-ai-agent-loader" }, Yt = { class: "vc-ai-agent-loader__content" }, Qt = { class: "vc-ai-agent-loader__logo" }, er = {
|
|
4196
4827
|
key: 0,
|
|
4197
4828
|
class: "vc-ai-agent-loader__text"
|
|
4198
|
-
},
|
|
4829
|
+
}, tr = /* @__PURE__ */ L({
|
|
4199
4830
|
__name: "VcAiAgentLoader",
|
|
4200
4831
|
props: {
|
|
4201
4832
|
text: {}
|
|
4202
4833
|
},
|
|
4203
|
-
setup(
|
|
4204
|
-
return (e, t) => (w(), N("div",
|
|
4205
|
-
$("div",
|
|
4206
|
-
$("div",
|
|
4834
|
+
setup(i) {
|
|
4835
|
+
return (e, t) => (w(), N("div", Xt, [
|
|
4836
|
+
$("div", Yt, [
|
|
4837
|
+
$("div", Qt, [
|
|
4207
4838
|
W($e, {
|
|
4208
4839
|
width: 80,
|
|
4209
4840
|
height: 87,
|
|
4210
4841
|
animated: ""
|
|
4211
4842
|
})
|
|
4212
4843
|
]),
|
|
4213
|
-
|
|
4844
|
+
i.text ? (w(), N("p", er, pe(i.text), 1)) : Z("", !0)
|
|
4214
4845
|
])
|
|
4215
4846
|
]));
|
|
4216
4847
|
}
|
|
4217
|
-
}),
|
|
4848
|
+
}), rr = { class: "vc-ai-agent-iframe" }, nr = ["src"], ar = {
|
|
4218
4849
|
key: 1,
|
|
4219
4850
|
class: "vc-ai-agent-iframe__placeholder"
|
|
4220
|
-
},
|
|
4851
|
+
}, sr = /* @__PURE__ */ L({
|
|
4221
4852
|
__name: "VcAiAgentIframe",
|
|
4222
4853
|
props: {
|
|
4223
4854
|
url: {}
|
|
4224
4855
|
},
|
|
4225
4856
|
emits: ["iframe-ready"],
|
|
4226
|
-
setup(
|
|
4227
|
-
const t =
|
|
4228
|
-
|
|
4857
|
+
setup(i, { emit: e }) {
|
|
4858
|
+
const t = B("ai-agent-iframe"), n = i, r = e, a = D(null), o = D(!0);
|
|
4859
|
+
H(
|
|
4229
4860
|
a,
|
|
4230
4861
|
(c) => {
|
|
4231
4862
|
c && r("iframe-ready", c);
|
|
4232
4863
|
},
|
|
4233
4864
|
{ immediate: !0 }
|
|
4234
4865
|
);
|
|
4235
|
-
const
|
|
4866
|
+
const l = () => {
|
|
4236
4867
|
o.value = !1, t.debug("Iframe loaded");
|
|
4237
4868
|
};
|
|
4238
|
-
return
|
|
4869
|
+
return H(
|
|
4239
4870
|
() => n.url,
|
|
4240
4871
|
() => {
|
|
4241
4872
|
o.value = !0;
|
|
4242
4873
|
}
|
|
4243
|
-
), (c, m) => (w(), N("div",
|
|
4244
|
-
W(
|
|
4874
|
+
), (c, m) => (w(), N("div", rr, [
|
|
4875
|
+
W(Ae, { name: "fade" }, {
|
|
4245
4876
|
default: Pe(() => [
|
|
4246
|
-
o.value &&
|
|
4877
|
+
o.value && i.url ? (w(), Y(tr, {
|
|
4247
4878
|
key: 0,
|
|
4248
4879
|
text: c.$t("AI_AGENT.LOADING")
|
|
4249
|
-
}, null, 8, ["text"])) :
|
|
4880
|
+
}, null, 8, ["text"])) : Z("", !0)
|
|
4250
4881
|
]),
|
|
4251
4882
|
_: 1
|
|
4252
4883
|
}),
|
|
4253
|
-
|
|
4884
|
+
i.url ? (w(), N("iframe", {
|
|
4254
4885
|
key: 0,
|
|
4255
4886
|
ref_key: "iframeRef",
|
|
4256
4887
|
ref: a,
|
|
4257
|
-
src:
|
|
4258
|
-
class:
|
|
4888
|
+
src: i.url,
|
|
4889
|
+
class: K(["vc-ai-agent-iframe__frame", { "vc-ai-agent-iframe__frame--loading": o.value }]),
|
|
4259
4890
|
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
|
|
4260
4891
|
allow: "clipboard-read; clipboard-write",
|
|
4261
|
-
onLoad:
|
|
4262
|
-
}, null, 42,
|
|
4892
|
+
onLoad: l
|
|
4893
|
+
}, null, 42, nr)) : (w(), N("div", ar, [
|
|
4263
4894
|
W(ie(oe), {
|
|
4264
4895
|
icon: "lucide-sparkles",
|
|
4265
4896
|
size: "xl",
|
|
@@ -4269,144 +4900,139 @@ const Ft = ["width", "height"], Gt = ["clip-path"], Dt = {
|
|
|
4269
4900
|
]))
|
|
4270
4901
|
]));
|
|
4271
4902
|
}
|
|
4272
|
-
}),
|
|
4903
|
+
}), ir = { class: "vc-ai-agent-panel__content" }, pn = /* @__PURE__ */ L({
|
|
4273
4904
|
__name: "VcAiAgentPanel",
|
|
4274
|
-
setup(
|
|
4275
|
-
const e = J(ve), t = J(
|
|
4905
|
+
setup(i) {
|
|
4906
|
+
const e = J(ve), t = J(vt, !1);
|
|
4276
4907
|
e || console.error("[VcAiAgentPanel] AiAgentService not provided");
|
|
4277
4908
|
const n = h(
|
|
4278
4909
|
() => e?.config.value ?? { url: "", title: "AI Assistant", width: 362, expandedWidth: 500 }
|
|
4279
|
-
), r = h(() => !t && (e?.isOpen.value ?? !1)), a = h(() => e?.isExpanded.value ?? !1), o = h(() => e?.totalItemsCount.value ?? 0),
|
|
4910
|
+
), r = h(() => !t && (e?.isOpen.value ?? !1)), a = h(() => e?.isExpanded.value ?? !1), o = h(() => e?.totalItemsCount.value ?? 0), l = h(() => ({
|
|
4280
4911
|
width: a.value ? `${n.value.expandedWidth ?? 500}px` : `${n.value.width ?? 362}px`
|
|
4281
|
-
})), c = () => e?.closePanel(), m = () => e?.expandPanel(),
|
|
4912
|
+
})), c = () => e?.closePanel(), m = () => e?.expandPanel(), U = () => e?.collapsePanel(), p = (d) => {
|
|
4282
4913
|
e?._setIframeRef(d);
|
|
4283
4914
|
};
|
|
4284
|
-
return
|
|
4915
|
+
return Fe(() => {
|
|
4285
4916
|
e?._setIframeRef(null);
|
|
4286
|
-
}), (d, v) => (w(),
|
|
4917
|
+
}), (d, v) => (w(), Y(Ae, { name: "ai-panel-slide" }, {
|
|
4287
4918
|
default: Pe(() => [
|
|
4288
4919
|
r.value ? (w(), N("div", {
|
|
4289
4920
|
key: 0,
|
|
4290
|
-
class:
|
|
4921
|
+
class: K(["vc-ai-agent-panel", {
|
|
4291
4922
|
"vc-ai-agent-panel--expanded": a.value
|
|
4292
4923
|
}]),
|
|
4293
|
-
style:
|
|
4924
|
+
style: Q(l.value)
|
|
4294
4925
|
}, [
|
|
4295
|
-
W(
|
|
4926
|
+
W(Zt, {
|
|
4296
4927
|
title: n.value.title,
|
|
4297
4928
|
"is-expanded": a.value,
|
|
4298
4929
|
"items-count": o.value,
|
|
4299
4930
|
onClose: c,
|
|
4300
4931
|
onExpand: m,
|
|
4301
|
-
onCollapse:
|
|
4932
|
+
onCollapse: U
|
|
4302
4933
|
}, null, 8, ["title", "is-expanded", "items-count"]),
|
|
4303
|
-
$("div",
|
|
4304
|
-
W(
|
|
4934
|
+
$("div", ir, [
|
|
4935
|
+
W(sr, {
|
|
4305
4936
|
url: n.value.url,
|
|
4306
4937
|
onIframeReady: p
|
|
4307
4938
|
}, null, 8, ["url"])
|
|
4308
4939
|
])
|
|
4309
|
-
], 6)) :
|
|
4940
|
+
], 6)) : Z("", !0)
|
|
4310
4941
|
]),
|
|
4311
4942
|
_: 1
|
|
4312
4943
|
}));
|
|
4313
4944
|
}
|
|
4314
4945
|
});
|
|
4315
4946
|
export {
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4947
|
+
mr as $,
|
|
4948
|
+
tn as A,
|
|
4949
|
+
ht as B,
|
|
4950
|
+
Lr as C,
|
|
4951
|
+
gt as D,
|
|
4952
|
+
rn as E,
|
|
4953
|
+
Jr as F,
|
|
4954
|
+
qr as G,
|
|
4955
|
+
nn as H,
|
|
4956
|
+
Wr as I,
|
|
4957
|
+
Kr as J,
|
|
4958
|
+
Br as K,
|
|
4959
|
+
pt as L,
|
|
4960
|
+
Gr as M,
|
|
4961
|
+
$r as N,
|
|
4962
|
+
Nr as O,
|
|
4963
|
+
Ir as P,
|
|
4964
|
+
tt as Q,
|
|
4965
|
+
zr as R,
|
|
4966
|
+
Tr as S,
|
|
4967
|
+
mt as T,
|
|
4968
|
+
fr as U,
|
|
4969
|
+
Ke as V,
|
|
4970
|
+
Rr as W,
|
|
4971
|
+
Dr as X,
|
|
4972
|
+
pr as Y,
|
|
4973
|
+
F as Z,
|
|
4343
4974
|
oe as _,
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
zt as aD,
|
|
4359
|
-
vt as aE,
|
|
4360
|
-
vn as aF,
|
|
4361
|
-
Ur as aa,
|
|
4362
|
-
rt as ab,
|
|
4975
|
+
pn as a,
|
|
4976
|
+
Or as a0,
|
|
4977
|
+
ft as a1,
|
|
4978
|
+
dt as a2,
|
|
4979
|
+
en as a3,
|
|
4980
|
+
Pr as a4,
|
|
4981
|
+
vr as a5,
|
|
4982
|
+
Zr as a6,
|
|
4983
|
+
jr as a7,
|
|
4984
|
+
gr as a8,
|
|
4985
|
+
br as a9,
|
|
4986
|
+
hn as aA,
|
|
4987
|
+
kr as aa,
|
|
4988
|
+
xr as ab,
|
|
4363
4989
|
He as ac,
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4990
|
+
vt as ad,
|
|
4991
|
+
Ze as ae,
|
|
4992
|
+
Ve as af,
|
|
4993
|
+
Hr as ag,
|
|
4994
|
+
Er as ah,
|
|
4995
|
+
Xe as ai,
|
|
4996
|
+
yr as aj,
|
|
4997
|
+
_r as ak,
|
|
4998
|
+
Fr as al,
|
|
4999
|
+
Ur as am,
|
|
5000
|
+
Ye as an,
|
|
5001
|
+
Cr as ao,
|
|
5002
|
+
qe as ap,
|
|
5003
|
+
Qe as aq,
|
|
5004
|
+
Sr as ar,
|
|
5005
|
+
Mr as as,
|
|
5006
|
+
et as at,
|
|
5007
|
+
ot as au,
|
|
5008
|
+
lt as av,
|
|
5009
|
+
wr as aw,
|
|
5010
|
+
Ar as ax,
|
|
5011
|
+
It as ay,
|
|
5012
|
+
ut as az,
|
|
4387
5013
|
ve as b,
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
5014
|
+
fn as c,
|
|
5015
|
+
B as d,
|
|
5016
|
+
Ue as e,
|
|
5017
|
+
cn as f,
|
|
4392
5018
|
Oe as g,
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
5019
|
+
ct as h,
|
|
5020
|
+
on as i,
|
|
5021
|
+
an as j,
|
|
5022
|
+
ln as k,
|
|
5023
|
+
Yr as l,
|
|
5024
|
+
Xr as m,
|
|
5025
|
+
Pt as n,
|
|
5026
|
+
at as o,
|
|
5027
|
+
un as p,
|
|
4402
5028
|
Ie as q,
|
|
4403
5029
|
Re as r,
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
5030
|
+
sn as s,
|
|
5031
|
+
St as t,
|
|
5032
|
+
dn as u,
|
|
5033
|
+
je as v,
|
|
5034
|
+
Te as w,
|
|
5035
|
+
wt as x,
|
|
5036
|
+
Qr as y,
|
|
5037
|
+
Vr as z
|
|
4412
5038
|
};
|