@shopkit/data-layer 1.4.6 → 1.6.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.
@@ -1,4 +1,4 @@
1
- import { ISingleProductRequest, IOptionsRequest, IResponse, IProductQueryReqest, IProductsByHandlesRequest, IProductRecommendationsRequest, ISingleCollectionRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICollectionFilterRequest, ISingleOrderRequest, IOrderQueryRequest, IOrderRequest, IUpdateOrderRequest, IOrderHistoryRequest, IOrderByIdRequest, ISingleCustomerRequest, ICustomerQueryRequest, ICustomerRequest, IUpdateCustomerRequest, ISingleCartRequest, IUpdateCartRequest, IAddToCartRequest, IRemoveFromCartRequest, ICreateCheckoutRequest, IGetArticleRequest, IBlogArticleRequest, ITrendingArticleRequest, IArticleByHandleRequest, IGraphqlRequest, IFetchRequest } from './models/index.mjs';
1
+ import { ISingleProductRequest, IOptionsRequest, IResponse, IProductQueryReqest, IProductsByHandlesRequest, IProductRecommendationsRequest, ISingleCollectionRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICollectionFilterRequest, IQueryCollectionsRequest, ISingleOrderRequest, IOrderQueryRequest, IOrderRequest, IUpdateOrderRequest, IOrderHistoryRequest, IOrderByIdRequest, ISingleCustomerRequest, ICustomerQueryRequest, ICustomerRequest, IUpdateCustomerRequest, ISingleCartRequest, IUpdateCartRequest, IAddToCartRequest, IRemoveFromCartRequest, ICreateCheckoutRequest, IGetArticleRequest, IBlogArticleRequest, ITrendingArticleRequest, IArticleByHandleRequest, IGraphqlRequest, IFetchRequest } from './models/index.js';
2
2
 
3
3
  /**
4
4
  * Core interface that all platform adapters will implement
@@ -80,6 +80,14 @@ interface ICommerceClient {
80
80
  * @returns Promise resolving to available filter options (price ranges, brands, categories, etc.)
81
81
  */
82
82
  getCollectionFilters(params: ICollectionFilterRequest, options?: IOptionsRequest): Promise<IResponse>;
83
+ /**
84
+ * Read a page of collections, with their products and variants, from one
85
+ * query document (filter, fields, include, sort, paging)
86
+ * @param params - Query document; see IQueryCollectionsRequest for the syntax and limits
87
+ * @param options - Request options (headers, timeout, etc.)
88
+ * @returns Promise resolving to the collections, with paging in meta.pagination
89
+ */
90
+ queryCollections(params: IQueryCollectionsRequest, options?: IOptionsRequest): Promise<IResponse>;
83
91
  /**
84
92
  * Retrieve a single order by ID
85
93
  * @param params - Order identifier
@@ -1,4 +1,4 @@
1
- import { ISingleProductRequest, IOptionsRequest, IResponse, IProductQueryReqest, IProductsByHandlesRequest, IProductRecommendationsRequest, ISingleCollectionRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICollectionFilterRequest, ISingleOrderRequest, IOrderQueryRequest, IOrderRequest, IUpdateOrderRequest, IOrderHistoryRequest, IOrderByIdRequest, ISingleCustomerRequest, ICustomerQueryRequest, ICustomerRequest, IUpdateCustomerRequest, ISingleCartRequest, IUpdateCartRequest, IAddToCartRequest, IRemoveFromCartRequest, ICreateCheckoutRequest, IGetArticleRequest, IBlogArticleRequest, ITrendingArticleRequest, IArticleByHandleRequest, IGraphqlRequest, IFetchRequest } from './models/index.js';
1
+ import { ISingleProductRequest, IOptionsRequest, IResponse, IProductQueryReqest, IProductsByHandlesRequest, IProductRecommendationsRequest, ISingleCollectionRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICollectionFilterRequest, IQueryCollectionsRequest, ISingleOrderRequest, IOrderQueryRequest, IOrderRequest, IUpdateOrderRequest, IOrderHistoryRequest, IOrderByIdRequest, ISingleCustomerRequest, ICustomerQueryRequest, ICustomerRequest, IUpdateCustomerRequest, ISingleCartRequest, IUpdateCartRequest, IAddToCartRequest, IRemoveFromCartRequest, ICreateCheckoutRequest, IGetArticleRequest, IBlogArticleRequest, ITrendingArticleRequest, IArticleByHandleRequest, IGraphqlRequest, IFetchRequest } from './models/index.mjs';
2
2
 
3
3
  /**
4
4
  * Core interface that all platform adapters will implement
@@ -80,6 +80,14 @@ interface ICommerceClient {
80
80
  * @returns Promise resolving to available filter options (price ranges, brands, categories, etc.)
81
81
  */
