File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @crystallize/js-api-client" ,
33 "license" : " MIT" ,
4- "version" : " 0.7.1 " ,
4+ "version" : " 0.7.2 " ,
55 "author" :
" Crystallize <[email protected] > (https://crystallize.com)" ,
66 "contributors" : [
77 " Sébastien Morel <[email protected] >"
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ export function createOrderFetcher(apiClient: ClientInterface) {
9292 const response = await orderApi ( jsonToGraphQLQuery ( { query } ) ) ;
9393 return {
9494 pageInfo : response . orders . getAll . pageInfo ,
95- orders : response . orders . getAll . edges . map ( ( edge : any ) => edge . node ) ,
95+ orders : response . orders . getAll ? .edges ? .map ( ( edge : any ) => edge . node ) || [ ] ,
9696 } ;
9797 } ;
9898
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ export interface Item {
33 name ?: string ;
44 path ?: string ;
55 externalReference ?: string ;
6+ topics ?: Topic [ ] ;
67}
78
89export interface Product extends Item {
@@ -120,3 +121,28 @@ export interface ImageVariant {
120121 height ?: number ;
121122 size ?: number ;
122123}
124+
125+ export interface Topic {
126+ id : string ;
127+ name : string ;
128+ path : string ;
129+ language ?: string ;
130+ parentId ?: string ;
131+ parent : Topic ;
132+ children : Topic [ ] ;
133+ childCount : number ;
134+ createdAt ?: Date ;
135+ items : {
136+ edges : {
137+ node : Item ;
138+ cursor : string ;
139+ } ;
140+ pageInfo : {
141+ hasNextPage : boolean ;
142+ hasPreviousPage : boolean ;
143+ startCursor : string ;
144+ endCursor : string ;
145+ totalNodes : number ;
146+ } ;
147+ } ;
148+ }
You can’t perform that action at this time.
0 commit comments