@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.
- package/dist/auth.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/module.cjs +38 -23
- package/dist/module.json +4 -1
- package/dist/module.mjs +37 -22
- package/dist/{composables/useEnfyraApi.mjs → runtime/composables/useEnfyraApi.js} +3 -3
- package/dist/{composables/useEnfyraAuth.mjs → runtime/composables/useEnfyraAuth.js} +1 -1
- package/dist/runtime/server/api/all.js +1 -1
- package/dist/runtime/server/api/login.post.js +2 -2
- package/dist/runtime/server/api/logout.post.js +2 -2
- package/dist/runtime/server/middleware/auth.js +2 -2
- package/dist/runtime/shims.d.ts +72 -0
- package/dist/runtime/utils/http.d.ts +0 -0
- package/dist/runtime/utils/server/proxy.d.ts +0 -0
- package/dist/{utils/server/proxy.mjs → runtime/utils/server/proxy.js} +2 -2
- package/dist/runtime/utils/server/refreshToken.d.ts +0 -0
- package/dist/{utils/server/refreshToken.mjs → runtime/utils/server/refreshToken.js} +2 -2
- package/dist/runtime/utils/url.d.ts +0 -0
- package/module.d.ts +16 -6
- package/package.json +9 -11
- package/src/module.ts +54 -34
- package/src/{composables → runtime/composables}/useEnfyraApi.ts +17 -17
- package/src/{composables → runtime/composables}/useEnfyraAuth.ts +2 -2
- package/src/runtime/server/api/all.ts +1 -1
- package/src/runtime/server/api/login.post.ts +2 -2
- package/src/runtime/server/api/logout.post.ts +2 -2
- package/src/runtime/server/middleware/auth.ts +2 -2
- package/src/runtime/shims.d.ts +72 -0
- package/src/{utils → runtime/utils}/server/proxy.ts +1 -1
- package/src/{utils → runtime/utils}/server/refreshToken.ts +3 -3
- package/dist/composables/useEnfyraApi.d.ts +0 -8
- package/dist/composables/useEnfyraApi.d.ts.map +0 -1
- package/dist/composables/useEnfyraApi.js +0 -363
- package/dist/composables/useEnfyraAuth.d.ts +0 -89
- package/dist/composables/useEnfyraAuth.d.ts.map +0 -1
- package/dist/composables/useEnfyraAuth.js +0 -77
- package/dist/constants/config.d.ts +0 -2
- package/dist/constants/config.d.ts.map +0 -1
- package/dist/constants/config.mjs +0 -1
- package/dist/runtime/plugin/config-error.client.mjs +0 -107
- package/dist/runtime/server/api/all.mjs +0 -5
- package/dist/runtime/server/api/login.post.mjs +0 -62
- package/dist/runtime/server/api/logout.post.mjs +0 -35
- package/dist/runtime/server/middleware/auth.mjs +0 -36
- package/dist/types/auth.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/utils/config.mjs +0 -16
- package/dist/utils/http.d.ts +0 -8
- package/dist/utils/http.d.ts.map +0 -1
- package/dist/utils/http.js +0 -57
- package/dist/utils/url.d.ts +0 -12
- package/dist/utils/url.d.ts.map +0 -1
- package/dist/utils/url.js +0 -77
- package/src/types/nuxt-imports.d.ts +0 -61
- package/src/utils/config.ts +0 -22
- /package/dist/{types/auth.d.ts → auth.d.ts} +0 -0
- /package/dist/{types/auth.js → auth.js} +0 -0
- /package/dist/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/index.js → index.js} +0 -0
- /package/dist/{constants/auth.d.ts → runtime/composables/useEnfyraApi.d.ts} +0 -0
- /package/dist/{utils/config.d.ts → runtime/composables/useEnfyraAuth.d.ts} +0 -0
- /package/dist/{utils/server/proxy.d.ts → runtime/constants/auth.d.ts} +0 -0
- /package/dist/{constants/auth.mjs → runtime/constants/auth.js} +0 -0
- /package/dist/{utils/server/refreshToken.d.ts → runtime/constants/config.d.ts} +0 -0
- /package/dist/{constants → runtime/constants}/config.js +0 -0
- /package/dist/{utils/http.mjs → runtime/utils/http.js} +0 -0
- /package/dist/{utils/url.mjs → runtime/utils/url.js} +0 -0
- /package/src/{constants → runtime/constants}/auth.ts +0 -0
- /package/src/{constants → runtime/constants}/config.ts +0 -0
- /package/src/{utils → runtime/utils}/http.ts +0 -0
- /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
|
-
}
|
package/src/utils/config.ts
DELETED
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|