82
82
  getCollectionFilters(params: ICollectionFilterRequest, options?: IOptionsRequest): Promise<IResponse>;
83
+ /**
84
+ * Read a page of collections, with their products and variants, from one
85
+ * query document (filter, fields, include, sort, paging)
86
+ * @param params - Query document; see IQueryCollectionsRequest for the syntax and limits
87
+ * @param options - Request options (headers, timeout, etc.)
88
+ * @returns Promise resolving to the collections, with paging in meta.pagination
89
+ */
90
+ queryCollections(params: IQueryCollectionsRequest, options?: IOptionsRequest): Promise<IResponse>;
83
91
  /**
84
92
  * Retrieve a single order by ID
85
93
  * @param params - Order identifier
@@ -376,6 +376,113 @@ interface ICollectionsByhandlesRequest extends ICollectionQueryRequest {
376
376
  interface ICollectionFilterRequest {
377
377
  handle: string;
378
378
  }
379
+ /** Sort direction for a query document column. */
380
+ type QuerySortDirection = "asc" | "desc";
381
+ /**
382
+ * One relation under `include`: `true` returns the whole related row, an object
383
+ * narrows it. Relations nest: collections -> products -> variants/images/options,
384
+ * at most 3 relations per level and 3 levels deep.
385
+ */
386
+ type IQueryCollectionsInclude = true | {
387
+ fields?: string[];
388
+ filter?: Record<string, unknown>;
389
+ sort?: Record<string, QuerySortDirection>;
390
+ limit?: number;
391
+ skip?: number;
392
+ /** Adds `<relation>Count` beside the page, e.g. `productsCount`. */
393
+ count?: boolean;
394
+ include?: Record<string, IQueryCollectionsInclude>;
395
+ };
396
+ /**
397
+ * Query document for the custom backend's collections query.
398
+ *
399
+ * Backend limits: 10 collections, 20 products per collection, 5 variants per
400
+ * product, and at most 200 rows across one collection x product x variant chain.
401
+ * The backend rejects any top-level key not listed here with a 400.
402
+ *
403
+ * @example
404
+ * ```typescript
405
+ * {
406
+ * filter: { handle: "summer" },
407
+ * limit: 1,
408
+ * include: {
409
+ * products: {
410
+ * fields: ["id", "title", "handle", "priceRange"],
411
+ * limit: 20,
412
+ * count: true,
413
+ * include: { variants: { fields: ["id", "price"], limit: 1 }, images: { limit: 1 } },
414
+ * },
415
+ * },
416
+ * availability: true,
417
+ * }
418
+ * ```
419
+ */
420
+ interface IQueryCollectionsRequest {
421
+ /**
422
+ * Conditions on Collection. A bare value is equality; operators are $eq, $ne,
423
+ * $gt, $gte, $lt, $lte, $in, $not_in, $like, $is_null. To-many relations take
424
+ * $some / $every / $none, and $and / $or take a list.
425
+ */
426
+ filter?: Record<string, unknown>;
427
+ /** Columns to return. The whole row when omitted. */
428
+ fields?: string[];
429
+ include?: Record<string, IQueryCollectionsInclude>;
430
+ sort?: Record<string, QuerySortDirection>;
431
+ /** Page size, at most 10. */
432
+ limit?: number;
433
+ skip?: number;
434
+ /** `next_cursor` of the previous page. Cannot be sent with `skip`. */
435
+ after?: string;
436
+ /** Fills `paging.total`. A second statement — send it on the first page only. */
437
+ count?: boolean;
438
+ /** Metafield levels to fetch. */
439
+ metafields?: {
440
+ collections?: boolean;
441
+ products?: boolean;
442
+ variants?: boolean;
443
+ };
444
+ /** Fills stock and availableForSale on variants. Needs the variants include. */
445
+ availability?: boolean;
446
+ /** Fills average_rating and rating_count on products. */
447
+ ratings?: boolean;
448
+ /**
449
+ * Opt in to filtering by the collection in the page URL. Off by default: the
450
+ * page builder merges route params into every data source's params, and on a
451
+ * product page the route `handle` is the PRODUCT's, so applying it implicitly
452
+ * would filter collections by a product handle.
453
+ *
454
+ * When true, the route `handle` becomes `filter.handle`, unless the filter
455
+ * already names a handle.
456
+ *
457
+ * COLLECTION TEMPLATES ONLY — the one template whose route `handle` is always a
458
+ * collection. Never set it on a product template: each one also renders at
459
+ * `/products/<handle>`, where the route `handle` is the product's, and the
460
+ * route params there look exactly like a collection page's, so this cannot be
461
+ * detected here. On a product template the widget comes back empty.
462
+ */
463
+ useRouteHandle?: boolean;
464
+ /**
465
+ * Collections to fetch, by handle, in this order. Becomes
466
+ * `filter.handle: { $in: handles }` unless the filter already names a handle,
467
+ * and collections come back in this order when no `sort` is given.
468
+ *
469
+ * The visual editor's collection picker writes this key (as it does for
470
+ * `COLLECTION_BY_HANDLES`), so a data source declared with `handles` stays
471
+ * editable by the merchant; one declared with `filter.handle` is fixed.
472
+ * An empty list fetches nothing (`data: []`) rather than every collection.
473
+ */
474
+ handles?: string[];
475
+ }
476
+ /**
477
+ * Why a queryCollections call failed, in `error.code`.
478
+ *
479
+ * - `QUERY_REJECTED`: the backend refused the query (a 4xx). A template or code
480
+ * bug; retrying will not help. `error.message` names the path at fault.
481
+ * - `UPSTREAM_UNAVAILABLE`: no usable answer — network failure, timeout, 5xx,
482
+ * or a 200 that carried no data. Same meaning as `success: false` on
483
+ * getProduct / getCollection, so a route can keep its last good page.
484
+ */
485
+ type QueryCollectionsErrorCode = "QUERY_REJECTED" | "UPSTREAM_UNAVAILABLE";
379
486
 
