Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
fix: get hierarchy children (#614)
Browse files Browse the repository at this point in the history
* fix: GetHierarchyChildren was returning the wrong resource type

It was returning Hierarchy but should be returning Node.

* feat: exposing catalog types

* fix: removed unused import

* feat: added get product by node catalog endpoint

https://documentation.elasticpath.com/commerce-cloud/docs/api/pcm/catalogs/releases/products/get-products-by-node.html
  • Loading branch information
field123 authored Apr 20, 2022
1 parent 164f561 commit 95f184d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/moltin.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export * from './types/flow'
export * from './types/transaction'
export * from './types/settings'
export * from './types/promotions'
export * from './types/catalog'
export * from './types/catalogs'
export * from './types/catalogs-nodes'
export * from './types/catalogs-products'
Expand Down
7 changes: 6 additions & 1 deletion src/types/catalog.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ export interface NodesCatalogEndpoint
nodeId: string
token?: string
}): Promise<ResourceList<Node>>

GetNodeProducts(options: {
nodeId: string
token?: string
}): Promise<ResourceList<ProductResponse>>
}

export interface HierarchiesCatalogEndpoint
Expand All @@ -103,7 +108,7 @@ export interface HierarchiesCatalogEndpoint
GetHierarchyChildren(options: {
hierarchyId: string
token?: string
}): Promise<ResourceList<Hierarchy>>
}): Promise<ResourceList<Node>>

GetHierarchyNodes(options?: {
token?: string
Expand Down
1 change: 0 additions & 1 deletion src/types/pcm-variations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
Resource,
ResourceList, ResourcePage,
} from './core'
import {PcmProduct} from "./pcm";


/**
Expand Down

0 comments on commit 95f184d

Please sign in to comment.