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

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.
@@ -1,12 +1,14 @@
1
- import { Endpoints } from '../../types';
1
+ import { Endpoints, SearchProduct } from '../../types';
2
+ export interface getProductCollectionTemplateParams {
3
+ [key: string]: any;
4
+ }
2
5
  export interface getProductCollectionParams {
3
6
  collectionId: number | string;
7
+ templateParams?: getProductCollectionTemplateParams;
8
+ debug?: boolean;
4
9
  }
5
10
  export interface getProductCollectionResponse {
6
- data: {
7
- content: {};
8
- meta: {};
9
- };
11
+ data: SearchProduct[];
10
12
  }
11
13
  export declare const getProductCollection: Endpoints['getProductCollection'];
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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;AACxC,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AACD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE,CAAC;QACZ,IAAI,EAAE,EAAE,CAAC;KACV,CAAC;CACH;AACD,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,sBAAsB,CAqBlE,CAAC"}
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,4 +1,2 @@
1
- export { exampleEndpoint } from './exampleEndpoint';
2
- export { getPageContent } from './getPageContent';
3
1
  export { getProductCollection } from './getProductCollection';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAsCA,QAAA,MAAQ,eAAe,kEAGrB,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
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,5 +1,4 @@
1
- import { BfskIntegrationContext, TODO } from '..';
2
- import { getPageContentParams, getPageContentResponse } from '../../api/getPageContent/index';
1
+ import { BfskIntegrationContext } from '..';
3
2
  import { getProductCollectionParams, getProductCollectionResponse } from '../../api/getProductCollection/index';
4
3
  /**
5
4
  * Definition of all API-client methods available in {@link https://docs.vuestorefront.io/v2/advanced/context.html#context-api | context}.
@@ -9,8 +8,6 @@ export interface Endpoints {
9
8
  * Here you can find an example endpoint definition. Based on this example, you should define how your endpoint will look like.
10
9
  * This description will appear in the API extractor, so try to document all endpoints added here.
11
10
  */
12
- exampleEndpoint(context: BfskIntegrationContext, params: TODO): Promise<TODO>;
13
- getPageContent(context: BfskIntegrationContext, params: getPageContentParams): Promise<getPageContentResponse>;
14
11
  getProductCollection(context: BfskIntegrationContext, params: getProductCollectionParams): Promise<getProductCollectionResponse>;
15
12
  }
16
13
  //# sourceMappingURL=endpoints.d.ts.map
@@ -1 +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,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAC7F,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAA;AAE/G;;GAEG;AACH,MAAM,WAAW,SAAS;IAExB;;;OAGG;IACH,eAAe,CACb,OAAO,EAAE,sBAAsB,EAC/B,MAAM,EAAE,IAAI,GACX,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/G,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACpI"}
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;AACH,MAAM,WAAW,SAAS;IAExB;;;OAGG;IACH,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAClI"}
@@ -1,2 +1,62 @@
1
+ export interface SearchProductAttribute {
2
+ id: number;
3
+ name: string;
4
+ valueJSON: string;
5
+ }
6
+ export interface SearchProductAttributeTypes {
7
+ facets: SearchProductAttribute[];
8
+ misc: SearchProductAttribute[];
9
+ specifications: SearchProductAttribute[];
10
+ variants: SearchProductAttribute[];
11
+ }
12
+ export interface SearchProductCondition {
13
+ id: number;
14
+ name: string;
15
+ description: string;
16
+ }
17
+ export interface SearchProductImage {
18
+ url: string;
19
+ public_id: string;
20
+ isPrimary: number;
21
+ alt: string;
22
+ }
23
+ export interface SearchProductMeta {
24
+ }
25
+ export interface SearchProduct {
26
+ id: number;
27
+ accountId: number;
28
+ attributeListValues: string[];
29
+ attributeValues: string[];
30
+ attributes: SearchProductAttributeTypes;
31
+ brandId: number;
32
+ brandName: string;
33
+ categories: string[];
34
+ categoryIds: number[];
35
+ categoryName: string;
36
+ channelId: number;
37
+ colors: [];
38
+ condition: SearchProductCondition;
39
+ description: string;
40
+ familyId: number;
41
+ features: string[];
42
+ heading: string;
43
+ images: SearchProductImage[];
44
+ imagesCount: number;
45
+ isAvailable: boolean;
46
+ keywords: string[];
47
+ meta: SearchProductMeta;
48
+ metaDescription: string;
49
+ mpn: string;
50
+ parentName: string;
51
+ priceMAP: number;
52
+ priceSale: number;
53
+ pricingStrategy: string;
54
+ productName: string;
55
+ quantity: number;
56
+ sku: string;
57
+ slug: string;
58
+ title: string;
59
+ upc: string;
60
+ }
1
61
  export * from './endpoints';
