@enfyra/sdk-nuxt 0.3.19 → 0.3.20

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 (71) hide show
  1. package/dist/auth.d.ts.map +1 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/module.cjs +38 -23
  4. package/dist/module.json +4 -1
  5. package/dist/module.mjs +37 -22
  6. package/dist/{composables/useEnfyraApi.mjs → runtime/composables/useEnfyraApi.js} +3 -3
  7. package/dist/{composables/useEnfyraAuth.mjs → runtime/composables/useEnfyraAuth.js} +1 -1
  8. package/dist/runtime/server/api/all.js +1 -1
  9. package/dist/runtime/server/api/login.post.js +2 -2
  10. package/dist/runtime/server/api/logout.post.js +2 -2
  11. package/dist/runtime/server/middleware/auth.js +2 -2
  12. package/dist/runtime/shims.d.ts +72 -0
  13. package/dist/runtime/utils/http.d.ts +0 -0
  14. package/dist/runtime/utils/server/proxy.d.ts +0 -0
  15. package/dist/{utils/server/proxy.mjs → runtime/utils/server/proxy.js} +2 -2
  16. package/dist/runtime/utils/server/refreshToken.d.ts +0 -0
  17. package/dist/{utils/server/refreshToken.mjs → runtime/utils/server/refreshToken.js} +2 -2
  18. package/dist/runtime/utils/url.d.ts +0 -0
  19. package/module.d.ts +16 -6
  20. package/package.json +9 -11
  21. package/src/module.ts +54 -34
  22. package/src/{composables → runtime/composables}/useEnfyraApi.ts +17 -17
  23. package/src/{composables → runtime/composables}/useEnfyraAuth.ts +2 -2
  24. package/src/runtime/server/api/all.ts +1 -1
  25. package/src/runtime/server/api/login.post.ts +2 -2
  26. package/src/runtime/server/api/logout.post.ts +2 -2
  27. package/src/runtime/server/middleware/auth.ts +2 -2
  28. package/src/runtime/shims.d.ts +72 -0
  29. package/src/{utils → runtime/utils}/server/proxy.ts +1 -1
  30. package/src/{utils → runtime/utils}/server/refreshToken.ts +3 -3
  31. package/dist/composables/useEnfyraApi.d.ts +0 -8
  32. package/dist/composables/useEnfyraApi.d.ts.map +0 -1
  33. package/dist/composables/useEnfyraApi.js +0 -363
  34. package/dist/composables/useEnfyraAuth.d.ts +0 -89
  35. package/dist/composables/useEnfyraAuth.d.ts.map +0 -1
  36. package/dist/composables/useEnfyraAuth.js +0 -77
  37. package/dist/constants/config.d.ts +0 -2
  38. package/dist/constants/config.d.ts.map +0 -1
  39. package/dist/constants/config.mjs +0 -1
  40. package/dist/runtime/plugin/config-error.client.mjs +0 -107
  41. package/dist/runtime/server/api/all.mjs +0 -5
  42. package/dist/runtime/server/api/login.post.mjs +0 -62
  43. package/dist/runtime/server/api/logout.post.mjs +0 -35
  44. package/dist/runtime/server/middleware/auth.mjs +0 -36
  45. package/dist/types/auth.d.ts.map +0 -1
  46. package/dist/types/index.d.ts.map +0 -1
  47. package/dist/utils/config.mjs +0 -16
  48. package/dist/utils/http.d.ts +0 -8
  49. package/dist/utils/http.d.ts.map +0 -1
  50. package/dist/utils/http.js +0 -57
  51. package/dist/utils/url.d.ts +0 -12
  52. package/dist/utils/url.d.ts.map +0 -1
  53. package/dist/utils/url.js +0 -77
  54. package/src/types/nuxt-imports.d.ts +0 -61
  55. package/src/utils/config.ts +0 -22
  56. /package/dist/{types/auth.d.ts → auth.d.ts} +0 -0
  57. /package/dist/{types/auth.js → auth.js} +0 -0
  58. /package/dist/{types/index.d.ts → index.d.ts} +0 -0
  59. /package/dist/{types/index.js → index.js} +0 -0
  60. /package/dist/{constants/auth.d.ts → runtime/composables/useEnfyraApi.d.ts} +0 -0
  61. /package/dist/{utils/config.d.ts → runtime/composables/useEnfyraAuth.d.ts} +0 -0
  62. /package/dist/{utils/server/proxy.d.ts → runtime/constants/auth.d.ts} +0 -0
  63. /package/dist/{constants/auth.mjs → runtime/constants/auth.js} +0 -0
  64. /package/dist/{utils/server/refreshToken.d.ts → runtime/constants/config.d.ts} +0 -0
  65. /package/dist/{constants → runtime/constants}/config.js +0 -0
  66. /package/dist/{utils/http.mjs → runtime/utils/http.js} +0 -0
  67. /package/dist/{utils/url.mjs → runtime/utils/url.js} +0 -0
  68. /package/src/{constants → runtime/constants}/auth.ts +0 -0
  69. /package/src/{constants → runtime/constants}/config.ts +0 -0
  70. /package/src/{utils → runtime/utils}/http.ts +0 -0
  71. /package/src/{utils → runtime/utils}/url.ts +0 -0
