@blackfisk/blackfisk-vue-storefront-api 1.0.4 → 1.0.6

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 (81) hide show
  1. package/lib/packages/api-client/src/api/getCollection/index.d.ts +9 -0
  2. package/lib/packages/api-client/src/api/getCollection/index.d.ts.map +1 -0
  3. package/lib/{api → packages/api-client/src/api}/getProductCollection/index.d.ts +2 -2
  4. package/lib/packages/api-client/src/api/getProductCollection/index.d.ts.map +1 -0
  5. package/lib/packages/api-client/src/api/getProductFacets/index.d.ts +3 -0
  6. package/lib/packages/api-client/src/api/getProductFacets/index.d.ts.map +1 -0
  7. package/lib/packages/api-client/src/api/getProductListing/index.d.ts +15 -0
  8. package/lib/packages/api-client/src/api/getProductListing/index.d.ts.map +1 -0
  9. package/lib/packages/api-client/src/api/index.d.ts +6 -0
  10. package/lib/packages/api-client/src/api/index.d.ts.map +1 -0
  11. package/lib/packages/api-client/src/api/proxyInstantsearch/index.d.ts +6 -0
  12. package/lib/packages/api-client/src/api/proxyInstantsearch/index.d.ts.map +1 -0
  13. package/lib/packages/api-client/src/index.d.ts.map +1 -0
  14. package/lib/packages/api-client/src/index.server.d.ts.map +1 -0
  15. package/lib/packages/api-client/src/types/api/endpoints.d.ts +20 -0
  16. package/lib/packages/api-client/src/types/api/endpoints.d.ts.map +1 -0
  17. package/{server → lib/packages/api-client/src}/types/api/index.d.ts +3 -0
  18. package/lib/packages/api-client/src/types/api/index.d.ts.map +1 -0
  19. package/lib/packages/api-client/src/types/config/index.d.ts.map +1 -0
  20. package/lib/packages/api-client/src/types/context/index.d.ts.map +1 -0
  21. package/lib/packages/api-client/src/types/index.d.ts.map +1 -0
  22. package/lib/utils/elasticsearch/productGroup.d.ts +23 -0
  23. package/lib/utils/elasticsearch/productGroup.d.ts.map +1 -0
  24. package/package.json +2 -2
  25. package/server/index.js +173 -1
  26. package/server/index.js.map +1 -1
  27. package/server/packages/api-client/src/api/getCollection/index.d.ts +9 -0
  28. package/server/packages/api-client/src/api/getCollection/index.d.ts.map +1 -0
  29. package/server/{api → packages/api-client/src/api}/getProductCollection/index.d.ts +2 -2
  30. package/server/packages/api-client/src/api/getProductCollection/index.d.ts.map +1 -0
  31. package/server/packages/api-client/src/api/getProductFacets/index.d.ts +3 -0
  32. package/server/packages/api-client/src/api/getProductFacets/index.d.ts.map +1 -0
  33. package/server/packages/api-client/src/api/getProductListing/index.d.ts +15 -0
  34. package/server/packages/api-client/src/api/getProductListing/index.d.ts.map +1 -0
  35. package/server/packages/api-client/src/api/index.d.ts +6 -0
  36. package/server/packages/api-client/src/api/index.d.ts.map +1 -0
  37. package/server/packages/api-client/src/api/proxyInstantsearch/index.d.ts +6 -0
  38. package/server/packages/api-client/src/api/proxyInstantsearch/index.d.ts.map +1 -0
  39. package/server/packages/api-client/src/index.d.ts.map +1 -0
  40. package/server/packages/api-client/src/index.server.d.ts.map +1 -0
  41. package/server/packages/api-client/src/types/api/endpoints.d.ts +20 -0
  42. package/server/packages/api-client/src/types/api/endpoints.d.ts.map +1 -0
  43. package/{lib → server/packages/api-client/src}/types/api/index.d.ts +3 -0
  44. package/server/packages/api-client/src/types/api/index.d.ts.map +1 -0
  45. package/server/packages/api-client/src/types/config/index.d.ts.map +1 -0
  46. package/server/packages/api-client/src/types/context/index.d.ts.map +1 -0
  47. package/server/packages/api-client/src/types/index.d.ts.map +1 -0
  48. package/server/utils/elasticsearch/productGroup.d.ts +23 -0
  49. package/server/utils/elasticsearch/productGroup.d.ts.map +1 -0
  50. package/lib/api/getProductCollection/index.d.ts.map +0 -1
  51. package/lib/api/index.d.ts +0 -2
  52. package/lib/api/index.d.ts.map +0 -1
  53. package/lib/index.d.ts.map +0 -1
  54. package/lib/index.server.d.ts.map +0 -1
  55. package/lib/types/api/endpoints.d.ts +0 -13
  56. package/lib/types/api/endpoints.d.ts.map +0 -1
  57. package/lib/types/api/index.d.ts.map +0 -1
  58. package/lib/types/config/index.d.ts.map +0 -1
  59. package/lib/types/context/index.d.ts.map +0 -1
  60. package/lib/types/index.d.ts.map +0 -1
  61. package/server/api/getProductCollection/index.d.ts.map +0 -1
  62. package/server/api/index.d.ts +0 -2
  63. package/server/api/index.d.ts.map +0 -1
  64. package/server/index.d.ts.map +0 -1
  65. package/server/index.server.d.ts.map +0 -1
  66. package/server/types/api/endpoints.d.ts +0 -13
  67. package/server/types/api/endpoints.d.ts.map +0 -1
  68. package/server/types/api/index.d.ts.map +0 -1
  69. package/server/types/config/index.d.ts.map +0 -1
  70. package/server/types/context/index.d.ts.map +0 -1
  71. package/server/types/index.d.ts.map +0 -1
  72. /package/lib/{index.d.ts → packages/api-client/src/index.d.ts} +0 -0
  73. /package/lib/{index.server.d.ts → packages/api-client/src/index.server.d.ts} +0 -0
  74. /package/lib/{types → packages/api-client/src/types}/config/index.d.ts +0 -0
  75. /package/lib/{types → packages/api-client/src/types}/context/index.d.ts +0 -0
  76. /package/lib/{types → packages/api-client/src/types}/index.d.ts +0 -0
  77. /package/server/{index.d.ts → packages/api-client/src/index.d.ts} +0 -0
  78. /package/server/{index.server.d.ts → packages/api-client/src/index.server.d.ts} +0 -0
  79. /package/server/{types → packages/api-client/src/types}/config/index.d.ts +0 -0
  80. /package/server/{types → packages/api-client/src/types}/context/index.d.ts +0 -0
  81. /package/server/{types → packages/api-client/src/types}/index.d.ts +0 -0
