File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ export class KnockGuideClient {
277277 guideGroups : [ ] ,
278278 guideGroupDisplayLogs : { } ,
279279 guides : { } ,
280+ ineligibleGuides : { } ,
280281 previewGuides : { } ,
281282 queries : { } ,
282283 location,
@@ -358,14 +359,20 @@ export class KnockGuideClient {
358359 > ( this . channelId , queryParams ) ;
359360 queryStatus = { status : "ok" } ;
360361
361- const { entries, guide_groups : groups , guide_group_display_logs } = data ;
362+ const {
363+ entries,
364+ guide_groups : groups ,
365+ guide_group_display_logs,
366+ ineligible_guides,
367+ } = data ;
362368
363369 this . knock . log ( "[Guide] Loading fetched guides" ) ;
364370 this . store . setState ( ( state ) => ( {
365371 ...state ,
366372 guideGroups : groups ?. length > 0 ? groups : [ mockDefaultGroup ( entries ) ] ,
367373 guideGroupDisplayLogs : guide_group_display_logs || { } ,
368374 guides : byKey ( entries . map ( ( g ) => this . localCopy ( g ) ) ) ,
375+ ineligibleGuides : byKey ( ineligible_guides ) ,
369376 queries : { ...state . queries , [ queryKey ] : queryStatus } ,
370377 } ) ) ;
371378 } catch ( e ) {
Original file line number Diff line number Diff line change @@ -65,6 +65,13 @@ export interface GuideGroupData {
6565 updated_at : string ;
6666}
6767
68+ export type GuideIneligibilityMarker = {
69+ __typename : "GuideIneligibilityMarker" ;
70+ key : KnockGuide [ "key" ] ;
71+ reason : string ;
72+ message : string ;
73+ } ;
74+
6875export type GetGuidesQueryParams = {
6976 data ?: string ;
7077 tenant ?: string ;
@@ -76,6 +83,7 @@ export type GetGuidesResponse = {
7683 entries : GuideData [ ] ;
7784 guide_groups : GuideGroupData [ ] ;
7885 guide_group_display_logs : Record < GuideGroupData [ "key" ] , string > ;
86+ ineligible_guides : GuideIneligibilityMarker [ ] ;
7987} ;
8088
8189//
@@ -202,6 +210,10 @@ export type StoreState = {
202210 guideGroups : GuideGroupData [ ] ;
203211 guideGroupDisplayLogs : Record < GuideGroupData [ "key" ] , string > ;
204212 guides : Record < KnockGuide [ "key" ] , KnockGuide > ;
213+ ineligibleGuides : Record <
214+ GuideIneligibilityMarker [ "key" ] ,
215+ GuideIneligibilityMarker
216+ > ;
205217 previewGuides : Record < KnockGuide [ "key" ] , KnockGuide > ;
206218 queries : Record < QueryKey , QueryStatus > ;
207219 location : string | undefined ;
You can’t perform that action at this time.
0 commit comments