@@ -1,61 +0,0 @@
1
- /**
2
- * Type declarations for Nuxt auto-imports
3
- * These are provided at runtime by Nuxt but need declarations for TypeScript
4
- */
5
-
6
- declare global {
7
- const useEnfyraApi: typeof import('../composables/useEnfyraApi').useEnfyraApi
8
- const useEnfyraAuth: typeof import('../composables/useEnfyraAuth').useEnfyraAuth
9
- }
10
-
11
- declare module '#imports' {
12
- export const useRuntimeConfig: () => {
13
- public: {
14
- enfyraSDK?: {
15
- apiUrl?: string;
16
- apiPrefix?: string;
17
- configError?: boolean;
18
- configErrorMessage?: string;
19
- };
20
- };
21
- [key: string]: any;
22
- };
23
-
24
- export const useRequestHeaders: (headers?: string[]) => Record<string, string | undefined>;
25
-
26
- export const useRequestURL: () => URL;
27
-
28
- export const useFetch: <T = any>(
29
- url: string | (() => string),
30
- options?: any
31
- ) => any;
32
-
33
- export const useNuxtApp: () => {
34
- payload: {
35
- data: Record<string, any>;
36
- [key: string]: any;
37
- };
38
- static: {
39
- data: Record<string, any>;
40
- [key: string]: any;
41
- };
42
- [key: string]: any;
43
- };
44
-
45
- export const defineNuxtPlugin: (plugin: any) => any;
46
-
47
- export const defineCachedEventHandler: (handler: any, options?: any) => any;
48
-
49
- export const getCookie: (event: any, name: string) => string | undefined;
50
-
51
- export const setCookie: (event: any, name: string, value: string, options?: any) => void;
52
-
53
- export const deleteCookie: (event: any, name: string, options?: any) => void;
54
-
55
- export const createError: (options: {
56
- statusCode?: number;
57
- statusMessage?: string;
58
- message?: string;
59
- data?: any;
60
- }) => Error;
61
- }
@@ -1,22 +0,0 @@
1
- import { ref } from 'vue';
2
- import type { EnfyraConfig } from '../types';
3
-
4
- const config = ref<EnfyraConfig>({
5
- apiUrl: '',
6
- defaultHeaders: {}
7
- });
8
-
9
- export function useEnfyraConfig() {
10
- const setConfig = (newConfig: Partial<EnfyraConfig>) => {
11
- config.value = { ...config.value, ...newConfig };
12
- };
13
-
14
- const getConfig = () => config.value;
15
-
16
- return {
17
- setConfig,
18
- getConfig
19
- };
20
- }
21
-
22
- export { config };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes