@webitel/ui-sdk 26.8.3 → 26.8.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "26.8.3",
3
+ "version": "26.8.5",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "npm run docs:dev",
package/src/install.ts CHANGED
@@ -5,6 +5,7 @@ import './css/main.css';
5
5
  import './css/tailwind.css';
6
6
 
7
7
  import { generateInstance } from '@webitel/api-services/api/axios';
8
+ import type { AxiosInstance } from 'axios';
8
9
  import type { App } from 'vue';
9
10
  import type { Router } from 'vue-router';
10
11
  import { fillIconsRepository } from './assets/icons';
@@ -22,8 +23,14 @@ export type WebitelUiInstallOptions = {
22
23
  router?: Router;
23
24
  };
24
25
 
25
- export default {
26
- install(app: App, { eventBus, globals = {} }: WebitelUiInstallOptions) {
26
+ export type WebitelUiPlugin = {
27
+ install(app: App, options: WebitelUiInstallOptions): void;
28
+ // Keep signature public — do not leak api-services private option types into emit.
29
+ generateInstance: (options?: Record<string, unknown>) => AxiosInstance;
30
+ };
31
+
32
+ const plugin: WebitelUiPlugin = {
33
+ install(app, { eventBus, globals = {} }) {
27
34
  Object.keys(Directives).forEach((name) => {
28
35
  app.directive(name, Directives[name as keyof typeof Directives]);
29
36
  });
@@ -36,5 +43,7 @@ export default {
36
43
  app.provide(EVENT_BUS_INJECTION_KEY, eventBus);
37
44
  initPrimevue(app);
38
45
  },
39
- generateInstance,
46
+ generateInstance: generateInstance as WebitelUiPlugin['generateInstance'],
40
47
  };
48
+
49
+ export default plugin;