@blackfisk/blackfisk-vue-storefront-sdk 1.0.4 → 1.0.5
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.
- package/lib/client/index.d.ts +2 -0
- package/lib/client/index.d.ts.map +1 -0
- package/lib/connector.d.ts +12 -0
- package/lib/connector.d.ts.map +1 -0
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.es.js.map +1 -1
- package/lib/methods/index.d.ts +2 -0
- package/lib/methods/index.d.ts.map +1 -0
- package/lib/packages/api-client/src/api/getProductCollection/index.d.ts +14 -0
- package/lib/packages/api-client/src/api/getProductCollection/index.d.ts.map +1 -0
- package/lib/packages/api-client/src/types/api/endpoints.d.ts +13 -0
- package/lib/packages/api-client/src/types/api/endpoints.d.ts.map +1 -0
- package/lib/packages/api-client/src/types/api/index.d.ts +62 -0
- package/lib/packages/api-client/src/types/api/index.d.ts.map +1 -0
- package/lib/packages/api-client/src/types/config/index.d.ts +15 -0
- package/lib/packages/api-client/src/types/config/index.d.ts.map +1 -0
- package/lib/packages/api-client/src/types/context/index.d.ts +14 -0
- package/lib/packages/api-client/src/types/context/index.d.ts.map +1 -0
- package/lib/packages/api-client/src/types/index.d.ts +12 -0
- package/lib/packages/api-client/src/types/index.d.ts.map +1 -0
- package/lib/packages/sdk/src/index.d.ts +1 -1
- package/lib/types/MethodOptions.d.ts +16 -0
- package/lib/types/MethodOptions.d.ts.map +1 -0
- package/lib/types/index.d.ts +4 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/options.d.ts +10 -0
- package/lib/types/options.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,+BAAiB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Options } from './types';
|
|
2
|
+
import * as methods from './methods/index';
|
|
3
|
+
/**
|
|
4
|
+
* Connector methods.
|
|
5
|
+
*/
|
|
6
|
+
declare type Methods = typeof methods;
|
|
7
|
+
/**
|
|
8
|
+
* Initialize the Blackfisk connector.
|
|
9
|
+
*/
|
|
10
|
+
export declare const blackfiskConnector: (options: Options) => Methods;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=connector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../src/connector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAE3C;;GAEG;AACH,aAAK,OAAO,GAAG,OAAO,OAAO,CAAC;AAE9B;;GAEG;AACH,eAAO,MAAM,kBAAkB,YAAa,OAAO,KAAG,OAIrD,CAAC"}
|
package/lib/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/client/index.ts","../src/methods/getProductCollection/index.ts","../src/connector.ts","../src/index.ts"],"sourcesContent":["import axios from 'axios';\n\nexport const client = axios.create();","import { client } from '../../client';\nimport { getProductCollectionParams, getProductCollectionResponse } from '@blackfisk/blackfisk-vue-storefront-api/src/api/getProductCollection'\n\n/**\n * Executes a collection template chain against Elasticsearch - returning a collection of products.\n * \n * @remarks\n * * API middleware endpoint: /getProductCollection\n * * Blackfisk endpoint: /v2/vsf/productCollection\n * * Any authenticated client can make this call. A collectionId must be provided.\n * \n * @param props\n * \n * Required\n * * collectionId \n * \n * Optional -\n * * debug: boolean\n * * templateParams: object with the keys required to populate the template chain for the specified collection.\n * \n * @returns\n * An array of SearchProduct objects.\n * \n * @example\n * const { data: ProductCollection } = await getProductCollection({ collectionId: 145, debug: true })\n */\nexport async function getProductCollection(props: getProductCollectionParams) {\n const { data } = await client.post<getProductCollectionResponse>('getProductCollection', props);\n return data\n}\n","import { client } from './client';\nimport { Options } from './types';\nimport * as methods from './methods/index';\n\n/**\n * Connector methods.\n */\ntype Methods = typeof methods;\n\n/**\n * Initialize the Blackfisk connector.\n */\nexport const blackfiskConnector = (options: Options): Methods => {\n client.defaults.baseURL = options.apiUrl;\n\n return methods;\n};\n","import { blackfiskConnector } from './connector';\nimport type { Options } from './types';\nimport type { Module } from '@vue-storefront/sdk';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/client/index.ts","../src/methods/getProductCollection/index.ts","../src/connector.ts","../src/index.ts"],"sourcesContent":["import axios from 'axios';\n\nexport const client = axios.create();","import { client } from '../../client';\nimport { getProductCollectionParams, getProductCollectionResponse } from '@blackfisk/blackfisk-vue-storefront-api/src/api/getProductCollection'\n\n/**\n * Executes a collection template chain against Elasticsearch - returning a collection of products.\n * \n * @remarks\n * * API middleware endpoint: /getProductCollection\n * * Blackfisk endpoint: /v2/vsf/productCollection\n * * Any authenticated client can make this call. A collectionId must be provided.\n * \n * @param props\n * \n * Required\n * * collectionId \n * \n * Optional -\n * * debug: boolean\n * * templateParams: object with the keys required to populate the template chain for the specified collection.\n * \n * @returns\n * An array of SearchProduct objects.\n * \n * @example\n * const { data: ProductCollection } = await getProductCollection({ collectionId: 145, debug: true })\n */\nexport async function getProductCollection(props: getProductCollectionParams) {\n const { data } = await client.post<getProductCollectionResponse>('getProductCollection', props);\n return data\n}\n","import { client } from './client';\nimport { Options } from './types';\nimport * as methods from './methods/index';\n\n/**\n * Connector methods.\n */\ntype Methods = typeof methods;\n\n/**\n * Initialize the Blackfisk connector.\n */\nexport const blackfiskConnector = (options: Options): Methods => {\n client.defaults.baseURL = options.apiUrl;\n\n return methods;\n};\n","import { blackfiskConnector } from './connector';\nimport type { Options } from './types';\nimport type { Module } from '@vue-storefront/sdk';\n\n/**\n * Blackfisk module type.\n */\nexport interface BlackfiskModuleType extends Module {\n /**\n * The connector of the Blackfisk module.\n */\n connector: ReturnType<typeof blackfiskConnector>;\n}\n\n/**\n * Blackfisk module.\n */\nexport const blackfiskModule = (options: Options): BlackfiskModuleType => {\n return {\n connector: blackfiskConnector({\n apiUrl: options.apiUrl,\n }),\n utils: {},\n subscribers: {},\n }\n};\n\nexport { client } from './client';\n\nexport * from './types';\n"],"names":["axios"],"mappings":";;;;;;;;;;MAEa,MAAM,GAAGA,yBAAK,CAAC,MAAM;;ACClC;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACI,eAAe,oBAAoB,CAAC,KAAiC,EAAA;AAC1E,IAAA,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAA+B,sBAAsB,EAAE,KAAK,CAAC,CAAC;AAChG,IAAA,OAAO,IAAI,CAAA;AACb;;;;;;;ACpBA;;AAEG;AACI,MAAM,kBAAkB,GAAG,CAAC,OAAgB,KAAa;IAC9D,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;AAEzC,IAAA,OAAO,OAAO,CAAC;AACjB,CAAC;;ACFD;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,OAAgB,KAAyB;IACvE,OAAO;QACL,SAAS,EAAE,kBAAkB,CAAC;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC;AACF,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,WAAW,EAAE,EAAE;KAChB,CAAA;AACH;;;;;"}
|
package/lib/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/client/index.ts","../src/methods/getProductCollection/index.ts","../src/connector.ts","../src/index.ts"],"sourcesContent":["import axios from 'axios';\n\nexport const client = axios.create();","import { client } from '../../client';\nimport { getProductCollectionParams, getProductCollectionResponse } from '@blackfisk/blackfisk-vue-storefront-api/src/api/getProductCollection'\n\n/**\n * Executes a collection template chain against Elasticsearch - returning a collection of products.\n * \n * @remarks\n * * API middleware endpoint: /getProductCollection\n * * Blackfisk endpoint: /v2/vsf/productCollection\n * * Any authenticated client can make this call. A collectionId must be provided.\n * \n * @param props\n * \n * Required\n * * collectionId \n * \n * Optional -\n * * debug: boolean\n * * templateParams: object with the keys required to populate the template chain for the specified collection.\n * \n * @returns\n * An array of SearchProduct objects.\n * \n * @example\n * const { data: ProductCollection } = await getProductCollection({ collectionId: 145, debug: true })\n */\nexport async function getProductCollection(props: getProductCollectionParams) {\n const { data } = await client.post<getProductCollectionResponse>('getProductCollection', props);\n return data\n}\n","import { client } from './client';\nimport { Options } from './types';\nimport * as methods from './methods/index';\n\n/**\n * Connector methods.\n */\ntype Methods = typeof methods;\n\n/**\n * Initialize the Blackfisk connector.\n */\nexport const blackfiskConnector = (options: Options): Methods => {\n client.defaults.baseURL = options.apiUrl;\n\n return methods;\n};\n","import { blackfiskConnector } from './connector';\nimport type { Options } from './types';\nimport type { Module } from '@vue-storefront/sdk';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/client/index.ts","../src/methods/getProductCollection/index.ts","../src/connector.ts","../src/index.ts"],"sourcesContent":["import axios from 'axios';\n\nexport const client = axios.create();","import { client } from '../../client';\nimport { getProductCollectionParams, getProductCollectionResponse } from '@blackfisk/blackfisk-vue-storefront-api/src/api/getProductCollection'\n\n/**\n * Executes a collection template chain against Elasticsearch - returning a collection of products.\n * \n * @remarks\n * * API middleware endpoint: /getProductCollection\n * * Blackfisk endpoint: /v2/vsf/productCollection\n * * Any authenticated client can make this call. A collectionId must be provided.\n * \n * @param props\n * \n * Required\n * * collectionId \n * \n * Optional -\n * * debug: boolean\n * * templateParams: object with the keys required to populate the template chain for the specified collection.\n * \n * @returns\n * An array of SearchProduct objects.\n * \n * @example\n * const { data: ProductCollection } = await getProductCollection({ collectionId: 145, debug: true })\n */\nexport async function getProductCollection(props: getProductCollectionParams) {\n const { data } = await client.post<getProductCollectionResponse>('getProductCollection', props);\n return data\n}\n","import { client } from './client';\nimport { Options } from './types';\nimport * as methods from './methods/index';\n\n/**\n * Connector methods.\n */\ntype Methods = typeof methods;\n\n/**\n * Initialize the Blackfisk connector.\n */\nexport const blackfiskConnector = (options: Options): Methods => {\n client.defaults.baseURL = options.apiUrl;\n\n return methods;\n};\n","import { blackfiskConnector } from './connector';\nimport type { Options } from './types';\nimport type { Module } from '@vue-storefront/sdk';\n\n/**\n * Blackfisk module type.\n */\nexport interface BlackfiskModuleType extends Module {\n /**\n * The connector of the Blackfisk module.\n */\n connector: ReturnType<typeof blackfiskConnector>;\n}\n\n/**\n * Blackfisk module.\n */\nexport const blackfiskModule = (options: Options): BlackfiskModuleType => {\n return {\n connector: blackfiskConnector({\n apiUrl: options.apiUrl,\n }),\n utils: {},\n subscribers: {},\n }\n};\n\nexport { client } from './client';\n\nexport * from './types';\n"],"names":[],"mappings":";;MAEa,MAAM,GAAG,KAAK,CAAC,MAAM;;ACClC;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACI,eAAe,oBAAoB,CAAC,KAAiC,EAAA;AAC1E,IAAA,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAA+B,sBAAsB,EAAE,KAAK,CAAC,CAAC;AAChG,IAAA,OAAO,IAAI,CAAA;AACb;;;;;;;ACpBA;;AAEG;AACI,MAAM,kBAAkB,GAAG,CAAC,OAAgB,KAAa;IAC9D,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;AAEzC,IAAA,OAAO,OAAO,CAAC;AACjB,CAAC;;ACFD;;AAEG;AACU,MAAA,eAAe,GAAG,CAAC,OAAgB,KAAyB;IACvE,OAAO;QACL,SAAS,EAAE,kBAAkB,CAAC;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC;AACF,QAAA,KAAK,EAAE,EAAE;AACT,QAAA,WAAW,EAAE,EAAE;KAChB,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/methods/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Endpoints, SearchProduct } from '../../types';
|
|
2
|
+
export interface getProductCollectionTemplateParams {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
export interface getProductCollectionParams {
|
|
6
|
+
collectionId: number | string;
|
|
7
|
+
templateParams?: getProductCollectionTemplateParams;
|
|
8
|
+
debug?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface getProductCollectionResponse {
|
|
11
|
+
data: SearchProduct[];
|
|
12
|
+
}
|
|
13
|
+
export declare const getProductCollection: Endpoints['getProductCollection'];
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../api-client/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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../../../../api-client/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"}
|
|
@@ -0,0 +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
|
+
}
|
|
61
|
+
export * from './endpoints';
|
|
62
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../api-client/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,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Settings to be provided in the `middleware.config.js` file.
|
|
3
|
+
*/
|
|
4
|
+
interface ApiMiddlewareConfig {
|
|
5
|
+
url: string;
|
|
6
|
+
auth_jwt: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MiddlewareConfig {
|
|
9
|
+
accountId: number;
|
|
10
|
+
channelId: number;
|
|
11
|
+
accountSiteId: number;
|
|
12
|
+
api: ApiMiddlewareConfig;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../api-client/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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IntegrationContext } from '@vue-storefront/middleware';
|
|
2
|
+
import { AxiosInstance } from 'axios';
|
|
3
|
+
import { MiddlewareConfig, ContextualizedEndpoints } from '../index';
|
|
4
|
+
/**
|
|
5
|
+
* Runtime integration context, which includes API client instance, settings, and endpoints that will be passed via middleware server.
|
|
6
|
+
**/
|
|
7
|
+
export declare type BfskIntegrationContext = IntegrationContext<AxiosInstance, MiddlewareConfig, ContextualizedEndpoints>;
|
|
8
|
+
/**
|
|
9
|
+
* Global context of the application which includes runtime integration context.
|
|
10
|
+
**/
|
|
11
|
+
export interface Context {
|
|
12
|
+
$bfsk: BfskIntegrationContext;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../api-client/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,12 @@
|
|
|
1
|
+
import { Endpoints } from './api';
|
|
2
|
+
/**
|
|
3
|
+
* All available API Endpoints without first argument - `context`, because this prop is set automatically.
|
|
4
|
+
*/
|
|
5
|
+
export declare type ContextualizedEndpoints = {
|
|
6
|
+
[T in keyof Endpoints]: Endpoints[T] extends (x: any, ...args: infer P) => infer R ? (...args: P) => R : never;
|
|
7
|
+
};
|
|
8
|
+
export declare type TODO = any;
|
|
9
|
+
export * from './api';
|
|
10
|
+
export * from './config';
|
|
11
|
+
export * from './context';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../api-client/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"}
|
|
@@ -2,7 +2,7 @@ import { blackfiskConnector } from './connector';
|
|
|
2
2
|
import type { Options } from './types';
|
|
3
3
|
import type { Module } from '@vue-storefront/sdk';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Blackfisk module type.
|
|
6
6
|
*/
|
|
7
7
|
export interface BlackfiskModuleType extends Module {
|
|
8
8
|
/**
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosRequestConfig } from 'axios';
|
|
2
|
+
/**
|
|
3
|
+
* Definition of the MethodOptions parameter.
|
|
4
|
+
*/
|
|
5
|
+
export interface MethodOptions {
|
|
6
|
+
/**
|
|
7
|
+
* {@link https://axios-http.com/docs/req_config | AxiosRequestConfig} object
|
|
8
|
+
* You can use it to override Axios request configuration
|
|
9
|
+
*/
|
|
10
|
+
axiosRequestConfig?: Readonly<AxiosRequestConfig>;
|
|
11
|
+
/**
|
|
12
|
+
* Additional optional fields. Its usage depends on the custom implementation.
|
|
13
|
+
*/
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=MethodOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MethodOptions.d.ts","sourceRoot":"","sources":["../../src/types/MethodOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,aAAa;IAE5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAElD;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,oBAAY,IAAI,GAAG,GAAG,CAAC;AAEvB,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/types/options.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackfisk/blackfisk-vue-storefront-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"main": "lib/index.cjs.js",
|
|
5
5
|
"module": "lib/index.es.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"nock": "^13.2.9",
|
|
30
30
|
"rollup-plugin-typescript2": "^0.34.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "24e4a47e724b2c64639629691963c5c51bc69709"
|
|
33
33
|
}
|