@wippy-fe/proxy 0.0.3 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.mts +88 -5
  2. package/package.json +2 -2
  3. package/index.d.ts +0 -780
package/index.d.mts CHANGED
@@ -415,15 +415,98 @@ type Events = {
415
415
  [K in string as K extends KnownTopics ? never : K]: (data: WsMessage) => void;
416
416
  };
417
417
 
418
- declare var cssRS = {
418
+ var cssRS = {
419
419
 
420
420
  };
421
- declare var featureRS = {
421
+
422
+ var session = {
423
+ type: "non-persistent"
424
+ };
425
+ var history = "browser";
426
+ var env = {
427
+ APP_API_URL: "",
428
+ APP_AUTH_API_URL: "",
429
+ APP_WEBSOCKET_URL: ""
430
+ };
431
+ var featureRS = {
422
432
  session: session,
423
433
  history: history,
424
434
  env: env
425
435
  };
426
- declare var textRS = {
436
+
437
+ var chat = {
438
+ emptyState: {
439
+ title: "No chat session selected",
440
+ description: "Please select a session from the dropdown above or start a new conversation.",
441
+ goToHome: "Go to Home Page",
442
+ loadingAgents: "Loading agents...",
443
+ selectAgent: "Select Agent",
444
+ startChat: "Start Chat",
445
+ startChatError: "Failed to start chat",
446
+ noAgents: "No agents available. Please contact your administrator.",
447
+ dropFiles: "Drop files here to upload"
448
+ }
449
+ };
450
+ var customPage = {
451
+ loading: {
452
+ title: "Loading page content..."
453
+ },
454
+ error: {
455
+ title: "Failed to load page content"
456
+ }
457
+ };
458
+ var home = {
459
+ loading: "Application is Loading",
460
+ error: {
461
+ title: "Error Loading Application"
462
+ },
463
+ noHomePage: {
464
+ title: "No Home Page Detected",
465
+ message: "Probably backend configuration is malformed"
466
+ }
467
+ };
468
+ var app = {
469
+ title: "Wippy App",
470
+ appName: "Wippy",
471
+ icon: "wippy:logo"
472
+ };
473
+ var login = {
474
+ error: {
475
+ title: "Session Token Expired",
476
+ description: "Your session has expired or is no longer valid. Please close this window and log in again to continue."
477
+ }
478
+ };
479
+ var logout = {
480
+ title: "Logout",
481
+ description: "Logging out..."
482
+ };
483
+ var keeper = {
484
+ controls: {
485
+ newChat: "New Chat",
486
+ searchAgents: "Search agents...",
487
+ undo: "Undo",
488
+ redo: "Redo",
489
+ download: "Registry To File System",
490
+ upload: "File System To Registry",
491
+ codeAssistant: "Wippy Code Assistant",
492
+ syncControls: "Sync Controls",
493
+ confirmUpload: {
494
+ title: "Confirm Upload",
495
+ message: "Do you wish to upload file system changes to registry? This will overwrite current state",
496
+ cancel: "Cancel",
497
+ upload: "Upload",
498
+ cancelled: {
499
+ title: "Upload cancelled",
500
+ message: "The upload operation was cancelled"
501
+ }
502
+ }
503
+ },
504
+ version: {
505
+ label: "Version:",
506
+ tooltip: "Version {{version}}"
507
+ }
508
+ };
509
+ var textRS = {
427
510
  chat: chat,
428
511
  customPage: customPage,
429
512
  home: home,
@@ -497,8 +580,8 @@ interface ApiRoutes {
497
580
  undo: string;
498
581
  redo: string;
499
582
  };
500
- npm: {
501
- globalAutoload: string;
583
+ components: {
584
+ list: string;
502
585
  };
503
586
  tools: {
504
587
  byName: string;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@wippy-fe/proxy",
3
- "version": "0.0.3",
3
+ "version": "0.0.6",
4
4
  "description": "Proxy API for Wippy child micro-frontends",
5
5
  "main": "index.mjs",
6
6
  "module": "index.mjs",
7
- "types": "index.d.ts",
7
+ "types": "index.d.mts",
8
8
  "scripts": {
9
9
  "build:types": "tsup"
10
10
  }
package/index.d.ts DELETED
@@ -1,780 +0,0 @@
1
- import * as nanoevents from 'nanoevents';
2
- import { ConfirmationOptions } from 'primevue/confirmationoptions';
3
- import * as primevue_toast from 'primevue/toast';
4
- import * as axios from 'axios';
5
- import { AxiosDefaults } from 'axios';
6
- import { addCollection } from '@iconify/vue';
7
-
8
- declare namespace PageApi {
9
- interface Page {
10
- icon: string;
11
- id: string;
12
- name: string;
13
- title: string;
14
- internal?: string;
15
- order: number;
16
- placement?: 'default' | 'bottom';
17
- hidden?: boolean;
18
- badge?: string | number;
19
- badge_icon?: string;
20
- group?: string;
21
- group_order?: number;
22
- group_icon?: string;
23
- group_placement?: 'default' | 'bottom';
24
- content_version?: string;
25
- /** The content of the page artifact, which can be HTML, Markdown, or JSON with wippy specific package.json info */
26
- content_type?: 'text/html' | 'text/markdown' | 'application/json';
27
- }
28
- interface PagesResponse {
29
- count: number;
30
- pages: Page[];
31
- success: boolean;
32
- }
33
- interface PageContentResponse {
34
- content: string;
35
- success: boolean;
36
- }
37
- }
38
-
39
- declare namespace UploadApi {
40
- interface Meta {
41
- filename: string;
42
- content_sample?: string;
43
- }
44
- interface Upload {
45
- uuid: string;
46
- created_at: string;
47
- updated_at: string;
48
- mime_type: string;
49
- size: number;
50
- /**
51
- * Note `@@local` is not part of the API response, it's a local state when file is still only on user PC
52
- */
53
- status: '@@local' | 'uploaded' | 'completed' | 'error' | 'processing';
54
- meta: Meta;
55
- error?: string;
56
- }
57
- interface ListResponse {
58
- success: boolean;
59
- meta: {
60
- limit: number;
61
- offset: number;
62
- total: number;
63
- };
64
- uploads: Upload[];
65
- }
66
- interface GetResponse {
67
- success: boolean;
68
- upload: Upload;
69
- }
70
- interface UploadResponse {
71
- success: boolean;
72
- uuid: string;
73
- }
74
- }
75
-
76
- declare enum ArtifactStatus {
77
- /**
78
- * The artifact is still being generated or processed.
79
- * UI should display a loading indicator or show partial code/content.
80
- * User interactions with the artifact may be limited during this state.
81
- */
82
- PROCESSING = "processing",
83
- /**
84
- * The artifact rendering is complete and it's in an active state.
85
- * For interactive artifacts (forms, calculators, etc.), this indicates
86
- * the artifact is ready and waiting for user input or interaction.
87
- * UI should show the artifact as fully interactive.
88
- */
89
- RUNNING = "running",
90
- /**
91
- * The artifact rendering is complete but it's in an inactive state.
92
- * For interactive artifacts, this indicates the artifact is not expecting
93
- * any further input from the user.
94
- * UI should show the artifact as read-only or with limited interactivity.
95
- */
96
- IDLE = "idle",
97
- /**
98
- * The artifact is being built by the system.
99
- */
100
- BUILDING = "building",
101
- /**
102
- * The artifact is being unit tested by the system.
103
- */
104
- TESTING = "testing",
105
- /**
106
- * The artifact failed to generate
107
- */
108
- ERROR = "error"
109
- }
110
- declare enum ArtifactType {
111
- /**
112
- * The artifact is embedded within chat message, html is sanitized to very basic tags.
113
- * Applies only to text/html and text/markdown content types.
114
- */
115
- INLINE = "inline",
116
- /**
117
- * The artifact is embedded within chat message, in an iframe with support of iframe-proxy API
118
- */
119
- INLINE_INTERACTIVE = "inline-interactive",
120
- /**
121
- * The artifact is rendered as a button that opens artifact in an iframe with support of iframe-proxy API
122
- * @see iframe-proxy.md
123
- */
124
- STANDALONE = "standalone"
125
- }
126
- interface Artifact {
127
- uuid: string;
128
- title: string;
129
- description?: string;
130
- icon?: string;
131
- type: ArtifactType;
132
- /** The content of the artifact, which can be HTML, Markdown, or JSON with wippy specific package.json info */
133
- content_type: 'text/html' | 'text/markdown' | 'application/json';
134
- content_version?: string;
135
- status: ArtifactStatus;
136
- }
137
-
138
- type ArtifactUUID = string;
139
- type PageUUID = string;
140
- type SessionUUID = string;
141
- type EntryUUID = string;
142
- type MessageUUID = string;
143
- type ActionCommand = 'navigate' | 'sidebar';
144
- declare const WsTopicPrefixes: {
145
- readonly Pages: "pages";
146
- readonly Page: "page";
147
- readonly Artifact: "artifact";
148
- readonly Welcome: "welcome";
149
- readonly Update: "update";
150
- readonly Session: "session";
151
- readonly SessionOpen: "session.opened";
152
- readonly SessionClosed: "session.closed";
153
- readonly Error: "error";
154
- readonly Upload: "upload";
155
- readonly Action: "action";
156
- readonly Registry: "registry";
157
- readonly RegistryEntry: "entry";
158
- };
159
- interface WsTopicTypes {
160
- /**
161
- * Welcome info with active sessions
162
- */
163
- Welcome: typeof WsTopicPrefixes.Welcome;
164
- /**
165
- * Artifact are updated
166
- */
167
- Artifact: `${typeof WsTopicPrefixes.Artifact}:${ArtifactUUID}`;
168
- /**
169
- * Dynamic page list is updated
170
- */
171
- Pages: typeof WsTopicPrefixes.Pages;
172
- /**
173
- * Single page is updated and needs reload
174
- */
175
- Page: `${typeof WsTopicPrefixes.Page}:${PageUUID}`;
176
- /**
177
- * Session was opened event
178
- */
179
- SessionOpened: typeof WsTopicPrefixes.SessionOpen;
180
- /**
181
- * Session was closed event
182
- */
183
- SessionClosed: typeof WsTopicPrefixes.SessionClosed;
184
- /**
185
- * Session operation
186
- */
187
- Session: `${typeof WsTopicPrefixes.Session}:${SessionUUID}`;
188
- /**
189
- * Registry operation
190
- */
191
- Registry: `${typeof WsTopicPrefixes.Registry}:${string}`;
192
- /**
193
- * Registry entry updates
194
- */
195
- RegistryEntry: `${typeof WsTopicPrefixes.RegistryEntry}:${EntryUUID}`;
196
- /**
197
- * Registry entry updates
198
- */
199
- Action: `${typeof WsTopicPrefixes.Action}:${ActionCommand}`;
200
- /**
201
- * Session message
202
- */
203
- SessionMessage: `${typeof WsTopicPrefixes.Session}:${SessionUUID}:message:${MessageUUID}`;
204
- /**
205
- * Error message
206
- */
207
- Error: typeof WsTopicPrefixes.Error;
208
- /**
209
- * Upload was created or updated
210
- */
211
- Upload: `${typeof WsTopicPrefixes.Upload}:${string}`;
212
- }
213
- type WsTopic = WsTopicTypes[keyof WsTopicTypes];
214
- declare enum WsMessageType {
215
- /** Contains the actual content of the message */
216
- CONTENT = "content",
217
- /** Contains content of the message to append to current one */
218
- CHUNK = "chunk",
219
- /** User message with contents */
220
- USER = "received",
221
- /** Response started, can create a message placeholder */
222
- RESPONSE_STARTED = "response_started",
223
- /** Kill the message */
224
- INVALIDATE = "invalidate",
225
- /** from to agent, get agent names */
226
- DELEGATION = "delegation",
227
- /** Tool/fn was called */
228
- TOOL_CALL = "tool_call",
229
- FUNCTION_CALL = "function_call",
230
- /** Tool/fn was succesfull */
231
- TOOL_SUCCESS = "tool_success",
232
- FUNCTION_SUCCESS = "function_success",
233
- /** Tool/fn failed */
234
- TOOL_ERROR = "tool_error",
235
- FUNCTION_ERROR = "function_error",
236
- /** Error */
237
- ERROR = "error",
238
- /** Error */
239
- ARTIFACT = "artifact"
240
- }
241
- interface WsMessageBase {
242
- topic: WsTopic;
243
- data?: {
244
- request_id?: string;
245
- };
246
- }
247
- interface WsMessage_Welcome extends WsMessageBase {
248
- topic: WsTopicTypes['Welcome'];
249
- data: {
250
- request_id?: string;
251
- active_session_ids: Array<string>;
252
- active_sessions: number;
253
- client_count: number;
254
- user_id: string;
255
- };
256
- }
257
- interface WsMessage_Action extends WsMessageBase {
258
- topic: WsTopicTypes['Action'];
259
- data: {
260
- request_id?: string;
261
- artifact_uuid?: string;
262
- artifact_content_type?: string;
263
- session_uuid?: string;
264
- path?: string;
265
- };
266
- }
267
- interface WsMessage_Registry extends WsMessageBase {
268
- topic: WsTopicTypes['Registry'];
269
- data: {
270
- request_id?: string;
271
- };
272
- }
273
- interface WsMessage_RegistryEntry extends WsMessageBase {
274
- topic: WsTopicTypes['RegistryEntry'];
275
- data: {
276
- request_id?: string;
277
- content_version?: string;
278
- };
279
- }
280
- interface WsMessage_Pages extends WsMessageBase {
281
- topic: WsTopicTypes['Pages'];
282
- }
283
- interface WsMessage_Page extends WsMessageBase {
284
- topic: WsTopicTypes['Page'];
285
- data: PageApi.Page & {
286
- request_id?: string;
287
- };
288
- }
289
- interface WsMessage_SessionOpen extends WsMessageBase {
290
- topic: WsTopicTypes['SessionOpened'];
291
- data: {
292
- request_id?: string;
293
- active_session_ids: Array<string>;
294
- session_id: string;
295
- };
296
- }
297
- interface WsMessage_Error extends WsMessageBase {
298
- topic: WsTopicTypes['Error'];
299
- data: {
300
- request_id?: string;
301
- error: string;
302
- message: string;
303
- };
304
- }
305
- interface WsMessage_SessionClosed extends WsMessageBase {
306
- topic: WsTopicTypes['SessionClosed'];
307
- data: {
308
- request_id?: string;
309
- active_session_ids: Array<string>;
310
- session_id: string;
311
- };
312
- }
313
- interface WsMessageDataBase {
314
- type: WsMessageType;
315
- }
316
- interface WsMessageDataChunk extends WsMessageDataBase {
317
- type: WsMessageType.CHUNK;
318
- content: string;
319
- }
320
- interface WsMessageDataContent extends WsMessageDataBase {
321
- type: WsMessageType.CONTENT;
322
- content: string;
323
- message_id: MessageUUID;
324
- file_uuids?: string[];
325
- }
326
- interface WsMessageDataUser extends WsMessageDataBase {
327
- type: WsMessageType.USER;
328
- text: string;
329
- message_id: MessageUUID;
330
- file_uuids?: string[];
331
- }
332
- interface WsMessageDataDelegation extends WsMessageDataBase {
333
- type: WsMessageType.DELEGATION;
334
- from: string;
335
- to: string;
336
- }
337
- interface WsMessageDataInvalidate extends WsMessageDataBase {
338
- type: WsMessageType.INVALIDATE;
339
- }
340
- interface WsMessageDataStarted extends WsMessageDataBase {
341
- type: WsMessageType.RESPONSE_STARTED;
342
- message_id: MessageUUID;
343
- }
344
- interface WsMessageDataToolCall extends WsMessageDataBase {
345
- type: WsMessageType.TOOL_CALL | WsMessageType.FUNCTION_CALL;
346
- function_name: string;
347
- artifact_id?: string;
348
- }
349
- interface WsMessageDataArtifact extends WsMessageDataBase {
350
- type: WsMessageType.ARTIFACT;
351
- artifact_id?: string;
352
- }
353
- interface WsMessageDataToolSuccess extends WsMessageDataBase {
354
- type: WsMessageType.TOOL_SUCCESS | WsMessageType.FUNCTION_SUCCESS;
355
- function_name: string;
356
- artifact_id?: string;
357
- }
358
- interface WsMessageDataToolError extends WsMessageDataBase {
359
- type: WsMessageType.TOOL_ERROR | WsMessageType.FUNCTION_ERROR;
360
- function_name: string;
361
- artifact_id?: string;
362
- }
363
- interface WsMessageDataError extends WsMessageDataBase {
364
- type: WsMessageType.ERROR;
365
- message: string;
366
- code: string;
367
- }
368
- interface WsMessage_SessionMessage extends WsMessageBase {
369
- topic: WsTopicTypes['SessionMessage'];
370
- data: (WsMessageDataUser | WsMessageDataContent | WsMessageDataChunk | WsMessageDataDelegation | WsMessageDataToolCall | WsMessageDataError | WsMessageDataInvalidate | WsMessageDataStarted | WsMessageDataToolSuccess | WsMessageDataArtifact | WsMessageDataToolError) & {
371
- request_id?: string;
372
- };
373
- }
374
- interface WsMessage_Session extends WsMessageBase {
375
- topic: WsTopicTypes['Session'];
376
- data: {
377
- request_id?: string;
378
- agent?: string;
379
- last_message_date?: number;
380
- model?: string;
381
- status?: string;
382
- title?: string;
383
- type: 'update';
384
- public_meta?: Array<{
385
- icon?: string;
386
- id: string;
387
- title: string;
388
- url?: string;
389
- }>;
390
- };
391
- }
392
- interface WsMessage_Artifact extends WsMessageBase {
393
- topic: WsTopicTypes['Artifact'];
394
- data: Partial<Artifact> & {
395
- request_id?: string;
396
- };
397
- }
398
- interface WsMessage_Upload extends WsMessageBase {
399
- topic: WsTopicTypes['Upload'];
400
- data: UploadApi.Upload & {
401
- request_id?: string;
402
- };
403
- }
404
- type WsMessage = WsMessage_Welcome | WsMessage_Pages | WsMessage_Page | WsMessage_SessionMessage | WsMessage_Session | WsMessage_SessionClosed | WsMessage_Error | WsMessage_Artifact | WsMessage_SessionOpen | WsMessage_Action | WsMessage_Registry | WsMessage_RegistryEntry | WsMessage_Upload;
405
-
406
- type KnownTopics = '@history' | '@visibility' | '@message';
407
- type Events = {
408
- /** Emitted when pages are updated */
409
- '@history': (data: {
410
- path: string;
411
- }) => void;
412
- '@visibility': (visible: boolean) => void;
413
- '@message': (data: WsMessage) => void;
414
- } & {
415
- [K in string as K extends KnownTopics ? never : K]: (data: WsMessage) => void;
416
- };
417
-
418
- declare var cssRS = {
419
-
420
- };
421
- declare var featureRS = {
422
- session: session,
423
- history: history,
424
- env: env
425
- };
426
- declare var textRS = {
427
- chat: chat,
428
- customPage: customPage,
429
- home: home,
430
- app: app,
431
- login: login,
432
- logout: logout,
433
- keeper: keeper
434
- };
435
-
436
- type I18NFeatureTypes = typeof featureRS;
437
- type I18NTextTypes = typeof textRS;
438
- type I18NCssTypes = typeof cssRS;
439
-
440
- /**
441
- * All API route templates, grouped by domain.
442
- * Dynamic path segments use `{paramName}` placeholders (OpenAPI-style).
443
- * Each leaf value is a flat, fully-formed route — no concatenation needed at call site.
444
- *
445
- * Internally, routes use `@/…` shorthand that resolves against the group's `@prefix`.
446
- * Resolution happens once inside `getApiRoutes()`, so consumers always receive clean strings.
447
- *
448
- * Base URL resolution:
449
- * - HTTP routes: `getEnv().APP_API_URL` + route (handled by axios baseURL)
450
- * - WebSocket: `getEnv().APP_WEBSOCKET_URL` + `getApiRoutes().ws.join` (composed in ws/client.ts)
451
- */
452
- interface ApiRoutes {
453
- agents: {
454
- list: string;
455
- details: string;
456
- byName: string;
457
- };
458
- sessions: {
459
- list: string;
460
- get: string;
461
- messages: string;
462
- };
463
- models: {
464
- list: string;
465
- byName: string;
466
- };
467
- uploads: {
468
- list: string;
469
- get: string;
470
- create: string;
471
- };
472
- artifacts: {
473
- get: string;
474
- content: string;
475
- state: string;
476
- baseUrl: string;
477
- };
478
- pages: {
479
- list: string;
480
- get: string;
481
- content: string;
482
- baseUrl: string;
483
- };
484
- registry: {
485
- namespaces: string;
486
- entries: string;
487
- entry: string;
488
- entryCreate: string;
489
- entryEditors: string;
490
- versions: string;
491
- versionApply: string;
492
- };
493
- keeperSync: {
494
- state: string;
495
- download: string;
496
- upload: string;
497
- undo: string;
498
- redo: string;
499
- };
500
- npm: {
501
- globalAutoload: string;
502
- };
503
- tools: {
504
- byName: string;
505
- };
506
- ws: {
507
- join: string;
508
- };
509
- }
510
- /**
511
- * Override type for `AppConfig.feature.apiRoutes`.
512
- *
513
- * Each group is optional and partially overridable.
514
- * Set `@prefix` to rebase all `@/…` routes in that group at once,
515
- * or override individual routes with absolute paths.
516
- */
517
- type ApiRoutesOverride = {
518
- [K in keyof ApiRoutes]?: Partial<ApiRoutes[K]> & {
519
- '@prefix'?: string;
520
- };
521
- };
522
-
523
- interface AppFeatures extends I18NFeatureTypes {
524
- /**
525
- * If to remember auth details or not
526
- */
527
- session: {
528
- type: 'non-persistent' | 'cookie';
529
- };
530
- history: 'browser' | 'hash';
531
- env: {
532
- APP_API_URL: string;
533
- APP_AUTH_API_URL: string;
534
- APP_WEBSOCKET_URL: string;
535
- };
536
- axiosDefaults?: Partial<AxiosDefaults>;
537
- routePrefix?: string;
538
- showAdmin?: boolean;
539
- allowSelectModel?: boolean;
540
- startNavOpen?: boolean;
541
- hideNavBar?: boolean;
542
- disableRightPanel?: boolean;
543
- /**
544
- * Hide the session selector dropdown in chat views
545
- * @default false
546
- */
547
- hideSessionSelector?: boolean;
548
- additionalNavItems?: Array<PageApi.Page>;
549
- chat?: {
550
- convertPasteToFile?: {
551
- enabled: boolean;
552
- minFileSize: number;
553
- allowHtml: boolean;
554
- };
555
- };
556
- apiRoutes?: ApiRoutesOverride;
557
- }
558
- interface AppAuthConfig {
559
- token: string;
560
- expiresAt: string;
561
- }
562
- interface AppCustomization {
563
- customCSS?: string;
564
- cssVariables?: I18NCssTypes;
565
- i18n?: Partial<I18NTextTypes>;
566
- icons?: Record<string, {
567
- body: string;
568
- width: number;
569
- height: number;
570
- }>;
571
- }
572
- interface AppConfig {
573
- artifactId?: string;
574
- /**
575
- * Starting app or artifact/page path
576
- */
577
- path?: string;
578
- /**
579
- * App features like history mode, session type, etc.
580
- */
581
- feature?: AppFeatures;
582
- /**
583
- * Auth configuration
584
- */
585
- auth: AppAuthConfig;
586
- /**
587
- * App customization like i18n texts, css variables, custom css, etc.
588
- */
589
- customization?: AppCustomization;
590
- externalEvents?: {
591
- enabled: boolean;
592
- wsType: string;
593
- allowedOrigins: string[];
594
- allowedTypes: string[];
595
- };
596
- }
597
-
598
- interface FormState {
599
- data?: Record<string, unknown>;
600
- status: 'active' | 'inactive';
601
- }
602
- interface FormResult {
603
- success: boolean;
604
- message?: string;
605
- errors?: Record<string, string>;
606
- }
607
- type LimitedConfirmationOptions = Omit<ConfirmationOptions, 'target' | 'appendTo' | 'onShow' | 'onHide'>;
608
-
609
- declare const fontCssUrl: string;
610
- declare const iframeCssUrl: string;
611
- declare const markdownCssUrl: string;
612
- declare const primeVueCssUrl: string;
613
- declare const themeConfigUrl: string;
614
-
615
- declare const hostCssRaw_fontCssUrl: typeof fontCssUrl;
616
- declare const hostCssRaw_iframeCssUrl: typeof iframeCssUrl;
617
- declare const hostCssRaw_markdownCssUrl: typeof markdownCssUrl;
618
- declare const hostCssRaw_primeVueCssUrl: typeof primeVueCssUrl;
619
- declare const hostCssRaw_themeConfigUrl: typeof themeConfigUrl;
620
- declare namespace hostCssRaw {
621
- export { hostCssRaw_fontCssUrl as fontCssUrl, hostCssRaw_iframeCssUrl as iframeCssUrl, hostCssRaw_markdownCssUrl as markdownCssUrl, hostCssRaw_primeVueCssUrl as primeVueCssUrl, hostCssRaw_themeConfigUrl as themeConfigUrl };
622
- }
623
-
624
- declare const resolvers: {
625
- readonly api: axios.AxiosInstance;
626
- readonly host: {
627
- toast: (message: primevue_toast.ToastMessageOptions) => void;
628
- confirm: (options: LimitedConfirmationOptions) => Promise<boolean>;
629
- startChat: (start_token: string, options?: {
630
- sidebar?: boolean;
631
- }) => void;
632
- openSession: (sessionUUID: string, options?: {
633
- sidebar?: boolean;
634
- }) => void;
635
- openArtifact: (artifactUUID: string, options?: {
636
- target: "modal" | "sidebar";
637
- }) => void;
638
- navigate: (url: string) => void;
639
- onRouteChanged: (internalRoute: string) => void;
640
- handleError: (code: ("auth-expired" | "other"), error: Record<string, unknown>) => void;
641
- setContext: (context: Record<string, unknown>, sessionUUID?: string, source?: {
642
- type: "page" | "artifact";
643
- uuid: string;
644
- instanceUUID?: string;
645
- }) => void;
646
- formatUrl: (relativeUrl: string) => string;
647
- logout: () => void;
648
- };
649
- /** @deprecated, use `host` instead to host calls */
650
- readonly iframe: {
651
- toast: (message: primevue_toast.ToastMessageOptions) => void;
652
- confirm: (options: LimitedConfirmationOptions) => Promise<boolean>;
653
- startChat: (start_token: string, sidebar?: boolean) => void;
654
- openSession: (sessionUUID: string, sidebar?: boolean) => void;
655
- openArtifact: (artifactUUID: string, target: "modal" | "sidebar") => void;
656
- navigate: (url: string) => void;
657
- handleError: (code: ("auth-expired" | "other"), error: Record<string, unknown>) => void;
658
- setContext: (context: Record<string, unknown>, source?: {
659
- type: "page" | "artifact";
660
- uuid: string;
661
- }) => void;
662
- formatUrl: (relativeUrl: string) => string;
663
- logout: () => void;
664
- };
665
- readonly on: <T extends string>(topicPattern: T, callback: T extends "@history" | "@visibility" | "@message" ? Events[T] : Events["@message"]) => nanoevents.Unsubscribe;
666
- readonly config: AppConfig;
667
- /** @deprecated, use direct api calls instead */
668
- readonly form: {
669
- get: () => Promise<FormState>;
670
- submit: (data: FormData | Record<string, unknown>) => Promise<FormResult>;
671
- };
672
- readonly loadWebComponent: (componentId: string, tagName?: string) => Promise<void>;
673
- hostCss: typeof hostCssRaw;
674
- tailwindConfig: {
675
- content: string[];
676
- theme: {
677
- extend: {
678
- colors: {
679
- secondary: {
680
- 50: string;
681
- 100: string;
682
- 200: string;
683
- 300: string;
684
- 400: string;
685
- 500: string;
686
- 600: string;
687
- 700: string;
688
- 800: string;
689
- 900: string;
690
- 950: string;
691
- };
692
- };
693
- };
694
- };
695
- plugins: any[];
696
- };
697
- /**
698
- * Automatically defines a web component based on the import meta URL if imported with `declare-tag` in the query parameters.
699
- * @param importMetaUrl
700
- * @param ComponentClass
701
- */
702
- define: (importMetaUrl: string, ComponentClass: typeof HTMLElement) => void;
703
- loadCss: (cssUrl: string) => Promise<string>;
704
- addIcons: (addCollectionFn: typeof addCollection) => void;
705
- };
706
- declare const define: (importMetaUrl: string, ComponentClass: typeof HTMLElement) => void;
707
- declare const api: axios.AxiosInstance;
708
- declare const host: {
709
- toast: (message: primevue_toast.ToastMessageOptions) => void;
710
- confirm: (options: LimitedConfirmationOptions) => Promise<boolean>;
711
- startChat: (start_token: string, options?: {
712
- sidebar?: boolean;
713
- }) => void;
714
- openSession: (sessionUUID: string, options?: {
715
- sidebar?: boolean;
716
- }) => void;
717
- openArtifact: (artifactUUID: string, options?: {
718
- target: "modal" | "sidebar";
719
- }) => void;
720
- navigate: (url: string) => void;
721
- onRouteChanged: (internalRoute: string) => void;
722
- handleError: (code: ("auth-expired" | "other"), error: Record<string, unknown>) => void;
723
- setContext: (context: Record<string, unknown>, sessionUUID?: string, source?: {
724
- type: "page" | "artifact";
725
- uuid: string;
726
- instanceUUID?: string;
727
- }) => void;
728
- formatUrl: (relativeUrl: string) => string;
729
- logout: () => void;
730
- };
731
- declare const iframe: {
732
- toast: (message: primevue_toast.ToastMessageOptions) => void;
733
- confirm: (options: LimitedConfirmationOptions) => Promise<boolean>;
734
- startChat: (start_token: string, sidebar?: boolean) => void;
735
- openSession: (sessionUUID: string, sidebar?: boolean) => void;
736
- openArtifact: (artifactUUID: string, target: "modal" | "sidebar") => void;
737
- navigate: (url: string) => void;
738
- handleError: (code: ("auth-expired" | "other"), error: Record<string, unknown>) => void;
739
- setContext: (context: Record<string, unknown>, source?: {
740
- type: "page" | "artifact";
741
- uuid: string;
742
- }) => void;
743
- formatUrl: (relativeUrl: string) => string;
744
- logout: () => void;
745
- };
746
- declare const on: <T extends string>(topicPattern: T, callback: T extends "@history" | "@visibility" | "@message" ? Events[T] : Events["@message"]) => nanoevents.Unsubscribe;
747
- declare const config: AppConfig;
748
- declare const form: {
749
- get: () => Promise<FormState>;
750
- submit: (data: FormData | Record<string, unknown>) => Promise<FormResult>;
751
- };
752
- declare const hostCss: typeof hostCssRaw;
753
- declare const loadCss: (cssUrl: string) => Promise<string>;
754
- declare const tailwindConfig: {
755
- content: string[];
756
- theme: {
757
- extend: {
758
- colors: {
759
- secondary: {
760
- 50: string;
761
- 100: string;
762
- 200: string;
763
- 300: string;
764
- 400: string;
765
- 500: string;
766
- 600: string;
767
- 700: string;
768
- 800: string;
769
- 900: string;
770
- 950: string;
771
- };
772
- };
773
- };
774
- };
775
- plugins: any[];
776
- };
777
- declare const loadWebComponent: (componentId: string, tagName?: string) => Promise<void>;
778
- declare const addIcons: (addCollectionFn: typeof addCollection) => void;
779
-
780
- export { addIcons, api, config, resolvers as default, define, form, host, hostCss, iframe, loadCss, loadWebComponent, on, tailwindConfig };