@scayle/omnichannel-nuxt 4.0.0 → 4.0.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +16 -0
  3. package/dist/index.d.mts +164 -2
  4. package/dist/index.d.ts +164 -2
  5. package/dist/module.d.mts +6 -2
  6. package/dist/module.d.ts +6 -2
  7. package/dist/module.json +5 -1
  8. package/dist/module.mjs +6 -1
  9. package/dist/runtime/composables/index.d.ts +4 -4
  10. package/dist/runtime/composables/index.js +4 -0
  11. package/dist/runtime/composables/useStoreLocator.d.ts +4 -4
  12. package/dist/runtime/composables/{useStoreLocator.mjs → useStoreLocator.js} +3 -3
  13. package/dist/runtime/composables/useStoreVariantById.d.ts +2 -2
  14. package/dist/runtime/composables/useStores.d.ts +2 -2
  15. package/dist/runtime/composables/useVariantStores.d.ts +2 -2
  16. package/dist/runtime/constants/httpStatus.d.ts +4 -4
  17. package/dist/runtime/constants/{httpStatus.mjs → httpStatus.js} +4 -4
  18. package/dist/runtime/error/errorHandler.d.ts +1 -1
  19. package/dist/runtime/error/{errorHandler.mjs → errorHandler.js} +2 -2
  20. package/dist/runtime/handler.d.ts +6 -1
  21. package/dist/runtime/{handler.mjs → handler.js} +7 -4
  22. package/dist/runtime/lib/init.d.ts +4 -3
  23. package/dist/runtime/lib/{init.mjs → init.js} +5 -2
  24. package/dist/runtime/rpc/storeLocator.d.ts +4 -4
  25. package/dist/runtime/rpc/{storeLocator.mjs → storeLocator.js} +1 -1
  26. package/dist/types.d.mts +4 -5
  27. package/dist/types.d.ts +4 -5
  28. package/package.json +17 -18
  29. package/dist/runtime/composables/index.mjs +0 -4
  30. package/dist/shared/omnichannel-nuxt.270bfbda.d.mts +0 -163
  31. package/dist/shared/omnichannel-nuxt.270bfbda.d.ts +0 -163
  32. /package/dist/runtime/composables/{useStoreVariantById.mjs → useStoreVariantById.js} +0 -0
  33. /package/dist/runtime/composables/{useStores.mjs → useStores.js} +0 -0
  34. /package/dist/runtime/composables/{useVariantStores.mjs → useVariantStores.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @scayle/omnichannel-nuxt
2
2
 
3
+ ## 4.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Support internal access header
8
+
9
+ ## 4.0.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Update @nuxt/module-builder to 0.8.4
14
+
3
15
  ## 4.0.0
4
16
 
5
17
  ### Major Changes
package/README.md CHANGED
@@ -84,3 +84,19 @@ const variantId = 1
84
84
  const storeId = 12
85
85
  await refreshStoreVariant(variantId, storeId)
86
86
  ```
87
+
88
+ ## What is SCAYLE?
89
+
90
+ [SCAYLE](https://scayle.com) is a full-featured e-commerce software solution that comes with flexible APIs.
91
+ Within SCAYLE, you can manage all aspects of your shop, such as products, stocks, customers, and transactions.
92
+
93
+ Learn more about [SCAYLE’s architecture](https://scayle.dev/en/developer-guide) and commerce modules in the docs.
94
+
95
+ ## Other channels
96
+
97
+ - [LinkedIn](https://www.linkedin.com/company/scaylecommerce/)
98
+ - [Jobs](https://careers.smartrecruiters.com/ABOUTYOUGmbH/scayle)
99
+
100
+ ## License
101
+
102
+ Licensed under the [MIT License](https://opensource.org/license/mit/)
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ValuesType } from 'utility-types';
2
- export { u as FetchStoreVariantByIdParams, t as FetchStoresForVariantParams, F as FiltersAddressParams, q as FiltersCoordinatesParams, G as GeoPoint, j as OmnichannelLinks, i as OmnichannelMeta, a as OpeningTimeException, O as OpeningTimeInterval, f as OpeningTimes, g as Store, c as StoreAddress, n as StoreAvailabilityCheck, o as StoreAvailabilityCheckResponse, b as StoreImage, e as StoreItem, d as StoreItemVariant, k as StoreLocation, l as StoreLocationResponse, S as StoreLocatorConfig, r as StoreLocatorSearchParams, m as StoreVariantLocation, h as StoreWithProperty, V as VariantLocation, p as VariantLocationResponse, s as VariantLocatorSearchParams } from './shared/omnichannel-nuxt.270bfbda.mjs';
3
2
 
4
3
  declare const OpeningTime: {
5
4
  readonly MONDAY: "mon";
@@ -12,4 +11,167 @@ declare const OpeningTime: {
12
11
  };
13
12
  type OpeningTime = ValuesType<typeof OpeningTime>;
14
13
 
15
- export { OpeningTime };
14
+ interface StoreLocatorConfig {
15
+ token: string;
16
+ host: string;
17
+ companyId?: number;
18
+ googleApiKey?: string;
19
+ additionalHeaders?: HeadersInit;
20
+ }
21
+ interface GeoPoint {
22
+ lat: number;
23
+ lng: number;
24
+ }
25
+ interface OpeningTimeInterval {
26
+ timeFrom: string;
27
+ timeUntil: string;
28
+ }
29
+ interface OpeningTimeException {
30
+ exceptionDate: string;
31
+ exceptionName: string;
32
+ exceptionType: 'open' | 'closed';
33
+ timeFrom: string;
34
+ timeUntil: string;
35
+ }
36
+ interface StoreImage {
37
+ id: number;
38
+ name: string;
39
+ damKey: string;
40
+ url: string;
41
+ customData: object;
42
+ }
43
+ interface StoreAddress {
44
+ street: string;
45
+ houseNumber: string;
46
+ zipCode: string;
47
+ city: string;
48
+ countryCode: string;
49
+ }
50
+ interface StoreItemVariant {
51
+ variantId: number;
52
+ variantReferenceKey: string;
53
+ quantity: number;
54
+ }
55
+ interface StoreItem {
56
+ productId: number;
57
+ productReferenceKey: string;
58
+ name: object;
59
+ image: string;
60
+ variants: StoreItemVariant[];
61
+ }
62
+ interface OpeningTimes {
63
+ mon: OpeningTimeInterval[];
64
+ tue: OpeningTimeInterval[];
65
+ wed: OpeningTimeInterval[];
66
+ thu: OpeningTimeInterval[];
67
+ fri: OpeningTimeInterval[];
68
+ sat: OpeningTimeInterval[];
69
+ sun: OpeningTimeInterval[];
70
+ exceptions: OpeningTimeException[];
71
+ currentlyOpen: boolean;
72
+ minutesUntilClosed: number;
73
+ }
74
+ interface Store {
75
+ id: number;
76
+ referenceKey: string;
77
+ name: string;
78
+ email: string;
79
+ address: StoreAddress;
80
+ openingTimes?: OpeningTimes;
81
+ geoPoint: GeoPoint;
82
+ customData?: object;
83
+ settings?: {
84
+ shipFromStore: boolean;
85
+ clickAndCollect: boolean;
86
+ };
87
+ isActive: boolean;
88
+ images?: StoreImage;
89
+ }
90
+ type StoreWithProperty = 'openingTimes' | 'customData' | 'images' | 'settings';
91
+ interface OmnichannelMeta {
92
+ path: string;
93
+ currentPage: number;
94
+ lastPage: number;
95
+ from: number;
96
+ to: number;
97
+ perPage: number;
98
+ total: number;
99
+ firstPageUrl: string;
100
+ lastPageUrl: string;
101
+ prevPageUrl: string | null;
102
+ nextPageUrl: string | null;
103
+ }
104
+ interface OmnichannelLinks {
105
+ first: string | null;
106
+ last: string | null;
107
+ prev: string | null;
108
+ next: string | null;
109
+ }
110
+ interface StoreLocation extends Store {
111
+ distance: number;
112
+ }
113
+ interface StoreLocationResponse {
114
+ data: StoreLocation[];
115
+ meta: {
116
+ searchAddress: GeoPoint;
117
+ };
118
+ }
119
+ interface StoreVariantLocation extends StoreLocation {
120
+ quantity: number;
121
+ }
122
+ interface StoreAvailabilityCheck extends Store {
123
+ items: StoreItem[];
124
+ }
125
+ interface StoreAvailabilityCheckResponse {
126
+ data: StoreAvailabilityCheck;
127
+ meta: OmnichannelMeta;
128
+ }
129
+ interface VariantLocation {
130
+ name: object;
131
+ productId: number;
132
+ variantId: number;
133
+ productReferenceKey: string;
134
+ variantReferenceKey: string;
135
+ image: string;
136
+ additionalData: object;
137
+ stores: StoreVariantLocation[];
138
+ }
139
+ interface VariantLocationResponse {
140
+ data: VariantLocation;
141
+ meta: OmnichannelMeta;
142
+ }
143
+ interface FiltersAddressParams {
144
+ address: string;
145
+ radius: number;
146
+ }
147
+ interface FiltersCoordinatesParams {
148
+ geoPoint: GeoPoint;
149
+ radius: number;
150
+ }
151
+ interface StoreLocatorSearchParams {
152
+ filters: FiltersAddressParams | FiltersCoordinatesParams;
153
+ perPage?: number;
154
+ with?: StoreWithProperty[];
155
+ }
156
+ interface VariantLocatorSearchParams {
157
+ variantId: number;
158
+ filters: FiltersAddressParams | FiltersCoordinatesParams;
159
+ perPage?: number;
160
+ with?: StoreWithProperty[];
161
+ }
162
+ interface FetchStoresForVariantParams {
163
+ variantId: number;
164
+ filters: {
165
+ address: string;
166
+ radius: number;
167
+ };
168
+ perPage?: number;
169
+ with?: StoreWithProperty[];
170
+ }
171
+ interface FetchStoreVariantByIdParams {
172
+ storeId: number;
173
+ variantId: number;
174
+ with?: StoreWithProperty[];
175
+ }
176
+
177
+ export { type FetchStoreVariantByIdParams, type FetchStoresForVariantParams, type FiltersAddressParams, type FiltersCoordinatesParams, type GeoPoint, type OmnichannelLinks, type OmnichannelMeta, OpeningTime, type OpeningTimeException, type OpeningTimeInterval, type OpeningTimes, type Store, type StoreAddress, type StoreAvailabilityCheck, type StoreAvailabilityCheckResponse, type StoreImage, type StoreItem, type StoreItemVariant, type StoreLocation, type StoreLocationResponse, type StoreLocatorConfig, type StoreLocatorSearchParams, type StoreVariantLocation, type StoreWithProperty, type VariantLocation, type VariantLocationResponse, type VariantLocatorSearchParams };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ValuesType } from 'utility-types';
2
- export { u as FetchStoreVariantByIdParams, t as FetchStoresForVariantParams, F as FiltersAddressParams, q as FiltersCoordinatesParams, G as GeoPoint, j as OmnichannelLinks, i as OmnichannelMeta, a as OpeningTimeException, O as OpeningTimeInterval, f as OpeningTimes, g as Store, c as StoreAddress, n as StoreAvailabilityCheck, o as StoreAvailabilityCheckResponse, b as StoreImage, e as StoreItem, d as StoreItemVariant, k as StoreLocation, l as StoreLocationResponse, S as StoreLocatorConfig, r as StoreLocatorSearchParams, m as StoreVariantLocation, h as StoreWithProperty, V as VariantLocation, p as VariantLocationResponse, s as VariantLocatorSearchParams } from './shared/omnichannel-nuxt.270bfbda.js';
3
2
 
4
3
  declare const OpeningTime: {
5
4
  readonly MONDAY: "mon";
@@ -12,4 +11,167 @@ declare const OpeningTime: {
12
11
  };
13
12
  type OpeningTime = ValuesType<typeof OpeningTime>;
14
13
 
15
- export { OpeningTime };
14
+ interface StoreLocatorConfig {
15
+ token: string;
16
+ host: string;
17
+ companyId?: number;
18
+ googleApiKey?: string;
19
+ additionalHeaders?: HeadersInit;
20
+ }
21
+ interface GeoPoint {
22
+ lat: number;
23
+ lng: number;
24
+ }
25
+ interface OpeningTimeInterval {
26
+ timeFrom: string;
27
+ timeUntil: string;
28
+ }
29
+ interface OpeningTimeException {
30
+ exceptionDate: string;
31
+ exceptionName: string;
32
+ exceptionType: 'open' | 'closed';
33
+ timeFrom: string;
34
+ timeUntil: string;
35
+ }
36
+ interface StoreImage {
37
+ id: number;
38
+ name: string;
39
+ damKey: string;
40
+ url: string;
41
+ customData: object;
42
+ }
43
+ interface StoreAddress {
44
+ street: string;
45
+ houseNumber: string;
46
+ zipCode: string;
47
+ city: string;
48
+ countryCode: string;
49
+ }
50
+ interface StoreItemVariant {
51
+ variantId: number;
52
+ variantReferenceKey: string;
53
+ quantity: number;
54
+ }
55
+ interface StoreItem {
56
+ productId: number;
57
+ productReferenceKey: string;
58
+ name: object;
59
+ image: string;
60
+ variants: StoreItemVariant[];
61
+ }
62
+ interface OpeningTimes {
63
+ mon: OpeningTimeInterval[];
64
+ tue: OpeningTimeInterval[];
65
+ wed: OpeningTimeInterval[];
66
+ thu: OpeningTimeInterval[];
67
+ fri: OpeningTimeInterval[];
68
+ sat: OpeningTimeInterval[];
69
+ sun: OpeningTimeInterval[];
70
+ exceptions: OpeningTimeException[];
71
+ currentlyOpen: boolean;
72
+ minutesUntilClosed: number;
73
+ }
74
+ interface Store {
75
+ id: number;
76
+ referenceKey: string;
77
+ name: string;
78
+ email: string;
79
+ address: StoreAddress;
80
+ openingTimes?: OpeningTimes;
81
+ geoPoint: GeoPoint;
82
+ customData?: object;
83
+ settings?: {
84
+ shipFromStore: boolean;
85
+ clickAndCollect: boolean;
86
+ };
87
+ isActive: boolean;
88
+ images?: StoreImage;
89
+ }
90
+ type StoreWithProperty = 'openingTimes' | 'customData' | 'images' | 'settings';
91
+ interface OmnichannelMeta {
92
+ path: string;
93
+ currentPage: number;
94
+ lastPage: number;
95
+ from: number;
96
+ to: number;
97
+ perPage: number;
98
+ total: number;
99
+ firstPageUrl: string;
100
+ lastPageUrl: string;
101
+ prevPageUrl: string | null;
102
+ nextPageUrl: string | null;
103
+ }
104
+ interface OmnichannelLinks {
105
+ first: string | null;
106
+ last: string | null;
107
+ prev: string | null;
108
+ next: string | null;
109
+ }
110
+ interface StoreLocation extends Store {
111
+ distance: number;
112
+ }
113
+ interface StoreLocationResponse {
114
+ data: StoreLocation[];
115
+ meta: {
116
+ searchAddress: GeoPoint;
117
+ };
118
+ }
119
+ interface StoreVariantLocation extends StoreLocation {
120
+ quantity: number;
121
+ }
122
+ interface StoreAvailabilityCheck extends Store {
123
+ items: StoreItem[];
124
+ }
125
+ interface StoreAvailabilityCheckResponse {
126
+ data: StoreAvailabilityCheck;
127
+ meta: OmnichannelMeta;
128
+ }
129
+ interface VariantLocation {
130
+ name: object;
131
+ productId: number;
132
+ variantId: number;
133
+ productReferenceKey: string;
134
+ variantReferenceKey: string;
135
+ image: string;
136
+ additionalData: object;
137
+ stores: StoreVariantLocation[];
138
+ }
139
+ interface VariantLocationResponse {
140
+ data: VariantLocation;
141
+ meta: OmnichannelMeta;
142
+ }
143
+ interface FiltersAddressParams {
144
+ address: string;
145
+ radius: number;
146
+ }
147
+ interface FiltersCoordinatesParams {
148
+ geoPoint: GeoPoint;
149
+ radius: number;
150
+ }
151
+ interface StoreLocatorSearchParams {
152
+ filters: FiltersAddressParams | FiltersCoordinatesParams;
153
+ perPage?: number;
154
+ with?: StoreWithProperty[];
155
+ }
156
+ interface VariantLocatorSearchParams {
157
+ variantId: number;
158
+ filters: FiltersAddressParams | FiltersCoordinatesParams;
159
+ perPage?: number;
160
+ with?: StoreWithProperty[];
161
+ }
162
+ interface FetchStoresForVariantParams {
163
+ variantId: number;
164
+ filters: {
165
+ address: string;
166
+ radius: number;
167
+ };
168
+ perPage?: number;
169
+ with?: StoreWithProperty[];
170
+ }
171
+ interface FetchStoreVariantByIdParams {
172
+ storeId: number;
173
+ variantId: number;
174
+ with?: StoreWithProperty[];
175
+ }
176
+
177
+ export { type FetchStoreVariantByIdParams, type FetchStoresForVariantParams, type FiltersAddressParams, type FiltersCoordinatesParams, type GeoPoint, type OmnichannelLinks, type OmnichannelMeta, OpeningTime, type OpeningTimeException, type OpeningTimeInterval, type OpeningTimes, type Store, type StoreAddress, type StoreAvailabilityCheck, type StoreAvailabilityCheckResponse, type StoreImage, type StoreItem, type StoreItemVariant, type StoreLocation, type StoreLocationResponse, type StoreLocatorConfig, type StoreLocatorSearchParams, type StoreVariantLocation, type StoreWithProperty, type VariantLocation, type VariantLocationResponse, type VariantLocatorSearchParams };
package/dist/module.d.mts CHANGED
@@ -1,6 +1,10 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import { S as StoreLocatorConfig } from './shared/omnichannel-nuxt.270bfbda.mjs';
3
2
 
4
- declare const _default: _nuxt_schema.NuxtModule<StoreLocatorConfig>;
3
+ type ModuleOptions = {
4
+ token: string;
5
+ host: string;
6
+ internalAccessHeader?: string | undefined;
7
+ };
8
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
9
 
6
10
  export { _default as default };
package/dist/module.d.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
- import { S as StoreLocatorConfig } from './shared/omnichannel-nuxt.270bfbda.js';
3
2
 
4
- declare const _default: _nuxt_schema.NuxtModule<StoreLocatorConfig>;
3
+ type ModuleOptions = {
4
+ token: string;
5
+ host: string;
6
+ internalAccessHeader?: string | undefined;
7
+ };
8
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
9
 
6
10
  export { _default as default };
package/dist/module.json CHANGED
@@ -1,4 +1,8 @@
1
1
  {
2
2
  "name": "@scayle/omnichannel-nuxt",
3
- "version": "4.0.0"
3
+ "version": "4.0.2",
4
+ "builder": {
5
+ "@nuxt/module-builder": "0.8.4",
6
+ "unbuild": "2.0.0"
7
+ }
4
8
  }
package/dist/module.mjs CHANGED
@@ -2,13 +2,18 @@ import { defineNuxtModule, isNuxt2, createResolver, addServerHandler, addImports
2
2
 
3
3
  const module = defineNuxtModule({
4
4
  meta: {},
5
- async setup(_moduleOptions, nuxt) {
5
+ async setup(moduleOptions, nuxt) {
6
6
  if (isNuxt2()) {
7
7
  throw new Error(
8
8
  "Nuxt 2 is not supported in this version of @scayle/omnichannel-nuxt"
9
9
  );
10
10
  } else {
11
11
  const { resolve } = createResolver(import.meta.url);
12
+ nuxt.options.runtimeConfig.omnichannel = {
13
+ apiToken: moduleOptions.token ?? "",
14
+ apiHost: moduleOptions.host ?? "",
15
+ internalAccessHeader: moduleOptions.internalAccessHeader ?? ""
16
+ };
12
17
  addServerHandler({
13
18
  route: `/api/omnichannel/**`,
14
19
  handler: resolve("./runtime/handler"),
@@ -1,4 +1,4 @@
1
- export * from './useStoreLocator';
2
- export * from './useStores';
3
- export * from './useStoreVariantById';
4
- export * from './useVariantStores';
1
+ export * from './useStoreLocator.js';
2
+ export * from './useStores.js';
3
+ export * from './useStoreVariantById.js';
4
+ export * from './useVariantStores.js';
@@ -0,0 +1,4 @@
1
+ export * from "./useStoreLocator.js";
2
+ export * from "./useStores.js";
3
+ export * from "./useStoreVariantById.js";
4
+ export * from "./useVariantStores.js";
@@ -1,9 +1,9 @@
1
- import type { StoreWithProperty } from '../../types';
1
+ import type { StoreWithProperty } from '../../types/index.js';
2
2
  export declare function useStoreLocator(key?: string, withProperties?: StoreWithProperty[]): {
3
- storesData: any;
3
+ storesData: import("vue").ComputedRef<import("../../types").StoreLocation[] | undefined>;
4
4
  refreshStores: (searchParams: import("../../types").StoreLocatorSearchParams) => Promise<void>;
5
- storeVariantData: any;
5
+ storeVariantData: import("vue").ComputedRef<import("../../types").StoreAvailabilityCheck | null>;
6
6
  refreshStoreVariant: (variantId: number, storeId: number) => Promise<void>;
7
- variantStoresData: any;
7
+ variantStoresData: import("vue").ComputedRef<import("../../types").VariantLocation | null>;
8
8
  refreshVariantStores: (searchParams: import("../../types").VariantLocatorSearchParams) => Promise<void>;
9
9
  };
@@ -1,6 +1,6 @@
1
- import { useStoreVariantById } from "./useStoreVariantById.mjs";
2
- import { useStores } from "./useStores.mjs";
3
- import { useVariantStores } from "./useVariantStores.mjs";
1
+ import { useStoreVariantById } from "./useStoreVariantById.js";
2
+ import { useStores } from "./useStores.js";
3
+ import { useVariantStores } from "./useVariantStores.js";
4
4
  export function useStoreLocator(key = "useStoreLocator", withProperties = []) {
5
5
  const { data: storesData, getData: refreshStores } = useStores(
6
6
  `${key}-stores`,
@@ -1,5 +1,5 @@
1
- import type { StoreWithProperty } from '../../types';
1
+ import type { StoreAvailabilityCheck, StoreWithProperty } from '../../types/index.js';
2
2
  export declare function useStoreVariantById(key?: string, withProperties?: StoreWithProperty[]): {
3
- data: any;
3
+ data: import("#imports").ComputedRef<StoreAvailabilityCheck | null>;
4
4
  getData: (variantId: number, storeId: number) => Promise<void>;
5
5
  };
@@ -1,5 +1,5 @@
1
- import type { StoreLocatorSearchParams, StoreWithProperty } from '../../types';
1
+ import type { StoreLocatorSearchParams, StoreWithProperty } from '../../types/index.js';
2
2
  export declare function useStores(key?: string, withProperties?: StoreWithProperty[]): {
3
- data: any;
3
+ data: import("#imports").ComputedRef<import("../../types").StoreLocation[] | undefined>;
4
4
  getData: (searchParams: StoreLocatorSearchParams) => Promise<void>;
5
5
  };
@@ -1,5 +1,5 @@
1
- import type { VariantLocatorSearchParams, StoreWithProperty } from '../../types';
1
+ import type { VariantLocatorSearchParams, VariantLocation, StoreWithProperty } from '../../types/index.js';
2
2
  export declare function useVariantStores(key?: string, withProperties?: StoreWithProperty[]): {
3
- data: any;
3
+ data: import("#imports").ComputedRef<VariantLocation | null>;
4
4
  getData: (searchParams: VariantLocatorSearchParams) => Promise<void>;
5
5
  };
@@ -195,7 +195,7 @@ declare const HttpStatusCode: {
195
195
  /**
196
196
  * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
197
197
  */
198
- readonly PAYLOAD_TOO_LARGE: 413;
198
+ readonly CONTENT_TOO_LARGE: 413;
199
199
  /**
200
200
  * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
201
201
  * in which case it should be converted to a POST request.
@@ -230,7 +230,7 @@ declare const HttpStatusCode: {
230
230
  /**
231
231
  * The request was well-formed but was unable to be followed due to semantic errors.
232
232
  */
233
- readonly UNPROCESSABLE_ENTITY: 422;
233
+ readonly UNPROCESSABLE_CONTENT: 422;
234
234
  /**
235
235
  * The resource that is being accessed is locked.
236
236
  */
@@ -509,7 +509,7 @@ declare const HttpStatusMessage: {
509
509
  /**
510
510
  * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
511
511
  */
512
- readonly PAYLOAD_TOO_LARGE: "PAYLOAD TOO LARGE";
512
+ readonly CONTENT_TOO_LARGE: "CONTENT TOO LARGE";
513
513
  /**
514
514
  * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
515
515
  * in which case it should be converted to a POST request.
@@ -544,7 +544,7 @@ declare const HttpStatusMessage: {
544
544
  /**
545
545
  * The request was well-formed but was unable to be followed due to semantic errors.
546
546
  */
547
- readonly UNPROCESSABLE_ENTITY: "UNPROCESSABLE ENTITY";
547
+ readonly UNPROCESSABLE_CONTENT: "UNPROCESSABLE CONTENT";
548
548
  /**
549
549
  * The resource that is being accessed is locked.
550
550
  */
@@ -194,7 +194,7 @@ const HttpStatusCode = {
194
194
  /**
195
195
  * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
196
196
  */
197
- PAYLOAD_TOO_LARGE: 413,
197
+ CONTENT_TOO_LARGE: 413,
198
198
  /**
199
199
  * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
200
200
  * in which case it should be converted to a POST request.
@@ -229,7 +229,7 @@ const HttpStatusCode = {
229
229
  /**
230
230
  * The request was well-formed but was unable to be followed due to semantic errors.
231
231
  */
232
- UNPROCESSABLE_ENTITY: 422,
232
+ UNPROCESSABLE_CONTENT: 422,
233
233
  /**
234
234
  * The resource that is being accessed is locked.
235
235
  */
@@ -508,7 +508,7 @@ const HttpStatusMessage = {
508
508
  /**
509
509
  * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
510
510
  */
511
- PAYLOAD_TOO_LARGE: "PAYLOAD TOO LARGE",
511
+ CONTENT_TOO_LARGE: "CONTENT TOO LARGE",
512
512
  /**
513
513
  * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
514
514
  * in which case it should be converted to a POST request.
@@ -543,7 +543,7 @@ const HttpStatusMessage = {
543
543
  /**
544
544
  * The request was well-formed but was unable to be followed due to semantic errors.
545
545
  */
546
- UNPROCESSABLE_ENTITY: "UNPROCESSABLE ENTITY",
546
+ UNPROCESSABLE_CONTENT: "UNPROCESSABLE CONTENT",
547
547
  /**
548
548
  * The resource that is being accessed is locked.
549
549
  */
@@ -1,4 +1,4 @@
1
- import { HttpStatusCode } from '../constants/httpStatus';
1
+ import { HttpStatusCode } from '../constants/httpStatus.js';
2
2
  declare const parseErrorData: (error: unknown) => {
3
3
  statusCode: HttpStatusCode;
4
4
  message: string;
@@ -1,5 +1,5 @@
1
- import { HttpStatusCode, HttpStatusMessage } from "../constants/httpStatus.mjs";
2
- import { FetchError } from "../lib/init.mjs";
1
+ import { HttpStatusCode, HttpStatusMessage } from "../constants/httpStatus.js";
2
+ import { FetchError } from "../lib/init.js";
3
3
  const parseErrorData = (error) => {
4
4
  if (error instanceof FetchError) {
5
5
  return {
@@ -1,2 +1,7 @@
1
- declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
1
+ import { HttpStatusCode } from './constants/httpStatus.js';
2
+ declare const _default: import("h3").EventHandler<import("h3").EventHandlerRequest, Promise<import("../types").StoreAvailabilityCheckResponse | import("./lib/init").PaginatedResponse<import("../types").StoreLocation[]> | import("./lib/init").PaginatedResponse<import("../types").VariantLocationResponse> | {
3
+ statusCode: HttpStatusCode;
4
+ message: string;
5
+ url?: string;
6
+ } | undefined>>;
2
7
  export default _default;
@@ -1,11 +1,11 @@
1
1
  import { defineEventHandler, readBody, setResponseStatus } from "h3";
2
- import { HttpStatusCode } from "./constants/httpStatus.mjs";
2
+ import { HttpStatusCode } from "./constants/httpStatus.js";
3
3
  import {
4
4
  getStores,
5
5
  getStoreVariantById,
6
6
  getStoresForVariant
7
- } from "./rpc/storeLocator.mjs";
8
- import { parseErrorData } from "./error/errorHandler.mjs";
7
+ } from "./rpc/storeLocator.js";
8
+ import { parseErrorData } from "./error/errorHandler.js";
9
9
  import { useRuntimeConfig } from "#imports";
10
10
  export default defineEventHandler(async (event) => {
11
11
  const path = event.path.split("/").reverse()[0];
@@ -24,7 +24,10 @@ export default defineEventHandler(async (event) => {
24
24
  }
25
25
  const options = {
26
26
  host: config.apiHost,
27
- token: config.apiToken
27
+ token: config.apiToken,
28
+ additionalHeaders: config.internalAccessHeader ? {
29
+ "x-internal-access": config.internalAccessHeader
30
+ } : {}
28
31
  };
29
32
  try {
30
33
  switch (path) {
@@ -1,4 +1,4 @@
1
- import type { StoreLocation, StoreLocatorSearchParams, StoreAvailabilityCheckResponse, VariantLocationResponse, FetchStoresForVariantParams, FetchStoreVariantByIdParams } from '../types';
1
+ import type { StoreLocation, StoreLocatorConfig, StoreLocatorSearchParams, StoreAvailabilityCheckResponse, VariantLocationResponse, FetchStoresForVariantParams, FetchStoreVariantByIdParams } from '../../types/index.js';
2
2
  export interface PaginatedResponse<DataType> {
3
3
  nextPage: null;
4
4
  data: DataType;
@@ -15,11 +15,12 @@ export declare class FetchError extends Error {
15
15
  export declare class OmnichannelClient {
16
16
  private readonly host;
17
17
  private readonly token;
18
- constructor(host: string, token: string);
18
+ private readonly additionalHeaders;
19
+ constructor(host: string, token: string, additionalHeaders?: HeadersInit);
19
20
  get headers(): HeadersInit;
20
21
  private handleResponse;
21
22
  getStores(options: StoreLocatorSearchParams): Promise<PaginatedResponse<StoreLocation[]>>;
22
23
  getStoresForVariant(options: FetchStoresForVariantParams): Promise<PaginatedResponse<VariantLocationResponse>>;
23
24
  getStoreVariantById(options: FetchStoreVariantByIdParams): Promise<StoreAvailabilityCheckResponse>;
24
25
  }
25
- export declare const init: (config?: any) => OmnichannelClient | null;
26
+ export declare const init: (config?: StoreLocatorConfig) => OmnichannelClient | null;
@@ -15,15 +15,18 @@ export class FetchError extends Error {
15
15
  export class OmnichannelClient {
16
16
  host;
17
17
  token;
18
- constructor(host, token) {
18
+ additionalHeaders;
19
+ constructor(host, token, additionalHeaders) {
19
20
  this.host = host;
20
21
  this.token = token;
22
+ this.additionalHeaders = additionalHeaders;
21
23
  }
22
24
  get headers() {
23
25
  return {
24
26
  Authorization: `Bearer ${this.token}`,
25
27
  Accept: "application/json",
26
- "Content-Type": "application/json"
28
+ "Content-Type": "application/json",
29
+ ...this.additionalHeaders
27
30
  };
28
31
  }
29
32
  async handleResponse(response) {
@@ -1,4 +1,4 @@
1
- import type { StoreLocatorConfig, StoreLocatorSearchParams, FetchStoresForVariantParams, FetchStoreVariantByIdParams } from '../../types';
2
- export declare const getStores: (options: StoreLocatorSearchParams, storeLocator: StoreLocatorConfig) => Promise<import("../lib/init").PaginatedResponse<StoreLocation[]>>;
3
- export declare const getStoresForVariant: (options: FetchStoresForVariantParams, storeLocator: StoreLocatorConfig) => Promise<import("../lib/init").PaginatedResponse<VariantLocationResponse>>;
4
- export declare const getStoreVariantById: (options: FetchStoreVariantByIdParams, storeLocator: StoreLocatorConfig) => Promise<StoreAvailabilityCheckResponse>;
1
+ import type { StoreLocatorConfig, StoreLocatorSearchParams, FetchStoresForVariantParams, FetchStoreVariantByIdParams } from '../../types/index.js';
2
+ export declare const getStores: (options: StoreLocatorSearchParams, storeLocator: StoreLocatorConfig) => Promise<import("../lib/init").PaginatedResponse<import("../../types").StoreLocation[]>>;
3
+ export declare const getStoresForVariant: (options: FetchStoresForVariantParams, storeLocator: StoreLocatorConfig) => Promise<import("../lib/init").PaginatedResponse<import("../../types").VariantLocationResponse>>;
4
+ export declare const getStoreVariantById: (options: FetchStoreVariantByIdParams, storeLocator: StoreLocatorConfig) => Promise<import("../../types").StoreAvailabilityCheckResponse>;
@@ -1,4 +1,4 @@
1
- import { init } from "../lib/init.mjs";
1
+ import { init } from "../lib/init.js";
2
2
  const noClientMessage = "Client not configured";
3
3
  export const getStores = async function getStores2(options, storeLocator) {
4
4
  const omnichannelClient = init(storeLocator);
package/dist/types.d.mts CHANGED
@@ -1,8 +1,7 @@
1
+ import type { NuxtModule } from '@nuxt/schema'
1
2
 
2
- import type { } from './module.js'
3
+ import type { default as Module } from './module.js'
3
4
 
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
4
6
 
5
-
6
-
7
-
8
- export type { default } from './module.js'
7
+ export { default } from './module.js'
package/dist/types.d.ts CHANGED
@@ -1,8 +1,7 @@
1
+ import type { NuxtModule } from '@nuxt/schema'
1
2
 
2
- import type { } from './module'
3
+ import type { default as Module } from './module'
3
4
 
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
4
6
 
5
-
6
-
7
-
8
- export type { default } from './module'
7
+ export { default } from './module'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/omnichannel-nuxt",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "description": "Collection of essential utilities to work with omnichannel",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -8,6 +8,7 @@
8
8
  "access": "public",
9
9
  "registry": "https://registry.npmjs.org/"
10
10
  },
11
+ "website": "https://scayle.dev/en/extensions/omnichannel/user-guide",
11
12
  "exports": {
12
13
  "./module": {
13
14
  "types": "./dist/module.d.ts",
@@ -33,14 +34,14 @@
33
34
  "node": ">= 18.15.0"
34
35
  },
35
36
  "compatibility": {
36
- "nuxt": "^2.17.3 || ^3.9.0"
37
+ "nuxt": "^3.9.0"
37
38
  },
38
39
  "scripts": {
39
40
  "clean": "rimraf ./dist",
40
41
  "build": "nuxt-module-build build",
41
42
  "dev": "nuxi dev playground",
42
43
  "dev:build": "nuxi build playground",
43
- "prep": "nuxi prepare playground",
44
+ "prep": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
44
45
  "format": "dprint check",
45
46
  "format:fix": "dprint fmt",
46
47
  "lint": "eslint . --format gitlab",
@@ -56,24 +57,22 @@
56
57
  "utility-types": "^3.11.0"
57
58
  },
58
59
  "devDependencies": {
59
- "@nuxt/eslint": "0.5.0",
60
- "@nuxt/module-builder": "0.5.5",
61
- "@nuxt/schema": "3.12.4",
62
- "@nuxt/types": "2.18.1",
63
- "@nuxtjs/composition-api": "0.34.0",
64
- "@scayle/eslint-config-storefront": "4.3.0",
65
- "@types/node": "20.14.14",
66
- "@types/qs": "6.9.15",
60
+ "@nuxt/eslint": "0.6.0",
61
+ "@nuxt/module-builder": "0.8.4",
62
+ "@nuxt/schema": "3.13.2",
63
+ "@scayle/eslint-config-storefront": "4.3.2",
64
+ "@types/node": "20.16.11",
65
+ "@types/qs": "6.9.16",
67
66
  "dprint": "0.47.2",
68
- "eslint": "9.8.0",
67
+ "eslint": "9.12.0",
69
68
  "eslint-formatter-gitlab": "5.1.0",
70
- "h3": "1.12.0",
71
- "nuxi": "3.12.0",
72
- "typescript": "5.5.4",
73
- "vitest": "2.0.5",
74
- "vue": "2.7.16"
69
+ "h3": "1.13.0",
70
+ "nuxi": "3.14.0",
71
+ "nuxt": "3.13.2",
72
+ "typescript": "5.6.3",
73
+ "vitest": "2.1.3"
75
74
  },
76
75
  "volta": {
77
- "node": "20.16.0"
76
+ "node": "20.18.0"
78
77
  }
79
78
  }
@@ -1,4 +0,0 @@
1
- export * from "./useStoreLocator.mjs";
2
- export * from "./useStores.mjs";
3
- export * from "./useStoreVariantById.mjs";
4
- export * from "./useVariantStores.mjs";
@@ -1,163 +0,0 @@
1
- interface StoreLocatorConfig {
2
- token: string;
3
- host: string;
4
- companyId?: number;
5
- googleApiKey?: string;
6
- }
7
- interface GeoPoint {
8
- lat: number;
9
- lng: number;
10
- }
11
- interface OpeningTimeInterval {
12
- timeFrom: string;
13
- timeUntil: string;
14
- }
15
- interface OpeningTimeException {
16
- exceptionDate: string;
17
- exceptionName: string;
18
- exceptionType: 'open' | 'closed';
19
- timeFrom: string;
20
- timeUntil: string;
21
- }
22
- interface StoreImage {
23
- id: number;
24
- name: string;
25
- damKey: string;
26
- url: string;
27
- customData: object;
28
- }
29
- interface StoreAddress {
30
- street: string;
31
- houseNumber: string;
32
- zipCode: string;
33
- city: string;
34
- countryCode: string;
35
- }
36
- interface StoreItemVariant {
37
- variantId: number;
38
- variantReferenceKey: string;
39
- quantity: number;
40
- }
41
- interface StoreItem {
42
- productId: number;
43
- productReferenceKey: string;
44
- name: object;
45
- image: string;
46
- variants: StoreItemVariant[];
47
- }
48
- interface OpeningTimes {
49
- mon: OpeningTimeInterval[];
50
- tue: OpeningTimeInterval[];
51
- wed: OpeningTimeInterval[];
52
- thu: OpeningTimeInterval[];
53
- fri: OpeningTimeInterval[];
54
- sat: OpeningTimeInterval[];
55
- sun: OpeningTimeInterval[];
56
- exceptions: OpeningTimeException[];
57
- currentlyOpen: boolean;
58
- minutesUntilClosed: number;
59
- }
60
- interface Store {
61
- id: number;
62
- referenceKey: string;
63
- name: string;
64
- email: string;
65
- address: StoreAddress;
66
- openingTimes?: OpeningTimes;
67
- geoPoint: GeoPoint;
68
- customData?: object;
69
- settings?: {
70
- shipFromStore: boolean;
71
- clickAndCollect: boolean;
72
- };
73
- isActive: boolean;
74
- images?: StoreImage;
75
- }
76
- type StoreWithProperty = 'openingTimes' | 'customData' | 'images' | 'settings';
77
- interface OmnichannelMeta {
78
- path: string;
79
- currentPage: number;
80
- lastPage: number;
81
- from: number;
82
- to: number;
83
- perPage: number;
84
- total: number;
85
- firstPageUrl: string;
86
- lastPageUrl: string;
87
- prevPageUrl: string | null;
88
- nextPageUrl: string | null;
89
- }
90
- interface OmnichannelLinks {
91
- first: string | null;
92
- last: string | null;
93
- prev: string | null;
94
- next: string | null;
95
- }
96
- interface StoreLocation extends Store {
97
- distance: number;
98
- }
99
- interface StoreLocationResponse {
100
- data: StoreLocation[];
101
- meta: {
102
- searchAddress: GeoPoint;
103
- };
104
- }
105
- interface StoreVariantLocation extends StoreLocation {
106
- quantity: number;
107
- }
108
- interface StoreAvailabilityCheck extends Store {
109
- items: StoreItem[];
110
- }
111
- interface StoreAvailabilityCheckResponse {
112
- data: StoreAvailabilityCheck;
113
- meta: OmnichannelMeta;
114
- }
115
- interface VariantLocation {
116
- name: object;
117
- productId: number;
118
- variantId: number;
119
- productReferenceKey: string;
120
- variantReferenceKey: string;
121
- image: string;
122
- additionalData: object;
123
- stores: StoreVariantLocation[];
124
- }
125
- interface VariantLocationResponse {
126
- data: VariantLocation;
127
- meta: OmnichannelMeta;
128
- }
129
- interface FiltersAddressParams {
130
- address: string;
131
- radius: number;
132
- }
133
- interface FiltersCoordinatesParams {
134
- geoPoint: GeoPoint;
135
- radius: number;
136
- }
137
- interface StoreLocatorSearchParams {
138
- filters: FiltersAddressParams | FiltersCoordinatesParams;
139
- perPage?: number;
140
- with?: StoreWithProperty[];
141
- }
142
- interface VariantLocatorSearchParams {
143
- variantId: number;
144
- filters: FiltersAddressParams | FiltersCoordinatesParams;
145
- perPage?: number;
146
- with?: StoreWithProperty[];
147
- }
148
- interface FetchStoresForVariantParams {
149
- variantId: number;
150
- filters: {
151
- address: string;
152
- radius: number;
153
- };
154
- perPage?: number;
155
- with?: StoreWithProperty[];
156
- }
157
- interface FetchStoreVariantByIdParams {
158
- storeId: number;
159
- variantId: number;
160
- with?: StoreWithProperty[];
161
- }
162
-
163
- export type { FiltersAddressParams as F, GeoPoint as G, OpeningTimeInterval as O, StoreLocatorConfig as S, VariantLocation as V, OpeningTimeException as a, StoreImage as b, StoreAddress as c, StoreItemVariant as d, StoreItem as e, OpeningTimes as f, Store as g, StoreWithProperty as h, OmnichannelMeta as i, OmnichannelLinks as j, StoreLocation as k, StoreLocationResponse as l, StoreVariantLocation as m, StoreAvailabilityCheck as n, StoreAvailabilityCheckResponse as o, VariantLocationResponse as p, FiltersCoordinatesParams as q, StoreLocatorSearchParams as r, VariantLocatorSearchParams as s, FetchStoresForVariantParams as t, FetchStoreVariantByIdParams as u };
@@ -1,163 +0,0 @@
1
- interface StoreLocatorConfig {
2
- token: string;
3
- host: string;
4
- companyId?: number;
5
- googleApiKey?: string;
6
- }
7
- interface GeoPoint {
8
- lat: number;
9
- lng: number;
10
- }
11
- interface OpeningTimeInterval {
12
- timeFrom: string;
13
- timeUntil: string;
14
- }
15
- interface OpeningTimeException {
16
- exceptionDate: string;
17
- exceptionName: string;
18
- exceptionType: 'open' | 'closed';
19
- timeFrom: string;
20
- timeUntil: string;
21
- }
22
- interface StoreImage {
23
- id: number;
24
- name: string;
25
- damKey: string;
26
- url: string;
27
- customData: object;
28
- }
29
- interface StoreAddress {
30
- street: string;
31
- houseNumber: string;
32
- zipCode: string;
33
- city: string;
34
- countryCode: string;
35
- }
36
- interface StoreItemVariant {
37
- variantId: number;
38
- variantReferenceKey: string;
39
- quantity: number;
40
- }
41
- interface StoreItem {
42
- productId: number;
43
- productReferenceKey: string;
44
- name: object;
45
- image: string;
46
- variants: StoreItemVariant[];
47
- }
48
- interface OpeningTimes {
49
- mon: OpeningTimeInterval[];
50
- tue: OpeningTimeInterval[];
51
- wed: OpeningTimeInterval[];
52
- thu: OpeningTimeInterval[];
53
- fri: OpeningTimeInterval[];
54
- sat: OpeningTimeInterval[];
55
- sun: OpeningTimeInterval[];
56
- exceptions: OpeningTimeException[];
57
- currentlyOpen: boolean;
58
- minutesUntilClosed: number;
59
- }
60
- interface Store {
61
- id: number;
62
- referenceKey: string;
63
- name: string;
64
- email: string;
65
- address: StoreAddress;
66
- openingTimes?: OpeningTimes;
67
- geoPoint: GeoPoint;
68
- customData?: object;
69
- settings?: {
70
- shipFromStore: boolean;
71
- clickAndCollect: boolean;
72
- };
73
- isActive: boolean;
74
- images?: StoreImage;
75
- }
76
- type StoreWithProperty = 'openingTimes' | 'customData' | 'images' | 'settings';
77
- interface OmnichannelMeta {
78
- path: string;
79
- currentPage: number;
80
- lastPage: number;
81
- from: number;
82
- to: number;
83
- perPage: number;
84
- total: number;
85
- firstPageUrl: string;
86
- lastPageUrl: string;
87
- prevPageUrl: string | null;
88
- nextPageUrl: string | null;
89
- }
90
- interface OmnichannelLinks {
91
- first: string | null;
92
- last: string | null;
93
- prev: string | null;
94
- next: string | null;
95
- }
96
- interface StoreLocation extends Store {
97
- distance: number;
98
- }
99
- interface StoreLocationResponse {
100
- data: StoreLocation[];
101
- meta: {
102
- searchAddress: GeoPoint;
103
- };
104
- }
105
- interface StoreVariantLocation extends StoreLocation {
106
- quantity: number;
107
- }
108
- interface StoreAvailabilityCheck extends Store {
109
- items: StoreItem[];
110
- }
111
- interface StoreAvailabilityCheckResponse {
112
- data: StoreAvailabilityCheck;
113
- meta: OmnichannelMeta;
114
- }
115
- interface VariantLocation {
116
- name: object;
117
- productId: number;
118
- variantId: number;
119
- productReferenceKey: string;
120
- variantReferenceKey: string;
121
- image: string;
122
- additionalData: object;
123
- stores: StoreVariantLocation[];
124
- }
125
- interface VariantLocationResponse {
126
- data: VariantLocation;
127
- meta: OmnichannelMeta;
128
- }
129
- interface FiltersAddressParams {
130
- address: string;
131
- radius: number;
132
- }
133
- interface FiltersCoordinatesParams {
134
- geoPoint: GeoPoint;
135
- radius: number;
136
- }
137
- interface StoreLocatorSearchParams {
138
- filters: FiltersAddressParams | FiltersCoordinatesParams;
139
- perPage?: number;
140
- with?: StoreWithProperty[];
141
- }
142
- interface VariantLocatorSearchParams {
143
- variantId: number;
144
- filters: FiltersAddressParams | FiltersCoordinatesParams;
145
- perPage?: number;
146
- with?: StoreWithProperty[];
147
- }
148
- interface FetchStoresForVariantParams {
149
- variantId: number;
150
- filters: {
151
- address: string;
152
- radius: number;
153
- };
154
- perPage?: number;
155
- with?: StoreWithProperty[];
156
- }
157
- interface FetchStoreVariantByIdParams {
158
- storeId: number;
159
- variantId: number;
160
- with?: StoreWithProperty[];
161
- }
162
-
163
- export type { FiltersAddressParams as F, GeoPoint as G, OpeningTimeInterval as O, StoreLocatorConfig as S, VariantLocation as V, OpeningTimeException as a, StoreImage as b, StoreAddress as c, StoreItemVariant as d, StoreItem as e, OpeningTimes as f, Store as g, StoreWithProperty as h, OmnichannelMeta as i, OmnichannelLinks as j, StoreLocation as k, StoreLocationResponse as l, StoreVariantLocation as m, StoreAvailabilityCheck as n, StoreAvailabilityCheckResponse as o, VariantLocationResponse as p, FiltersCoordinatesParams as q, StoreLocatorSearchParams as r, VariantLocatorSearchParams as s, FetchStoresForVariantParams as t, FetchStoreVariantByIdParams as u };