@@ -86,8 +86,6 @@ export type ApprovedCorpusItem = {
86
86
excerpt : Scalars [ 'String' ] ;
87
87
/** An alternative primary key in UUID format that is generated on creation. */
88
88
externalId : Scalars [ 'ID' ] ;
89
- /** The quality grade associated with this CorpusItem. */
90
- grade ?: Maybe < ApprovedItemGrade > ;
91
89
/** True if the domain of the corpus item has been scheduled in the past. */
92
90
hasTrustedDomain : Scalars [ 'Boolean' ] ;
93
91
/**
@@ -208,13 +206,6 @@ export type ApprovedCorpusItemScheduledSurfaceHistoryFilters = {
208
206
scheduledSurfaceGuid ?: InputMaybe < Scalars [ 'ID' ] > ;
209
207
} ;
210
208
211
- /** Valid grade values for CorpusItem (public graph) and ApprovedItem (admin graph) */
212
- export enum ApprovedItemGrade {
213
- A = 'A' ,
214
- B = 'B' ,
215
- C = 'C' ,
216
- }
217
-
218
209
export type ArticleMarkdown = {
219
210
__typename ?: 'ArticleMarkdown' ;
220
211
images ?: Maybe < Array < MarkdownImagePosition > > ;
@@ -521,8 +512,6 @@ export type CreateApprovedCorpusItemInput = {
521
512
datePublished ?: InputMaybe < Scalars [ 'Date' ] > ;
522
513
/** The excerpt of the Approved Item. */
523
514
excerpt : Scalars [ 'String' ] ;
524
- /** The quality grade associated with this CorpusItem. */
525
- grade ?: InputMaybe < ApprovedItemGrade > ;
526
515
/** The image URL for this item's accompanying picture. */
527
516
imageUrl : Scalars [ 'Url' ] ;
528
517
/** Whether this story is a Pocket Collection. */
@@ -732,6 +721,17 @@ export type DeleteScheduledCorpusItemInput = {
732
721
reasons ?: InputMaybe < Scalars [ 'String' ] > ;
733
722
} ;
734
723
724
+ /** Input data for disabling or enabling a Section */
725
+ export type DisableEnableSectionInput = {
726
+ /**
727
+ * Indicates whether or not a Section is fully disabled from display on NewTab. Can only be controlled
728
+ * in the admin tool.
729
+ */
730
+ disabled : Scalars [ 'Boolean' ] ;
731
+ /** An alternative primary key in UUID format supplied by ML. */
732
+ externalId : Scalars [ 'ID' ] ;
733
+ } ;
734
+
735
735
/** Metadata from a domain, originally populated from ClearBit */
736
736
export type DomainMetadata = {
737
737
__typename ?: 'DomainMetadata' ;
@@ -1227,6 +1227,8 @@ export type Mutation = {
1227
1227
deleteCollectionStory : CollectionStory ;
1228
1228
/** Deletes an item from a Scheduled Surface. */
1229
1229
deleteScheduledCorpusItem : ScheduledCorpusItem ;
1230
+ /** Disables or enables a Section. Can only be done from the admin tool. */
1231
+ disableEnableSection : Section ;
1230
1232
/**
1231
1233
* Lets an automated process create an Approved Item and optionally schedule it to appear
1232
1234
* on a Scheduled Surface.
@@ -1254,8 +1256,6 @@ export type Mutation = {
1254
1256
rescheduleScheduledCorpusItem : ScheduledCorpusItem ;
1255
1257
/** Updates an Approved Item. */
1256
1258
updateApprovedCorpusItem : ApprovedCorpusItem ;
1257
- /** Updates the grade of an Approved Item */
1258
- updateApprovedCorpusItemGrade : ApprovedCorpusItem ;
1259
1259
/** Updates a Collection. */
1260
1260
updateCollection : Collection ;
1261
1261
/** Updates a CollectionAuthor. */
@@ -1373,6 +1373,10 @@ export type MutationDeleteScheduledCorpusItemArgs = {
1373
1373
data : DeleteScheduledCorpusItemInput ;
1374
1374
} ;
1375
1375
1376
+ export type MutationDisableEnableSectionArgs = {
1377
+ data : DisableEnableSectionInput ;
1378
+ } ;
1379
+
1376
1380
export type MutationImportApprovedCorpusItemArgs = {
1377
1381
data : ImportApprovedCorpusItemInput ;
1378
1382
} ;
@@ -1405,10 +1409,6 @@ export type MutationUpdateApprovedCorpusItemArgs = {
1405
1409
data : UpdateApprovedCorpusItemInput ;
1406
1410
} ;
1407
1411
1408
- export type MutationUpdateApprovedCorpusItemGradeArgs = {
1409
- data : UpdateApprovedCorpusItemGradeInput ;
1410
- } ;
1411
-
1412
1412
export type MutationUpdateCollectionArgs = {
1413
1413
data : UpdateCollectionInput ;
1414
1414
} ;
@@ -1689,7 +1689,7 @@ export type Query = {
1689
1689
getScheduledCorpusItems : Array < ScheduledCorpusItemsResult > ;
1690
1690
/** Retrieves all ScheduledSurfaces available to the given SSO user. Requires an Authorization header. */
1691
1691
getScheduledSurfacesForUser : Array < ScheduledSurface > ;
1692
- /** Retrieves a list of active Sections with their corresponding active SectionItems for a scheduled surface. */
1692
+ /** Retrieves a list of active and enabled/disabled Sections with their corresponding active SectionItems for a scheduled surface. */
1693
1693
getSectionsWithSectionItems : Array < Section > ;
1694
1694
/** returns parser meta data for a given url */
1695
1695
getUrlMetadata : UrlMetadata ;
@@ -2081,6 +2081,11 @@ export type Section = {
2081
2081
createSource : ActivitySource ;
2082
2082
/** A Unix timestamp of when the Section was created. */
2083
2083
createdAt : Scalars [ 'Int' ] ;
2084
+ /**
2085
+ * Indicates whether or not a Section is fully disabled from display on NewTab. Can only be controlled
2086
+ * in the admin tool.
2087
+ */
2088
+ disabled : Scalars [ 'Boolean' ] ;
2084
2089
/** An alternative primary key in UUID format. */
2085
2090
externalId : Scalars [ 'ID' ] ;
2086
2091
/** The GUID of the Scheduled Surface. Example: 'NEW_TAB_EN_US'. */
@@ -2273,16 +2278,6 @@ export type UnMarseable = {
2273
2278
html : Scalars [ 'String' ] ;
2274
2279
} ;
2275
2280
2276
- /** Input data for updating the grade of an Approved Item. */
2277
- export type UpdateApprovedCorpusItemGradeInput = {
2278
- /** The UI screen where the approved corpus item is being graded from. */
2279
- actionScreen : ActionScreen ;
2280
- /** Approved Item ID. */
2281
- externalId : Scalars [ 'ID' ] ;
2282
- /** The quality grade associated with this CorpusItem. */
2283
- grade : ApprovedItemGrade ;
2284
- } ;
2285
-
2286
2281
/** Input data for updating an Approved Item. */
2287
2282
export type UpdateApprovedCorpusItemInput = {
2288
2283
/**
@@ -2298,8 +2293,6 @@ export type UpdateApprovedCorpusItemInput = {
2298
2293
excerpt : Scalars [ 'String' ] ;
2299
2294
/** Approved Item ID. */
2300
2295
externalId : Scalars [ 'ID' ] ;
2301
- /** The quality grade associated with this CorpusItem. */
2302
- grade ?: InputMaybe < ApprovedItemGrade > ;
2303
2296
/** The image URL for this item's accompanying picture. */
2304
2297
imageUrl : Scalars [ 'Url' ] ;
2305
2298
/**
@@ -2636,6 +2629,7 @@ export type BaseSectionDataFragment = {
2636
2629
scheduledSurfaceGuid : string ;
2637
2630
sort ?: number | null ;
2638
2631
createSource : ActivitySource ;
2632
+ disabled : boolean ;
2639
2633
active : boolean ;
2640
2634
} ;
2641
2635
@@ -2648,6 +2642,7 @@ export type SectionDataFragment = {
2648
2642
scheduledSurfaceGuid : string ;
2649
2643
sort ?: number | null ;
2650
2644
createSource : ActivitySource ;
2645
+ disabled : boolean ;
2651
2646
active : boolean ;
2652
2647
sectionItems : Array < {
2653
2648
__typename ?: 'SectionItem' ;
@@ -3373,6 +3368,68 @@ export type DeleteScheduledItemMutation = {
3373
3368
} ;
3374
3369
} ;
3375
3370
3371
+ export type DisableEnableSectionMutationVariables = Exact < {
3372
+ data : DisableEnableSectionInput ;
3373
+ } > ;
3374
+
3375
+ export type DisableEnableSectionMutation = {
3376
+ __typename ?: 'Mutation' ;
3377
+ disableEnableSection : {
3378
+ __typename ?: 'Section' ;
3379
+ createdAt : number ;
3380
+ updatedAt : number ;
3381
+ externalId : string ;
3382
+ title : string ;
3383
+ scheduledSurfaceGuid : string ;
3384
+ sort ?: number | null ;
3385
+ createSource : ActivitySource ;
3386
+ disabled : boolean ;
3387
+ active : boolean ;
3388
+ sectionItems : Array < {
3389
+ __typename ?: 'SectionItem' ;
3390
+ createdAt : number ;
3391
+ updatedAt : number ;
3392
+ externalId : string ;
3393
+ rank ?: number | null ;
3394
+ approvedItem : {
3395
+ __typename ?: 'ApprovedCorpusItem' ;
3396
+ externalId : string ;
3397
+ prospectId ?: string | null ;
3398
+ title : string ;
3399
+ language : CorpusLanguage ;
3400
+ publisher : string ;
3401
+ datePublished ?: any | null ;
3402
+ url : any ;
3403
+ hasTrustedDomain : boolean ;
3404
+ imageUrl : any ;
3405
+ excerpt : string ;
3406
+ status : CuratedStatus ;
3407
+ source : CorpusItemSource ;
3408
+ topic : string ;
3409
+ isCollection : boolean ;
3410
+ isTimeSensitive : boolean ;
3411
+ isSyndicated : boolean ;
3412
+ createdBy : string ;
3413
+ createdAt : number ;
3414
+ updatedBy ?: string | null ;
3415
+ updatedAt : number ;
3416
+ authors : Array < {
3417
+ __typename ?: 'CorpusItemAuthor' ;
3418
+ name : string ;
3419
+ sortOrder : number ;
3420
+ } > ;
3421
+ scheduledSurfaceHistory : Array < {
3422
+ __typename ?: 'ApprovedCorpusItemScheduledSurfaceHistory' ;
3423
+ externalId : string ;
3424
+ createdBy : string ;
3425
+ scheduledDate : any ;
3426
+ scheduledSurfaceGuid : string ;
3427
+ } > ;
3428
+ } ;
3429
+ } > ;
3430
+ } ;
3431
+ } ;
3432
+
3376
3433
export type ImageUploadMutationVariables = Exact < {
3377
3434
image : Scalars [ 'Upload' ] ;
3378
3435
width : Scalars [ 'Int' ] ;
@@ -4874,6 +4931,7 @@ export type GetSectionsWithSectionItemsQuery = {
4874
4931
scheduledSurfaceGuid : string ;
4875
4932
sort ?: number | null ;
4876
4933
createSource : ActivitySource ;
4934
+ disabled : boolean ;
4877
4935
active : boolean ;
4878
4936
sectionItems : Array < {
4879
4937
__typename ?: 'SectionItem' ;
@@ -5117,6 +5175,7 @@ export const BaseSectionDataFragmentDoc = gql`
5117
5175
scheduledSurfaceGuid
5118
5176
sort
5119
5177
createSource
5178
+ disabled
5120
5179
active
5121
5180
}
5122
5181
` ;
@@ -6053,6 +6112,57 @@ export type DeleteScheduledItemMutationOptions = Apollo.BaseMutationOptions<
6053
6112
DeleteScheduledItemMutation ,
6054
6113
DeleteScheduledItemMutationVariables
6055
6114
> ;
6115
+ export const DisableEnableSectionDocument = gql `
6116
+ mutation disableEnableSection($data: DisableEnableSectionInput!) {
6117
+ disableEnableSection(data: $data) {
6118
+ ...SectionData
6119
+ }
6120
+ }
6121
+ ${ SectionDataFragmentDoc }
6122
+ ` ;
6123
+ export type DisableEnableSectionMutationFn = Apollo . MutationFunction <
6124
+ DisableEnableSectionMutation ,
6125
+ DisableEnableSectionMutationVariables
6126
+ > ;
6127
+
6128
+ /**
6129
+ * __useDisableEnableSectionMutation__
6130
+ *
6131
+ * To run a mutation, you first call `useDisableEnableSectionMutation` within a React component and pass it any options that fit your needs.
6132
+ * When your component renders, `useDisableEnableSectionMutation` returns a tuple that includes:
6133
+ * - A mutate function that you can call at any time to execute the mutation
6134
+ * - An object with fields that represent the current status of the mutation's execution
6135
+ *
6136
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
6137
+ *
6138
+ * @example
6139
+ * const [disableEnableSectionMutation, { data, loading, error }] = useDisableEnableSectionMutation({
6140
+ * variables: {
6141
+ * data: // value for 'data'
6142
+ * },
6143
+ * });
6144
+ */
6145
+ export function useDisableEnableSectionMutation (
6146
+ baseOptions ?: Apollo . MutationHookOptions <
6147
+ DisableEnableSectionMutation ,
6148
+ DisableEnableSectionMutationVariables
6149
+ > ,
6150
+ ) {
6151
+ const options = { ...defaultOptions , ...baseOptions } ;
6152
+ return Apollo . useMutation <
6153
+ DisableEnableSectionMutation ,
6154
+ DisableEnableSectionMutationVariables
6155
+ > ( DisableEnableSectionDocument , options ) ;
6156
+ }
6157
+ export type DisableEnableSectionMutationHookResult = ReturnType <
6158
+ typeof useDisableEnableSectionMutation
6159
+ > ;
6160
+ export type DisableEnableSectionMutationResult =
6161
+ Apollo . MutationResult < DisableEnableSectionMutation > ;
6162
+ export type DisableEnableSectionMutationOptions = Apollo . BaseMutationOptions <
6163
+ DisableEnableSectionMutation ,
6164
+ DisableEnableSectionMutationVariables
6165
+ > ;
6056
6166
export const ImageUploadDocument = gql `
6057
6167
mutation imageUpload(
6058
6168
$image: Upload!
0 commit comments