380
487
  /**
381
488
  * Order data models for the commerce library
@@ -591,4 +698,4 @@ interface IGetArticleRequest {
591
698
  reverse?: boolean;
592
699
  }
593
700
 
594
- export { EAvailability, ECollectionSortKey, EFulfillmentStatus, EOrderSortKey, EOrderStatus, EPaymentStatus, EProductSortKey, type IAddToCartRequest, type IAddress, type IArticleByHandleRequest, type IBaseQueryParams, type IBlogArticleRequest, type ICartItemRequest, type ICollectionFilterRequest, type ICollectionQueryRequest, type ICollectionsByhandlesRequest, type ICreateCheckoutRequest, type ICustomerQueryRequest, type ICustomerRequest, type IFetchRequest, type IGetArticleRequest, type IGraphqlRequest, type IImage, type IMetafield, type IMoney, type IOptionsRequest, type IOrderByIdRequest, type IOrderHistoryRequest, type IOrderQueryRequest, type IOrderRequest, type IPaginationParams, type IProductFilters, type IProductQueryReqest, type IProductRecommendationsRequest, type IProductsByHandlesRequest, type IRemoveFromCartRequest, type IResponse, type IResponseMeta, type ISeo, type ISingleCartRequest, type ISingleCollectionRequest, type ISingleCustomerRequest, type ISingleOrderRequest, type ISingleProductRequest, type ITrendingArticleRequest, type IUpdateCartRequest, type IUpdateCustomerRequest, type IUpdateOrderRequest };
701
+ export { EAvailability, ECollectionSortKey, EFulfillmentStatus, EOrderSortKey, EOrderStatus, EPaymentStatus, EProductSortKey, type IAddToCartRequest, type IAddress, type IArticleByHandleRequest, type IBaseQueryParams, type IBlogArticleRequest, type ICartItemRequest, type ICollectionFilterRequest, type ICollectionQueryRequest, type ICollectionsByhandlesRequest, type ICreateCheckoutRequest, type ICustomerQueryRequest, type ICustomerRequest, type IFetchRequest, type IGetArticleRequest, type IGraphqlRequest, type IImage, type IMetafield, type IMoney, type IOptionsRequest, type IOrderByIdRequest, type IOrderHistoryRequest, type IOrderQueryRequest, type IOrderRequest, type IPaginationParams, type IProductFilters, type IProductQueryReqest, type IProductRecommendationsRequest, type IProductsByHandlesRequest, type IQueryCollectionsInclude, type IQueryCollectionsRequest, type IRemoveFromCartRequest, type IResponse, type IResponseMeta, type ISeo, type ISingleCartRequest, type ISingleCollectionRequest, type ISingleCustomerRequest, type ISingleOrderRequest, type ISingleProductRequest, type ITrendingArticleRequest, type IUpdateCartRequest, type IUpdateCustomerRequest, type IUpdateOrderRequest, type QueryCollectionsErrorCode, type QuerySortDirection };
@@ -376,6 +376,113 @@ interface ICollectionsByhandlesRequest extends ICollectionQueryRequest {
376
376
  interface ICollectionFilterRequest {
377
377
  handle: string;
378
378
  }
379
+ /** Sort direction for a query document column. */
380
+ type QuerySortDirection = "asc" | "desc";
381
+ /**
382
+ * One relation under `include`: `true` returns the whole related row, an object
383
+ * narrows it. Relations nest: collections -> products -> variants/images/options,
384
+ * at most 3 relations per level and 3 levels deep.
385
+ */
386
+ type IQueryCollectionsInclude = true | {
387
+ fields?: string[];
388
+ filter?: Record<string, unknown>;
389
+ sort?: Record<string, QuerySortDirection>;
390
+ limit?: number;
391
+ skip?: number;
392
+ /** Adds `<relation>Count` beside the page, e.g. `productsCount`. */
393
+ count?: boolean;
394
+ include?: Record<string, IQueryCollectionsInclude>;
395
+ };
396
+ /**
397
+ * Query document for the custom backend's collections query.
398
+ *
399
+ * Backend limits: 10 collections, 20 products per collection, 5 variants per
400
+ * product, and at most 200 rows across one collection x product x variant chain.
401
+ * The backend rejects any top-level key not listed here with a 400.
402
+ *
403
+ * @example
404
+ * ```typescript
405
+ * {
406
+ * filter: { handle: "summer" },
407
+ * limit: 1,
408
+ * include: {
409
+ * products: {
410
+ * fields: ["id", "title", "handle", "priceRange"],
411
+ * limit: 20,
412
+ * count: true,
413
+ * include: { variants: { fields: ["id", "price"], limit: 1 }, images: { limit: 1 } },
414
+ * },
415
+ * },
416
+ * availability: true,
417
+ * }
418
+ * ```
419
+ */
420
+ interface IQueryCollectionsRequest {
421
+ /**
422
+ * Conditions on Collection. A bare value is equality; operators are $eq, $ne,
423
+ * $gt, $gte, $lt, $lte, $in, $not_in, $like, $is_null. To-many relations take
424
+ * $some / $every / $none, and $and / $or take a list.
425
+ */
426
+ filter?: Record<string, unknown>;
427
+ /** Columns to return. The whole row when omitted. */
428
+ fields?: string[];
429
+ include?: Record<string, IQueryCollectionsInclude>;
430
+ sort?: Record<string, QuerySortDirection>;
431
+ /** Page size, at most 10. */
432
+ limit?: number;
433
+ skip?: number;
434
+ /** `next_cursor` of the previous page. Cannot be sent with `skip`. */
435
+ after?: string;
436
+ /** Fills `paging.total`. A second statement — send it on the first page only. */
437
+ count?: boolean;
438
+ /** Metafield levels to fetch. */
439
+ metafields?: {
440
+ collections?: boolean;
441
+ products?: boolean;
442
+ variants?: boolean;
443
+ };
444
+ /** Fills stock and availableForSale on variants. Needs the variants include. */
445
+ availability?: boolean;
446
+ /** Fills average_rating and rating_count on products. */
447
+ ratings?: boolean;
448
+ /**
449
+ * Opt in to filtering by the collection in the page URL. Off by default: the
450
+ * page builder merges route params into every data source's params, and on a
451
+ * product page the route `handle` is the PRODUCT's, so applying it implicitly
452
+ * would filter collections by a product handle.
453
+ *
454
+ * When true, the route `handle` becomes `filter.handle`, unless the filter
455
+ * already names a handle.
456
+ *
457
+ * COLLECTION TEMPLATES ONLY — the one template whose route `handle` is always a
458
+ * collection. Never set it on a product template: each one also renders at
459
+ * `/products/<handle>`, where the route `handle` is the product's, and the
460
+ * route params there look exactly like a collection page's, so this cannot be
461
+ * detected here. On a product template the widget comes back empty.
462
+ */
463
+ useRouteHandle?: boolean;
464
+ /**
465
+ * Collections to fetch, by handle, in this order. Becomes
466
+ * `filter.handle: { $in: handles }` unless the filter already names a handle,
467
+ * and collections come back in this order when no `sort` is given.
468
+ *
469
+ * The visual editor's collection picker writes this key (as it does for
470
+ * `COLLECTION_BY_HANDLES`), so a data source declared with `handles` stays
471
+ * editable by the merchant; one declared with `filter.handle` is fixed.
472
+ * An empty list fetches nothing (`data: []`) rather than every collection.
473
+ */
474
+ handles?: string[];
475
+ }
476
+ /**
477
+ * Why a queryCollections call failed, in `error.code`.
478
+ *
479
+ * - `QUERY_REJECTED`: the backend refused the query (a 4xx). A template or code
480
+ * bug; retrying will not help. `error.message` names the path at fault.
481
+ * - `UPSTREAM_UNAVAILABLE`: no usable answer — network failure, timeout, 5xx,
482
+ * or a 200 that carried no data. Same meaning as `success: false` on
483
+ * getProduct / getCollection, so a route can keep its last good page.
484
+ */
485
+ type QueryCollectionsErrorCode = "QUERY_REJECTED" | "UPSTREAM_UNAVAILABLE";
379
486
 
