@shopkit/data-layer 1.0.0

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.
@@ -0,0 +1,40 @@
1
+ import { I as IShopifyConfig, L as LoggerConfig, S as ShopifyCommerceClient, a as ICustomConfig, C as CustomBackendClient, b as ICommerceClient } from './service-NPmqCNGb.mjs';
2
+ export { EAvailability, ECollectionSortKey, EFulfillmentStatus, EOrderSortKey, EOrderStatus, EPaymentStatus, EProductSortKey, IAddToCartRequest, IAddress, IArticleByHandleRequest, IBaseQueryParams, IBlogArticleRequest, ICartItemRequest, ICheckoutUpdateRequest, ICollectionFilterRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICreateCheckoutRequest, ICustomerQueryRequest, ICustomerRequest, IFetchOptionsRequest, IGetArticleRequest, IImage, IMetafield, IMoney, IOptionsRequest, IOrderByIdRequest, IOrderHistoryRequest, IOrderQueryRequest, IOrderRequest, IPaginationParams, IPaymentRequest, IProductFilters, IProductQueryReqest, IRemoveFromCartRequest, IResponse, IResponseMeta, ISeo, ISingleCartRequest, ISingleCollectionRequest, ISingleCustomerRequest, ISingleOrderRequest, ISingleProductRequest, ITrendingArticleRequest, IUpdateCartRequest, IUpdateCustomerRequest, IUpdateOrderRequest } from './models/index.mjs';
3
+
4
+ /**
5
+ * Commerce client factory
6
+ * Simple client creation and management
7
+ */
8
+
9
+ /**
10
+ * Create a Shopify commerce client
11
+ * @param config Shopify configuration
12
+ * @returns ShopifyCommerceClient instance
13
+ */
14
+ declare function createShopifyClient(config: IShopifyConfig, logging?: LoggerConfig): ShopifyCommerceClient;
15
+ /**
16
+ * Create a Custom Backend commerce client
17
+ * @param config Custom backend configuration
18
+ * @returns CustomBackendClient instance
19
+ */
20
+ declare function createCustomClient(config: ICustomConfig, logging?: LoggerConfig): CustomBackendClient;
21
+ /**
22
+ * Commerce client configuration options
23
+ */
24
+ type IClientConfig = {
25
+ type: "shopify";
26
+ config: IShopifyConfig;
27
+ logging?: LoggerConfig;
28
+ } | {
29
+ type: "custom";
30
+ config: ICustomConfig;
31
+ logging?: LoggerConfig;
32
+ };
33
+ /**
34
+ * Create a commerce client based on configuration
35
+ * @param clientConfig Client configuration with type and config
36
+ * @returns CommerceClient instance
37
+ */
38
+ declare function createCommerceClient(clientConfig: IClientConfig): ICommerceClient;
39
+
40
+ export { type IClientConfig, createCommerceClient, createCustomClient, createShopifyClient };
@@ -0,0 +1,40 @@
1
+ import { I as IShopifyConfig, L as LoggerConfig, S as ShopifyCommerceClient, a as ICustomConfig, C as CustomBackendClient, b as ICommerceClient } from './service-Q7zlmyFk.js';
2
+ export { EAvailability, ECollectionSortKey, EFulfillmentStatus, EOrderSortKey, EOrderStatus, EPaymentStatus, EProductSortKey, IAddToCartRequest, IAddress, IArticleByHandleRequest, IBaseQueryParams, IBlogArticleRequest, ICartItemRequest, ICheckoutUpdateRequest, ICollectionFilterRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICreateCheckoutRequest, ICustomerQueryRequest, ICustomerRequest, IFetchOptionsRequest, IGetArticleRequest, IImage, IMetafield, IMoney, IOptionsRequest, IOrderByIdRequest, IOrderHistoryRequest, IOrderQueryRequest, IOrderRequest, IPaginationParams, IPaymentRequest, IProductFilters, IProductQueryReqest, IRemoveFromCartRequest, IResponse, IResponseMeta, ISeo, ISingleCartRequest, ISingleCollectionRequest, ISingleCustomerRequest, ISingleOrderRequest, ISingleProductRequest, ITrendingArticleRequest, IUpdateCartRequest, IUpdateCustomerRequest, IUpdateOrderRequest } from './models/index.js';
3
+
4
+ /**
5
+ * Commerce client factory
6
+ * Simple client creation and management
7
+ */
8
+
9
+ /**
10
+ * Create a Shopify commerce client
11
+ * @param config Shopify configuration
12
+ * @returns ShopifyCommerceClient instance
13
+ */
14
+ declare function createShopifyClient(config: IShopifyConfig, logging?: LoggerConfig): ShopifyCommerceClient;
15
+ /**
16
+ * Create a Custom Backend commerce client
17
+ * @param config Custom backend configuration
18
+ * @returns CustomBackendClient instance
19
+ */
20
+ declare function createCustomClient(config: ICustomConfig, logging?: LoggerConfig): CustomBackendClient;
21
+ /**
22
+ * Commerce client configuration options
23
+ */
24
+ type IClientConfig = {
25
+ type: "shopify";
26
+ config: IShopifyConfig;
27
+ logging?: LoggerConfig;
28
+ } | {
29
+ type: "custom";
30
+ config: ICustomConfig;
31
+ logging?: LoggerConfig;
32
+ };
33
+ /**
34
+ * Create a commerce client based on configuration
35
+ * @param clientConfig Client configuration with type and config
36
+ * @returns CommerceClient instance
37
+ */
38
+ declare function createCommerceClient(clientConfig: IClientConfig): ICommerceClient;
39
+
40
+ export { type IClientConfig, createCommerceClient, createCustomClient, createShopifyClient };