From dad36ec9488a65c767b4039890a55c5f43d833af Mon Sep 17 00:00:00 2001 From: Rolf Rando Date: Fri, 30 Aug 2024 18:28:57 -0700 Subject: [PATCH 1/4] Prep for new External Editorial prospecting feed --- .../integration-test-mocks/getScheduledSurfacesForUser.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts b/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts index a6581241..505f4b97 100644 --- a/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts +++ b/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts @@ -1,6 +1,6 @@ -import { ProspectType, ScheduledSurface } from '../../api/generatedTypes'; -import { getScheduledSurfacesForUser } from '../../api/queries/getScheduledSurfacesForUser'; -import { constructMock } from './utils'; +import {ProspectType, ScheduledSurface} from '../../api/generatedTypes'; +import {getScheduledSurfacesForUser} from '../../api/queries/getScheduledSurfacesForUser'; +import {constructMock} from './utils'; /** * The source array with all the scheduled surfaces available in the Curation Tool. @@ -25,6 +25,7 @@ const allScheduledSurfaces: ScheduledSurface[] = [ ProspectType.RssLogistic, ProspectType.RssLogisticRecent, ProspectType.SlateSchedulerV2, + ProspectType.ExternalEditorial, ], }, { @@ -37,6 +38,7 @@ const allScheduledSurfaces: ScheduledSurface[] = [ ProspectType.DomainAllowlist, ProspectType.Dismissed, ProspectType.TitleUrlModeled, + ProspectType.ExternalEditorial, ], }, { From aa30c505815b8bbdb2d20aa76a8e11cebb82dd37 Mon Sep 17 00:00:00 2001 From: Rolf Rando Date: Tue, 3 Sep 2024 10:44:00 -0700 Subject: [PATCH 2/4] removed old syndication type --- src/api/generatedTypes.ts | 34 +++++++++++++++++++ .../getScheduledSurfacesForUser.ts | 2 -- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/api/generatedTypes.ts b/src/api/generatedTypes.ts index 05134f14..de1ef77e 100644 --- a/src/api/generatedTypes.ts +++ b/src/api/generatedTypes.ts @@ -626,6 +626,17 @@ export type CreateRejectedCorpusItemInput = { url: Scalars['Url']; }; +/** + * Input data for marking the given scheduled surface as reviewed + * by human curators for a given date. + */ +export type CreateScheduleReviewInput = { + /** The date of the schedule that was reviewed, in YYYY-MM-DD format. */ + scheduledDate: Scalars['Date']; + /** The GUID of the scheduledSurface that was reviewed. */ + scheduledSurfaceGuid: Scalars['ID']; +}; + /** Input data for creating a scheduled entry for an Approved Item on a Scheduled Surface. */ export type CreateScheduledCorpusItemInput = { /** @@ -1155,6 +1166,8 @@ export type Mutation = { createLabel: Label; /** Creates a Rejected Item. */ createRejectedCorpusItem: RejectedCorpusItem; + /** Marks the given scheduled surface as reviewed by human curators for a given date. */ + createScheduleReview: ScheduleReview; /** Creates a Scheduled Surface Scheduled Item. */ createScheduledCorpusItem: ScheduledCorpusItem; /** Deletes a CollectionPartnerAssociation. */ @@ -1282,6 +1295,10 @@ export type MutationCreateRejectedCorpusItemArgs = { data: CreateRejectedCorpusItemInput; }; +export type MutationCreateScheduleReviewArgs = { + data: CreateScheduleReviewInput; +}; + export type MutationCreateScheduledCorpusItemArgs = { data: CreateScheduledCorpusItemInput; }; @@ -1545,6 +1562,7 @@ export enum ProspectType { CountsModeled = 'COUNTS_MODELED', Dismissed = 'DISMISSED', DomainAllowlist = 'DOMAIN_ALLOWLIST', + ExternalEditorial = 'EXTERNAL_EDITORIAL', Recommended = 'RECOMMENDED', RssLogistic = 'RSS_LOGISTIC', RssLogisticRecent = 'RSS_LOGISTIC_RECENT', @@ -1889,6 +1907,19 @@ export type RescheduleScheduledCorpusItemInput = { source: ScheduledItemSource; }; +/** Contains information about the human curator who reviewed the schedule for a given date and scheduled surface. */ +export type ScheduleReview = { + __typename?: 'ScheduleReview'; + /** A Unix timestamp of when the scheduled was last reviewed. */ + reviewedAt: Scalars['Date']; + /** A single sign-on user identifier of the user who reviewed the schedule. */ + reviewedBy: Scalars['String']; + /** The date of the schedule that was reviewed, in YYYY-MM-DD format. */ + scheduledDate: Scalars['Date']; + /** The GUID of the scheduledSurface that was reviewed. */ + scheduledSurfaceGuid: Scalars['ID']; +}; + /** * A scheduled entry for an Approved Item to appear on a Scheduled Surface. * For example, a story that is scheduled to appear on December 31st, 2021 on the New Tab in Firefox for the US audience. @@ -1935,6 +1966,8 @@ export type ScheduledCorpusItemsResult = { collectionCount: Scalars['Int']; /** An array of items for a given Scheduled Surface */ items: Array; + /** The human review status of the schedule for the given scheduledSurfaceGuid & scheduledDate. */ + scheduleReview?: Maybe; /** The date items are scheduled for, in YYYY-MM-DD format. */ scheduledDate: Scalars['Date']; /** The number of syndicated articles for the scheduled date. */ @@ -2104,6 +2137,7 @@ export enum Topics { Food = 'FOOD', Gaming = 'GAMING', HealthFitness = 'HEALTH_FITNESS', + Home = 'HOME', Parenting = 'PARENTING', PersonalFinance = 'PERSONAL_FINANCE', Politics = 'POLITICS', diff --git a/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts b/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts index 505f4b97..b88b8acc 100644 --- a/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts +++ b/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts @@ -17,8 +17,6 @@ const allScheduledSurfaces: ScheduledSurface[] = [ ProspectType.TopSaved, ProspectType.DomainAllowlist, ProspectType.Dismissed, - ProspectType.SyndicatedRerun, - ProspectType.SyndicatedNew, ProspectType.CountsModeled, ProspectType.TimespentModeled, ProspectType.TitleUrlModeled, From 846ac7a06c4658cad31ae54674e92602c1845ee3 Mon Sep 17 00:00:00 2001 From: Rolf Rando Date: Tue, 3 Sep 2024 11:02:53 -0700 Subject: [PATCH 3/4] lint fix --- .../integration-test-mocks/getScheduledSurfacesForUser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts b/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts index b88b8acc..6875b860 100644 --- a/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts +++ b/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts @@ -1,6 +1,6 @@ -import {ProspectType, ScheduledSurface} from '../../api/generatedTypes'; -import {getScheduledSurfacesForUser} from '../../api/queries/getScheduledSurfacesForUser'; -import {constructMock} from './utils'; +import { ProspectType, ScheduledSurface } from '../../api/generatedTypes'; +import { getScheduledSurfacesForUser } from '../../api/queries/getScheduledSurfacesForUser'; +import { constructMock } from './utils'; /** * The source array with all the scheduled surfaces available in the Curation Tool. From 8ba7a8c8cdae7dfb5f93950565d5f33152fb0ed3 Mon Sep 17 00:00:00 2001 From: Rolf Rando Date: Wed, 4 Sep 2024 11:49:21 -0700 Subject: [PATCH 4/4] Changed name --- src/api/generatedTypes.ts | 2 +- .../integration-test-mocks/getScheduledSurfacesForUser.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/generatedTypes.ts b/src/api/generatedTypes.ts index de1ef77e..4fa19141 100644 --- a/src/api/generatedTypes.ts +++ b/src/api/generatedTypes.ts @@ -1562,7 +1562,7 @@ export enum ProspectType { CountsModeled = 'COUNTS_MODELED', Dismissed = 'DISMISSED', DomainAllowlist = 'DOMAIN_ALLOWLIST', - ExternalEditorial = 'EXTERNAL_EDITORIAL', + PublisherSubmitted = 'PUBLISHER_SUBMITTED', Recommended = 'RECOMMENDED', RssLogistic = 'RSS_LOGISTIC', RssLogisticRecent = 'RSS_LOGISTIC_RECENT', diff --git a/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts b/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts index 6875b860..6135234d 100644 --- a/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts +++ b/src/curated-corpus/integration-test-mocks/getScheduledSurfacesForUser.ts @@ -23,7 +23,7 @@ const allScheduledSurfaces: ScheduledSurface[] = [ ProspectType.RssLogistic, ProspectType.RssLogisticRecent, ProspectType.SlateSchedulerV2, - ProspectType.ExternalEditorial, + ProspectType.PublisherSubmitted, ], }, { @@ -36,7 +36,7 @@ const allScheduledSurfaces: ScheduledSurface[] = [ ProspectType.DomainAllowlist, ProspectType.Dismissed, ProspectType.TitleUrlModeled, - ProspectType.ExternalEditorial, + ProspectType.PublisherSubmitted, ], }, {