nuxt-api-party
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.5.0" | ||
"version": "0.5.1" | ||
} |
@@ -7,3 +7,3 @@ import type { FetchOptions } from 'ofetch'; | ||
}; | ||
export type $Api = <T = any>(request: string, opts?: ApiFetchOptions) => Promise<T>; | ||
export declare function _$api<T = any>(endpointId: string, request: string, opts?: ApiFetchOptions): Promise<T>; | ||
export type $Api = <T = any>(path: string, opts?: ApiFetchOptions) => Promise<T>; | ||
export declare function _$api<T = any>(endpointId: string, path: string, opts?: ApiFetchOptions): Promise<T>; |
@@ -11,4 +11,4 @@ import type { FetchError, FetchOptions } from 'ofetch'; | ||
}; | ||
export type UseApiData = <T = any>(request: MaybeComputedRef<string>, opts?: UseApiDataOptions<T>) => AsyncData<T, FetchError | null | true>; | ||
export declare function _useApiData<T = any>(endpointId: string, request: MaybeComputedRef<string>, opts?: UseApiDataOptions<T>): AsyncData<T, true | FetchError<any> | null>; | ||
export type UseApiData = <T = any>(path: MaybeComputedRef<string>, opts?: UseApiDataOptions<T>) => AsyncData<T, FetchError | null | true>; | ||
export declare function _useApiData<T = any>(endpointId: string, path: MaybeComputedRef<string>, opts?: UseApiDataOptions<T>): AsyncData<T, true | FetchError<any> | null>; | ||
export {}; |
import type { QueryObject } from 'ufo'; | ||
import type { ComputedRef, Ref } from 'vue'; | ||
export interface EndpointFetchOptions { | ||
request: string; | ||
query?: QueryObject; | ||
@@ -6,0 +5,0 @@ method?: string; |
{ | ||
"name": "nuxt-api-party", | ||
"type": "module", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"packageManager": "pnpm@7.17.1", | ||
@@ -6,0 +6,0 @@ "description": "Nuxt 3 module to securely connect with any API", |
@@ -396,3 +396,3 @@  | ||
> & Pick< | ||
FetchOptions, | ||
ComputedOptions<FetchOptions>, | ||
| 'onRequest' | ||
@@ -403,6 +403,6 @@ | 'onRequestError' | ||
// Pick from `globalThis.RequestInit` | ||
| 'query' | ||
| 'headers' | ||
| 'method' | ||
> & { | ||
query?: QueryObject | ||
body?: Record<string, any> | ||
@@ -409,0 +409,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24954
345