2
62
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/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AAkB,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blackfisk/blackfisk-vue-storefront-api",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
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": "094c3d4d430d37b78ae5085ccbe6629ac79a8baf"
31
+ "gitHead": "be6d7a7b779ae7025136bd8e093ca3d2284f1a9d"
32
32
  }
@@ -1,12 +1,14 @@
1
- import { Endpoints } from '../../types';
1
+ import { Endpoints, SearchProduct } from '../../types';
2
+ export interface getProductCollectionTemplateParams {
3
+ [key: string]: any;
4
+ }
2
5
  export interface getProductCollectionParams {
3
6
  collectionId: number | string;
7
+ templateParams?: getProductCollectionTemplateParams;
8
+ debug?: boolean;
4
9
  }
5
10
  export interface getProductCollectionResponse {
6
- data: {
7
- content: {};
8
- meta: {};
9
- };
11
+ data: SearchProduct[];
10
12
  }
11
13
  export declare const getProductCollection: Endpoints['getProductCollection'];
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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;AACxC,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AACD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE,CAAC;QACZ,IAAI,EAAE,EAAE,CAAC;KACV,CAAC;CACH;AACD,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,sBAAsB,CAqBlE,CAAC"}
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,4 +1,2 @@
1
- export { exampleEndpoint } from './exampleEndpoint';
2
- export { getPageContent } from './getPageContent';
3
1
  export { getProductCollection } from './getProductCollection';
4
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
package/server/index.js CHANGED
@@ -9,54 +9,33 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
9
9
 
10
10
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
11
11
 