380
487
  /**
381
488
  * Order data models for the commerce library
@@ -591,4 +698,4 @@ interface IGetArticleRequest {
591
698
  reverse?: boolean;
592
699
  }
593
700
 
594
- export { EAvailability, ECollectionSortKey, EFulfillmentStatus, EOrderSortKey, EOrderStatus, EPaymentStatus, EProductSortKey, type IAddToCartRequest, type IAddress, type IArticleByHandleRequest, type IBaseQueryParams, type IBlogArticleRequest, type ICartItemRequest, type ICollectionFilterRequest, type ICollectionQueryRequest, type ICollectionsByhandlesRequest, type ICreateCheckoutRequest, type ICustomerQueryRequest, type ICustomerRequest, type IFetchRequest, type IGetArticleRequest, type IGraphqlRequest, type IImage, type IMetafield, type IMoney, type IOptionsRequest, type IOrderByIdRequest, type IOrderHistoryRequest, type IOrderQueryRequest, type IOrderRequest, type IPaginationParams, type IProductFilters, type IProductQueryReqest, type IProductRecommendationsRequest, type IProductsByHandlesRequest, type IRemoveFromCartRequest, type IResponse, type IResponseMeta, type ISeo, type ISingleCartRequest, type ISingleCollectionRequest, type ISingleCustomerRequest, type ISingleOrderRequest, type ISingleProductRequest, type ITrendingArticleRequest, type IUpdateCartRequest, type IUpdateCustomerRequest, type IUpdateOrderRequest };
701
+ export { EAvailability, ECollectionSortKey, EFulfillmentStatus, EOrderSortKey, EOrderStatus, EPaymentStatus, EProductSortKey, type IAddToCartRequest, type IAddress, type IArticleByHandleRequest, type IBaseQueryParams, type IBlogArticleRequest, type ICartItemRequest, type ICollectionFilterRequest, type ICollectionQueryRequest, type ICollectionsByhandlesRequest, type ICreateCheckoutRequest, type ICustomerQueryRequest, type ICustomerRequest, type IFetchRequest, type IGetArticleRequest, type IGraphqlRequest, type IImage, type IMetafield, type IMoney, type IOptionsRequest, type IOrderByIdRequest, type IOrderHistoryRequest, type IOrderQueryRequest, type IOrderRequest, type IPaginationParams, type IProductFilters, type IProductQueryReqest, type IProductRecommendationsRequest, type IProductsByHandlesRequest, type IQueryCollectionsInclude, type IQueryCollectionsRequest, type IRemoveFromCartRequest, type IResponse, type IResponseMeta, type ISeo, type ISingleCartRequest, type ISingleCollectionRequest, type ISingleCustomerRequest, type ISingleOrderRequest, type ISingleProductRequest, type ITrendingArticleRequest, type IUpdateCartRequest, type IUpdateCustomerRequest, type IUpdateOrderRequest, type QueryCollectionsErrorCode, type QuerySortDirection };
@@ -1,5 +1,5 @@
1
- import { ISingleProductRequest, IOptionsRequest, IResponse, IProductQueryReqest, IProductsByHandlesRequest, IProductRecommendationsRequest, ISingleCollectionRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICollectionFilterRequest, ISingleOrderRequest, IOrderQueryRequest, IOrderRequest, IUpdateOrderRequest, IOrderHistoryRequest, IOrderByIdRequest, ISingleCustomerRequest, ICustomerQueryRequest, ICustomerRequest, IUpdateCustomerRequest, ISingleCartRequest, IUpdateCartRequest, IAddToCartRequest, IRemoveFromCartRequest, ICreateCheckoutRequest, IGetArticleRequest, IBlogArticleRequest, ITrendingArticleRequest, IArticleByHandleRequest, IGraphqlRequest, IFetchRequest } from './models/index.js';
2
- import { I as ICommerceClient } from './interface-dqoKc63z.js';
1
+ import { ISingleProductRequest, IOptionsRequest, IResponse, IProductQueryReqest, IProductsByHandlesRequest, IProductRecommendationsRequest, ISingleCollectionRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICollectionFilterRequest, IQueryCollectionsRequest, ISingleOrderRequest, IOrderQueryRequest, IOrderRequest, IUpdateOrderRequest, IOrderHistoryRequest, IOrderByIdRequest, ISingleCustomerRequest, ICustomerQueryRequest, ICustomerRequest, IUpdateCustomerRequest, ISingleCartRequest, IUpdateCartRequest, IAddToCartRequest, IRemoveFromCartRequest, ICreateCheckoutRequest, IGetArticleRequest, IBlogArticleRequest, ITrendingArticleRequest, IArticleByHandleRequest, IGraphqlRequest, IFetchRequest } from './models/index.mjs';
2
+ import { I as ICommerceClient } from './interface-CgPiwpPe.mjs';
3
3
 
4
4
  /**
5
5
  * Shopify-specific types for the commerce library
@@ -146,6 +146,14 @@ declare abstract class BaseCommerceClient implements ICommerceClient {
146
146
  * @throws NotImplementedError if not implemented in adapter
147
147
  */
