@scayle/omnichannel-nuxt 1.1.16

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 (80) hide show
  1. package/CHANGELOG.md +135 -0
  2. package/LICENSE +21 -0
  3. package/README.md +115 -0
  4. package/dist/composables/sharedRef.d.ts +3 -0
  5. package/dist/composables/sharedRef.d.ts.map +1 -0
  6. package/dist/composables/sharedRef.js +16 -0
  7. package/dist/composables/sharedRef.js.map +1 -0
  8. package/dist/composables/useGeocode.d.ts +7 -0
  9. package/dist/composables/useGeocode.d.ts.map +1 -0
  10. package/dist/composables/useGeocode.js +17 -0
  11. package/dist/composables/useGeocode.js.map +1 -0
  12. package/dist/composables/useStoreLocator.d.ts +10 -0
  13. package/dist/composables/useStoreLocator.d.ts.map +1 -0
  14. package/dist/composables/useStoreLocator.js +17 -0
  15. package/dist/composables/useStoreLocator.js.map +1 -0
  16. package/dist/composables/useStoreVariantById.d.ts +6 -0
  17. package/dist/composables/useStoreVariantById.d.ts.map +1 -0
  18. package/dist/composables/useStoreVariantById.js +20 -0
  19. package/dist/composables/useStoreVariantById.js.map +1 -0
  20. package/dist/composables/useStores.d.ts +7 -0
  21. package/dist/composables/useStores.d.ts.map +1 -0
  22. package/dist/composables/useStores.js +17 -0
  23. package/dist/composables/useStores.js.map +1 -0
  24. package/dist/composables/useVariantStores.d.ts +7 -0
  25. package/dist/composables/useVariantStores.d.ts.map +1 -0
  26. package/dist/composables/useVariantStores.js +17 -0
  27. package/dist/composables/useVariantStores.js.map +1 -0
  28. package/dist/constants/index.d.ts +2 -0
  29. package/dist/constants/index.d.ts.map +1 -0
  30. package/dist/constants/index.js +5 -0
  31. package/dist/constants/index.js.map +1 -0
  32. package/dist/constants/omnichannel.d.ts +12 -0
  33. package/dist/constants/omnichannel.d.ts.map +1 -0
  34. package/dist/constants/omnichannel.js +13 -0
  35. package/dist/constants/omnichannel.js.map +1 -0
  36. package/dist/error/errorHandler.d.ts +11 -0
  37. package/dist/error/errorHandler.d.ts.map +1 -0
  38. package/dist/error/errorHandler.js +57 -0
  39. package/dist/error/errorHandler.js.map +1 -0
  40. package/dist/index.d.ts +9 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +18 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/lib/init.d.ts +11 -0
  45. package/dist/lib/init.d.ts.map +1 -0
  46. package/dist/lib/init.js +49 -0
  47. package/dist/lib/init.js.map +1 -0
  48. package/dist/module/createOmnichannelHandler.d.ts +3 -0
  49. package/dist/module/createOmnichannelHandler.d.ts.map +1 -0
  50. package/dist/module/createOmnichannelHandler.js +56 -0
  51. package/dist/module/createOmnichannelHandler.js.map +1 -0
  52. package/dist/module/register.d.ts +6 -0
  53. package/dist/module/register.d.ts.map +1 -0
  54. package/dist/module/register.js +12 -0
  55. package/dist/module/register.js.map +1 -0
  56. package/dist/rpc/geocode.d.ts +23 -0
  57. package/dist/rpc/geocode.d.ts.map +1 -0
  58. package/dist/rpc/geocode.js +46 -0
  59. package/dist/rpc/geocode.js.map +1 -0
  60. package/dist/rpc/index.d.ts +3 -0
  61. package/dist/rpc/index.d.ts.map +1 -0
  62. package/dist/rpc/index.js +6 -0
  63. package/dist/rpc/index.js.map +1 -0
  64. package/dist/rpc/storeLocator.d.ts +31 -0
  65. package/dist/rpc/storeLocator.d.ts.map +1 -0
  66. package/dist/rpc/storeLocator.js +69 -0
  67. package/dist/rpc/storeLocator.js.map +1 -0
  68. package/dist/types/geocode.d.ts +8 -0
  69. package/dist/types/geocode.d.ts.map +1 -0
  70. package/dist/types/geocode.js +3 -0
  71. package/dist/types/geocode.js.map +1 -0
  72. package/dist/types/index.d.ts +3 -0
  73. package/dist/types/index.d.ts.map +1 -0
  74. package/dist/types/index.js +6 -0
  75. package/dist/types/index.js.map +1 -0
  76. package/dist/types/omnichannel.d.ts +145 -0
  77. package/dist/types/omnichannel.d.ts.map +1 -0
  78. package/dist/types/omnichannel.js +3 -0
  79. package/dist/types/omnichannel.js.map +1 -0
  80. package/package.json +62 -0
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useGeocode = exports.useStoreLocator = exports.useVariantStores = exports.useStoreVariantById = exports.useStores = void 0;
4
+ const tslib_1 = require("tslib");
5
+ var useStores_1 = require("./composables/useStores");
6
+ Object.defineProperty(exports, "useStores", { enumerable: true, get: function () { return tslib_1.__importDefault(useStores_1).default; } });
7
+ var useStoreVariantById_1 = require("./composables/useStoreVariantById");
8
+ Object.defineProperty(exports, "useStoreVariantById", { enumerable: true, get: function () { return tslib_1.__importDefault(useStoreVariantById_1).default; } });
9
+ var useVariantStores_1 = require("./composables/useVariantStores");
10
+ Object.defineProperty(exports, "useVariantStores", { enumerable: true, get: function () { return tslib_1.__importDefault(useVariantStores_1).default; } });
11
+ var useStoreLocator_1 = require("./composables/useStoreLocator");
12
+ Object.defineProperty(exports, "useStoreLocator", { enumerable: true, get: function () { return tslib_1.__importDefault(useStoreLocator_1).default; } });
13
+ var useGeocode_1 = require("./composables/useGeocode");
14
+ Object.defineProperty(exports, "useGeocode", { enumerable: true, get: function () { return tslib_1.__importDefault(useGeocode_1).default; } });
15
+ tslib_1.__exportStar(require("./constants/index"), exports);
16
+ tslib_1.__exportStar(require("./rpc/index"), exports);
17
+ tslib_1.__exportStar(require("./types/index"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,qDAA8D;AAArD,+HAAA,OAAO,OAAa;AAC7B,yEAAkF;AAAzE,mJAAA,OAAO,OAAuB;AACvC,mEAA4E;AAAnE,6IAAA,OAAO,OAAoB;AACpC,iEAA0E;AAAjE,2IAAA,OAAO,OAAmB;AACnC,uDAAgE;AAAvD,iIAAA,OAAO,OAAc;AAE9B,4DAAiC;AACjC,sDAA2B;AAC3B,wDAA6B"}
@@ -0,0 +1,11 @@
1
+ import { StoreLocatorConfig } from '../types';
2
+ export declare class OmnichannelClient {
3
+ private readonly host;
4
+ private readonly token;
5
+ constructor(host: string, token: string);
6
+ get(endpoint?: string, params?: any, signal?: AbortSignal): Promise<any>;
7
+ private createClient;
8
+ private handleError;
9
+ }
10
+ export declare const init: (config?: StoreLocatorConfig) => OmnichannelClient | null;
11
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/lib/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE7C,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAQ;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAQ;gBAElB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAK1B,GAAG,CACd,QAAQ,GAAE,MAAW,EACrB,MAAM,CAAC,EAAE,GAAG,EACZ,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,GAAG,CAAC;IAUf,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,WAAW;CAIpB;AAED,eAAO,MAAM,IAAI,YAAa,kBAAkB,6BAM/C,CAAA"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.init = exports.OmnichannelClient = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const axios_1 = tslib_1.__importDefault(require("axios"));
6
+ class OmnichannelClient {
7
+ constructor(host, token) {
8
+ this.host = host;
9
+ this.token = token;
10
+ }
11
+ async get(endpoint = '', params, signal) {
12
+ try {
13
+ const client = this.createClient();
14
+ const response = await client.get(endpoint, { ...params, signal });
15
+ return response.data;
16
+ }
17
+ catch (error) {
18
+ this.handleError(error);
19
+ }
20
+ }
21
+ createClient() {
22
+ const config = {
23
+ baseURL: this.host,
24
+ headers: {
25
+ Accept: 'application/json',
26
+ 'Content-Type': 'application/json',
27
+ },
28
+ };
29
+ if (this.token) {
30
+ config.headers = {
31
+ Authorization: `Bearer ${this.token}`,
32
+ };
33
+ }
34
+ return axios_1.default.create(config);
35
+ }
36
+ handleError(error) {
37
+ // TODO: add better error handling
38
+ throw error;
39
+ }
40
+ }
41
+ exports.OmnichannelClient = OmnichannelClient;
42
+ const init = (config) => {
43
+ if (config) {
44
+ return new OmnichannelClient(config.host, config.token);
45
+ }
46
+ return null;
47
+ };
48
+ exports.init = init;
49
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/lib/init.ts"],"names":[],"mappings":";;;;AAAA,0DAAgE;AAGhE,MAAa,iBAAiB;IAI5B,YAAY,IAAY,EAAE,KAAa;QACrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAEM,KAAK,CAAC,GAAG,CACd,WAAmB,EAAE,EACrB,MAAY,EACZ,MAAoB;QAEpB,IAAI;YACF,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAA;YAClC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;YAClE,OAAO,QAAQ,CAAC,IAAI,CAAA;SACrB;QAAC,OAAO,KAAU,EAAE;YACnB,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;SACxB;IACH,CAAC;IAEO,YAAY;QAClB,MAAM,MAAM,GAAuB;YACjC,OAAO,EAAE,IAAI,CAAC,IAAI;YAClB,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;gBAC1B,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAA;QACD,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,MAAM,CAAC,OAAO,GAAG;gBACf,aAAa,EAAE,UAAU,IAAI,CAAC,KAAK,EAAE;aACtC,CAAA;SACF;QACD,OAAO,eAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAEO,WAAW,CAAC,KAAU;QAC5B,kCAAkC;QAClC,MAAM,KAAK,CAAA;IACb,CAAC;CACF;AA3CD,8CA2CC;AAEM,MAAM,IAAI,GAAG,CAAC,MAA2B,EAAE,EAAE;IAClD,IAAI,MAAM,EAAE;QACV,OAAO,IAAI,iBAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAA;KACxD;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AANY,QAAA,IAAI,QAMhB"}
@@ -0,0 +1,3 @@
1
+ import { StoreLocatorConfig } from '../types';
2
+ export default function createOmnichannelHandler(options: StoreLocatorConfig): import("express-serve-static-core").Express;
3
+ //# sourceMappingURL=createOmnichannelHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createOmnichannelHandler.d.ts","sourceRoot":"","sources":["../../src/module/createOmnichannelHandler.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAW7C,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,+CAmD3E"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const express_1 = tslib_1.__importDefault(require("express"));
5
+ const body_parser_1 = tslib_1.__importDefault(require("body-parser"));
6
+ const storeLocator_1 = require("../rpc/storeLocator");
7
+ const geocode_1 = require("../rpc/geocode");
8
+ const errorHandler_1 = require("../error/errorHandler");
9
+ function createOmnichannelHandler(options) {
10
+ const app = (0, express_1.default)();
11
+ app.use(body_parser_1.default.urlencoded({ extended: false }));
12
+ app.use(body_parser_1.default.json());
13
+ app.post(`/stores`, async (req, res) => {
14
+ try {
15
+ const response = await (0, storeLocator_1.getStores)(req.body, options);
16
+ res.json(response);
17
+ }
18
+ catch (e) {
19
+ const parsedError = (0, errorHandler_1.parseErrorData)(e);
20
+ res.status(parsedError.statusCode).json({ ...parsedError });
21
+ }
22
+ });
23
+ app.post(`/storeVariantById`, async (req, res) => {
24
+ try {
25
+ const response = await (0, storeLocator_1.getStoreVariantById)(req.body, options);
26
+ res.json(response);
27
+ }
28
+ catch (e) {
29
+ const parsedError = (0, errorHandler_1.parseErrorData)(e);
30
+ res.status(parsedError.statusCode).json({ ...parsedError });
31
+ }
32
+ });
33
+ app.post(`/variantStores`, async (req, res) => {
34
+ try {
35
+ const response = await (0, storeLocator_1.getStoresForVariant)(req.body, options);
36
+ res.json(response);
37
+ }
38
+ catch (e) {
39
+ const parsedError = (0, errorHandler_1.parseErrorData)(e);
40
+ res.status(parsedError.statusCode).json({ ...parsedError });
41
+ }
42
+ });
43
+ app.post(`/geocode`, async (req, res) => {
44
+ try {
45
+ const response = await (0, geocode_1.getGeocoder)(req.body, options);
46
+ res.json(response);
47
+ }
48
+ catch (e) {
49
+ const parsedError = (0, errorHandler_1.parseErrorData)(e);
50
+ res.status(parsedError.statusCode).json({ ...parsedError });
51
+ }
52
+ });
53
+ return app;
54
+ }
55
+ exports.default = createOmnichannelHandler;
56
+ //# sourceMappingURL=createOmnichannelHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createOmnichannelHandler.js","sourceRoot":"","sources":["../../src/module/createOmnichannelHandler.ts"],"names":[],"mappings":";;;AAAA,8DAA6B;AAC7B,sEAAoC;AAGpC,sDAI4B;AAE5B,4CAA4C;AAE5C,wDAAsD;AAEtD,SAAwB,wBAAwB,CAAC,OAA2B;IAC1E,MAAM,GAAG,GAAG,IAAA,iBAAO,GAAE,CAAA;IAErB,GAAG,CAAC,GAAG,CAAC,qBAAU,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;IACnD,GAAG,CAAC,GAAG,CA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AC,OAAO,CAAC,EAAE;YACV,MAAM,WAAW,GAAG,IAAA,6BAAc,EAAC,CAAC,CAAC,CAAA;YACrC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC,CAAA;SAC5D;IACH,CAAC,CAAC,CAAA;IAEF,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QACtC,IAAI;YACF,MAAM,QAAQ,GAAG,MAAM,IAAA,qBAAW,EAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;YAErD,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;SACnB;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,WAAW,GAAG,IAAA,6BAAc,EAAC,CAAC,CAAC,CAAA;YACrC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC,CAAA;SAC5D;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,GAAG,CAAA;AACZ,CAAC;AAnDD,2CAmDC"}
@@ -0,0 +1,6 @@
1
+ import { Module } from '@nuxt/types';
2
+ import { StoreLocatorConfig } from '../types';
3
+ type ModuleOptions = StoreLocatorConfig;
4
+ declare const omnichannelModule: Module<ModuleOptions>;
5
+ export default omnichannelModule;
6
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/module/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAG7C,KAAK,aAAa,GAAG,kBAAkB,CAAA;AACvC,QAAA,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,CAO5C,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const createOmnichannelHandler_1 = tslib_1.__importDefault(require("./createOmnichannelHandler"));
5
+ const omnichannelModule = function (moduleOptions) {
6
+ this.addServerMiddleware({
7
+ path: '/api/omnichannel',
8
+ handler: (0, createOmnichannelHandler_1.default)(moduleOptions),
9
+ });
10
+ };
11
+ exports.default = omnichannelModule;
12
+ //# sourceMappingURL=register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/module/register.ts"],"names":[],"mappings":";;;AAEA,kGAAiE;AAGjE,MAAM,iBAAiB,GAA0B,UAC/C,aAA4B;IAE5B,IAAI,CAAC,mBAAmB,CAAC;QACvB,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,IAAA,kCAAwB,EAAC,aAAa,CAAC;KACjD,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,kBAAe,iBAAiB,CAAA"}
@@ -0,0 +1,23 @@
1
+ import { StoreLocatorConfig } from '../types';
2
+ export type GeocodeParams = {
3
+ /**
4
+ * Latitude in degrees. Values will be clamped to the range [-90, 90]. This
5
+ * means that if the value specified is less than -90, it will be set to
6
+ * -90. And if the value is greater than 90, it will be set to 90.
7
+ */
8
+ lat: number;
9
+ /**
10
+ * Longitude in degrees. Values outside the range [-180, 180] will be
11
+ * wrapped so that they fall within the range. For example, a value of -190
12
+ * will be converted to 170. A value of 190 will be converted to -170. This
13
+ * reflects the fact that longitudes wrap around the globe.
14
+ */
15
+ lng: number;
16
+ };
17
+ type SearchParams = {
18
+ search: string | number;
19
+ };
20
+ export declare function isObject<T>(input: unknown): input is T;
21
+ export declare const getGeocoder: (content: GeocodeParams | SearchParams, storeLocator: StoreLocatorConfig) => Promise<any>;
22
+ export {};
23
+ //# sourceMappingURL=geocode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geocode.d.ts","sourceRoot":"","sources":["../../src/rpc/geocode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE7C,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,CAAA;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC,CAEtD;AACD,eAAO,MAAM,WAAW,YACb,aAAa,GAAG,YAAY,gBACvB,kBAAkB,iBAqCjC,CAAA"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getGeocoder = exports.isObject = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const axios_1 = tslib_1.__importDefault(require("axios"));
6
+ function isObject(input) {
7
+ return true;
8
+ }
9
+ exports.isObject = isObject;
10
+ const getGeocoder = async function getGeocoder(content, storeLocator) {
11
+ if (!storeLocator.googleApiKey) {
12
+ return Promise.reject(new Error('Missing Google API Key'));
13
+ }
14
+ const url = new URL('https://maps.googleapis.com/maps/api/geocode/json');
15
+ if (isObject(content) && content.search) {
16
+ if (typeof content.search === 'number') {
17
+ url.searchParams.set('components', `postal_code:${content.search}`);
18
+ }
19
+ else {
20
+ url.searchParams.set('address', content.search.trim());
21
+ }
22
+ }
23
+ else if (isObject(content)) {
24
+ url.searchParams.set('latlng', `${content.lat},${content.lng}`);
25
+ }
26
+ url.searchParams.set('key', storeLocator.googleApiKey);
27
+ return await (0, axios_1.default)({
28
+ method: 'get',
29
+ url: url.toString(),
30
+ })
31
+ .then((response) => {
32
+ return response.data;
33
+ })
34
+ .catch((error) => {
35
+ console.log('[ERROR] getGeocoder:', {
36
+ message: error.message,
37
+ params: content,
38
+ });
39
+ return {
40
+ results: [],
41
+ status: 'ZERO_RESULTS',
42
+ };
43
+ });
44
+ };
45
+ exports.getGeocoder = getGeocoder;
46
+ //# sourceMappingURL=geocode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geocode.js","sourceRoot":"","sources":["../../src/rpc/geocode.ts"],"names":[],"mappings":";;;;AAAA,0DAAyB;AAuBzB,SAAgB,QAAQ,CAAI,KAAc;IACxC,OAAO,IAAI,CAAA;AACb,CAAC;AAFD,4BAEC;AACM,MAAM,WAAW,GAAG,KAAK,UAAU,WAAW,CACnD,OAAqC,EACrC,YAAgC;IAEhC,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;QAC9B,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAA;KAC3D;IACD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,mDAAmD,CAAC,CAAA;IAExE,IAAI,QAAQ,CAAe,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE;QACrD,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,EAAE;YACtC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,YAAY,EAAE,eAAe,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;SACpE;aAAM;YACL,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;SACvD;KACF;SAAM,IAAI,QAAQ,CAAgB,OAAO,CAAC,EAAE;QAC3C,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAA;KAChE;IAED,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,EAAE,YAAY,CAAC,YAAY,CAAC,CAAA;IAEtD,OAAO,MAAM,IAAA,eAAK,EAAC;QACjB,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,GAAG,CAAC,QAAQ,EAAE;KACpB,CAAC;SACC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;QACjB,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC,CAAC;SACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;YAClC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,EAAE,OAAO;SAChB,CAAC,CAAA;QAEF,OAAO;YACL,OAAO,EAAE,EAAE;YACX,MAAM,EAAE,cAAc;SACvB,CAAA;IACH,CAAC,CAAC,CAAA;AACN,CAAC,CAAA;AAvCY,QAAA,WAAW,eAuCvB"}
@@ -0,0 +1,3 @@
1
+ export * from './storeLocator';
2
+ export * from './geocode';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rpc/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./storeLocator"), exports);
5
+ tslib_1.__exportStar(require("./geocode"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rpc/index.ts"],"names":[],"mappings":";;;AAAA,yDAA8B;AAC9B,oDAAyB"}
@@ -0,0 +1,31 @@
1
+ import { StoreAvailabilityCheck, StoreLocation, StoreLocatorConfig, StoreLocatorSearchParams, VariantLocation } from '../types';
2
+ export interface FetchStoresForVariantParams {
3
+ variantId: number;
4
+ filters: {
5
+ address: string;
6
+ radius: number;
7
+ };
8
+ perPage?: number;
9
+ }
10
+ export interface FetchStoreVariantByIdParams {
11
+ storeId: number;
12
+ variantId: number;
13
+ }
14
+ export interface FetchOptions {
15
+ filters: {
16
+ address: string;
17
+ radius: number;
18
+ };
19
+ variantId?: number;
20
+ perPage: number;
21
+ }
22
+ export declare const getStores: (options: StoreLocatorSearchParams, storeLocator: StoreLocatorConfig) => Promise<{
23
+ data: StoreLocation[];
24
+ nextPage: null;
25
+ }>;
26
+ export declare const getStoresForVariant: (options: FetchStoresForVariantParams, storeLocator: StoreLocatorConfig) => Promise<{
27
+ data: VariantLocation;
28
+ nextPage: null;
29
+ }>;
30
+ export declare const getStoreVariantById: (options: FetchStoreVariantByIdParams, storeLocator: StoreLocatorConfig) => Promise<StoreAvailabilityCheck>;
31
+ //# sourceMappingURL=storeLocator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storeLocator.d.ts","sourceRoot":"","sources":["../../src/rpc/storeLocator.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EAEtB,aAAa,EAEb,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EAEhB,MAAM,UAAU,CAAA;AAGjB,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAChB;AAID,eAAO,MAAM,SAAS,YACX,wBAAwB,gBACnB,kBAAkB;;;EAoBjC,CAAA;AAED,eAAO,MAAM,mBAAmB,YACrB,2BAA2B,gBACtB,kBAAkB;;;EA4BjC,CAAA;AAED,eAAO,MAAM,mBAAmB,YACrB,2BAA2B,gBACtB,kBAAkB,oCAYjC,CAAA"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStoreVariantById = exports.getStoresForVariant = exports.getStores = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const qs_1 = tslib_1.__importDefault(require("qs"));
6
+ const init_1 = require("../lib/init");
7
+ const noClientMessage = 'Client not configured';
8
+ const getStores = async function getStores(options, storeLocator) {
9
+ const omnichannelClient = (0, init_1.init)(storeLocator);
10
+ if (!omnichannelClient) {
11
+ throw new Error(noClientMessage);
12
+ }
13
+ return await omnichannelClient
14
+ .get(`/stores/locator`, {
15
+ params: options,
16
+ paramsSerializer: (params) => {
17
+ return qs_1.default.stringify(params, { arrayFormat: 'brackets' });
18
+ },
19
+ })
20
+ .then((response) => {
21
+ return {
22
+ data: response.data,
23
+ nextPage: null,
24
+ };
25
+ });
26
+ };
27
+ exports.getStores = getStores;
28
+ const getStoresForVariant = async function getStoresForVariant(options, storeLocator) {
29
+ var _a;
30
+ const fetchOptions = {
31
+ filters: {
32
+ address: options.filters.address,
33
+ radius: (_a = options.filters.radius) !== null && _a !== void 0 ? _a : 10000,
34
+ },
35
+ variantId: options.variantId,
36
+ perPage: 10,
37
+ };
38
+ const omnichannelClient = (0, init_1.init)(storeLocator);
39
+ if (!omnichannelClient) {
40
+ throw new Error(noClientMessage);
41
+ }
42
+ return await omnichannelClient
43
+ .get(`/variants/locator`, {
44
+ params: fetchOptions,
45
+ paramsSerializer: (params) => {
46
+ return qs_1.default.stringify(params, { arrayFormat: 'brackets' });
47
+ },
48
+ })
49
+ .then((response) => {
50
+ return {
51
+ data: response.data,
52
+ nextPage: null,
53
+ };
54
+ });
55
+ };
56
+ exports.getStoresForVariant = getStoresForVariant;
57
+ const getStoreVariantById = async function getStoreVariantById(options, storeLocator) {
58
+ const omnichannelClient = (0, init_1.init)(storeLocator);
59
+ if (!omnichannelClient) {
60
+ throw new Error(noClientMessage);
61
+ }
62
+ return await omnichannelClient
63
+ .get(`/stores/${options.storeId}/variants/${options.variantId}`)
64
+ .then((response) => {
65
+ return response.data;
66
+ });
67
+ };
68
+ exports.getStoreVariantById = getStoreVariantById;
69
+ //# sourceMappingURL=storeLocator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storeLocator.js","sourceRoot":"","sources":["../../src/rpc/storeLocator.ts"],"names":[],"mappings":";;;;AAAA,oDAAmB;AAWnB,sCAAkC;AAyBlC,MAAM,eAAe,GAAW,uBAAuB,CAAA;AAEhD,MAAM,SAAS,GAAG,KAAK,UAAU,SAAS,CAC/C,OAAiC,EACjC,YAAgC;IAEhC,MAAM,iBAAiB,GAAG,IAAA,WAAI,EAAC,YAAY,CAAC,CAAA;IAC5C,IAAI,CAAC,iBAAiB,EAAE;QACtB,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;KACjC;IAED,OAAO,MAAM,iBAAiB;SAC3B,GAAG,CAAC,iBAAiB,EAAE;QACtB,MAAM,EAAE,OAAO;QACf,gBAAgB,EAAE,CAAC,MAAgC,EAAE,EAAE;YACrD,OAAO,YAAE,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAA;QAC1D,CAAC;KACF,CAAC;SACD,IAAI,CAAC,CAAC,QAA+B,EAAE,EAAE;QACxC,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,IAAuB;YACtC,QAAQ,EAAE,IAAI;SACf,CAAA;IACH,CAAC,CAAC,CAAA;AACN,CAAC,CAAA;AAtBY,QAAA,SAAS,aAsBrB;AAEM,MAAM,mBAAmB,GAAG,KAAK,UAAU,mBAAmB,CACnE,OAAoC,EACpC,YAAgC;;IAEhC,MAAM,YAAY,GAAiB;QACjC,OAAO,EAAE;YACP,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO;YAChC,MAAM,EAAE,MAAA,OAAO,CAAC,OAAO,CAA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;
3
+ lng: number;
4
+ };
5
+ export type GeocodeSearchParams = {
6
+ search: string | number;
7
+ };
8
+ //# sourceMappingURL=geocode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geocode.d.ts","sourceRoot":"","sources":["../../src/types/geocode.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=geocode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geocode.js","sourceRoot":"","sources":["../../src/types/geocode.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './omnichannel';
2
+ export * from './geocode';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,WAAW,CAAA"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./omnichannel"), exports);
5
+ tslib_1.__exportStar(require("./geocode"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,wDAA6B;AAC7B,oDAAyB"}
@@ -0,0 +1,145 @@
1
+ export interface StoreLocatorConfig {
2
+ token: string;
3
+ host: string;
4
+ companyId?: number;
5
+ googleApiKey?: string;
6
+ }
7
+ export interface GeoPoint {
8
+ lat: number;
9
+ lng: number;
10
+ }
11
+ export interface OpeningTimeInterval {
12
+ timeFrom: string;
13
+ timeUntil: string;
14
+ }
15
+ export interface OpeningTimeException {
16
+ exceptionDate: string;
17
+ exceptionName: string;
18
+ exceptionType: 'open' | 'closed';
19
+ timeFrom: string;
20
+ timeUntil: string;
21
+ }
22
+ export interface StoreImage {
23
+ id: number;
24
+ name: string;
25
+ damKey: string;
26
+ url: string;
27
+ customData: object;
28
+ }
29
+ export interface StoreAddress {
30
+ street: string;
31
+ houseNumber: string;
32
+ zipCode: string;
33
+ city: string;
34
+ countryCode: string;
35
+ }
36
+ export interface StoreItemVariant {
37
+ variantId: number;
38
+ variantReferenceKey: string;
39
+ quantity: number;
40
+ }
41
+ export interface StoreItem {
42
+ productId: number;
43
+ productReferenceKey: string;
44
+ name: object;
45
+ image: string;
46
+ variants: StoreItemVariant[];
47
+ }
48
+ export 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
+ export 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
+ export interface OmnichannelMeta {
77
+ path: string;
78
+ currentPage: number;
79
+ lastPage: number;
80
+ from: number;
81
+ to: number;
82
+ perPage: number;
83
+ total: number;
84
+ firstPageUrl: string;
85
+ lastPageUrl: string;
86
+ prevPageUrl: string | null;
87
+ nextPageUrl: string | null;
88
+ }
89
+ export interface OmnichannelLinks {
90
+ first: string | null;
91
+ last: string | null;
92
+ prev: string | null;
93
+ next: string | null;
94
+ }
95
+ export interface StoreLocation extends Store {
96
+ distance: number;
97
+ }
98
+ export interface StoreLocationResponse {
99
+ data: StoreLocation[];
100
+ meta: {
101
+ searchAddress: GeoPoint;
102
+ };
103
+ }
104
+ export interface StoreVariantLocation extends StoreLocation {
105
+ quantity: number;
106
+ }
107
+ export interface StoreAvailabilityCheck extends Store {
108
+ items: StoreItem[];
109
+ }
110
+ export interface StoreAvailabilityCheckResponse {
111
+ data: StoreAvailabilityCheck;
112
+ meta: OmnichannelMeta;
113
+ }
114
+ export interface VariantLocation {
115
+ name: object;
116
+ productId: number;
117
+ variantId: number;
118
+ productReferenceKey: string;
119
+ variantReferenceKey: string;
120
+ image: string;
121
+ additionalData: object;
122
+ stores: StoreVariantLocation[];
123
+ }
124
+ export interface VariantLocationResponse {
125
+ data: VariantLocation;
126
+ meta: OmnichannelMeta;
127
+ }
128
+ export interface FiltersAddressParams {
129
+ address: string;
130
+ radius: number;
131
+ }
132
+ export interface FiltersCoordinatesParams {
133
+ geoPoint: GeoPoint;
134
+ radius: number;
135
+ }
136
+ export interface StoreLocatorSearchParams {
137
+ filters: FiltersAddressParams | FiltersCoordinatesParams;
138
+ perPage?: number;
139
+ }
140
+ export interface VariantLocatorSearchParams {
141
+ variantId: number;
142
+ filters: FiltersAddressParams | FiltersCoordinatesParams;
143
+ perPage?: number;
144
+ }
145
+ //# sourceMappingURL=omnichannel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omnichannel.d.ts","sourceRoot":"","sources":["../../src/types/omnichannel.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAA;I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,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=omnichannel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"omnichannel.js","sourceRoot":"","sources":["../../src/types/omnichannel.ts"],"names":[],"mappings":""}