12
- const exampleEndpoint = async (context, params) => {
13
- console.log('exampleEndpoint has been called');
14
- // Example request could look like this:
15
- // return await context.client.get(`example-url?id=${params.id}`);
16
- return { data: 'Hello, Vue Storefront Integrator!' };
17
- };
18
-
19
- const getPageContent = async (context, params) => {
20
- console.log('getPageContent has been called. It\'s now updated.');
21
- const RequestURL = new URL('v2/vsf/cms/pageContent', context.config.api.url);
22
- for (const param in params) {
23
- RequestURL.searchParams.set(param, params[param]);
24
- }
25
- console.log({ RequestURL });
26
- const { data, status } = await context.client.request({
27
- method: 'GET',
28
- url: RequestURL.href,
29
- });
30
- console.log({ status, PageContentResponse: data });
31
- const PageContent = data?.data?.[0] ?? {};
32
- console.log({ PageContent });
33
- return { data: PageContent };
34
- };
35
-
36
- const getProductCollection = async (context, params) => {
37
- console.log('getProductCollection has been called. It\'s now updated.');
12
+ const getProductCollection = async (context, params = {
13
+ collectionId: 0,
14
+ templateParams: {
15
+ id: 0,
16
+ ids: [],
17
+ term: '',
18
+ familyId: 0,
19
+ categoryId: 0,
20
+ brandId: 0,
21
+ pricingStrategy: '',
22
+ conditionId: 0,
23
+ limit: 0,
24
+ },
25
+ debug: false,
26
+ }) => {
38
27
  const RequestURL = new URL('v2/vsf/productCollection', context.config.api.url);
39
- if (!('collectionId' in params)) {
40
- params['collectionId'] = 145;
41
- }
42
- for (const param in params) {
43
- RequestURL.searchParams.set(param, params[param]);
44
- }
45
- console.log({ RequestURL });
46
28
  const { data, status } = await context.client.request({
47
- method: 'GET',
29
+ method: 'POST',
48
30
  url: RequestURL.href,
31
+ data: params,
49
32
  });
50
- console.log({ status, PageContentResponse: data });
51
- const PageContent = data?.data?.[0] ?? {};
52
- console.log({ PageContent });
53
- return { data: PageContent };
33
+ const productCollection = (data?.data ?? []);
34
+ return { data: productCollection };
54
35
  };
55
36
 
56
37
  var apiEndpoints = /*#__PURE__*/Object.freeze({
57
38
  __proto__: null,
58
- exampleEndpoint: exampleEndpoint,
59
- getPageContent: getPageContent,
60
39
  getProductCollection: getProductCollection
61
40
  });
62
41
 
@@ -84,7 +63,6 @@ const buildClient = (settings) => {
84
63
  return axiosInstance;
85
64
  };
86
65
  const onCreate = (settings) => {
87
- console.log({ settings });
88
66
  const client = buildClient(settings);
89
67
  return {
90
68
  config: settings,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/api/exampleEndpoint/index.ts","../src/api/getPageContent/index.ts","../src/api/getProductCollection/index.ts","../src/index.server.ts"],"sourcesContent":["import { Endpoints } from '../../types';\n\nexport const exampleEndpoint: Endpoints['exampleEndpoint'] = async (\n context,\n params\n) => {\n console.log('exampleEndpoint has been called');\n\n // Example request could look like this:\n // return await context.client.get(`example-url?id=${params.id}`);\n return { data: 'Hello, Vue Storefront Integrator!' };\n};\n","import { Endpoints } from '../../types';\nexport interface getPageContentParams {\n typeId: number,\n referenceId: string,\n collectionId: number,\n slug: string,\n}\nexport interface getPageContentResponse {\n data: {\n content: {},\n meta: {},\n },\n}\nexport const getPageContent: Endpoints['getPageContent'] = async (\n context,\n params: getPageContentParams\n) => {\n console.log('getPageContent has been called. It\\'s now updated.');\n const RequestURL = new URL('v2/vsf/cms/pageContent', context.config.api.url);\n for (const param in params) {\n RequestURL.searchParams.set(param, params[param]);\n }\n console.log({RequestURL})\n const { data, status } = await context.client.request({\n method: 'GET',\n url: RequestURL.href,\n })\n console.log({status, PageContentResponse: data})\n const PageContent = data?.data?.[0] ?? {}\n console.log({PageContent})\n return { data: PageContent };\n};\n","import { Endpoints } from '../../types';\nexport interface getProductCollectionParams {\n collectionId: number | string,\n}\nexport interface getProductCollectionResponse {\n data: {\n content: {},\n meta: {},\n },\n}\nexport const getProductCollection: Endpoints['getProductCollection'] = async (\n context,\n params: getProductCollectionParams\n) => {\n console.log('getProductCollection has been called. It\\'s now updated.');\n const RequestURL = new URL('v2/vsf/productCollection', context.config.api.url);\n if (!('collectionId' in params)) {\n params['collectionId'] = 145\n }\n for (const param in params) {\n RequestURL.searchParams.set(param, params[param]);\n }\n console.log({RequestURL})\n const { data, status } = await context.client.request({\n method: 'GET',\n url: RequestURL.href,\n })\n console.log({status, PageContentResponse: data})\n const PageContent = data?.data?.[0] ?? {}\n console.log({PageContent})\n return { data: PageContent };\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 console.log({settings});\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":";;;;;;;;;;;AAEO,MAAM,eAAe,GAAiC,OAC3D,OAAO,EACP,MAAM,KACJ;AACF,IA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,CAAC,OAAO;;AAEpD,QAAA,OAAO,EAAE;AACP,YAAA,cAAc,EAAE,QAAQ,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,OAAO,CAAC,GAAG,CAAC,EAAC,QAAQ,EAAC,CAAC,CAAC;AACxB,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":["../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;AAC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AA;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;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAsCA,QAAA,MAAQ,eAAe,kEAGrB,CAAC;AAEH,OAAO,EAAE,eAAe,EAAE,CAAC"}
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,5 +1,4 @@
1
- import { BfskIntegrationContext, TODO } from '..';
2
- import { getPageContentParams, getPageContentResponse } from '../../api/getPageContent/index';
1
+ import { BfskIntegrationContext } from '..';
3
2
  import { getProductCollectionParams, getProductCollectionResponse } from '../../api/getProductCollection/index';
4
3
  /**
5
4
  * Definition of all API-client methods available in {@link https://docs.vuestorefront.io/v2/advanced/context.html#context-api | context}.
@@ -9,8 +8,6 @@ export interface Endpoints {
9
8
  * Here you can find an example endpoint definition. Based on this example, you should define how your endpoint will look like.
10
9
  * This description will appear in the API extractor, so try to document all endpoints added here.
11
10
  */
12
- exampleEndpoint(context: BfskIntegrationContext, params: TODO): Promise<TODO>;
13
- getPageContent(context: BfskIntegrationContext, params: getPageContentParams): Promise<getPageContentResponse>;
14
11
  getProductCollection(context: BfskIntegrationContext, params: getProductCollectionParams): Promise<getProductCollectionResponse>;
15
12
  }
16
13
  //# sourceMappingURL=endpoints.d.ts.map
@@ -1 +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,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAC7F,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAA;AAE/G;;GAEG;AACH,MAAM,WAAW,SAAS;IAExB;;;OAGG;IACH,eAAe,CACb,OAAO,EAAE,sBAAsB,EAC/B,MAAM,EAAE,IAAI,GACX,OAAO,CAAC,IAAI,CAAC,CAAC;IACf,cAAc,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAC/G,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CACpI"}
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;AACH,MAAM,WAAW,SAAS;IAExB;;;OAGG;IACH,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;CAClI"}
@@ -1,2 +1,62 @@
1
+ export interface SearchProductAttribute {
2
+ id: number;
3
+ name: string;
4
+ valueJSON: string;
5
+ }
6
+ export interface SearchProductAttributeTypes {
7
+ facets: SearchProductAttribute[];
8
+ misc: SearchProductAttribute[];
9
+ specifications: SearchProductAttribute[];
10
+ variants: SearchProductAttribute[];
11
+ }
12
+ export interface SearchProductCondition {
13
+ id: number;
14
+ name: string;
15
+ description: string;
16
+ }
17
+ export interface SearchProductImage {
18
+ url: string;
19
+ public_id: string;
20
+ isPrimary: number;
21
+ alt: string;
22
+ }
23
+ export interface SearchProductMeta {
24
+ }
25
+ export interface SearchProduct {
26
+ id: number;
27
+ accountId: number;
28
+ attributeListValues: string[];
29
+ attributeValues: string[];
30
+ attributes: SearchProductAttributeTypes;
31
+ brandId: number;
32
+ brandName: string;
33
+ categories: string[];
34
+ categoryIds: number[];
35
+ categoryName: string;
36
+ channelId: number;
37
+ colors: [];
38
+ condition: SearchProductCondition;
39
+ description: string;
40
+ familyId: number;
41
+ features: string[];
42
+ heading: string;
43
+ images: SearchProductImage[];
44
+ imagesCount: number;
45
+ isAvailable: boolean;
46
+ keywords: string[];
47
+ meta: SearchProductMeta;
48
+ metaDescription: string;
49
+ mpn: string;
50
+ parentName: string;
51
+ priceMAP: number;
52
+ priceSale: number;
53
+ pricingStrategy: string;
54
+ productName: string;
55
+ quantity: number;
56
+ sku: string;
57
+ slug: string;
58
+ title: string;
59
+ upc: string;
60
+ }
1
61
  export * from './endpoints';
2
62
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
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,EAA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S,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,3 +0,0 @@
1
- import { Endpoints } from '../../types';
2
- export declare const exampleEndpoint: Endpoints['exampleEndpoint'];
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/exampleEndpoint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,iBAAiB,CASxD,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Endpoints } from '../../types';
2
- export interface getPageContentParams {
3
- typeId: number;
4
- referenceId: string;
5
- collectionId: number;
6
- slug: string;
7
- }
8
- export interface getPageContentResponse {
9
- data: {
10
- content: {};
11
- meta: {};
12
- };
13
- }
14
- export declare const getPageContent: Endpoints['getPageContent'];
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getPageContent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE,CAAC;QACZ,IAAI,EAAE,EAAE,CAAC;KACV,CAAC;CACH;AACD,eAAO,MAAM,cAAc,EAAE,SAAS,CAAC,gBAAgB,CAkBtD,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Endpoints } from '../../types';
2
- export declare const exampleEndpoint: Endpoints['exampleEndpoint'];
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/exampleEndpoint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,iBAAiB,CASxD,CAAC"}
@@ -1,15 +0,0 @@
1
- import { Endpoints } from '../../types';
2
- export interface getPageContentParams {
3
- typeId: number;
4
- referenceId: string;
5
- collectionId: number;
6
- slug: string;
7
- }
8
- export interface getPageContentResponse {
9
- data: {
10
- content: {};
11
- meta: {};
12
- };
13
- }
14
- export declare const getPageContent: Endpoints['getPageContent'];
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getPageContent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AACD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,OAAO,EAAE,EAAE,CAAC;QACZ,IAAI,EAAE,EAAE,CAAC;KACV,CAAC;CACH;AACD,eAAO,MAAM,cAAc,EAAE,SAAS,CAAC,gBAAgB,CAkBtD,CAAC"}