148
148
  getCollectionFilters(params: ICollectionFilterRequest, options?: IOptionsRequest): Promise<IResponse>;
149
+ /**
150
+ * Read a page of collections, with their products and variants, from one query document
151
+ * @param params - Query document (filter, fields, include, sort, paging)
152
+ * @param options - Request options (headers, timeout, etc.)
153
+ * @returns Promise resolving to collections, with paging in meta.pagination
154
+ * @throws NotImplementedError if not implemented in adapter
155
+ */
156
+ queryCollections(params: IQueryCollectionsRequest, options?: IOptionsRequest): Promise<IResponse>;
149
157
  /**
150
158
  * Retrieve a single order by ID
151
159
  * @param params - Order identifier
@@ -488,6 +496,7 @@ declare class CustomBackendClient extends BaseCommerceClient {
488
496
  */
489
497
  getCollectionsByHandles(params: ICollectionsByhandlesRequest, options?: IOptionsRequest): Promise<IResponse>;
490
498
  getCollectionFilters(params: ICollectionFilterRequest, options?: IOptionsRequest): Promise<IResponse>;
499
+ queryCollections(params: IQueryCollectionsRequest, options?: IOptionsRequest): Promise<IResponse>;
491
500
  getCart(params: ISingleCartRequest, options?: IOptionsRequest): Promise<IResponse>;
