@frontic/nuxt 0.8.1 → 0.8.2
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.
|
@@ -52,6 +52,12 @@ declare module '@frontic/stack/generated-client' {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
declare module '@frontic/stack/generated-types' {
|
|
55
|
+
export interface RequestOptions {
|
|
56
|
+
requestUrl?: string
|
|
57
|
+
contextKey?: string
|
|
58
|
+
contextDomain?: string
|
|
59
|
+
proxyUrl?: string
|
|
60
|
+
}
|
|
55
61
|
export interface Blocks {}
|
|
56
62
|
export interface BlockData {}
|
|
57
63
|
export interface Pages {}
|
|
@@ -6,32 +6,20 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { MaybeRef, Ref, ShallowRef } from 'vue';
|
|
8
8
|
import type { UseQueryReturn } from '@pinia/colada';
|
|
9
|
-
import type { Listings, ListingParameters, ListingQueryFilters, ListingQuerySorts, Responses } from '@frontic/stack/generated-types';
|
|
9
|
+
import type { Listings, ListingParameters, ListingQueryFilters, ListingQuerySorts, RequestOptions, Responses } from '@frontic/stack/generated-types';
|
|
10
10
|
export type { Listings, ListingParameters, ListingQueryFilters, ListingQuerySorts, Responses };
|
|
11
11
|
export type { Query, Sort, EqualsFilter, LogicalFilter, Filter, RangeFilter, ContainsFilter } from '@frontic/stack/query-types';
|
|
12
12
|
/**
|
|
13
|
-
* Shared request options for all Frontic composables
|
|
14
|
-
* These options match the client's RequestOptions interface
|
|
13
|
+
* Shared request options for all Frontic composables.
|
|
15
14
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* Derived from the client's `RequestOptions` so new fields and renames flow
|
|
16
|
+
* through automatically. Each field is wrapped in `MaybeRef` so callers can
|
|
17
|
+
* pass reactive values, and the surface is narrowed to the options that make
|
|
18
|
+
* sense in a Nuxt composable context (proxyUrl is configured at module level).
|
|
18
19
|
*/
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
contextKey?: MaybeRef<string | undefined>;
|
|
24
|
-
/**
|
|
25
|
-
* Context domain to override the global contextDomain for this request
|
|
26
|
-
* Used to indicate the requested region and locale
|
|
27
|
-
*/
|
|
28
|
-
contextDomain?: MaybeRef<string | undefined>;
|
|
29
|
-
/**
|
|
30
|
-
* Request URL for analytics/tracking purposes
|
|
31
|
-
* URL to the current page, used by the Fetch API for tracking
|
|
32
|
-
*/
|
|
33
|
-
requestUrl?: MaybeRef<string | undefined>;
|
|
34
|
-
}
|
|
20
|
+
export type FronticRequestOptions = {
|
|
21
|
+
[K in 'contextKey' | 'contextDomain' | 'requestUrl']?: MaybeRef<RequestOptions[K] | undefined>;
|
|
22
|
+
};
|
|
35
23
|
/**
|
|
36
24
|
* Inclusion mode for configuring which fields to show
|
|
37
25
|
* - 'include': Only show specified keys
|
package/package.json
CHANGED