diff --git a/src/auth/components/AdvertiserDetailsForm.tsx b/src/auth/components/AdvertiserDetailsForm.tsx index 55551ed3..b800f5e3 100644 --- a/src/auth/components/AdvertiserDetailsForm.tsx +++ b/src/auth/components/AdvertiserDetailsForm.tsx @@ -10,7 +10,6 @@ import { useHistory } from "react-router-dom"; import { AdvertiserBillingAddressDocument, PaymentType, - UpdateAdvertiserDocument, } from "@/graphql-client/graphql"; import { AdvertiserAgreed } from "@/auth/components/AdvertiserAgreed"; import { FormikSubmitButton } from "@/form/FormikButton"; @@ -20,6 +19,16 @@ import { useTrackWithMatomo } from "@/hooks/useTrackWithMatomo"; import _ from "lodash"; import { msg, Trans } from "@lingui/macro"; import { useMutation, useQuery } from "@apollo/client"; +import { graphql } from "@/graphql-client/index"; + +export const Advertiser_Update = graphql(` + mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) { + updateSelfServeAdvertiser(updateAdvertiserInput: $input) { + id + publicKey + } + } +`); export function AdvertiserDetailsForm() { const { trackMatomoEvent } = useTrackWithMatomo({ @@ -35,7 +44,7 @@ export function AdvertiserDetailsForm() { initialAdvertiserForm(!requiresPaymentAgree), ); - const [mutation] = useMutation(UpdateAdvertiserDocument, { + const [mutation] = useMutation(Advertiser_Update, { async onCompleted() { const user = await getUser(); setSessionUser(user); @@ -63,7 +72,7 @@ export function AdvertiserDetailsForm() { setSubmitting(true); await mutation({ variables: { - updateAdvertiserInput: { + input: { id: advertiser.id, agreed: v.terms && v.tracking && v.payment && v.language, billingAddress: v.address.id diff --git a/src/graphql-client/gql.ts b/src/graphql-client/gql.ts index 49336503..1aaa3fba 100644 --- a/src/graphql-client/gql.ts +++ b/src/graphql-client/gql.ts @@ -13,8 +13,9 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document- * Therefore it is highly recommended to use the babel or swc plugin for production. */ const documents = { + "\n mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) {\n updateSelfServeAdvertiser(updateAdvertiserInput: $input) {\n id\n publicKey\n }\n }\n": types.UpdateAdvertiserDocument, "fragment AdSet on AdSet {\n id\n price\n createdAt\n billingType\n name\n totalMax\n perDay\n state\n segments {\n code\n name\n }\n oses {\n code\n name\n }\n conversions {\n id\n type\n urlPattern\n observationWindow\n }\n ads {\n ...Ad\n }\n}\n\nfragment Ad on Ad {\n id\n state\n creative {\n ...Creative\n }\n}\n\nfragment AdSetWithDeletedAds on AdSet {\n id\n createdAt\n name\n state\n billingType\n oses {\n code\n name\n }\n segments {\n code\n name\n }\n conversions {\n id\n }\n ads(includeDeleted: true) {\n ...Ad\n }\n}\n\nmutation CreateAdSet($createAdSetInput: CreateAdSetInput!) {\n createAdSet(createAdSetInput: $createAdSetInput) {\n ...AdSet\n }\n}\n\nmutation UpdateAdSet($updateAdSetInput: UpdateAdSetInput!) {\n updateAdSet(updateAdSetInput: $updateAdSetInput) {\n ...AdSet\n }\n}": types.AdSetFragmentDoc, - "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nmutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}": types.AdvertiserBillingAddressFragmentDoc, + "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}": types.AdvertiserBillingAddressFragmentDoc, "fragment Engagement on Engagement {\n creativeinstanceid\n createdat\n type\n pricetype\n creativesetname\n creativesetid\n creativename\n creativeid\n creativestate\n creativepayload\n view\n click\n viewthroughConversion\n clickthroughConversion\n conversion\n dismiss\n downvote\n landed\n spend\n upvote\n price\n android\n ios\n linux\n macos\n windows\n}\n\nfragment CampaignWithEngagements on Campaign {\n id\n name\n state\n budget\n spent\n createdAt\n startAt\n endAt\n currency\n pacingIndex\n format\n adSets {\n id\n conversions {\n id\n type\n extractExternalId\n }\n }\n engagements {\n ...Engagement\n }\n}\n\nquery AnalyticOverview($id: String!) {\n campaign(id: $id) {\n ...CampaignWithEngagements\n }\n}\n\nfragment CampaignMetricSummaryValues on Metrics {\n click\n impression\n siteVisit\n spendUsd\n rates {\n clickThrough\n }\n}\n\nquery CampaignMetrics($campaignIds: [String!]!) {\n performance(filter: {campaignIds: $campaignIds}) {\n values {\n dimensions {\n campaign {\n id\n }\n }\n metrics {\n ...CampaignMetricSummaryValues\n }\n }\n }\n}\n\nfragment CampaignMetricDetailValues on Metrics {\n click\n impression\n siteVisit\n conversion\n dismiss\n spendUsd\n rates {\n clickThrough\n clickToConversion\n costPerAcquisition\n }\n}\n\nfragment DailyValues on Performance {\n dimensions {\n day\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n}\n\nquery FetchDailyMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...DailyValues\n }\n total {\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n }\n}\n\nfragment AdSetValues on Performance {\n dimensions {\n adSet {\n id\n name\n state\n billingType\n }\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n}\n\nquery FetchAdSetMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...AdSetValues\n }\n }\n}": types.EngagementFragmentDoc, "fragment Campaign on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\n stripePaymentId\n hasPaymentIntent\n dayPartings {\n dow\n startMinute\n endMinute\n }\n geoTargets {\n code\n name\n }\n adSets {\n ...AdSet\n }\n advertiser {\n id\n }\n}\n\nfragment CampaignSummary on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n paymentType\n createdAt\n startAt\n endAt\n source\n type\n format\n dayProportion\n brandedKeywords\n advertiser {\n id\n name\n }\n}\n\nfragment CampaignAds on Campaign {\n id\n name\n state\n startAt\n endAt\n source\n currency\n format\n advertiser {\n id\n }\n adSets {\n ...AdSetWithDeletedAds\n }\n}\n\nquery LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n}\n\nquery LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n}\n\nmutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n}\n\nmutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n}": types.CampaignFragmentDoc, "fragment Geocode on Geocode {\n code\n name\n}\n\nfragment Segment on Segment {\n code\n name\n}\n\nquery ActiveGeocodes {\n geocodes {\n ...Geocode\n }\n}\n\nquery Segments {\n segments {\n data {\n ...Segment\n }\n }\n}": types.GeocodeFragmentDoc, @@ -46,6 +47,10 @@ const documents = { */ export function graphql(source: string): unknown; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) {\n updateSelfServeAdvertiser(updateAdvertiserInput: $input) {\n id\n publicKey\n }\n }\n"): (typeof documents)["\n mutation UpdateAdvertiser($input: UpdateSelfServeAdvertiserInput!) {\n updateSelfServeAdvertiser(updateAdvertiserInput: $input) {\n id\n publicKey\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -53,7 +58,7 @@ export function graphql(source: "fragment AdSet on AdSet {\n id\n price\n cre /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nmutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}"): (typeof documents)["fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nmutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}"]; +export function graphql(source: "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}"): (typeof documents)["fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/src/graphql-client/graphql.ts b/src/graphql-client/graphql.ts index 9fc5bf92..104d5695 100644 --- a/src/graphql-client/graphql.ts +++ b/src/graphql-client/graphql.ts @@ -600,7 +600,7 @@ export type CreateTypeInput = { export type CreateUserInput = { email: Scalars['String']['input']; - emailVerified: Scalars['Boolean']['input']; + emailVerified?: InputMaybe; fullName: Scalars['String']['input']; password?: InputMaybe; role: Scalars['String']['input']; @@ -878,6 +878,7 @@ export type Mutation = { updateCampaign: Campaign; updateCreative: Creative; updateNotificationCreative: Creative; + updateSelfServeAdvertiser: Advertiser; updateUser: User; }; @@ -1007,6 +1008,11 @@ export type MutationUpdateNotificationCreativeArgs = { }; +export type MutationUpdateSelfServeAdvertiserArgs = { + updateAdvertiserInput: UpdateSelfServeAdvertiserInput; +}; + + export type MutationUpdateUserArgs = { updateUserInput: UpdateUserInput; }; @@ -1600,6 +1606,14 @@ export type UpdateSegmentInput = { name?: InputMaybe; }; +export type UpdateSelfServeAdvertiserInput = { + /** Agreed to Terms And Conditions - Advertiser Facing Dashboard */ + agreed?: InputMaybe; + billingAddress?: InputMaybe; + id: Scalars['String']['input']; + publicKey?: InputMaybe; +}; + export type UpdateUserInput = { email?: InputMaybe; emailVerified?: InputMaybe; @@ -1648,6 +1662,13 @@ export type CreateWebhookInput = { url: Scalars['String']['input']; }; +export type UpdateAdvertiserMutationVariables = Exact<{ + input: UpdateSelfServeAdvertiserInput; +}>; + + +export type UpdateAdvertiserMutation = { __typename?: 'Mutation', updateSelfServeAdvertiser: { __typename?: 'Advertiser', id: string, publicKey?: string | null } }; + export type AdSetFragment = { __typename?: 'AdSet', id: string, price: string, createdAt: string, billingType?: string | null, name: string, totalMax: number, perDay: number, state: string, segments: Array<{ __typename?: 'Segment', code: string, name: string }>, oses: Array<{ __typename?: 'OS', code: string, name: string }>, conversions: Array<{ __typename?: 'Conversion', id: string, type: string, urlPattern: string, observationWindow: number }>, ads: Array<{ __typename?: 'Ad', id: string, state: string, creative: { __typename?: 'Creative', id: string, createdAt: string, modifiedAt: string, name: string, state: string, type: { __typename?: 'CreativeType', code: string }, payloadNotification?: { __typename?: 'NotificationPayload', body: string, title: string, targetUrl: string } | null, payloadNewTabPage?: { __typename?: 'NewTabPagePayload', logo?: { __typename?: 'Logo', imageUrl: string, alt: string, companyName: string, destinationUrl: string } | null, wallpapers?: Array<{ __typename?: 'Wallpaper', imageUrl: string, focalPoint: { __typename?: 'FocalPoint', x: number, y: number } }> | null } | null, payloadInlineContent?: { __typename?: 'InlineContentPayload', title: string, ctaText: string, imageUrl: string, targetUrl: string, dimensions: string, description: string } | null, payloadSearch?: { __typename?: 'SearchPayload', body: string, title: string, targetUrl: string } | null, payloadSearchHomepage?: { __typename?: 'SearchHomepagePayload', body: string, imageUrl: string, imageDarkModeUrl?: string | null, targetUrl: string, title: string, ctaText: string } | null } }> }; export type AdFragment = { __typename?: 'Ad', id: string, state: string, creative: { __typename?: 'Creative', id: string, createdAt: string, modifiedAt: string, name: string, state: string, type: { __typename?: 'CreativeType', code: string }, payloadNotification?: { __typename?: 'NotificationPayload', body: string, title: string, targetUrl: string } | null, payloadNewTabPage?: { __typename?: 'NewTabPagePayload', logo?: { __typename?: 'Logo', imageUrl: string, alt: string, companyName: string, destinationUrl: string } | null, wallpapers?: Array<{ __typename?: 'Wallpaper', imageUrl: string, focalPoint: { __typename?: 'FocalPoint', x: number, y: number } }> | null } | null, payloadInlineContent?: { __typename?: 'InlineContentPayload', title: string, ctaText: string, imageUrl: string, targetUrl: string, dimensions: string, description: string } | null, payloadSearch?: { __typename?: 'SearchPayload', body: string, title: string, targetUrl: string } | null, payloadSearchHomepage?: { __typename?: 'SearchHomepagePayload', body: string, imageUrl: string, imageDarkModeUrl?: string | null, targetUrl: string, title: string, ctaText: string } | null } }; @@ -1677,13 +1698,6 @@ export type AdvertiserQueryVariables = Exact<{ export type AdvertiserQuery = { __typename?: 'Query', advertiser?: { __typename?: 'Advertiser', id: string, publicKey?: string | null } | null }; -export type UpdateAdvertiserMutationVariables = Exact<{ - updateAdvertiserInput: UpdateAdvertiserInput; -}>; - - -export type UpdateAdvertiserMutation = { __typename?: 'Mutation', updateAdvertiser: { __typename?: 'Advertiser', id: string, publicKey?: string | null } }; - export type AdvertiserCampaignsFragment = { __typename?: 'Advertiser', id: string, name: string, selfServiceManageCampaign: boolean, selfServiceSetPrice: boolean, campaigns: Array<{ __typename?: 'Campaign', id: string, name: string, state: string, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, advertiser: { __typename?: 'Advertiser', id: string, name: string } }> }; export type AdvertiserCampaignsQueryVariables = Exact<{ @@ -1975,10 +1989,10 @@ export const HourlyValuesFragmentDoc = {"kind":"Document","definitions":[{"kind" export const CampaignOverviewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignOverview"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"extractExternalId"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; export const SearchProspectsLandingPageListFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SearchProspectsLandingPageList"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SearchLandingPageWithStats"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"rank"}},{"kind":"Field","name":{"kind":"Name","value":"lastSeen"}},{"kind":"Field","name":{"kind":"Name","value":"favicon"}},{"kind":"Field","name":{"kind":"Name","value":"creatives"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"lastSeen"}}]}}]}}]} as unknown as DocumentNode; export const SearchProspectsLandingPageDetailFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SearchProspectsLandingPageDetail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SearchLandingPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"queries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"query"}}]}}]}}]} as unknown as DocumentNode; +export const UpdateAdvertiserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAdvertiser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateSelfServeAdvertiserInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateSelfServeAdvertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"updateAdvertiserInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]}}]} as unknown as DocumentNode; export const CreateAdSetDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateAdSet"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"createAdSetInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateAdSetInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createAdSet"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"createAdSetInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"createAdSetInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSet"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Creative"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Creative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"modifiedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"type"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadNotification"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadNewTabPage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"logo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"alt"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"wallpapers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"focalPoint"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"x"}},{"kind":"Field","name":{"kind":"Name","value":"y"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadInlineContent"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"ctaText"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"dimensions"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadSearch"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadSearchHomepage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"imageDarkModeUrl"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"ctaText"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Ad"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Ad"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSet"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdSet"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"totalMax"}},{"kind":"Field","name":{"kind":"Name","value":"perDay"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"oses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"urlPattern"}},{"kind":"Field","name":{"kind":"Name","value":"observationWindow"}}]}},{"kind":"Field","name":{"kind":"Name","value":"ads"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Ad"}}]}}]}}]} as unknown as DocumentNode; export const UpdateAdSetDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAdSet"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updateAdSetInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateAdSetInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateAdSet"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"updateAdSetInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updateAdSetInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSet"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Creative"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Creative"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"modifiedAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"type"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadNotification"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadNewTabPage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"logo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"alt"}},{"kind":"Field","name":{"kind":"Name","value":"companyName"}},{"kind":"Field","name":{"kind":"Name","value":"destinationUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"wallpapers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"focalPoint"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"x"}},{"kind":"Field","name":{"kind":"Name","value":"y"}}]}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadInlineContent"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"ctaText"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"dimensions"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadSearch"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}}]}},{"kind":"Field","name":{"kind":"Name","value":"payloadSearchHomepage"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"imageDarkModeUrl"}},{"kind":"Field","name":{"kind":"Name","value":"targetUrl"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"ctaText"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Ad"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Ad"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSet"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdSet"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"totalMax"}},{"kind":"Field","name":{"kind":"Name","value":"perDay"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"oses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"urlPattern"}},{"kind":"Field","name":{"kind":"Name","value":"observationWindow"}}]}},{"kind":"Field","name":{"kind":"Name","value":"ads"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Ad"}}]}}]}}]} as unknown as DocumentNode; export const AdvertiserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Advertiser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]}}]} as unknown as DocumentNode; -export const UpdateAdvertiserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAdvertiser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"updateAdvertiserInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateAdvertiserInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateAdvertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"updateAdvertiserInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"updateAdvertiserInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]}}]} as unknown as DocumentNode; export const AdvertiserCampaignsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserCampaigns"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserCampaignFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiserCampaigns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserCampaigns"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserCampaigns"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Advertiser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceManageCampaign"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceSetPrice"}},{"kind":"Field","name":{"kind":"Name","value":"campaigns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}}]}}]}}]} as unknown as DocumentNode; export const AdvertiserImagesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserImages"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"images"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserImage"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserImage"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserImage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; export const AdvertiserPricesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserPrices"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"prices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserPrice"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserPrice"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserPrice"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingModelPrice"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"kind":"Field","name":{"kind":"Name","value":"format"}}]}}]} as unknown as DocumentNode; diff --git a/src/graphql/ads-serve.graphql.schema.json b/src/graphql/ads-serve.graphql.schema.json index e8aa25e5..89de46e3 100644 --- a/src/graphql/ads-serve.graphql.schema.json +++ b/src/graphql/ads-serve.graphql.schema.json @@ -5813,15 +5813,11 @@ "name": "emailVerified", "description": null, "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, - "defaultValue": null, + "defaultValue": "false", "isDeprecated": false, "deprecationReason": null }, @@ -9192,6 +9188,39 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "updateSelfServeAdvertiser", + "description": null, + "args": [ + { + "name": "updateAdvertiserInput", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateSelfServeAdvertiserInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Advertiser", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "updateUser", "description": null, @@ -14526,6 +14555,69 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateSelfServeAdvertiserInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "agreed", + "description": "Agreed to Terms And Conditions - Advertiser Facing Dashboard", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "billingAddress", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateAddressInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "publicKey", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "UpdateUserInput", @@ -14552,7 +14644,7 @@ "name": "Boolean", "ofType": null }, - "defaultValue": null, + "defaultValue": "false", "isDeprecated": false, "deprecationReason": null }, diff --git a/src/graphql/advertiser.graphql b/src/graphql/advertiser.graphql index bde36074..189b3ac2 100644 --- a/src/graphql/advertiser.graphql +++ b/src/graphql/advertiser.graphql @@ -17,13 +17,6 @@ query Advertiser($id: String!) { } } -mutation UpdateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) { - updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) { - id - publicKey - } -} - fragment AdvertiserCampaigns on Advertiser { id name diff --git a/src/user/settings/NewKeyPairModal.tsx b/src/user/settings/NewKeyPairModal.tsx index 6772e8db..860fc46d 100644 --- a/src/user/settings/NewKeyPairModal.tsx +++ b/src/user/settings/NewKeyPairModal.tsx @@ -14,7 +14,7 @@ import { modalStyles } from "@/theme"; import { msg, Trans } from "@lingui/macro"; import { useLingui } from "@lingui/react"; import { useMutation } from "@apollo/client"; -import { UpdateAdvertiserDocument } from "@/graphql-client/graphql"; +import { Advertiser_Update } from "@/auth/components/AdvertiserDetailsForm"; interface Props { advertiser: IAdvertiser; @@ -32,9 +32,9 @@ export function NewKeyPairModal({ advertiser }: Props) { const [newKeypairModalState, setNewKeypairModalState] = useState("disclaimer"); - const [updateAdvertiser] = useMutation(UpdateAdvertiserDocument, { + const [updateAdvertiser] = useMutation(Advertiser_Update, { variables: { - updateAdvertiserInput: { + input: { id: advertiser.id, publicKey: publicKey.current, }, @@ -55,7 +55,7 @@ export function NewKeyPairModal({ advertiser }: Props) { setSaving(true); updateAdvertiser({ variables: { - updateAdvertiserInput: { + input: { id: advertiser.id, publicKey: newPublicKey, },