492
501
  createCart(options?: IOptionsRequest): Promise<IResponse>;
493
502
  updateCart(params: IUpdateCartRequest, options?: IOptionsRequest): Promise<IResponse>;
@@ -1,5 +1,5 @@
1
- import { ISingleProductRequest, IOptionsRequest, IResponse, IProductQueryReqest, IProductsByHandlesRequest, IProductRecommendationsRequest, ISingleCollectionRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICollectionFilterRequest, ISingleOrderRequest, IOrderQueryRequest, IOrderRequest, IUpdateOrderRequest, IOrderHistoryRequest, IOrderByIdRequest, ISingleCustomerRequest, ICustomerQueryRequest, ICustomerRequest, IUpdateCustomerRequest, ISingleCartRequest, IUpdateCartRequest, IAddToCartRequest, IRemoveFromCartRequest, ICreateCheckoutRequest, IGetArticleRequest, IBlogArticleRequest, ITrendingArticleRequest, IArticleByHandleRequest, IGraphqlRequest, IFetchRequest } from './models/index.mjs';
2
- import { I as ICommerceClient } from './interface-NJcjuqaL.mjs';
1
+ import { ISingleProductRequest, IOptionsRequest, IResponse, IProductQueryReqest, IProductsByHandlesRequest, IProductRecommendationsRequest, ISingleCollectionRequest, ICollectionQueryRequest, ICollectionsByhandlesRequest, ICollectionFilterRequest, IQueryCollectionsRequest, ISingleOrderRequest, IOrderQueryRequest, IOrderRequest, IUpdateOrderRequest, IOrderHistoryRequest, IOrderByIdRequest, ISingleCustomerRequest, ICustomerQueryRequest, ICustomerRequest, IUpdateCustomerRequest, ISingleCartRequest, IUpdateCartRequest, IAddToCartRequest, IRemoveFromCartRequest, ICreateCheckoutRequest, IGetArticleRequest, IBlogArticleRequest, ITrendingArticleRequest, IArticleByHandleRequest, IGraphqlRequest, IFetchRequest } from './models/index.js';
2
+ import { I as ICommerceClient } from './interface-BGV7d5F8.js';
3
3
 