@@ -0,0 +1,9 @@
1
+ import { Endpoints } from '../../types';
2
+ export interface getCollectionParams {
3
+ collectionId: number;
4
+ }
5
+ export interface getCollectionResponse {
6
+ data: any;
7
+ }
8
+ export declare const getCollection: Endpoints['getCollection'];
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/getCollection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,GAAG,CAAA;CACV;AACD,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,eAAe,CAcpD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Endpoints, SearchProduct } from '../../types';
1
+ import { Endpoints } from '../../types';
2
2
  export interface getProductCollectionTemplateParams {
3
3
  [key: string]: any;
4
4
  }
@@ -8,7 +8,7 @@ export interface getProductCollectionParams {
8
8
  debug?: boolean;
9
9
  }
10
10
  export interface getProductCollectionResponse {
11
- data: SearchProduct[];
11
+ data: any[];
12
12
  }
13
13
  export declare const getProductCollection: Endpoints['getProductCollection'];
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/getProductCollection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,kCAAkC;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AACD,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,kCAAkC,CAAC;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,GAAG,EAAE,CAAC;CACb;AAED,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,sBAAsB,CA2BlE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Endpoints } from '../../types';
2
+ export declare const getProductFacets: Endpoints['getProductFacets'];
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/getProductFacets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,kBAAkB,CAW1D,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Endpoints, ProductListing } from '../../types';
2
+ export interface getProductListingTemplateParams {
3
+ [key: string]: any;
4
+ }
5
+ export interface getProductListingParams {
6
+ collectionId: number | string;
7
+ familyId: number | string;
8
+ channelListingId: number | string;
9
+ debug?: boolean;
10
+ }
11
+ export interface getProductListingResponse {
12
+ data: ProductListing[];
13
+ }
14
+ export declare const getProductListing: Endpoints['getProductListing'];
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/getProductListing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxD,MAAM,WAAW,+BAA+B;IAC9C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AACD,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,cAAc,EAAE,CAAC;CACxB;AACD,eAAO,MAAM,iBAAiB,EAAE,SAAS,CAAC,mBAAmB,CAiB5D,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { getProductCollection } from './getProductCollection';
2
+ export { getProductListing } from './getProductListing';
3
+ export { proxyInstantsearch } from './proxyInstantsearch';
4
+ export { getCollection } from './getCollection';
5
+ export { getProductFacets } from './getProductFacets';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Endpoints } from '../../types';
2
+ export interface proxyInstantsearchResponse {
3
+ results: any[];
4
+ }
5
+ export declare const proxyInstantsearch: Endpoints['proxyInstantsearch'];
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/proxyInstantsearch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,GAAG,EAAE,CAAC;CAChB;AAED,eAAO,MAAM,kBAAkB,EAAE,SAAS,CAAC,oBAAoB,CAuC9D,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../../../src/index.server.ts"],"names":[],"mappings":"AAqCA,QAAA,MAAQ,eAAe,kEAGrB,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { BfskIntegrationContext, TODO } from '..';
2
+ import { getProductCollectionParams, getProductCollectionResponse } from '../../api/getProductCollection/index';
3
+ import { getProductListingParams, getProductListingResponse } from '../../api/getProductListing/index';
4
+ import { proxyInstantsearchResponse } from '../../api/proxyInstantsearch/index';
5
+ import { getCollectionParams, getCollectionResponse } from '../../api/getCollection/index';
6
+ /**
7
+ * Definition of all API-client methods available in {@link https://docs.vuestorefront.io/v2/advanced/context.html#context-api | context}.
8
+ */
9
+ export interface Endpoints {
10
+ /**
11
+ * Here you can find an example endpoint definition. Based on this example, you should define how your endpoint will look like.
12
+ * This description will appear in the API extractor, so try to document all endpoints added here.
13
+ */
14
+ getProductCollection(context: BfskIntegrationContext, params: getProductCollectionParams): Promise<getProductCollectionResponse>;
15
+ getProductListing(context: BfskIntegrationContext, params: getProductListingParams): Promise<getProductListingResponse>;
16
+ proxyInstantsearch(context: BfskIntegrationContext, params: any): Promise<proxyInstantsearchResponse>;
17
+ getCollection(context: BfskIntegrationContext, params: getCollectionParams): Promise<getCollectionResponse>;
18
+ getProductFacets(context: BfskIntegrationContext, params: TODO): Promise<TODO>;
19
+ }
20
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/types/api/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,MAAM,IAAI,CAAA;AACjD,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAA;AAC/G,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AACtG,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAE1F;;GAEG;AACH,MAAM,WAAW,SAAS;IAExB;;;OAGG;IACH,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACjI,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACxH,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACtG,aAAa,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC5G,gBAAgB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChF"}
@@ -58,5 +58,8 @@ export interface SearchProduct {
58
58
  title: string;
59
59
  upc: string;
60
60
  }
61
+ export interface ProductListing {
62
+ [key: string]: any;
63
+ }
61
64
  export * from './endpoints';
62
65
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/api/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,IAAI,EAAE,sBAAsB,EAAE,CAAC;IAC/B,cAAc,EAAE,sBAAsB,EAAE,CAAC;IACzC,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC;AACD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,iBAAiB;CAAG;AACrC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAA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AAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,gBAAgB;IAE/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,mBAAmB,CAAC;CAC1B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAErE;;IAEI;AACJ,oBAAY,sBAAsB,GAAG,kBAAkB,CACrD,aAAa,EACb,gBAAgB,EAChB,uBAAuB,CACxB,CAAC;AAEF;;IAEI;AACJ,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,sBAAsB,CAAC;CAC/B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC;;GAEG;AACH,oBAAY,uBAAuB,GAAG;KACnC,CAAC,IAAI,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAC3C,CAAC,EAAE,GAAG,EACN,GAAG,IAAI,EAAE,MAAM,CAAC,KACb,MAAM,CAAC,GACR,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjB,KAAK;CACV,CAAC;AAEF,oBAAY,IAAI,GAAG,GAAG,CAAC;AAEvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,23 @@
1
+ export interface DisplayProductImage {
2
+ src: string;
3
+ url: string;
4
+ alt: string;
5
+ }
6
+ export interface DisplayProduct {
7
+ id: number;
8
+ slug: string;
9
+ name: string;
10
+ groupId: number;
11
+ price: string;
12
+ img: DisplayProductImage;
13
+ }
14
+ export interface DisplayProductGroup {
15
+ groupId: number;
16
+ groupName: string;
17
+ brandName: string;
18
+ groupPriceLow: number;
19
+ groupPriceHigh: number;
20
+ products: DisplayProduct[];
21
+ }
22
+ export declare const groupProductResult: (ProductResult: any) => unknown[];
23
+ //# sourceMappingURL=productGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productGroup.d.ts","sourceRoot":"","sources":["../../../../../utils/elasticsearch/productGroup.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,mBAAmB,CAAC;CAC1B;AACD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AACD,eAAO,MAAM,kBAAkB,mCAmF9B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blackfisk/blackfisk-vue-storefront-api",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "sideEffects": false,
5
5
  "server": "server/index.js",
6
6
  "main": "lib/index.cjs.js",
@@ -28,5 +28,5 @@
28
28
  "lib/**/*",
29
29
  "server/**/*"
30
30
  ],
31
- "gitHead": "be6d7a7b779ae7025136bd8e093ca3d2284f1a9d"
31
+ "gitHead": "d644c181a9276e1f6613eb0a7afd252077bedf55"
32
32
  }
package/server/index.js CHANGED
@@ -9,6 +9,96 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
9
9
 
10
10
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
11
11
 
