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

Commit 2d19722

Browse files
butikdenDenys Butynskyy
andauthored
feat: delta link added to catalog relationship (#742)
Co-authored-by: Denys Butynskyy <denys.butynskyy@elasticpath.com>
1 parent 9072814 commit 2d19722

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

src/types/catalog.d.ts

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { Catalog, CatalogFilter } from './catalogs'
44
import type { Node } from './nodes'
55
import type { Hierarchy } from './hierarchies'
66
import type { File } from './file'
7-
import { Identifiable } from './core';
7+
import { Identifiable } from './core'
88

99
export interface ShopperCatalogResource<T> extends Resource<T> {
1010
included?: {
@@ -46,11 +46,16 @@ export interface ShopperCatalogReleaseBase extends Identifiable {
4646
related: string
4747
}
4848
}
49+
delta: {
50+
links: {
51+
related: string
52+
}
53+
}
4954
}
5055
meta: {
5156
created_at: string
5257
is_full_publish: boolean
53-
release_status: 'PENDING' | 'IN_PROGRESS' |'FAILED' | 'PUBLISHED'
58+
release_status: 'PENDING' | 'IN_PROGRESS' | 'FAILED' | 'PUBLISHED'
5459
started_at: string
5560
}
5661
links: {
@@ -91,15 +96,18 @@ interface ShopperCatalogResourcePageIncluded {
9196
component_products?: ProductResponse[]
9297
}
9398

94-
export type ShopperCatalogResourcePage<T> = ResourcePage<T, ShopperCatalogResourcePageIncluded>
99+
export type ShopperCatalogResourcePage<T> = ResourcePage<
100+
T,
101+
ShopperCatalogResourcePageIncluded
102+
>
95103

96104
export interface ShopperCatalogProductsEndpoint
97105
extends ShopperCatalogProductsQueryableResource<
98-
ShopperCatalogProductsEndpoint,
99-
Catalog,
100-
CatalogFilter,
101-
ShopperCatalogProductsInclude
102-
> {
106+
ShopperCatalogProductsEndpoint,
107+
Catalog,
108+
CatalogFilter,
109+
ShopperCatalogProductsInclude
110+
> {
103111
endpoint: 'products'
104112

105113
All(options?: {
@@ -134,10 +142,10 @@ export interface ShopperCatalogProductsEndpoint
134142

135143
export interface NodesShopperCatalogEndpoint
136144
extends ShopperCatalogQueryableResource<
137-
NodesShopperCatalogEndpoint,
138-
Catalog,
139-
CatalogFilter
140-
> {
145+
NodesShopperCatalogEndpoint,
146+
Catalog,
147+
CatalogFilter
148+
> {
141149
endpoint: 'nodes'
142150

143151
All(options?: {
@@ -166,10 +174,10 @@ export interface NodesShopperCatalogEndpoint
166174

167175
export interface HierarchiesShopperCatalogEndpoint
168176
extends ShopperCatalogQueryableResource<
169-
HierarchiesShopperCatalogEndpoint,
170-
Catalog,
171-
CatalogFilter
172-
> {
177+
HierarchiesShopperCatalogEndpoint,
178+
Catalog,
179+
CatalogFilter
180+
> {
173181
endpoint: 'products'
174182

175183
All(options?: {
@@ -198,10 +206,10 @@ export interface HierarchiesShopperCatalogEndpoint
198206

199207
export interface ShopperCatalogEndpoint
200208
extends ShopperCatalogQueryableResource<
201-
ShopperCatalogEndpoint,
202-
Catalog,
203-
CatalogFilter
204-
> {
209+
ShopperCatalogEndpoint,
210+
Catalog,
211+
CatalogFilter
212+
> {
205213
endpoint: 'catalog'
206214
Nodes: NodesShopperCatalogEndpoint
207215
Products: ShopperCatalogProductsEndpoint

0 commit comments

Comments
 (0)