4
4
  /**
5
5
  * Shopify-specific types for the commerce library
@@ -146,6 +146,14 @@ declare abstract class BaseCommerceClient implements ICommerceClient {
146
146
  * @throws NotImplementedError if not implemented in adapter
147
147
  */
148
148
  getCollectionFilters(params: ICollectionFilterRequest, options?: IOptionsRequest): Promise<IResponse>;
149
+ /**
150
+ * Read a page of collections, with their products and variants, from one query document
151
+ * @param params - Query document (filter, fields, include, sort, paging)
152
+ * @param options - Request options (headers, timeout, etc.)
153
+ * @returns Promise resolving to collections, with paging in meta.pagination
154
+ * @throws NotImplementedError if not implemented in adapter
155
+ */
156
+ queryCollections(params: IQueryCollectionsRequest, options?: IOptionsRequest): Promise<IResponse>;
149
157
  /**
150
158
  * Retrieve a single order by ID
151
159
  * @param params - Order identifier
@@ -488,6 +496,7 @@ declare class CustomBackendClient extends BaseCommerceClient {
488
496
  */
489
497
  getCollectionsByHandles(params: ICollectionsByhandlesRequest, options?: IOptionsRequest): Promise<IResponse>;
490
498
  getCollectionFilters(params: ICollectionFilterRequest, options?: IOptionsRequest): Promise<IResponse>;
499
+ queryCollections(params: IQueryCollectionsRequest, options?: IOptionsRequest): Promise<IResponse>;
491
500
  getCart(params: ISingleCartRequest, options?: IOptionsRequest): Promise<IResponse>;
492
501
  createCart(options?: IOptionsRequest): Promise<IResponse>;
493
502
  updateCart(params: IUpdateCartRequest, options?: IOptionsRequest): Promise<IResponse>;
@@ -1,4 +1,4 @@
1
- import { I as ICommerceClient } from '../interface-NJcjuqaL.mjs';
1
+ import { I as ICommerceClient } from '../interface-CgPiwpPe.mjs';
2
2
  import '../models/index.mjs';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { I as ICommerceClient } from '../interface-dqoKc63z.js';
1
+ import { I as ICommerceClient } from '../interface-BGV7d5F8.js';
2
2
  import '../models/index.js';
3
3
 
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopkit/data-layer",
3
- "version": "1.4.6",
3
+ "version": "1.6.0",
4
4
  "description": "Enterprise data abstraction layer providing unified API for e-commerce platforms including Shopify and custom backends",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",