12
+ const groupProductResult = (ProductResult) => {
13
+ const ProductCollectionItems = (Array.isArray(ProductResult) ? ProductResult : [ProductResult]);
14
+ if (ProductCollectionItems.length > 0) {
15
+ const formatDisplayProductImage = (ProductCollectionItem) => {
16
+ const primaryImage = ProductCollectionItem.images?.[0] ?? { public_id: '', alt: '', url: '' };
17
+ return {
18
+ src: primaryImage.public_id,
19
+ url: primaryImage.url,
20
+ alt: primaryImage.alt,
21
+ };
22
+ };
23
+ const formatDisplayProduct = (ProductCollectionItem) => {
24
+ return {
25
+ id: ProductCollectionItem.id,
26
+ slug: ProductCollectionItem.slug,
27
+ name: ProductCollectionItem.heading || ProductCollectionItem.productName,
28
+ price: `$${ProductCollectionItem.priceSale}`,
29
+ groupId: ProductCollectionItem.familyId,
30
+ img: formatDisplayProductImage(ProductCollectionItem),
31
+ };
32
+ };
33
+ const isGroupRepresented = {};
34
+ let sortOrder = 0;
35
+ const DisplayFamilies = ProductCollectionItems
36
+ .reduce((accumulator, ProductCollectionItem) => {
37
+ if (ProductCollectionItem.familyId > 0) {
38
+ if (!accumulator['groups'][ProductCollectionItem.familyId]) {
39
+ isGroupRepresented[ProductCollectionItem.familyId] = false;
40
+ accumulator['sort'][ProductCollectionItem.familyId] = sortOrder;
41
+ sortOrder++;
42
+ accumulator['groups'][ProductCollectionItem.familyId] = {
43
+ groupId: ProductCollectionItem.familyId,
44
+ groupName: ProductCollectionItem.parentName,
45
+ brandName: ProductCollectionItem.brandName,
46
+ groupPriceLow: ProductCollectionItem.priceSale,
47
+ groupPriceHigh: ProductCollectionItem.priceSale,
48
+ products: [formatDisplayProduct(ProductCollectionItem)],
49
+ };
50
+ }
51
+ else {
52
+ if (ProductCollectionItem.priceSale < accumulator['groups'][ProductCollectionItem.familyId].groupPriceLow) {
53
+ accumulator['groups'][ProductCollectionItem.familyId].groupPriceLow = ProductCollectionItem.priceSale;
54
+ }
55
+ if (ProductCollectionItem.priceSale > accumulator['groups'][ProductCollectionItem.familyId].groupPriceHigh) {
56
+ accumulator['groups'][ProductCollectionItem.familyId].groupPriceHigh = ProductCollectionItem.priceSale;
57
+ }
58
+ accumulator['groups'][ProductCollectionItem.familyId].products.push(formatDisplayProduct(ProductCollectionItem));
59
+ }
60
+ }
61
+ else if (!accumulator['groups'][`S${ProductCollectionItem.id}`]) {
62
+ isGroupRepresented[`S${ProductCollectionItem.id}`] = false;
63
+ accumulator['sort'][`S${ProductCollectionItem.id}`] = sortOrder;
64
+ sortOrder++;
65
+ accumulator['groups'][`S${ProductCollectionItem.id}`] = {
66
+ groupId: ProductCollectionItem.familyId,
67
+ groupName: ProductCollectionItem.heading || ProductCollectionItem.productName,
68
+ brandName: ProductCollectionItem.brandName,
69
+ groupPriceLow: ProductCollectionItem.priceSale,
70
+ groupPriceHigh: ProductCollectionItem.priceSale,
71
+ products: [formatDisplayProduct(ProductCollectionItem)],
72
+ };
73
+ }
74
+ return accumulator;
75
+ }, {
76
+ groups: {},
77
+ sort: {},
78
+ });
79
+ const SortedGroups = Object.entries(DisplayFamilies['groups'])
80
+ .sort(([firstKey, firstVal], [secondKey, secondVal]) => {
81
+ const firstElSort = DisplayFamilies['sort'][firstKey];
82
+ const secondElSort = DisplayFamilies['sort'][secondKey];
83
+ if (firstElSort < secondElSort) {
84
+ return -1;
85
+ }
86
+ else if (firstElSort > secondElSort) {
87
+ return 1;
88
+ }
89
+ else {
90
+ return 0;
91
+ }
92
+ })
93
+ .map(([groupId, group]) => group);
94
+ // console.log({SortedGroups})
95
+ return SortedGroups;
96
+ }
97
+ else {
98
+ return [];
99
+ }
100
+ };
101
+
12
102
  const getProductCollection = async (context, params = {
13
103
  collectionId: 0,
14
104
  templateParams: {
@@ -31,12 +121,94 @@ const getProductCollection = async (context, params = {
31
121
  data: params,
32
122
  });
33
123
  const productCollection = (data?.data ?? []);
124
+ // console.log(productCollection)
125
+ return { data: groupProductResult(productCollection) };
126
+ };
127
+
128
+ const getProductListing = async (context, params = {
129
+ collectionId: 0,
130
+ familyId: 0,
131
+ channelListingId: 0,
132
+ debug: false,
133
+ }) => {
134
+ const RequestURL = new URL('v2/vsf/product/variations', context.config.api.url);
135
+ const { data, status } = await context.client.request({
136
+ method: 'POST',
137
+ url: RequestURL.href,
138
+ data: params,
139
+ });
140
+ const productCollection = (data?.data ?? []);
34
141
  return { data: productCollection };
35
142
  };
36
143
 
144
+ const proxyInstantsearch = async (context, ...searchRequests) => {
145
+ // * Retrieve Brand & Category filters from Header
146
+ const brandHeaderIndex = (context?.req?.rawHeaders ?? []).indexOf('x-brand-id');
147
+ let brandId = 0;
148
+ if (brandHeaderIndex > -1) {
149
+ brandId = (context?.req?.rawHeaders?.[brandHeaderIndex + 1] ?? 0);
150
+ }
151
+ const categoryHeaderIndex = (context?.req?.rawHeaders ?? []).indexOf('x-category-id');
152
+ let categoryId = 0;
153
+ if (categoryHeaderIndex > -1) {
154
+ categoryId = (context?.req?.rawHeaders?.[categoryHeaderIndex + 1] ?? 0);
155
+ }
156
+ const RequestURL = new URL('v2/searchkit/proxy', context.config.api.url);
157
+ const { data, status } = await context.client.request({
158
+ method: 'POST',
159
+ url: RequestURL.href,
160
+ headers: {
161
+ 'X-Brand-Id': brandId,
162
+ 'X-Category-Id': categoryId,
163
+ },
164
+ data: Array.isArray(searchRequests) ? searchRequests : [searchRequests],
165
+ });
166
+ const FormattedResults = data.results.map((result, index) => {
167
+ if (index === 0 && (result?.hits ?? []).length > 0 && result.hits[0].id) {
168
+ return {
169
+ ...result,
170
+ hits: groupProductResult(result.hits),
171
+ };
172
+ }
173
+ else {
174
+ return result;
175
+ }
176
+ });
177
+ return {
178
+ results: FormattedResults,
179
+ };
180
+ };
181
+
182
+ const getCollection = async (context, params = {
183
+ collectionId: 0,
184
+ }) => {
185
+ const { collectionId = 0 } = params;
186
+ const RequestURL = new URL(`/blackfisk/collection/${collectionId}`, context.config.api.url);
187
+ const { data, status } = await context.client.request({
188
+ method: 'GET',
189
+ url: RequestURL.href,
190
+ });
191
+ const Collection = (data?.data ?? []);
192
+ return { data: (Collection?.[0] ?? null) };
193
+ };
194
+
195
+ const getProductFacets = async (context, params) => {
196
+ const RequestURL = new URL(`/v2/vsf/product/facets`, context.config.api.url);
197
+ const { data, status } = await context.client.request({
198
+ method: 'GET',
199
+ url: RequestURL.href,
200
+ });
201
+ const ProductFacets = (data?.data ?? []);
202
+ return { data: ProductFacets };
203
+ };
204
+
37
205
  var apiEndpoints = /*#__PURE__*/Object.freeze({
38
206
  __proto__: null,
39
- getProductCollection: getProductCollection
207
+ getProductCollection: getProductCollection,
208
+ getProductListing: getProductListing,
209
+ proxyInstantsearch: proxyInstantsearch,
210
+ getCollection: getCollection,
211
+ getProductFacets: getProductFacets
40
212
  });
41
213
 
42
214
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/api/getProductCollection/index.ts","../src/index.server.ts"],"sourcesContent":["import { Endpoints, SearchProduct } from '../../types';\nexport interface getProductCollectionTemplateParams {\n [key: string]: any,\n}\nexport interface getProductCollectionParams {\n collectionId: number | string,\n templateParams?: getProductCollectionTemplateParams,\n debug?: boolean,\n}\nexport interface getProductCollectionResponse {\n data: SearchProduct[],\n}\nexport const getProductCollection: Endpoints['getProductCollection'] = async (\n context,\n params: getProductCollectionParams = {\n collectionId: 0,\n templateParams: {\n id: 0,\n ids: [],\n term: '',\n familyId: 0,\n categoryId: 0,\n brandId: 0,\n pricingStrategy: '',\n conditionId: 0,\n limit: 0,\n },\n debug: false,\n }\n) => {\n const RequestURL = new URL('v2/vsf/productCollection', context.config.api.url);\n const { data, status } = await context.client.request({\n method: 'POST',\n url: RequestURL.href,\n data: params,\n })\n const productCollection = (data?.data ?? [])\n return { data: productCollection };\n};\n","import axios from 'axios';\nimport { apiClientFactory } from '@vue-storefront/middleware';\nimport { MiddlewareConfig } from './index';\nimport * as apiEndpoints from './api';\n\n/**\n * In here you should create the client you'll use to communicate with the backend.\n * Axios is just an example.\n */\nconst buildClient = (settings: MiddlewareConfig) => {\n const defaultSettings = {\n accountId: 0,\n channelId: 0,\n accountSiteId: 0,\n baseURL: '',\n }\n const axiosInstance = axios.create({\n baseURL: settings.api.url || defaultSettings.baseURL,\n // baseURL: settings.api.url,\n headers: {\n 'X-Account-Id': settings.accountId || defaultSettings.accountId,\n 'X-Channel-Id': settings.channelId || defaultSettings.channelId,\n 'X-Site-Id': settings.accountSiteId || defaultSettings.accountSiteId,\n authorization: `${settings.api.auth_jwt || process.env.SECURITY_TOKEN || ''}`\n },\n });\n return axiosInstance\n}\n\nconst onCreate = (settings: MiddlewareConfig) => {\n const client = buildClient(settings);\n return {\n config: settings,\n client\n };\n};\n\nconst { createApiClient } = apiClientFactory<any, any>({\n onCreate,\n api: apiEndpoints,\n});\n\nexport { createApiClient };\n"],"names":["axios","apiClientFactory"],"mappings":";;;;;;;;;;;AAYO,MAAM,oBAAoB,GAAsC,OACrE,OAAO,EACP,MAAqC,GAAA;AACnC,IAAA,YAAY,EAAE,CAAC;AACf,IAAA,cAAc,EAAE;AACd,QAAA,EAAE,EAAE,CAAC;AACL,QAAA,GAAG,EAAE,EAAE;AACP,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,QAAQ,EAAE,CAAC;AACX,QAAA,UAAU,EAAE,CAAC;AACb,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,eAAe,EAAE,EAAE;AACnB,QAAA,WAAW,EAAE,CAAC;AACd,QAAA,KAAK,EAAE,CAAC;AACT,KAAA;AACD,IAAA,KAAK,EAAE,KAAK;AACb,CAAA,KACC;AACF,IAAA,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,0B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,GAAG,CAAC,QAA0B,KAAI;AAC9C,IAAA,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO;AACL,QAAA,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,EAAE,eAAe,EAAE,GAAGC,2BAAgB,CAAW;IACrD,QAAQ;AACR,IAAA,GAAG,EAAE,YAAY;AAClB,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../utils/elasticsearch/productGroup.ts","../src/api/getProductCollection/index.ts","../src/api/getProductListing/index.ts","../src/api/proxyInstantsearch/index.ts","../src/api/getCollection/index.ts","../src/api/getProductFacets/index.ts","../src/index.server.ts"],"sourcesContent":["import type { SearchProduct } from '@blackfisk/blackfisk-vue-storefront-api/src/types/api'\nexport interface DisplayProductImage {\n src: string,\n url: string,\n alt: string,\n}\nexport interface DisplayProduct {\n id: number,\n slug: string,\n name: string,\n groupId: number,\n price: string,\n img: DisplayProductImage,\n}\nexport interface DisplayProductGroup {\n groupId: number,\n groupName: string,\n brandName: string,\n groupPriceLow: number,\n groupPriceHigh: number,\n products: DisplayProduct[],\n}\nexport const groupProductResult = (ProductResult) => {\n const ProductCollectionItems:SearchProduct[] = (Array.isArray(ProductResult) ? ProductResult : [ProductResult]);\n if (ProductCollectionItems.length > 0) {\n const formatDisplayProductImage = (ProductCollectionItem: SearchProduct) => {\n const primaryImage = ProductCollectionItem.images?.[0] ?? { public_id: '', alt: '', url: '' }\n return {\n src: primaryImage.public_id,\n url: primaryImage.url,\n alt: primaryImage.alt,\n }\n }\n const formatDisplayProduct = (ProductCollectionItem: SearchProduct) => {\n return {\n id: ProductCollectionItem.id,\n slug: ProductCollectionItem.slug,\n name: ProductCollectionItem.heading || ProductCollectionItem.productName,\n price: `$${ProductCollectionItem.priceSale}`,\n groupId: ProductCollectionItem.familyId,\n img: formatDisplayProductImage(ProductCollectionItem),\n }\n }\n const isGroupRepresented = {}\n let sortOrder = 0\n const DisplayFamilies: any = ProductCollectionItems\n .reduce((accumulator: {'groups': {[groupId: number | string]: DisplayProductGroup}, 'sort': {[groupId: number | string]: number}}, ProductCollectionItem: SearchProduct) => {\n if (ProductCollectionItem.familyId > 0) {\n if (!accumulator['groups'][ProductCollectionItem.familyId]) {\n isGroupRepresented[ProductCollectionItem.familyId] = false\n accumulator['sort'][ProductCollectionItem.familyId] = sortOrder\n sortOrder++\n accumulator['groups'][ProductCollectionItem.familyId] = {\n groupId: ProductCollectionItem.familyId,\n groupName: ProductCollectionItem.parentName,\n brandName: ProductCollectionItem.brandName,\n groupPriceLow: ProductCollectionItem.priceSale,\n groupPriceHigh: ProductCollectionItem.priceSale,\n products: [formatDisplayProduct(ProductCollectionItem)],\n }\n } else {\n if (ProductCollectionItem.priceSale < accumulator['groups'][ProductCollectionItem.familyId].groupPriceLow) {\n accumulator['groups'][ProductCollectionItem.familyId].groupPriceLow = ProductCollectionItem.priceSale\n }\n if (ProductCollectionItem.priceSale > accumulator['groups'][ProductCollectionItem.familyId].groupPriceHigh) {\n accumulator['groups'][ProductCollectionItem.familyId].groupPriceHigh = ProductCollectionItem.priceSale\n }\n accumulator['groups'][ProductCollectionItem.familyId].products.push(formatDisplayProduct(ProductCollectionItem))\n }\n } else if (!accumulator['groups'][`S${ProductCollectionItem.id}`]) {\n isGroupRepresented[`S${ProductCollectionItem.id}`] = false\n accumulator['sort'][`S${ProductCollectionItem.id}`] = sortOrder\n sortOrder++\n accumulator['groups'][`S${ProductCollectionItem.id}`] = {\n groupId: ProductCollectionItem.familyId,\n groupName: ProductCollectionItem.heading || ProductCollectionItem.productName,\n brandName: ProductCollectionItem.brandName,\n groupPriceLow: ProductCollectionItem.priceSale,\n groupPriceHigh: ProductCollectionItem.priceSale,\n products: [formatDisplayProduct(ProductCollectionItem)],\n }\n }\n return accumulator\n }, {\n groups: {},\n sort: {},\n })\n const SortedGroups = Object.entries(DisplayFamilies['groups'])\n .sort(([firstKey, firstVal]: any, [secondKey, secondVal]: any) => {\n const firstElSort = DisplayFamilies['sort'][firstKey]\n const secondElSort = DisplayFamilies['sort'][secondKey]\n if (firstElSort < secondElSort) {\n return -1\n } else if (firstElSort > secondElSort) {\n return 1\n } else {\n return 0\n }\n })\n .map(([groupId, group]) => group)\n // console.log({SortedGroups})\n return SortedGroups\n } else {\n return []\n }\n}\n","import { Endpoints } from '../../types';\nimport { groupProductResult } from 'utils/elasticsearch/productGroup'\n// import type { DisplayProductGroup } from 'utils/elasticsearch/productGroup'\nexport interface getProductCollectionTemplateParams {\n [key: string]: any,\n}\nexport interface getProductCollectionParams {\n collectionId: number | string,\n templateParams?: getProductCollectionTemplateParams,\n debug?: boolean,\n}\nexport interface getProductCollectionResponse {\n data: any[],\n}\n\nexport const getProductCollection: Endpoints['getProductCollection'] = async (\n context,\n params: getProductCollectionParams = {\n collectionId: 0,\n templateParams: {\n id: 0,\n ids: [],\n term: '',\n familyId: 0,\n categoryId: 0,\n brandId: 0,\n pricingStrategy: '',\n conditionId: 0,\n limit: 0,\n },\n debug: false,\n }\n) => {\n const RequestURL = new URL('v2/vsf/productCollection', context.config.api.url);\n const { data, status } = await context.client.request({\n method: 'POST',\n url: RequestURL.href,\n data: params,\n })\n const productCollection = (data?.data ?? [])\n // console.log(productCollection)\n return { data: groupProductResult(productCollection) };\n};\n","import { Endpoints, ProductListing } from '../../types';\nexport interface getProductListingTemplateParams {\n [key: string]: any,\n}\nexport interface getProductListingParams {\n collectionId: number | string,\n familyId: number | string,\n channelListingId: number | string,\n debug?: boolean,\n}\nexport interface getProductListingResponse {\n data: ProductListing[],\n}\nexport const getProductListing: Endpoints['getProductListing'] = async (\n context,\n params: getProductListingParams = {\n collectionId: 0,\n familyId: 0,\n channelListingId: 0,\n debug: false,\n }\n) => {\n const RequestURL = new URL('v2/vsf/product/variations', context.config.api.url);\n const { data, status } = await context.client.request({\n method: 'POST',\n url: RequestURL.href,\n data: params,\n })\n const productCollection = (data?.data ?? [])\n return { data: productCollection };\n};\n","import { Endpoints } from '../../types';\nimport { groupProductResult } from 'utils/elasticsearch/productGroup'\n\nexport interface proxyInstantsearchResponse {\n results: any[],\n}\n\nexport const proxyInstantsearch: Endpoints['proxyInstantsearch'] = async (\n context,\n ...searchRequests\n) => {\n // * Retrieve Brand & Category filters from Header\n const brandHeaderIndex = (context?.req?.rawHeaders ?? []).indexOf('x-brand-id')\n let brandId = 0\n if (brandHeaderIndex > -1) {\n brandId = (context?.req?.rawHeaders?.[brandHeaderIndex + 1] ?? 0)\n }\n const categoryHeaderIndex = (context?.req?.rawHeaders ?? []).indexOf('x-category-id')\n let categoryId = 0\n if (categoryHeaderIndex > -1) {\n categoryId = (context?.req?.rawHeaders?.[categoryHeaderIndex + 1] ?? 0)\n }\n\n const RequestURL = new URL('v2/searchkit/proxy', context.config.api.url);\n const { data, status } = await context.client.request({\n method: 'POST',\n url: RequestURL.href,\n headers: {\n 'X-Brand-Id': brandId,\n 'X-Category-Id': categoryId,\n },\n data: Array.isArray(searchRequests) ? searchRequests : [searchRequests],\n })\n const FormattedResults = data.results.map((result: any, index: number) => {\n if (index === 0 && (result?.hits ?? []).length > 0 && result.hits[0].id) {\n return {\n ...result,\n hits: groupProductResult(result.hits),\n }\n } else {\n return result\n }\n });\n return {\n results: FormattedResults,\n }\n};\n","import { Endpoints } from '../../types';\nexport interface getCollectionParams {\n collectionId: number\n}\nexport interface getCollectionResponse {\n data: any\n}\nexport const getCollection: Endpoints['getCollection'] = async (\n context,\n params = {\n collectionId: 0,\n },\n) => {\n const { collectionId = 0 } = params\n const RequestURL = new URL(`/blackfisk/collection/${collectionId}`, context.config.api.url);\n const { data, status } = await context.client.request({\n method: 'GET',\n url: RequestURL.href,\n })\n const Collection = (data?.data ?? [])\n return { data: (Collection?.[0] ?? null) };\n};\n","import { Endpoints } from '../../types';\n\nexport const getProductFacets: Endpoints['getProductFacets'] = async (\n context,\n params\n) => {\n const RequestURL = new URL(`/v2/vsf/product/facets`, context.config.api.url);\n const { data, status } = await context.client.request({\n method: 'GET',\n url: RequestURL.href,\n });\n const ProductFacets = (data?.data ?? []);\n return { data: ProductFacets };\n};\n","import axios from 'axios';\nimport { apiClientFactory } from '@vue-storefront/middleware';\nimport { MiddlewareConfig } from './index';\nimport * as apiEndpoints from './api';\n\n/**\n * In here you should create the client you'll use to communicate with the backend.\n * Axios is just an example.\n */\nconst buildClient = (settings: MiddlewareConfig) => {\n const defaultSettings = {\n accountId: 0,\n channelId: 0,\n accountSiteId: 0,\n baseURL: '',\n }\n const axiosInstance = axios.create({\n baseURL: settings.api.url || defaultSettings.baseURL,\n // baseURL: settings.api.url,\n headers: {\n 'X-Account-Id': settings.accountId || defaultSettings.accountId,\n 'X-Channel-Id': settings.channelId || defaultSettings.channelId,\n 'X-Site-Id': settings.accountSiteId || defaultSettings.accountSiteId,\n authorization: `${settings.api.auth_jwt || process.env.SECURITY_TOKEN || ''}`\n },\n });\n return axiosInstance\n}\n\nconst onCreate = (settings: MiddlewareConfig) => {\n const client = buildClient(settings);\n return {\n config: settings,\n client\n };\n};\n\nconst { createApiClient } = apiClientFactory<any, any>({\n onCreate,\n api: apiEndpoints,\n});\n\nexport { createApiClient };\n"],"names":["axios","apiClientFactory"],"mappings":";;;;;;;;;;;AAsBO,MAAM,kBAAkB,GAAG,CAAC,aAAa,KAAI;IAClD,MAAM,sBAAsB,IAAoB,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;AAChH,IAAA,IAAI,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE;AACrC,QAAA,MAAM,yBAAyB,GAAG,CAAC,qBAAoC,KAAI;YACzE,MAAM,YAAY,GAAG,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAA;YAC7F,OAAO;gBACL,GAAG,EAAE,YAAY,CAAC,S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CAAC,SAAS,IAAI,eAAe,CAAC,SAAS;AAC/D,YAAA,cAAc,EAAE,QAAQ,CAAC,SAAS,IAAI,eAAe,CAAC,SAAS;AAC/D,YAAA,WAAW,EAAE,QAAQ,CAAC,aAAa,IAAI,eAAe,CAAC,aAAa;AACpE,YAAA,aAAa,EAAE,CAAA,EAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE,CAAE,CAAA;AAC9E,SAAA;AACF,KAAA,CAAC,CAAC;AACH,IAAA,OAAO,aAAa,CAAA;AACtB,CAAC,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,QAA0B,KAAI;AAC9C,IAAA,MAAM,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO;AACL,QAAA,MAAM,EAAE,QAAQ;QAChB,MAAM;KACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,EAAE,eAAe,EAAE,GAAGC,2BAAgB,CAAW;IACrD,QAAQ;AACR,IAAA,GAAG,EAAE,YAAY;AAClB,CAAA;;;;"}
@@ -0,0 +1,9 @@
1
+ import { Endpoints } from '../../types';
2
+ export interface getCollectionParams {
3
+ collectionId: number;
4
+ }
5
+ export interface getCollectionResponse {
6
+ data: any;
7
+ }
8
+ export declare const getCollection: Endpoints['getCollection'];
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/getCollection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAA;CACrB;AACD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,GAAG,CAAA;CACV;AACD,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,eAAe,CAcpD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Endpoints, SearchProduct } from '../../types';
1
+ import { Endpoints } from '../../types';
2
2
  export interface getProductCollectionTemplateParams {
3
3
  [key: string]: any;
4
4
  }
@@ -8,7 +8,7 @@ export interface getProductCollectionParams {
8
8
  debug?: boolean;
9
9
  }
10
10
  export interface getProductCollectionResponse {
11
- data: SearchProduct[];
11
+ data: any[];
12
12
  }
13
13
  export declare const getProductCollection: Endpoints['getProductCollection'];
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/getProductCollection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,kCAAkC;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AACD,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,kCAAkC,CAAC;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,GAAG,EAAE,CAAC;CACb;AAED,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,sBAAsB,CA2BlE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Endpoints } from '../../types';
2
+ export declare const getProductFacets: Endpoints['getProductFacets'];
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/getProductFacets/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,kBAAkB,CAW1D,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { Endpoints, ProductListing } from '../../types';
2
+ export interface getProductListingTemplateParams {
3
+ [key: string]: any;
4
+ }
5
+ export interface getProductListingParams {
6
+ collectionId: number | string;
7
+ familyId: number | string;
8
+ channelListingId: number | string;
9
+ debug?: boolean;
10
+ }
11
+ export interface getProductListingResponse {
12
+ data: ProductListing[];
13
+ }
14
+ export declare const getProductListing: Endpoints['getProductListing'];
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/getProductListing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxD,MAAM,WAAW,+BAA+B;IAC9C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AACD,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,cAAc,EAAE,CAAC;CACxB;AACD,eAAO,MAAM,iBAAiB,EAAE,SAAS,CAAC,mBAAmB,CAiB5D,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { getProductCollection } from './getProductCollection';
2
+ export { getProductListing } from './getProductListing';
3
+ export { proxyInstantsearch } from './proxyInstantsearch';
4
+ export { getCollection } from './getCollection';
5
+ export { getProductFacets } from './getProductFacets';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Endpoints } from '../../types';
2
+ export interface proxyInstantsearchResponse {
3
+ results: any[];
4
+ }
5
+ export declare const proxyInstantsearch: Endpoints['proxyInstantsearch'];
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/api/proxyInstantsearch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,GAAG,EAAE,CAAC;CAChB;AAED,eAAO,MAAM,kBAAkB,EAAE,SAAS,CAAC,oBAAoB,CAuC9D,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../../../../src/index.server.ts"],"names":[],"mappings":"AAqCA,QAAA,MAAQ,eAAe,kEAGrB,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { BfskIntegrationContext, TODO } from '..';
2
+ import { getProductCollectionParams, getProductCollectionResponse } from '../../api/getProductCollection/index';
3
+ import { getProductListingParams, getProductListingResponse } from '../../api/getProductListing/index';
4
+ import { proxyInstantsearchResponse } from '../../api/proxyInstantsearch/index';
5
+ import { getCollectionParams, getCollectionResponse } from '../../api/getCollection/index';
6
+ /**
7
+ * Definition of all API-client methods available in {@link https://docs.vuestorefront.io/v2/advanced/context.html#context-api | context}.
8
+ */
9
+ export interface Endpoints {
10
+ /**
11
+ * Here you can find an example endpoint definition. Based on this example, you should define how your endpoint will look like.
12
+ * This description will appear in the API extractor, so try to document all endpoints added here.
13
+ */
14
+ getProductCollection(context: BfskIntegrationContext, params: getProductCollectionParams): Promise<getProductCollectionResponse>;
15
+ getProductListing(context: BfskIntegrationContext, params: getProductListingParams): Promise<getProductListingResponse>;
16
+ proxyInstantsearch(context: BfskIntegrationContext, params: any): Promise<proxyInstantsearchResponse>;
17
+ getCollection(context: BfskIntegrationContext, params: getCollectionParams): Promise<getCollectionResponse>;
18
+ getProductFacets(context: BfskIntegrationContext, params: TODO): Promise<TODO>;
19
+ }
20
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../../../src/types/api/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,IAAI,EAAE,MAAM,IAAI,CAAA;AACjD,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAA;AAC/G,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AACtG,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAA;AAE1F;;GAEG;AACH,MAAM,WAAW,SAAS;IAExB;;;OAGG;IACH,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;IACjI,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACxH,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACtG,aAAa,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC5G,gBAAgB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChF"}
@@ -58,5 +58,8 @@ export interface SearchProduct {
58
58
  title: string;
59
59
  upc: string;
60
60
  }
61
+ export interface ProductListing {
62
+ [key: string]: any;
63
+ }
61
64
  export * from './endpoints';
62
65
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/api/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,IAAI,EAAE,sBAAsB,EAAE,CAAC;IAC/B,cAAc,EAAE,sBAAsB,EAAE,CAAC;IACzC,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC;AACD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AACD,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,iBAAiB;CAAG;AACrC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,UAAU,EAAE,2BAA2B,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU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AClB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,mBAAmB,CAAC;CAC1B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAErE;;IAEI;AACJ,oBAAY,sBAAsB,GAAG,kBAAkB,CACrD,aAAa,EACb,gBAAgB,EAChB,uBAAuB,CACxB,CAAC;AAEF;;IAEI;AACJ,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,sBAAsB,CAAC;CAC/B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC;;GAEG;AACH,oBAAY,uBAAuB,GAAG;KACnC,CAAC,IAAI,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAC3C,CAAC,EAAE,GAAG,EACN,GAAG,IAAI,EAAE,MAAM,CAAC,KACb,MAAM,CAAC,GACR,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjB,KAAK;CACV,CAAC;AAEF,oBAAY,IAAI,GAAG,GAAG,CAAC;AAEvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,23 @@
1
+ export interface DisplayProductImage {
2
+ src: string;
3
+ url: string;
4
+ alt: string;
5
+ }
6
+ export interface DisplayProduct {
7
+ id: number;
8
+ slug: string;
9
+ name: string;
10
+ groupId: number;
11
+ price: string;
12
+ img: DisplayProductImage;
13
+ }
14
+ export interface DisplayProductGroup {
15
+ groupId: number;
16
+ groupName: string;
17
+ brandName: string;
18
+ groupPriceLow: number;
19
+ groupPriceHigh: number;
20
+ products: DisplayProduct[];
21
+ }
22
+ export declare const groupProductResult: (ProductResult: any) => unknown[];
23
+ //# sourceMappingURL=productGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productGroup.d.ts","sourceRoot":"","sources":["../../../../../utils/elasticsearch/productGroup.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb;AACD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,mBAAmB,CAAC;CAC1B;AACD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AACD,eAAO,MAAM,kBAAkB,mCAmF9B,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getProductCollection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,MAAM,WAAW,kCAAkC;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AACD,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,kCAAkC,CAAC;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AACD,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,sBAAsB,CA0BlE,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getProductCollection } from './getProductCollection';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAqCA,QAAA,MAAQ,eAAe,kEAGrB,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,13 +0,0 @@
1
- import { BfskIntegrationContext } from '..';
2
- import { getProductCollectionParams, getProductCollectionResponse } from '../../api/getProductCollection/index';
3
- /**
4
- * Definition of all API-client methods available in {@link https://docs.vuestorefront.io/v2/advanced/context.html#context-api | context}.
5
- */
6
- export interface Endpoints {
7
- /**
8
- * Here you can find an example endpoint definition. Based on this example, you should define how your endpoint will look like.
9
- * This description will appear in the API extractor, so try to document all endpoints added here.
10
- */
11
- getProductCollection(context: BfskIntegrationContext, params: getProductCollectionParams): Promise<getProductCollectionResponse>;
12
- }
13
- //# sourceMappingURL=endpoints.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../src/types/api/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAQ,MAAM,IAAI,CAAA;AACjD,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,sC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ACrB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,EAAE,CAAC;IACX,SAAS,EAAE,sBAAsB,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,iBAAiB,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AACD,cAAc,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/config/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,gBAAgB;IAE/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,mBAAmB,CAAC;CAC1B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAErE;;IAEI;AACJ,oBAAY,sBAAsB,GAAG,kBAAkB,CACrD,aAAa,EACb,gBAAgB,EAChB,uBAAuB,CACxB,CAAC;AAEF;;IAEI;AACJ,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,sBAAsB,CAAC;CAC/B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC;;GAEG;AACH,oBAAY,uBAAuB,GAAG;KACnC,CAAC,IAAI,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAC3C,CAAC,EAAE,GAAG,EACN,GAAG,IAAI,EAAE,MAAM,CAAC,KACb,MAAM,CAAC,GACR,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjB,KAAK;CACV,CAAC;AAEF,oBAAY,IAAI,GAAG,GAAG,CAAC;AAEvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getProductCollection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvD,MAAM,WAAW,kCAAkC;IACjD,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AACD,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,kCAAkC,CAAC;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,aAAa,EAAE,CAAC;CACvB;AACD,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,sBAAsB,CA0BlE,CAAC"}
@@ -1,2 +0,0 @@
1
- export { getProductCollection } from './getProductCollection';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAqCA,QAAA,MAAQ,eAAe,kEAGrB,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,13 +0,0 @@
1
- import { BfskIntegrationContext } from '..';
2
- import { getProductCollectionParams, getProductCollectionResponse } from '../../api/getProductCollection/index';
3
- /**
4
- * Definition of all API-client methods available in {@link https://docs.vuestorefront.io/v2/advanced/context.html#context-api | context}.
5
- */
6
- export interface Endpoints {
7
- /**
8
- * Here you can find an example endpoint definition. Based on this example, you should define how your endpoint will look like.
9
- * This description will appear in the API extractor, so try to document all endpoints added here.
10
- */
11
- getProductCollection(context: BfskIntegrationContext, params: getProductCollectionParams): Promise<getProductCollectionResponse>;
12
- }
13
- //# sourceMappingURL=endpoints.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../src/types/api/endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAQ,MAAM,IAAI,CAAA;AACjD,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAA;AAE/G;;GAEG;AAC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IAClB,MAAM,EAAE,EAAE,CAAC;IACX,SAAS,EAAE,sBAAsB,CAAC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,iBAAiB,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AACD,cAAc,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/config/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,gBAAgB;IAE/B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,mBAAmB,CAAC;CAC1B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAErE;;IAEI;AACJ,oBAAY,sBAAsB,GAAG,kBAAkB,CACrD,aAAa,EACb,gBAAgB,EAChB,uBAAuB,CACxB,CAAC;AAEF;;IAEI;AACJ,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,sBAAsB,CAAC;CAC/B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC;;GAEG;AACH,oBAAY,uBAAuB,GAAG;KACnC,CAAC,IAAI,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAC3C,CAAC,EAAE,GAAG,EACN,GAAG,IAAI,EAAE,MAAM,CAAC,KACb,MAAM,CAAC,GACR,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjB,KAAK;CACV,CAAC;AAEF,oBAAY,IAAI,GAAG,GAAG,CAAC;AAEvB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}