From c47e8973c5fd751fdcc4091e6e2e13932a980b3b Mon Sep 17 00:00:00 2001 From: Graham Tackley Date: Thu, 25 Apr 2024 09:54:06 +0100 Subject: [PATCH] refactor: switch to use graphqlcodegen client-preset (#1173) As we use on other internal projects, use the client-preset for codegen. This means we can more easily: - make use of other apollo operations like `useSuspenseQuery` - migrate code from internal codebases to here - in due course, move towards co-locating queries with their components, and [using fragment hiding](https://the-guild.dev/blog/unleash-the-power-of-fragments-with-graphql-codegen) to better track what needs to be queried I've tried to be mechanical about the changes here, limiting changes to just what was needed. --- .gitattributes | 1 + .prettierignore | 3 + codegen.ts | 29 +- package-lock.json | 378 ---- package.json | 4 - src/auth/components/AdvertiserAddress.tsx | 2 +- src/auth/components/AdvertiserDetailsForm.tsx | 15 +- src/auth/components/types.ts | 2 +- src/auth/context/auth.interface.ts | 2 +- src/auth/hooks/queries/useAdvertiser.ts | 2 +- src/auth/lib/index.ts | 8 +- src/components/Assets/AdvertiserAssets.tsx | 13 +- src/components/Assets/ImageAutocomplete.tsx | 5 +- src/components/Assets/UploadImage.tsx | 2 +- src/components/Assets/hooks/useUploadFile.ts | 15 +- src/components/Campaigns/CloneCampaign.tsx | 26 +- .../Creatives/CreateCreativeButton.tsx | 14 +- .../Creatives/CreativeCampaigns.tsx | 2 +- src/components/Creatives/CreativeForm.tsx | 11 +- src/components/Creatives/CreativeList.tsx | 11 +- src/components/Creatives/CreativeSelect.tsx | 2 +- .../Creatives/CreativeSpecificPreview.tsx | 2 +- .../Creatives/CreativeStatusSwitch.tsx | 47 +- src/components/Creatives/CreativeType.tsx | 2 +- src/components/Creatives/NewsPreview.tsx | 2 +- .../Creatives/NotificationPreview.tsx | 2 +- .../Creatives/hooks/useGetCreativeDetails.tsx | 6 +- .../Creatives/hooks/useSubmitCreative.tsx | 22 +- src/components/Datagrid/renderers.tsx | 39 +- src/components/Location/LocationPicker.tsx | 6 +- src/components/Segment/SegmentPicker.tsx | 5 +- src/components/Switch/OnOff.tsx | 2 +- src/components/Url/use-url-validation.ts | 7 +- src/form/fragmentUtil.ts | 9 +- src/graphql-client/gql.ts | 327 +++ src/graphql-client/graphql.ts | 1919 +++++++++++++++++ src/graphql-client/index.ts | 1 + src/graphql/ad-set.generated.tsx | 503 ----- src/graphql/advertiser.generated.tsx | 777 ------- src/graphql/analytics-overview.generated.tsx | 765 ------- src/graphql/campaign.generated.tsx | 876 -------- src/graphql/common.generated.tsx | 186 -- src/graphql/creative.generated.tsx | 678 ------ src/graphql/types.ts | 600 ------ src/graphql/url.generated.tsx | 108 - src/graphql/user.generated.tsx | 160 -- src/user/adSet/AdSetList.tsx | 5 +- src/user/ads/AdList.tsx | 10 +- src/user/ads/AdsExistingAd.tsx | 11 +- src/user/ads/NewAd.tsx | 2 +- .../components/EngagementHeader.tsx | 2 +- .../components/ReportUtils.tsx | 2 +- .../analyticsOverview/lib/ads.library.ts | 2 +- .../analyticsOverview/lib/os.library.ts | 2 +- .../analyticsOverview/lib/overview.library.ts | 2 +- .../reports/campaign/EngagementsOverview.tsx | 8 +- .../reports/os/OsOverview.tsx | 2 +- src/user/analytics/renderers/index.tsx | 6 +- src/user/analytics/search/AdSetBreakdown.tsx | 15 +- src/user/analytics/search/MetricSelector.tsx | 2 +- src/user/analytics/search/MetricsList.tsx | 6 +- src/user/analytics/search/OverTimeGraph.tsx | 2 +- src/user/analytics/search/metrics.ts | 6 +- src/user/analytics/search/series.test.ts | 2 +- src/user/analytics/search/series.ts | 2 +- src/user/campaignList/CampaignList.tsx | 17 +- src/user/campaignList/EditButton.tsx | 7 +- src/user/hooks/useAdvertiserWithPrices.tsx | 13 +- src/user/library/index.test.ts | 8 +- src/user/library/index.ts | 8 +- src/user/settings/NewKeyPairModal.tsx | 5 +- src/user/settings/UserForm.tsx | 5 +- src/user/views/adsManager/types/index.ts | 6 +- .../advanced/components/adSet/AdSetFields.tsx | 2 +- .../components/adSet/fields/AdSetAds.tsx | 2 +- .../components/adSet/fields/PickerFields.tsx | 3 +- .../components/BillingModelSelect.tsx | 2 +- .../campaign/components/CustomPriceSelect.tsx | 2 +- .../campaign/fields/FormatField.tsx | 2 +- .../campaign/fields/PaymentMethodField.tsx | 2 +- .../advanced/components/form/EditCampaign.tsx | 20 +- .../advanced/components/form/NewCampaign.tsx | 16 +- .../review/components/AdSetReview.tsx | 2 +- src/user/views/user/AdDetailTable.tsx | 3 +- src/user/views/user/CampaignDetails.tsx | 9 +- .../views/user/CampaignReportViewSelector.tsx | 9 +- src/user/views/user/CampaignView.tsx | 5 +- .../reports/OriginalCampaignReportView.tsx | 9 +- .../user/reports/SearchCampaignReportView.tsx | 11 +- src/util/campaign.ts | 2 +- src/validation/CampaignSchema.test.ts | 5 +- src/validation/CampaignSchema.tsx | 2 +- 92 files changed, 2579 insertions(+), 5285 deletions(-) create mode 100644 src/graphql-client/gql.ts create mode 100644 src/graphql-client/graphql.ts create mode 100644 src/graphql-client/index.ts delete mode 100644 src/graphql/ad-set.generated.tsx delete mode 100644 src/graphql/advertiser.generated.tsx delete mode 100644 src/graphql/analytics-overview.generated.tsx delete mode 100644 src/graphql/campaign.generated.tsx delete mode 100644 src/graphql/common.generated.tsx delete mode 100644 src/graphql/creative.generated.tsx delete mode 100644 src/graphql/types.ts delete mode 100644 src/graphql/url.generated.tsx delete mode 100644 src/graphql/user.generated.tsx diff --git a/.gitattributes b/.gitattributes index 1e23a0ed..f2b10959 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ *.generated.tsx linguist-generated src/graphql/types.ts linguist-generated +src/graphql-client/*.ts linguist-generated *.po linguist-generated diff --git a/.prettierignore b/.prettierignore index b8c8c9b3..0a34595e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,9 @@ node_modules build src/locales/*.js +# these files are code generated +src/graphql-client/*.ts + # npm and prettier fight over a EOF on these files, let npm win: package.json package-lock.json diff --git a/codegen.ts b/codegen.ts index 21354686..dddc7545 100644 --- a/codegen.ts +++ b/codegen.ts @@ -2,8 +2,17 @@ import { CodegenConfig } from "@graphql-codegen/cli"; const config: CodegenConfig = { schema: "../ads-serve/src/graphql/schema.graphql", - documents: "./src/**/*.graphql", - hooks: { afterAllFileWrite: ["prettier --write"] }, + documents: ["src/**/*.ts", "src/**/*.tsx", "src/**/*.graphql"], + ignoreNoDocuments: true, + overwrite: true, + generates: { + "./src/graphql-client/": { + preset: "client", + presetConfig: { + fragmentMasking: false, + }, + }, + }, config: { strictScalars: true, useTypeImports: true, @@ -16,20 +25,6 @@ const config: CodegenConfig = { JSONObject: "object", }, }, - generates: { - "src/": { - preset: "near-operation-file", - presetConfig: { - extension: ".generated.tsx", - baseTypesPath: "graphql/types.ts", - }, - plugins: ["typescript-operations", "typescript-react-apollo"], - config: { withHooks: true, withRefetchFn: true, skipTypename: true }, - }, - "src/graphql/types.ts": { - plugins: ["typescript"], - config: { onlyOperationTypes: true }, - }, - }, }; + export default config; diff --git a/package-lock.json b/package-lock.json index 69f015c1..c21bcb77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,10 +40,6 @@ "devDependencies": { "@babel/core": "7.24.4", "@graphql-codegen/cli": "5.0.2", - "@graphql-codegen/near-operation-file-preset": "3.0.0", - "@graphql-codegen/typescript": "4.0.6", - "@graphql-codegen/typescript-operations": "4.2.0", - "@graphql-codegen/typescript-react-apollo": "4.3.0", "@lingui/cli": "4.10.0", "@lingui/vite-plugin": "4.10.0", "@types/lodash": "4.17.0", @@ -1897,55 +1893,6 @@ "resolved": "https://registry.npmjs.org/@fontsource/poppins/-/poppins-5.0.13.tgz", "integrity": "sha512-8G9odFoxH43oZpvq43fpGucm8iHm6iatu0M1LIshb+tx3/y6YBXenVED7CI4resvPz6hyDu8a2vHSh9vrpe+wQ==" }, - "node_modules/@graphql-codegen/add": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@graphql-codegen/add/-/add-3.2.3.tgz", - "integrity": "sha512-sQOnWpMko4JLeykwyjFTxnhqjd/3NOG2OyMuvK76Wnnwh8DRrNf2VEs2kmSvLl7MndMlOj7Kh5U154dVcvhmKQ==", - "dev": true, - "dependencies": { - "@graphql-codegen/plugin-helpers": "^3.1.1", - "tslib": "~2.4.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/add/node_modules/@graphql-codegen/plugin-helpers": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-3.1.2.tgz", - "integrity": "sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg==", - "dev": true, - "dependencies": { - "@graphql-tools/utils": "^9.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.4.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/add/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-codegen/add/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true - }, "node_modules/@graphql-codegen/cli": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@graphql-codegen/cli/-/cli-5.0.2.tgz", @@ -2184,175 +2131,6 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/@graphql-codegen/near-operation-file-preset": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@graphql-codegen/near-operation-file-preset/-/near-operation-file-preset-3.0.0.tgz", - "integrity": "sha512-HRPaa7OsIAHQBFeGiTUVdjFcxzgvAs7uxSqcLEJgDpCr9cffpwnlgWP3gK79KnTiHsRkyb55U1K4YyrL00g1Cw==", - "dev": true, - "dependencies": { - "@graphql-codegen/add": "^3.2.1", - "@graphql-codegen/plugin-helpers": "^3.0.0", - "@graphql-codegen/visitor-plugin-common": "2.13.1", - "@graphql-tools/utils": "^10.0.0", - "parse-filepath": "^1.0.2", - "tslib": "~2.6.0" - }, - "engines": { - "node": ">= 16.0.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-codegen/plugin-helpers": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-3.1.2.tgz", - "integrity": "sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg==", - "dev": true, - "dependencies": { - "@graphql-tools/utils": "^9.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.4.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-codegen/plugin-helpers/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-codegen/plugin-helpers/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-codegen/visitor-plugin-common": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.1.tgz", - "integrity": "sha512-mD9ufZhDGhyrSaWQGrU1Q1c5f01TeWtSWy/cDwXYjJcHIj1Y/DG2x0tOflEfCvh5WcnmHNIw4lzDsg1W7iFJEg==", - "dev": true, - "dependencies": { - "@graphql-codegen/plugin-helpers": "^2.7.2", - "@graphql-tools/optimize": "^1.3.0", - "@graphql-tools/relay-operation-optimizer": "^6.5.0", - "@graphql-tools/utils": "^8.8.0", - "auto-bind": "~4.0.0", - "change-case-all": "1.0.14", - "dependency-graph": "^0.11.0", - "graphql-tag": "^2.11.0", - "parse-filepath": "^1.0.2", - "tslib": "~2.4.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-codegen/visitor-plugin-common/node_modules/@graphql-codegen/plugin-helpers": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.2.tgz", - "integrity": "sha512-kln2AZ12uii6U59OQXdjLk5nOlh1pHis1R98cDZGFnfaiAbX9V3fxcZ1MMJkB7qFUymTALzyjZoXXdyVmPMfRg==", - "dev": true, - "dependencies": { - "@graphql-tools/utils": "^8.8.0", - "change-case-all": "1.0.14", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.4.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-codegen/visitor-plugin-common/node_modules/@graphql-tools/utils": { - "version": "8.13.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.13.1.tgz", - "integrity": "sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw==", - "dev": true, - "dependencies": { - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-codegen/visitor-plugin-common/node_modules/change-case-all": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/change-case-all/-/change-case-all-1.0.14.tgz", - "integrity": "sha512-CWVm2uT7dmSHdO/z1CXT/n47mWonyypzBbuCy5tN7uMg22BsfkhwT6oHmFCAk+gL1LOOxhdbB9SZz3J1KTY3gA==", - "dev": true, - "dependencies": { - "change-case": "^4.1.2", - "is-lower-case": "^2.0.2", - "is-upper-case": "^2.0.2", - "lower-case": "^2.0.2", - "lower-case-first": "^2.0.2", - "sponge-case": "^1.0.1", - "swap-case": "^2.0.2", - "title-case": "^3.0.3", - "upper-case": "^2.0.2", - "upper-case-first": "^2.0.2" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-codegen/visitor-plugin-common/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-tools/optimize": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/optimize/-/optimize-1.4.0.tgz", - "integrity": "sha512-dJs/2XvZp+wgHH8T5J2TqptT9/6uVzIYvA6uFACha+ufvdMBedkfR4b4GbT8jAKLRARiqRTxy3dctnwkTM2tdw==", - "dev": true, - "dependencies": { - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-tools/relay-operation-optimizer": { - "version": "6.5.18", - "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.18.tgz", - "integrity": "sha512-mc5VPyTeV+LwiM+DNvoDQfPqwQYhPV/cl5jOBjTgSniyaq8/86aODfMkrE2OduhQ5E00hqrkuL2Fdrgk0w1QJg==", - "dev": true, - "dependencies": { - "@ardatan/relay-compiler": "12.0.0", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-codegen/near-operation-file-preset/node_modules/@graphql-tools/relay-operation-optimizer/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, "node_modules/@graphql-codegen/plugin-helpers": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-5.0.3.tgz", @@ -2474,162 +2252,6 @@ "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } }, - "node_modules/@graphql-codegen/typescript-react-apollo": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@graphql-codegen/typescript-react-apollo/-/typescript-react-apollo-4.3.0.tgz", - "integrity": "sha512-h+IxCGrOTDD60/6ztYDQs81yKDZZq/8aHqM9HHrZ9FiZn145O48VnQNCmGm88I619G9rEET8cCOrtYkCt+ZSzA==", - "dev": true, - "dependencies": { - "@graphql-codegen/plugin-helpers": "^3.0.0", - "@graphql-codegen/visitor-plugin-common": "2.13.1", - "auto-bind": "~4.0.0", - "change-case-all": "1.0.15", - "tslib": "~2.6.0" - }, - "engines": { - "node": ">= 16.0.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", - "graphql-tag": "^2.0.0" - } - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-codegen/plugin-helpers": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-3.1.2.tgz", - "integrity": "sha512-emOQiHyIliVOIjKVKdsI5MXj312zmRDwmHpyUTZMjfpvxq/UVAHUJIVdVf+lnjjrI+LXBTgMlTWTgHQfmICxjg==", - "dev": true, - "dependencies": { - "@graphql-tools/utils": "^9.0.0", - "change-case-all": "1.0.15", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.4.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-codegen/plugin-helpers/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-codegen/visitor-plugin-common": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-2.13.1.tgz", - "integrity": "sha512-mD9ufZhDGhyrSaWQGrU1Q1c5f01TeWtSWy/cDwXYjJcHIj1Y/DG2x0tOflEfCvh5WcnmHNIw4lzDsg1W7iFJEg==", - "dev": true, - "dependencies": { - "@graphql-codegen/plugin-helpers": "^2.7.2", - "@graphql-tools/optimize": "^1.3.0", - "@graphql-tools/relay-operation-optimizer": "^6.5.0", - "@graphql-tools/utils": "^8.8.0", - "auto-bind": "~4.0.0", - "change-case-all": "1.0.14", - "dependency-graph": "^0.11.0", - "graphql-tag": "^2.11.0", - "parse-filepath": "^1.0.2", - "tslib": "~2.4.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-codegen/visitor-plugin-common/node_modules/@graphql-codegen/plugin-helpers": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@graphql-codegen/plugin-helpers/-/plugin-helpers-2.7.2.tgz", - "integrity": "sha512-kln2AZ12uii6U59OQXdjLk5nOlh1pHis1R98cDZGFnfaiAbX9V3fxcZ1MMJkB7qFUymTALzyjZoXXdyVmPMfRg==", - "dev": true, - "dependencies": { - "@graphql-tools/utils": "^8.8.0", - "change-case-all": "1.0.14", - "common-tags": "1.8.2", - "import-from": "4.0.0", - "lodash": "~4.17.0", - "tslib": "~2.4.0" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-codegen/visitor-plugin-common/node_modules/@graphql-tools/utils": { - "version": "8.13.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.13.1.tgz", - "integrity": "sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw==", - "dev": true, - "dependencies": { - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-codegen/visitor-plugin-common/node_modules/change-case-all": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/change-case-all/-/change-case-all-1.0.14.tgz", - "integrity": "sha512-CWVm2uT7dmSHdO/z1CXT/n47mWonyypzBbuCy5tN7uMg22BsfkhwT6oHmFCAk+gL1LOOxhdbB9SZz3J1KTY3gA==", - "dev": true, - "dependencies": { - "change-case": "^4.1.2", - "is-lower-case": "^2.0.2", - "is-upper-case": "^2.0.2", - "lower-case": "^2.0.2", - "lower-case-first": "^2.0.2", - "sponge-case": "^1.0.1", - "swap-case": "^2.0.2", - "title-case": "^3.0.3", - "upper-case": "^2.0.2", - "upper-case-first": "^2.0.2" - } - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-codegen/visitor-plugin-common/node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "dev": true - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-tools/optimize": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@graphql-tools/optimize/-/optimize-1.4.0.tgz", - "integrity": "sha512-dJs/2XvZp+wgHH8T5J2TqptT9/6uVzIYvA6uFACha+ufvdMBedkfR4b4GbT8jAKLRARiqRTxy3dctnwkTM2tdw==", - "dev": true, - "dependencies": { - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-tools/relay-operation-optimizer": { - "version": "6.5.18", - "resolved": "https://registry.npmjs.org/@graphql-tools/relay-operation-optimizer/-/relay-operation-optimizer-6.5.18.tgz", - "integrity": "sha512-mc5VPyTeV+LwiM+DNvoDQfPqwQYhPV/cl5jOBjTgSniyaq8/86aODfMkrE2OduhQ5E00hqrkuL2Fdrgk0w1QJg==", - "dev": true, - "dependencies": { - "@ardatan/relay-compiler": "12.0.0", - "@graphql-tools/utils": "^9.2.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, - "node_modules/@graphql-codegen/typescript-react-apollo/node_modules/@graphql-tools/utils": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-9.2.1.tgz", - "integrity": "sha512-WUw506Ql6xzmOORlriNrD6Ugx+HjVgYxt9KCXD9mHAak+eaXSwuGGPyE60hy9xaDEoXKBsG7SkG69ybitaVl6A==", - "dev": true, - "dependencies": { - "@graphql-typed-document-node/core": "^3.1.1", - "tslib": "^2.4.0" - }, - "peerDependencies": { - "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" - } - }, "node_modules/@graphql-codegen/typescript/node_modules/@graphql-codegen/visitor-plugin-common": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.1.0.tgz", diff --git a/package.json b/package.json index 2ac0b139..76ae2408 100644 --- a/package.json +++ b/package.json @@ -52,10 +52,6 @@ "devDependencies": { "@babel/core": "7.24.4", "@graphql-codegen/cli": "5.0.2", - "@graphql-codegen/near-operation-file-preset": "3.0.0", - "@graphql-codegen/typescript": "4.0.6", - "@graphql-codegen/typescript-operations": "4.2.0", - "@graphql-codegen/typescript-react-apollo": "4.3.0", "@lingui/cli": "4.10.0", "@lingui/vite-plugin": "4.10.0", "@types/lodash": "4.17.0", diff --git a/src/auth/components/AdvertiserAddress.tsx b/src/auth/components/AdvertiserAddress.tsx index be54c63e..ea53111e 100644 --- a/src/auth/components/AdvertiserAddress.tsx +++ b/src/auth/components/AdvertiserAddress.tsx @@ -2,9 +2,9 @@ import { Box, Stack } from "@mui/material"; import { FormikTextField } from "@/form/FormikHelpers"; import { CountryPicker } from "@/components/Country/CountryPicker"; import { PropsWithChildren } from "react"; -import { AdvertiserBillingAddressFragment } from "@/graphql/advertiser.generated"; import { useLingui } from "@lingui/react"; import { msg } from "@lingui/macro"; +import { AdvertiserBillingAddressFragment } from "@/graphql-client/graphql"; interface Props { address: AdvertiserBillingAddressFragment["billingAddress"]; diff --git a/src/auth/components/AdvertiserDetailsForm.tsx b/src/auth/components/AdvertiserDetailsForm.tsx index 0ae2c15d..55551ed3 100644 --- a/src/auth/components/AdvertiserDetailsForm.tsx +++ b/src/auth/components/AdvertiserDetailsForm.tsx @@ -4,14 +4,14 @@ import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { Form, Formik } from "formik"; import { AdvertiserAddress } from "@/auth/components/AdvertiserAddress"; import { useAuthContext } from "@/auth/context/auth.hook"; -import { - useAdvertiserBillingAddressQuery, - useUpdateAdvertiserMutation, -} from "@/graphql/advertiser.generated"; import { getUser } from "@/auth/lib"; import { AdvertiserForm, initialAdvertiserForm } from "@/auth/components/types"; import { useHistory } from "react-router-dom"; -import { PaymentType } from "@/graphql/types"; +import { + AdvertiserBillingAddressDocument, + PaymentType, + UpdateAdvertiserDocument, +} from "@/graphql-client/graphql"; import { AdvertiserAgreed } from "@/auth/components/AdvertiserAgreed"; import { FormikSubmitButton } from "@/form/FormikButton"; import { AdvertiserSchema } from "@/validation/AdvertiserSchema"; @@ -19,6 +19,7 @@ import { useState } from "react"; import { useTrackWithMatomo } from "@/hooks/useTrackWithMatomo"; import _ from "lodash"; import { msg, Trans } from "@lingui/macro"; +import { useMutation, useQuery } from "@apollo/client"; export function AdvertiserDetailsForm() { const { trackMatomoEvent } = useTrackWithMatomo({ @@ -34,7 +35,7 @@ export function AdvertiserDetailsForm() { initialAdvertiserForm(!requiresPaymentAgree), ); - const [mutation] = useUpdateAdvertiserMutation({ + const [mutation] = useMutation(UpdateAdvertiserDocument, { async onCompleted() { const user = await getUser(); setSessionUser(user); @@ -46,7 +47,7 @@ export function AdvertiserDetailsForm() { }, }); - const { data, loading } = useAdvertiserBillingAddressQuery({ + const { data, loading } = useQuery(AdvertiserBillingAddressDocument, { variables: { id: advertiser.id }, onCompleted: (data) => { setInitial(initialAdvertiserForm(!requiresPaymentAgree, data.advertiser)); diff --git a/src/auth/components/types.ts b/src/auth/components/types.ts index 5c8db00f..73c8cef1 100644 --- a/src/auth/components/types.ts +++ b/src/auth/components/types.ts @@ -1,4 +1,4 @@ -import { AdvertiserBillingAddressFragment } from "@/graphql/advertiser.generated"; +import { AdvertiserBillingAddressFragment } from "@/graphql-client/graphql"; export type AdvertiserForm = { tracking: boolean; diff --git a/src/auth/context/auth.interface.ts b/src/auth/context/auth.interface.ts index cb52b02b..026982f1 100644 --- a/src/auth/context/auth.interface.ts +++ b/src/auth/context/auth.interface.ts @@ -1,6 +1,6 @@ import { ReactNode } from "react"; import { ResponseUser } from "../lib"; -import { PaymentType } from "@/graphql/types"; +import { PaymentType } from "@/graphql-client/graphql"; export type IAdvertiser = { id: string; diff --git a/src/auth/hooks/queries/useAdvertiser.ts b/src/auth/hooks/queries/useAdvertiser.ts index 990460b7..7e1c6ccf 100644 --- a/src/auth/hooks/queries/useAdvertiser.ts +++ b/src/auth/hooks/queries/useAdvertiser.ts @@ -1,6 +1,6 @@ import { useAuthContext } from "@/auth/context/auth.hook"; import { IAdvertiser } from "@/auth/context/auth.interface"; -import { PaymentType } from "@/graphql/types"; +import { PaymentType } from "@/graphql-client/graphql"; export function useAdvertiser(): { advertiser: IAdvertiser; diff --git a/src/auth/lib/index.ts b/src/auth/lib/index.ts index e5240bab..9c07a24b 100644 --- a/src/auth/lib/index.ts +++ b/src/auth/lib/index.ts @@ -1,6 +1,8 @@ -import { UserFragment } from "@/graphql/user.generated"; -import { AdvertiserFragment } from "@/graphql/advertiser.generated"; -import { PaymentType } from "@/graphql/types"; +import { + AdvertiserFragment, + PaymentType, + UserFragment, +} from "@/graphql-client/graphql"; import { buildAdServerEndpoint, buildAdServerV2Endpoint, diff --git a/src/components/Assets/AdvertiserAssets.tsx b/src/components/Assets/AdvertiserAssets.tsx index ddef2bfe..b912e360 100644 --- a/src/components/Assets/AdvertiserAssets.tsx +++ b/src/components/Assets/AdvertiserAssets.tsx @@ -1,24 +1,25 @@ -import { - AdvertiserImageFragment, - useAdvertiserImagesQuery, -} from "@/graphql/advertiser.generated"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; import { CardContainer } from "@/components/Card/CardContainer"; import { Grid, LinearProgress, Typography } from "@mui/material"; import MiniSideBar from "@/components/Drawer/MiniSideBar"; import { ImagePreview } from "@/components/Assets/ImagePreview"; -import { CampaignFormat } from "@/graphql/types"; +import { + AdvertiserImageFragment, + AdvertiserImagesDocument, + CampaignFormat, +} from "@/graphql-client/graphql"; import { RouteSelectionButton } from "@/components/Route/RouteSelectionButton"; import Box from "@mui/material/Box"; import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo"; import { msg, Trans } from "@lingui/macro"; import dayjs from "dayjs"; +import { useQuery } from "@apollo/client"; export function AdvertiserAssets() { useTrackMatomoPageView({ documentTitle: "Advertiser Assets" }); const { advertiser } = useAdvertiser(); - const { data, loading, error } = useAdvertiserImagesQuery({ + const { data, loading, error } = useQuery(AdvertiserImagesDocument, { variables: { id: advertiser.id }, initialFetchPolicy: "cache-and-network", nextFetchPolicy: "cache-only", diff --git a/src/components/Assets/ImageAutocomplete.tsx b/src/components/Assets/ImageAutocomplete.tsx index c63c2ede..a63d606f 100644 --- a/src/components/Assets/ImageAutocomplete.tsx +++ b/src/components/Assets/ImageAutocomplete.tsx @@ -1,4 +1,3 @@ -import { useAdvertiserImagesQuery } from "@/graphql/advertiser.generated"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { Autocomplete, createFilterOptions, TextField } from "@mui/material"; import { useEffect, useState } from "react"; @@ -6,6 +5,8 @@ import { useField } from "formik"; import { UploadImage } from "@/components/Assets/UploadImage"; import { useLingui } from "@lingui/react"; import { msg } from "@lingui/macro"; +import { useQuery } from "@apollo/client"; +import { AdvertiserImagesDocument } from "@/graphql-client/graphql"; type ImageOption = { label: string; image?: string }; @@ -18,7 +19,7 @@ export function ImageAutocomplete(props: { name: string }) { const showError = hasError && meta.touched; const { advertiser } = useAdvertiser(); const [options, setOptions] = useState(); - const { data, loading } = useAdvertiserImagesQuery({ + const { data, loading } = useQuery(AdvertiserImagesDocument, { variables: { id: advertiser.id }, }); const { _ } = useLingui(); diff --git a/src/components/Assets/UploadImage.tsx b/src/components/Assets/UploadImage.tsx index a14944ca..2ba920c1 100644 --- a/src/components/Assets/UploadImage.tsx +++ b/src/components/Assets/UploadImage.tsx @@ -14,7 +14,7 @@ import { StepLabel, Stepper, } from "@mui/material"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { useUploadFile } from "@/components/Assets/hooks/useUploadFile"; import { NewImageButton } from "@/components/Navigation/NewImageButton"; import { Trans } from "@lingui/macro"; diff --git a/src/components/Assets/hooks/useUploadFile.ts b/src/components/Assets/hooks/useUploadFile.ts index 7944c713..38cc52be 100644 --- a/src/components/Assets/hooks/useUploadFile.ts +++ b/src/components/Assets/hooks/useUploadFile.ts @@ -1,14 +1,15 @@ import { buildAdServerEndpoint, getEnvConfig } from "@/util/environment"; import { useCallback, useState } from "react"; import _ from "lodash"; -import { - refetchAdvertiserImagesQuery, - useUploadAdvertiserImageMutation, -} from "@/graphql/advertiser.generated"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; -import { CampaignFormat } from "@/graphql/types"; +import { + AdvertiserImagesDocument, + CampaignFormat, + UploadAdvertiserImageDocument, +} from "@/graphql-client/graphql"; import { UploadConfig } from "@/components/Assets/UploadImage"; import { t } from "@lingui/macro"; +import { useMutation } from "@apollo/client"; interface PutUploadResponse { // the pre-signed url to which the file should be uploaded to @@ -29,9 +30,9 @@ export const useUploadFile = ({ onComplete }: Props = {}) => { const [state, setState] = useState(); const [loading, setLoading] = useState(false); - const [mutate] = useUploadAdvertiserImageMutation({ + const [mutate] = useMutation(UploadAdvertiserImageDocument, { refetchQueries: [ - { ...refetchAdvertiserImagesQuery({ id: advertiser.id }) }, + { query: AdvertiserImagesDocument, variables: { id: advertiser.id } }, ], onError(e) { setError(e.message); diff --git a/src/components/Campaigns/CloneCampaign.tsx b/src/components/Campaigns/CloneCampaign.tsx index edcd14df..9ffc8503 100644 --- a/src/components/Campaigns/CloneCampaign.tsx +++ b/src/components/Campaigns/CloneCampaign.tsx @@ -9,22 +9,24 @@ import { LinearProgress, Tooltip, } from "@mui/material"; -import { - CampaignSummaryFragment, - useCreateCampaignMutation, - useLoadCampaignLazyQuery, -} from "@/graphql/campaign.generated"; import { useHistory } from "react-router-dom"; import { useContext, useState } from "react"; -import { refetchAdvertiserCampaignsQuery } from "@/graphql/advertiser.generated"; import { createCampaignFromFragment } from "@/form/fragmentUtil"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import ContentCopyIcon from "@mui/icons-material/ContentCopy"; import { useUser } from "@/auth/hooks/queries/useUser"; import { FilterContext } from "@/state/context"; -import { CampaignFormat, CampaignSource } from "@/graphql/types"; +import { + AdvertiserCampaignsDocument, + CampaignFormat, + CampaignSource, + CampaignSummaryFragment, + CreateCampaignDocument, + LoadCampaignDocument, +} from "@/graphql-client/graphql"; import { msg, Trans } from "@lingui/macro"; import { useLingui } from "@lingui/react"; +import { useLazyQuery, useMutation } from "@apollo/client"; interface Props { campaign?: CampaignSummaryFragment; @@ -40,14 +42,16 @@ export function CloneCampaign({ campaign, disabled }: Props) { const { _ } = useLingui(); const unableToClone = _(msg`Unable to clone campaign`); - const [getCampaign, { loading: getLoading }] = useLoadCampaignLazyQuery(); - const [copyCampaign, { loading }] = useCreateCampaignMutation({ + const [getCampaign, { loading: getLoading }] = + useLazyQuery(LoadCampaignDocument); + const [copyCampaign, { loading }] = useMutation(CreateCampaignDocument, { refetchQueries: [ { - ...refetchAdvertiserCampaignsQuery({ + query: AdvertiserCampaignsDocument, + variables: { id: advertiser.id, filter: { from: fromDate?.toISOString() }, - }), + }, }, ], onCompleted(data) { diff --git a/src/components/Creatives/CreateCreativeButton.tsx b/src/components/Creatives/CreateCreativeButton.tsx index c9cd5c6c..d84cbfbb 100644 --- a/src/components/Creatives/CreateCreativeButton.tsx +++ b/src/components/Creatives/CreateCreativeButton.tsx @@ -5,15 +5,16 @@ import { initialCreative, } from "@/user/views/adsManager/types"; import _ from "lodash"; -import { - refetchAdvertiserCreativesQuery, - useCreateCreativeMutation, -} from "@/graphql/creative.generated"; import { useField, useFormikContext } from "formik"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { LoadingButton } from "@mui/lab"; import { validCreativeFields } from "@/user/library"; import { Trans } from "@lingui/macro"; +import { useMutation } from "@apollo/client"; +import { + AdvertiserCreativesDocument, + CreateCreativeDocument, +} from "@/graphql-client/graphql"; export function CreateCreativeButton() { const { values, setFieldValue } = useFormikContext(); @@ -21,7 +22,7 @@ export function CreateCreativeButton() { const [, newMeta, newHelper] = useField("newCreative"); const { advertiser } = useAdvertiser(); - const [create, { loading }] = useCreateCreativeMutation({ + const [create, { loading }] = useMutation(CreateCreativeDocument, { async onCompleted(data) { newHelper.setValue(initialCreative); newHelper.setTouched(false); @@ -35,7 +36,8 @@ export function CreateCreativeButton() { }, refetchQueries: [ { - ...refetchAdvertiserCreativesQuery({ advertiserId: advertiser.id }), + query: AdvertiserCreativesDocument, + variables: { advertiserId: advertiser.id }, }, ], }); diff --git a/src/components/Creatives/CreativeCampaigns.tsx b/src/components/Creatives/CreativeCampaigns.tsx index 2f4bf704..204eee51 100644 --- a/src/components/Creatives/CreativeCampaigns.tsx +++ b/src/components/Creatives/CreativeCampaigns.tsx @@ -1,4 +1,3 @@ -import { CampaignsForCreativeQuery } from "@/graphql/creative.generated"; import { Link as RouterLink } from "react-router-dom"; import { Link, @@ -14,6 +13,7 @@ import _ from "lodash"; import { Status } from "@/components/Campaigns/Status"; import { ApolloError } from "@apollo/client"; import { msg, Trans } from "@lingui/macro"; +import { CampaignsForCreativeQuery } from "@/graphql-client/graphql"; interface Props { data?: CampaignsForCreativeQuery; diff --git a/src/components/Creatives/CreativeForm.tsx b/src/components/Creatives/CreativeForm.tsx index 8f3c1399..f32a7731 100644 --- a/src/components/Creatives/CreativeForm.tsx +++ b/src/components/Creatives/CreativeForm.tsx @@ -12,14 +12,17 @@ import { SubmitPanel } from "@/components/Button/SubmitPanel"; import { useGetCreativeDetails } from "@/components/Creatives/hooks/useGetCreativeDetails"; import { useSubmitCreative } from "@/components/Creatives/hooks/useSubmitCreative"; import CreativeCampaigns from "@/components/Creatives/CreativeCampaigns"; -import { useCampaignsForCreativeQuery } from "@/graphql/creative.generated"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; -import { CreativeInput } from "@/graphql/types"; -import { CampaignFragment } from "@/graphql/campaign.generated"; +import { + CampaignFragment, + CampaignsForCreativeDocument, + CreativeInput, +} from "@/graphql-client/graphql"; import _ from "lodash"; import { isReviewableState } from "@/util/displayState"; import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo"; import { msg, Trans } from "@lingui/macro"; +import { useQuery } from "@apollo/client"; interface Params { id: string; @@ -40,7 +43,7 @@ export function CreativeForm() { data: campaigns, loading: cLoading, error: cError, - } = useCampaignsForCreativeQuery({ + } = useQuery(CampaignsForCreativeDocument, { variables: { creativeId: id, advertiserId: advertiser.id }, skip: id === "new", }); diff --git a/src/components/Creatives/CreativeList.tsx b/src/components/Creatives/CreativeList.tsx index 5af19c5e..371fb5e0 100644 --- a/src/components/Creatives/CreativeList.tsx +++ b/src/components/Creatives/CreativeList.tsx @@ -1,7 +1,3 @@ -import { - CreativeFragment, - useAdvertiserCreativesQuery, -} from "@/graphql/creative.generated"; import { uiTextForCreativeTypeCode } from "@/user/library"; import { CardContainer } from "@/components/Card/CardContainer"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; @@ -18,13 +14,18 @@ import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo"; import { msg } from "@lingui/macro"; import { Trans, useLingui } from "@lingui/react"; import { MessageDescriptor } from "@lingui/core"; +import { useQuery } from "@apollo/client"; +import { + AdvertiserCreativesDocument, + CreativeFragment, +} from "@/graphql-client/graphql"; const ALLOWED_TYPES = ["notification_all_v1", "inline_content_all_v1"]; export function CreativeList() { useTrackMatomoPageView({ documentTitle: "Advertiser Creatives" }); const { advertiser } = useAdvertiser(); const { _ } = useLingui(); - const { data, error, loading } = useAdvertiserCreativesQuery({ + const { data, error, loading } = useQuery(AdvertiserCreativesDocument, { variables: { advertiserId: advertiser.id, }, diff --git a/src/components/Creatives/CreativeSelect.tsx b/src/components/Creatives/CreativeSelect.tsx index af78efc7..9c59db59 100644 --- a/src/components/Creatives/CreativeSelect.tsx +++ b/src/components/Creatives/CreativeSelect.tsx @@ -7,7 +7,7 @@ import _ from "lodash"; import { PropsWithChildren, useContext, useState } from "react"; import { FormContext } from "@/state/context"; import { useFormikContext } from "formik"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { ImagePreview } from "@/components/Assets/ImagePreview"; import { Trans } from "@lingui/macro"; import dayjs from "dayjs"; diff --git a/src/components/Creatives/CreativeSpecificPreview.tsx b/src/components/Creatives/CreativeSpecificPreview.tsx index 8b5548e8..1514a393 100644 --- a/src/components/Creatives/CreativeSpecificPreview.tsx +++ b/src/components/Creatives/CreativeSpecificPreview.tsx @@ -1,4 +1,4 @@ -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { BoxContainer } from "@/components/Box/BoxContainer"; import { NotificationPreview } from "@/components/Creatives/NotificationPreview"; import { Stack, Typography } from "@mui/material"; diff --git a/src/components/Creatives/CreativeStatusSwitch.tsx b/src/components/Creatives/CreativeStatusSwitch.tsx index 0fe3ac66..bdea667b 100644 --- a/src/components/Creatives/CreativeStatusSwitch.tsx +++ b/src/components/Creatives/CreativeStatusSwitch.tsx @@ -1,10 +1,3 @@ -import { - CreativeFragment, - refetchAdvertiserCreativesQuery, - refetchCampaignsForCreativeQuery, - useCampaignsForCreativeLazyQuery, - useUpdateCreativeMutation, -} from "@/graphql/creative.generated"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { Box, @@ -23,6 +16,13 @@ import _ from "lodash"; import { validCreativeFields } from "@/user/library"; import { isReviewableState } from "@/util/displayState"; import { Trans } from "@lingui/macro"; +import { + AdvertiserCreativesDocument, + CampaignsForCreativeDocument, + CreativeFragment, + UpdateCreativeDocument, +} from "@/graphql-client/graphql"; +import { useLazyQuery, useMutation } from "@apollo/client"; interface Props { creative: CreativeFragment; @@ -40,19 +40,28 @@ export function CreativeStatusSwitch({ creative }: Props) { [], ); const [creativeState, setCreativeState] = useState(input.state); - const [update, { loading: updateLoading }] = useUpdateCreativeMutation({ - refetchQueries: [ - refetchAdvertiserCreativesQuery({ advertiserId: advertiser.id }), - refetchCampaignsForCreativeQuery({ - creativeId: creative.id, - advertiserId: advertiser.id, - }), - ], - onCompleted() { - setRelatedCampaigns([]); + const [update, { loading: updateLoading }] = useMutation( + UpdateCreativeDocument, + { + refetchQueries: [ + { + query: AdvertiserCreativesDocument, + variables: { advertiserId: advertiser.id }, + }, + { + query: CampaignsForCreativeDocument, + variables: { + creativeId: creative.id, + advertiserId: advertiser.id, + }, + }, + ], + onCompleted() { + setRelatedCampaigns([]); + }, }, - }); - const [campaigns, { loading }] = useCampaignsForCreativeLazyQuery({ + ); + const [campaigns, { loading }] = useLazyQuery(CampaignsForCreativeDocument, { variables: { creativeId: creative.id, advertiserId: advertiser.id }, }); diff --git a/src/components/Creatives/CreativeType.tsx b/src/components/Creatives/CreativeType.tsx index 88db52ea..8200f8ab 100644 --- a/src/components/Creatives/CreativeType.tsx +++ b/src/components/Creatives/CreativeType.tsx @@ -1,6 +1,6 @@ import { Box, ListItemButton, List, Typography, Stack } from "@mui/material"; import { useFormikContext } from "formik"; -import { CreativeInput } from "@/graphql/types"; +import { CreativeInput } from "@/graphql-client/graphql"; import { FormatHelp } from "@/components/Button/FormatHelp"; import { msg } from "@lingui/macro"; import { Trans } from "@lingui/react"; diff --git a/src/components/Creatives/NewsPreview.tsx b/src/components/Creatives/NewsPreview.tsx index c5da7443..a8d93ed5 100644 --- a/src/components/Creatives/NewsPreview.tsx +++ b/src/components/Creatives/NewsPreview.tsx @@ -2,7 +2,7 @@ import { Box, Card, Typography } from "@mui/material"; import { ImagePreview } from "@/components/Assets/ImagePreview"; import { useField, useFormikContext } from "formik"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; -import { CreativeInput } from "@/graphql/types"; +import { CreativeInput } from "@/graphql-client/graphql"; import { Trans } from "@lingui/macro"; export function NewsPreview() { diff --git a/src/components/Creatives/NotificationPreview.tsx b/src/components/Creatives/NotificationPreview.tsx index dd60c44c..9ecc9ffa 100644 --- a/src/components/Creatives/NotificationPreview.tsx +++ b/src/components/Creatives/NotificationPreview.tsx @@ -1,7 +1,7 @@ import { Box, Paper, Stack, Typography } from "@mui/material"; import logo from "@/assets/images/brave_logo_icon.png"; import { useField, useFormikContext } from "formik"; -import { CreativeInput } from "@/graphql/types"; +import { CreativeInput } from "@/graphql-client/graphql"; import { Trans } from "@lingui/macro"; export function NotificationPreview(props: { diff --git a/src/components/Creatives/hooks/useGetCreativeDetails.tsx b/src/components/Creatives/hooks/useGetCreativeDetails.tsx index d5a5fb8f..15688991 100644 --- a/src/components/Creatives/hooks/useGetCreativeDetails.tsx +++ b/src/components/Creatives/hooks/useGetCreativeDetails.tsx @@ -1,13 +1,13 @@ -import { useLoadCreativeQuery } from "@/graphql/creative.generated"; -import { CreativeInput } from "@/graphql/types"; +import { CreativeInput, LoadCreativeDocument } from "@/graphql-client/graphql"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { useLingui } from "@lingui/react"; import { msg } from "@lingui/macro"; +import { useQuery } from "@apollo/client"; export function useGetCreativeDetails(props: { id: string }) { const { advertiser } = useAdvertiser(); const isNew = props.id === "new"; - const { data, loading, error } = useLoadCreativeQuery({ + const { data, loading, error } = useQuery(LoadCreativeDocument, { variables: { id: props.id }, skip: isNew, }); diff --git a/src/components/Creatives/hooks/useSubmitCreative.tsx b/src/components/Creatives/hooks/useSubmitCreative.tsx index b01f29c1..3b2057b0 100644 --- a/src/components/Creatives/hooks/useSubmitCreative.tsx +++ b/src/components/Creatives/hooks/useSubmitCreative.tsx @@ -1,15 +1,16 @@ -import { - refetchAdvertiserCreativesQuery, - useCreateCreativeMutation, - useUpdateCreativeMutation, -} from "@/graphql/creative.generated"; import { useCallback } from "react"; -import { CreativeInput } from "@/graphql/types"; +import { + AdvertiserCreativesDocument, + CreateCreativeDocument, + CreativeInput, + UpdateCreativeDocument, +} from "@/graphql-client/graphql"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { useHistory } from "react-router-dom"; import { validCreativeFields } from "@/user/library"; import _ from "lodash"; import { useTrackMatomoEvent } from "@/hooks/useTrackWithMatomo"; +import { useMutation } from "@apollo/client"; export function useSubmitCreative(props: { id: string }) { const { trackMatomoEvent } = useTrackMatomoEvent(); @@ -17,7 +18,10 @@ export function useSubmitCreative(props: { id: string }) { const isNew = props.id === "new"; const { advertiser } = useAdvertiser(); const refetchQueries = [ - refetchAdvertiserCreativesQuery({ advertiserId: advertiser.id }), + { + query: AdvertiserCreativesDocument, + variables: { advertiserId: advertiser.id }, + }, ]; const onCompleted = () => { trackMatomoEvent("creative", isNew ? "creation-success" : "update-success"); @@ -28,14 +32,14 @@ export function useSubmitCreative(props: { id: string }) { }; const [createCreative, { error: createError, loading: createLoading }] = - useCreateCreativeMutation({ + useMutation(CreateCreativeDocument, { refetchQueries, onCompleted, onError, }); const [updateCreative, { error: updateError, loading: updateLoading }] = - useUpdateCreativeMutation({ + useMutation(UpdateCreativeDocument, { refetchQueries, onCompleted, onError, diff --git a/src/components/Datagrid/renderers.tsx b/src/components/Datagrid/renderers.tsx index 5e8bb5a5..6d5b5d5b 100644 --- a/src/components/Datagrid/renderers.tsx +++ b/src/components/Datagrid/renderers.tsx @@ -1,23 +1,25 @@ import { Box, Tooltip } from "@mui/material"; import _ from "lodash"; import { ReactElement, ReactNode, useContext } from "react"; -import { - CampaignSummaryFragment, - refetchLoadCampaignAdsQuery, - refetchLoadCampaignQuery, - useUpdateCampaignMutation, -} from "@/graphql/campaign.generated"; -import { useUpdateAdSetMutation } from "@/graphql/ad-set.generated"; + import { OnOff } from "@/components/Switch/OnOff"; import { displayFromCampaignState } from "@/util/displayState"; import { CampaignExtras } from "@/user/adSet/AdSetList"; import { FilterContext } from "@/state/context"; -import { refetchAdvertiserCampaignsQuery } from "@/graphql/advertiser.generated"; -import { UpdateAdSetInput } from "@/graphql/types"; +import { + AdvertiserCampaignsDocument, + CampaignSummaryFragment, + LoadCampaignAdsDocument, + LoadCampaignDocument, + UpdateAdSetInput, + UpdateCampaignDocument, +} from "@/graphql-client/graphql"; import { toLocaleString } from "@/util/bignumber"; import BigNumber from "bignumber.js"; import { Trans } from "@lingui/macro"; import dayjs from "dayjs"; +import { useMutation } from "@apollo/client"; +import { UpdateAdSetDocument } from "@/graphql-client/graphql"; export type CellValueRenderer = (value: any) => ReactNode; const ADS_DEFAULT_TIMEZONE = "America/New_York"; @@ -84,13 +86,14 @@ export function campaignOnOffState( c: CampaignSummaryFragment & { advertiserId: string }, ): ReactNode { const { fromDate } = useContext(FilterContext); - const [updateCampaign, { loading }] = useUpdateCampaignMutation({ + const [updateCampaign, { loading }] = useMutation(UpdateCampaignDocument, { refetchQueries: [ { - ...refetchAdvertiserCampaignsQuery({ + query: AdvertiserCampaignsDocument, + variables: { id: c.advertiserId, filter: { from: fromDate?.toISOString() }, - }), + }, }, ], }); @@ -115,10 +118,16 @@ export function adSetOnOffState( c: Omit & CampaignExtras, isInline?: boolean, ): ReactNode { - const [updateAdSet, { loading }] = useUpdateAdSetMutation({ + const [updateAdSet, { loading }] = useMutation(UpdateAdSetDocument, { refetchQueries: [ - refetchLoadCampaignAdsQuery({ id: c.campaignId }), - refetchLoadCampaignQuery({ id: c.campaignId }), + { + query: LoadCampaignAdsDocument, + variables: { id: c.campaignId }, + }, + { + query: LoadCampaignDocument, + variables: { id: c.campaignId }, + }, ], }); diff --git a/src/components/Location/LocationPicker.tsx b/src/components/Location/LocationPicker.tsx index ceb28de2..286533f5 100644 --- a/src/components/Location/LocationPicker.tsx +++ b/src/components/Location/LocationPicker.tsx @@ -3,16 +3,16 @@ import CheckBoxIcon from "@mui/icons-material/CheckBox"; import { Autocomplete, Checkbox, TextField } from "@mui/material"; import { useField } from "formik"; import _ from "lodash"; -import { useActiveGeocodesQuery } from "@/graphql/common.generated"; -import { GeocodeInput } from "@/graphql/types"; +import { ActiveGeocodesDocument, GeocodeInput } from "@/graphql-client/graphql"; import { useLingui } from "@lingui/react"; import { msg, Trans } from "@lingui/macro"; +import { useQuery } from "@apollo/client"; const icon = ; const checkedIcon = ; export const LocationPicker = () => { - const { data } = useActiveGeocodesQuery(); + const { data } = useQuery(ActiveGeocodesDocument); const sorted = _.sortBy(data?.geocodes ?? [], "code"); const [formProps, meta, helper] = useField("geoTargets"); const errorMessage = meta.error; diff --git a/src/components/Segment/SegmentPicker.tsx b/src/components/Segment/SegmentPicker.tsx index b804a4cd..4edc53e4 100644 --- a/src/components/Segment/SegmentPicker.tsx +++ b/src/components/Segment/SegmentPicker.tsx @@ -3,12 +3,13 @@ import CheckBoxIcon from "@mui/icons-material/CheckBox"; import { Autocomplete, Box, Checkbox, TextField } from "@mui/material"; import { useField } from "formik"; import _ from "lodash"; -import { SegmentFragment, useSegmentsQuery } from "@/graphql/common.generated"; import { useEffect } from "react"; import { FormikSwitch } from "@/form/FormikHelpers"; import { segmentNameWithNoDash } from "@/util/segment"; import { useLingui } from "@lingui/react"; import { msg } from "@lingui/macro"; +import { useQuery } from "@apollo/client"; +import { SegmentFragment, SegmentsDocument } from "@/graphql-client/graphql"; const icon = ; const checkedIcon = ; @@ -18,7 +19,7 @@ interface Props { } export const SegmentPicker = ({ idx }: Props) => { - const { data } = useSegmentsQuery(); + const { data } = useQuery(SegmentsDocument); const activeSegments = [...(data?.segments?.data ?? [])].sort((a, b) => { if (a.name === "Untargeted" || b.name === "Untargeted") return 1; return a.name.toLowerCase().localeCompare(b.name.toLowerCase()); diff --git a/src/components/Switch/OnOff.tsx b/src/components/Switch/OnOff.tsx index b82bd224..ec1d23c6 100644 --- a/src/components/Switch/OnOff.tsx +++ b/src/components/Switch/OnOff.tsx @@ -1,5 +1,5 @@ import { Switch, Tooltip, Typography } from "@mui/material"; -import { CampaignSource } from "@/graphql/types"; +import { CampaignSource } from "@/graphql-client/graphql"; import { Trans } from "@lingui/macro"; import dayjs from "dayjs"; diff --git a/src/components/Url/use-url-validation.ts b/src/components/Url/use-url-validation.ts index d25f4b22..a435236e 100644 --- a/src/components/Url/use-url-validation.ts +++ b/src/components/Url/use-url-validation.ts @@ -1,7 +1,8 @@ import { - useValidateTargetUrlLazyQuery, + ValidateTargetUrlDocument, ValidateTargetUrlQuery, -} from "@/graphql/url.generated"; +} from "@/graphql-client/graphql"; +import { useLazyQuery } from "@apollo/client"; import _ from "lodash"; import { useEffect, useMemo, useState } from "react"; @@ -29,7 +30,7 @@ export function useUrlValidation(url: string): UrlValidationResult { const [response, setResponse] = useState(); const [error, setError] = useState(); - const [validateUrl] = useValidateTargetUrlLazyQuery({ + const [validateUrl] = useLazyQuery(ValidateTargetUrlDocument, { fetchPolicy: "no-cache", }); diff --git a/src/form/fragmentUtil.ts b/src/form/fragmentUtil.ts index a2fc109f..20832452 100644 --- a/src/form/fragmentUtil.ts +++ b/src/form/fragmentUtil.ts @@ -1,6 +1,9 @@ -import { CreateAdSetInput, CreateCampaignInput } from "@/graphql/types"; -import { CampaignFragment } from "@/graphql/campaign.generated"; -import { AdSetFragment } from "@/graphql/ad-set.generated"; +import { + AdSetFragment, + CampaignFragment, + CreateAdSetInput, + CreateCampaignInput, +} from "@/graphql-client/graphql"; import dayjs from "dayjs"; export function createCampaignFromFragment( diff --git a/src/graphql-client/gql.ts b/src/graphql-client/gql.ts new file mode 100644 index 00000000..ffdfe1df --- /dev/null +++ b/src/graphql-client/gql.ts @@ -0,0 +1,327 @@ +/* eslint-disable */ +import * as types from './graphql'; +import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + +/** + * Map of all GraphQL operations in the project. + * + * This map has several performance disadvantages: + * 1. It is not tree-shakeable, so it will include all operations in the project. + * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle. + * 3. It does not support dead code elimination, so it will add unused operations. + * + * Therefore it is highly recommended to use the babel or swc plugin for production. + */ +const documents = { + "\n fragment Ad on Ad {\n id\n state\n price\n priceType\n creative {\n ...Creative\n }\n }\n \n": types.AdFragmentDoc, + "\n 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 \n": types.AdSetFragmentDoc, + "\n fragment 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 \n": types.AdSetWithDeletedAdsFragmentDoc, + "\n mutation createAdSet($createAdSetInput: CreateAdSetInput!) {\n createAdSet(createAdSetInput: $createAdSetInput) {\n ...AdSet\n }\n }\n \n": types.CreateAdSetDocument, + "\n mutation updateAdSet($updateAdSetInput: UpdateAdSetInput!) {\n updateAdSet(updateAdSetInput: $updateAdSetInput) {\n ...AdSet\n }\n }\n \n": types.UpdateAdSetDocument, + "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 price\n priceType\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, + "\n fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n }\n": types.AdvertiserBillingAddressFragmentDoc, + "\n fragment AdvertiserSummary on Advertiser {\n id\n name\n state\n billingEmail\n additionalBillingEmails\n createdAt\n modifiedAt\n publicKey\n }\n": types.AdvertiserSummaryFragmentDoc, + "\n fragment Advertiser on Advertiser {\n ...AdvertiserSummary\n referrer\n phone\n selfServiceManageCampaign\n selfServiceSetPrice\n }\n \n": types.AdvertiserFragmentDoc, + "\n fragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n }\n \n": types.AdvertiserCampaignsFragmentDoc, + "\n fragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n }\n": types.AdvertiserImageFragmentDoc, + "\n fragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n }\n": types.AdvertiserPriceFragmentDoc, + "\n query advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n }\n": types.AdvertiserDocument, + "\n mutation updateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\n id\n publicKey\n }\n }\n": types.UpdateAdvertiserDocument, + "\n query advertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n }\n \n": types.AdvertiserCampaignsDocument, + "\n query advertiserImages($id: String!) {\n advertiser(id: $id) {\n images {\n ...AdvertiserImage\n }\n }\n }\n \n": types.AdvertiserImagesDocument, + "\n query advertiserPrices($id: String!) {\n advertiser(id: $id) {\n prices {\n ...AdvertiserPrice\n }\n }\n }\n \n": types.AdvertiserPricesDocument, + "\n query advertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n }\n \n": types.AdvertiserBillingAddressDocument, + "\n mutation uploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n name\n }\n }\n": types.UploadAdvertiserImageDocument, + "fragment AdvertiserSummary on Advertiser {\n id\n name\n state\n billingEmail\n additionalBillingEmails\n createdAt\n modifiedAt\n publicKey\n}\n\nfragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nfragment Advertiser on Advertiser {\n ...AdvertiserSummary\n referrer\n phone\n selfServiceManageCampaign\n selfServiceSetPrice\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 images {\n ...AdvertiserImage\n }\n }\n}\n\nquery advertiserPrices($id: String!) {\n advertiser(id: $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 name\n }\n}": types.AdvertiserSummaryFragmentDoc, + "\n 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 downvote\n price\n android\n ios\n linux\n macos\n windows\n }\n": types.EngagementFragmentDoc, + "\n fragment CampaignWithEngagements on Campaign {\n id\n name\n state\n budget\n spent\n currency\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 \n": types.CampaignWithEngagementsFragmentDoc, + "\n fragment CampaignMetricSummaryValues on Metrics {\n click\n impression\n siteVisit\n spendUsd\n rates {\n clickThrough\n }\n }\n": types.CampaignMetricSummaryValuesFragmentDoc, + "\n fragment 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": types.CampaignMetricDetailValuesFragmentDoc, + "\n fragment DailyValues on Performance {\n dimensions {\n day\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n \n": types.DailyValuesFragmentDoc, + "\n fragment AdSetValues on Performance {\n dimensions {\n adSet {\n id\n name\n state\n billingType\n }\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n \n": types.AdSetValuesFragmentDoc, + "\n query analyticOverview($id: String!) {\n campaign(id: $id) {\n ...CampaignWithEngagements\n }\n }\n \n": types.AnalyticOverviewDocument, + "\n query 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 \n": types.CampaignMetricsDocument, + "\n query fetchDailyMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...DailyValues\n }\n total {\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n }\n }\n \n \n": types.FetchDailyMetricsForCampaignDocument, + "\n query fetchAdSetMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...AdSetValues\n }\n }\n }\n \n": types.FetchAdSetMetricsForCampaignDocument, + "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 downvote\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 currency\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, + "\n 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 paymentType\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 \n": types.CampaignFragmentDoc, + "\n fragment 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 spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\n }\n": types.CampaignSummaryFragmentDoc, + "\n fragment 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 \n": types.CampaignAdsFragmentDoc, + "\n query LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n }\n \n": types.LoadCampaignDocument, + "\n query LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n }\n \n": types.LoadCampaignAdsDocument, + "\n query LoadCampaignSummary($id: String!) {\n campaign(id: $id) {\n ...CampaignSummary\n }\n }\n \n": types.LoadCampaignSummaryDocument, + "\n mutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n }\n": types.CreateCampaignDocument, + "\n mutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n }\n": types.UpdateCampaignDocument, + "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 paymentType\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 spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\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\nquery LoadCampaignSummary($id: String!) {\n campaign(id: $id) {\n ...CampaignSummary\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, + "\n fragment Geocode on Geocode {\n code\n name\n }\n": types.GeocodeFragmentDoc, + "\n fragment Segment on SegmentsEntry {\n code\n name\n }\n": types.SegmentFragmentDoc, + "\n query ActiveGeocodes {\n geocodes {\n ...Geocode\n }\n }\n \n": types.ActiveGeocodesDocument, + "\n query Segments {\n segments {\n data {\n ...Segment\n }\n }\n }\n \n": types.SegmentsDocument, + "fragment Geocode on Geocode {\n code\n name\n}\n\nfragment Segment on SegmentsEntry {\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, + "\n fragment Creative on Creative {\n id\n createdAt\n modifiedAt\n name\n state\n type {\n code\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadNewTabPage {\n logo {\n imageUrl\n alt\n companyName\n destinationUrl\n }\n wallpapers {\n imageUrl\n focalPoint {\n x\n y\n }\n }\n }\n payloadInlineContent {\n title\n ctaText\n imageUrl\n targetUrl\n dimensions\n description\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadSearch {\n body\n title\n targetUrl\n }\n payloadSearchHomepage {\n body\n imageUrl\n imageDarkModeUrl\n targetUrl\n title\n ctaText\n }\n }\n": types.CreativeFragmentDoc, + "\n query advertiserCreatives($advertiserId: String!) {\n advertiser(id: $advertiserId) {\n id\n creatives {\n ...Creative\n }\n }\n }\n \n": types.AdvertiserCreativesDocument, + "\n mutation createCreative($input: CreativeInput!) {\n createCreative(creative: $input) {\n ...Creative\n }\n }\n \n": types.CreateCreativeDocument, + "\n mutation updateCreative($id: String!, $input: CreativeInput!) {\n updateCreative(id: $id, creative: $input) {\n ...Creative\n }\n }\n \n": types.UpdateCreativeDocument, + "\n query loadCreative($id: String!) {\n creative(id: $id) {\n ...Creative\n }\n }\n \n": types.LoadCreativeDocument, + "\n query campaignsForCreative($creativeId: String!, $advertiserId: String!) {\n creativeCampaigns(creativeId: $creativeId, advertiserId: $advertiserId) {\n id\n name\n state\n format\n }\n }\n": types.CampaignsForCreativeDocument, + "fragment Creative on Creative {\n id\n createdAt\n modifiedAt\n name\n state\n type {\n code\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadNewTabPage {\n logo {\n imageUrl\n alt\n companyName\n destinationUrl\n }\n wallpapers {\n imageUrl\n focalPoint {\n x\n y\n }\n }\n }\n payloadInlineContent {\n title\n ctaText\n imageUrl\n targetUrl\n dimensions\n description\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadSearch {\n body\n title\n targetUrl\n }\n payloadSearchHomepage {\n body\n imageUrl\n imageDarkModeUrl\n targetUrl\n title\n ctaText\n }\n}\n\nquery advertiserCreatives($advertiserId: String!) {\n advertiser(id: $advertiserId) {\n id\n creatives {\n ...Creative\n }\n }\n}\n\nmutation createCreative($input: CreativeInput!) {\n createCreative(creative: $input) {\n ...Creative\n }\n}\n\nmutation updateCreative($id: String!, $input: CreativeInput!) {\n updateCreative(id: $id, creative: $input) {\n ...Creative\n }\n}\n\nquery loadCreative($id: String!) {\n creative(id: $id) {\n ...Creative\n }\n}\n\nquery campaignsForCreative($creativeId: String!, $advertiserId: String!) {\n creativeCampaigns(creativeId: $creativeId, advertiserId: $advertiserId) {\n id\n name\n state\n format\n }\n}": types.CreativeFragmentDoc, + "\n query validateTargetUrl($url: String!) {\n validateTargetUrl(targetUrl: $url) {\n isValid\n redirects {\n url\n violations {\n summary\n detail\n }\n }\n }\n }\n": types.ValidateTargetUrlDocument, + "query validateTargetUrl($url: String!) {\n validateTargetUrl(targetUrl: $url) {\n isValid\n redirects {\n url\n violations {\n summary\n detail\n }\n }\n }\n}": types.ValidateTargetUrlDocument, + "\n fragment User on User {\n email\n fullName\n id\n role\n }\n": types.UserFragmentDoc, + "\n query LoadUser($id: String!) {\n user(id: $id) {\n ...User\n }\n }\n \n": types.LoadUserDocument, + "\n mutation UpdateUser($input: UpdateUserInput!) {\n updateUser(updateUserInput: $input) {\n ...User\n }\n }\n \n": types.UpdateUserDocument, + "fragment User on User {\n email\n fullName\n id\n role\n}\n\nquery LoadUser($id: String!) {\n user(id: $id) {\n ...User\n }\n}\n\nmutation UpdateUser($input: UpdateUserInput!) {\n updateUser(updateUserInput: $input) {\n ...User\n }\n}": types.UserFragmentDoc, +}; + +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + * + * + * @example + * ```ts + * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`); + * ``` + * + * The query argument is unknown! + * Please regenerate the types. + */ +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 fragment Ad on Ad {\n id\n state\n price\n priceType\n creative {\n ...Creative\n }\n }\n \n"): (typeof documents)["\n fragment Ad on Ad {\n id\n state\n price\n priceType\n creative {\n ...Creative\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n 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 \n"): (typeof documents)["\n 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 \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment 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 \n"): (typeof documents)["\n fragment 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 \n"]; +/** + * 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 createAdSet($createAdSetInput: CreateAdSetInput!) {\n createAdSet(createAdSetInput: $createAdSetInput) {\n ...AdSet\n }\n }\n \n"): (typeof documents)["\n mutation createAdSet($createAdSetInput: CreateAdSetInput!) {\n createAdSet(createAdSetInput: $createAdSetInput) {\n ...AdSet\n }\n }\n \n"]; +/** + * 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 updateAdSet($updateAdSetInput: UpdateAdSetInput!) {\n updateAdSet(updateAdSetInput: $updateAdSetInput) {\n ...AdSet\n }\n }\n \n"): (typeof documents)["\n mutation updateAdSet($updateAdSetInput: UpdateAdSetInput!) {\n updateAdSet(updateAdSetInput: $updateAdSetInput) {\n ...AdSet\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "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 price\n priceType\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}"): (typeof documents)["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 price\n priceType\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}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n }\n"): (typeof documents)["\n fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment AdvertiserSummary on Advertiser {\n id\n name\n state\n billingEmail\n additionalBillingEmails\n createdAt\n modifiedAt\n publicKey\n }\n"): (typeof documents)["\n fragment AdvertiserSummary on Advertiser {\n id\n name\n state\n billingEmail\n additionalBillingEmails\n createdAt\n modifiedAt\n publicKey\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment Advertiser on Advertiser {\n ...AdvertiserSummary\n referrer\n phone\n selfServiceManageCampaign\n selfServiceSetPrice\n }\n \n"): (typeof documents)["\n fragment Advertiser on Advertiser {\n ...AdvertiserSummary\n referrer\n phone\n selfServiceManageCampaign\n selfServiceSetPrice\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n }\n \n"): (typeof documents)["\n fragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n }\n"): (typeof documents)["\n fragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n }\n"): (typeof documents)["\n fragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n }\n"): (typeof documents)["\n query advertiser($id: String!) {\n advertiser(id: $id) {\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. + */ +export function graphql(source: "\n mutation updateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\n id\n publicKey\n }\n }\n"): (typeof documents)["\n mutation updateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) {\n updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) {\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. + */ +export function graphql(source: "\n query advertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n }\n \n"): (typeof documents)["\n query advertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query advertiserImages($id: String!) {\n advertiser(id: $id) {\n images {\n ...AdvertiserImage\n }\n }\n }\n \n"): (typeof documents)["\n query advertiserImages($id: String!) {\n advertiser(id: $id) {\n images {\n ...AdvertiserImage\n }\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query advertiserPrices($id: String!) {\n advertiser(id: $id) {\n prices {\n ...AdvertiserPrice\n }\n }\n }\n \n"): (typeof documents)["\n query advertiserPrices($id: String!) {\n advertiser(id: $id) {\n prices {\n ...AdvertiserPrice\n }\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query advertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n }\n \n"): (typeof documents)["\n query advertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n }\n \n"]; +/** + * 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 uploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n name\n }\n }\n"): (typeof documents)["\n mutation uploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n name\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "fragment AdvertiserSummary on Advertiser {\n id\n name\n state\n billingEmail\n additionalBillingEmails\n createdAt\n modifiedAt\n publicKey\n}\n\nfragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nfragment Advertiser on Advertiser {\n ...AdvertiserSummary\n referrer\n phone\n selfServiceManageCampaign\n selfServiceSetPrice\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 images {\n ...AdvertiserImage\n }\n }\n}\n\nquery advertiserPrices($id: String!) {\n advertiser(id: $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 name\n }\n}"): (typeof documents)["fragment AdvertiserSummary on Advertiser {\n id\n name\n state\n billingEmail\n additionalBillingEmails\n createdAt\n modifiedAt\n publicKey\n}\n\nfragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nfragment Advertiser on Advertiser {\n ...AdvertiserSummary\n referrer\n phone\n selfServiceManageCampaign\n selfServiceSetPrice\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 images {\n ...AdvertiserImage\n }\n }\n}\n\nquery advertiserPrices($id: String!) {\n advertiser(id: $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 name\n }\n}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n 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 downvote\n price\n android\n ios\n linux\n macos\n windows\n }\n"): (typeof documents)["\n 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 downvote\n price\n android\n ios\n linux\n macos\n windows\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment CampaignWithEngagements on Campaign {\n id\n name\n state\n budget\n spent\n currency\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 \n"): (typeof documents)["\n fragment CampaignWithEngagements on Campaign {\n id\n name\n state\n budget\n spent\n currency\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 \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment CampaignMetricSummaryValues on Metrics {\n click\n impression\n siteVisit\n spendUsd\n rates {\n clickThrough\n }\n }\n"): (typeof documents)["\n fragment CampaignMetricSummaryValues on Metrics {\n click\n impression\n siteVisit\n spendUsd\n rates {\n clickThrough\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment 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"): (typeof documents)["\n fragment 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"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment DailyValues on Performance {\n dimensions {\n day\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n \n"): (typeof documents)["\n fragment DailyValues on Performance {\n dimensions {\n day\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment AdSetValues on Performance {\n dimensions {\n adSet {\n id\n name\n state\n billingType\n }\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n \n"): (typeof documents)["\n fragment AdSetValues on Performance {\n dimensions {\n adSet {\n id\n name\n state\n billingType\n }\n }\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query analyticOverview($id: String!) {\n campaign(id: $id) {\n ...CampaignWithEngagements\n }\n }\n \n"): (typeof documents)["\n query analyticOverview($id: String!) {\n campaign(id: $id) {\n ...CampaignWithEngagements\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query 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 \n"): (typeof documents)["\n query 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 \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query fetchDailyMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...DailyValues\n }\n total {\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n }\n }\n \n \n"): (typeof documents)["\n query fetchDailyMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...DailyValues\n }\n total {\n metrics {\n ...CampaignMetricDetailValues\n }\n }\n }\n }\n \n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query fetchAdSetMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...AdSetValues\n }\n }\n }\n \n"): (typeof documents)["\n query fetchAdSetMetricsForCampaign($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...AdSetValues\n }\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "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 downvote\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 currency\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}"): (typeof documents)["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 downvote\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 currency\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}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n 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 paymentType\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 \n"): (typeof documents)["\n 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 paymentType\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 \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment 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 spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\n }\n"): (typeof documents)["\n fragment 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 spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment 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 \n"): (typeof documents)["\n fragment 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 \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n }\n \n"): (typeof documents)["\n query LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n }\n \n"): (typeof documents)["\n query LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query LoadCampaignSummary($id: String!) {\n campaign(id: $id) {\n ...CampaignSummary\n }\n }\n \n"): (typeof documents)["\n query LoadCampaignSummary($id: String!) {\n campaign(id: $id) {\n ...CampaignSummary\n }\n }\n \n"]; +/** + * 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 CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n }\n"): (typeof documents)["\n mutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n }\n"]; +/** + * 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 UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n }\n"): (typeof documents)["\n mutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "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 paymentType\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 spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\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\nquery LoadCampaignSummary($id: String!) {\n campaign(id: $id) {\n ...CampaignSummary\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}"): (typeof documents)["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 paymentType\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 spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\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\nquery LoadCampaignSummary($id: String!) {\n campaign(id: $id) {\n ...CampaignSummary\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}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment Geocode on Geocode {\n code\n name\n }\n"): (typeof documents)["\n fragment Geocode on Geocode {\n code\n name\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment Segment on SegmentsEntry {\n code\n name\n }\n"): (typeof documents)["\n fragment Segment on SegmentsEntry {\n code\n name\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query ActiveGeocodes {\n geocodes {\n ...Geocode\n }\n }\n \n"): (typeof documents)["\n query ActiveGeocodes {\n geocodes {\n ...Geocode\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query Segments {\n segments {\n data {\n ...Segment\n }\n }\n }\n \n"): (typeof documents)["\n query Segments {\n segments {\n data {\n ...Segment\n }\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "fragment Geocode on Geocode {\n code\n name\n}\n\nfragment Segment on SegmentsEntry {\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}"): (typeof documents)["fragment Geocode on Geocode {\n code\n name\n}\n\nfragment Segment on SegmentsEntry {\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}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment Creative on Creative {\n id\n createdAt\n modifiedAt\n name\n state\n type {\n code\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadNewTabPage {\n logo {\n imageUrl\n alt\n companyName\n destinationUrl\n }\n wallpapers {\n imageUrl\n focalPoint {\n x\n y\n }\n }\n }\n payloadInlineContent {\n title\n ctaText\n imageUrl\n targetUrl\n dimensions\n description\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadSearch {\n body\n title\n targetUrl\n }\n payloadSearchHomepage {\n body\n imageUrl\n imageDarkModeUrl\n targetUrl\n title\n ctaText\n }\n }\n"): (typeof documents)["\n fragment Creative on Creative {\n id\n createdAt\n modifiedAt\n name\n state\n type {\n code\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadNewTabPage {\n logo {\n imageUrl\n alt\n companyName\n destinationUrl\n }\n wallpapers {\n imageUrl\n focalPoint {\n x\n y\n }\n }\n }\n payloadInlineContent {\n title\n ctaText\n imageUrl\n targetUrl\n dimensions\n description\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadSearch {\n body\n title\n targetUrl\n }\n payloadSearchHomepage {\n body\n imageUrl\n imageDarkModeUrl\n targetUrl\n title\n ctaText\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query advertiserCreatives($advertiserId: String!) {\n advertiser(id: $advertiserId) {\n id\n creatives {\n ...Creative\n }\n }\n }\n \n"): (typeof documents)["\n query advertiserCreatives($advertiserId: String!) {\n advertiser(id: $advertiserId) {\n id\n creatives {\n ...Creative\n }\n }\n }\n \n"]; +/** + * 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 createCreative($input: CreativeInput!) {\n createCreative(creative: $input) {\n ...Creative\n }\n }\n \n"): (typeof documents)["\n mutation createCreative($input: CreativeInput!) {\n createCreative(creative: $input) {\n ...Creative\n }\n }\n \n"]; +/** + * 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 updateCreative($id: String!, $input: CreativeInput!) {\n updateCreative(id: $id, creative: $input) {\n ...Creative\n }\n }\n \n"): (typeof documents)["\n mutation updateCreative($id: String!, $input: CreativeInput!) {\n updateCreative(id: $id, creative: $input) {\n ...Creative\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query loadCreative($id: String!) {\n creative(id: $id) {\n ...Creative\n }\n }\n \n"): (typeof documents)["\n query loadCreative($id: String!) {\n creative(id: $id) {\n ...Creative\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query campaignsForCreative($creativeId: String!, $advertiserId: String!) {\n creativeCampaigns(creativeId: $creativeId, advertiserId: $advertiserId) {\n id\n name\n state\n format\n }\n }\n"): (typeof documents)["\n query campaignsForCreative($creativeId: String!, $advertiserId: String!) {\n creativeCampaigns(creativeId: $creativeId, advertiserId: $advertiserId) {\n id\n name\n state\n format\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "fragment Creative on Creative {\n id\n createdAt\n modifiedAt\n name\n state\n type {\n code\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadNewTabPage {\n logo {\n imageUrl\n alt\n companyName\n destinationUrl\n }\n wallpapers {\n imageUrl\n focalPoint {\n x\n y\n }\n }\n }\n payloadInlineContent {\n title\n ctaText\n imageUrl\n targetUrl\n dimensions\n description\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadSearch {\n body\n title\n targetUrl\n }\n payloadSearchHomepage {\n body\n imageUrl\n imageDarkModeUrl\n targetUrl\n title\n ctaText\n }\n}\n\nquery advertiserCreatives($advertiserId: String!) {\n advertiser(id: $advertiserId) {\n id\n creatives {\n ...Creative\n }\n }\n}\n\nmutation createCreative($input: CreativeInput!) {\n createCreative(creative: $input) {\n ...Creative\n }\n}\n\nmutation updateCreative($id: String!, $input: CreativeInput!) {\n updateCreative(id: $id, creative: $input) {\n ...Creative\n }\n}\n\nquery loadCreative($id: String!) {\n creative(id: $id) {\n ...Creative\n }\n}\n\nquery campaignsForCreative($creativeId: String!, $advertiserId: String!) {\n creativeCampaigns(creativeId: $creativeId, advertiserId: $advertiserId) {\n id\n name\n state\n format\n }\n}"): (typeof documents)["fragment Creative on Creative {\n id\n createdAt\n modifiedAt\n name\n state\n type {\n code\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadNewTabPage {\n logo {\n imageUrl\n alt\n companyName\n destinationUrl\n }\n wallpapers {\n imageUrl\n focalPoint {\n x\n y\n }\n }\n }\n payloadInlineContent {\n title\n ctaText\n imageUrl\n targetUrl\n dimensions\n description\n }\n payloadNotification {\n body\n title\n targetUrl\n }\n payloadSearch {\n body\n title\n targetUrl\n }\n payloadSearchHomepage {\n body\n imageUrl\n imageDarkModeUrl\n targetUrl\n title\n ctaText\n }\n}\n\nquery advertiserCreatives($advertiserId: String!) {\n advertiser(id: $advertiserId) {\n id\n creatives {\n ...Creative\n }\n }\n}\n\nmutation createCreative($input: CreativeInput!) {\n createCreative(creative: $input) {\n ...Creative\n }\n}\n\nmutation updateCreative($id: String!, $input: CreativeInput!) {\n updateCreative(id: $id, creative: $input) {\n ...Creative\n }\n}\n\nquery loadCreative($id: String!) {\n creative(id: $id) {\n ...Creative\n }\n}\n\nquery campaignsForCreative($creativeId: String!, $advertiserId: String!) {\n creativeCampaigns(creativeId: $creativeId, advertiserId: $advertiserId) {\n id\n name\n state\n format\n }\n}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query validateTargetUrl($url: String!) {\n validateTargetUrl(targetUrl: $url) {\n isValid\n redirects {\n url\n violations {\n summary\n detail\n }\n }\n }\n }\n"): (typeof documents)["\n query validateTargetUrl($url: String!) {\n validateTargetUrl(targetUrl: $url) {\n isValid\n redirects {\n url\n violations {\n summary\n detail\n }\n }\n }\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "query validateTargetUrl($url: String!) {\n validateTargetUrl(targetUrl: $url) {\n isValid\n redirects {\n url\n violations {\n summary\n detail\n }\n }\n }\n}"): (typeof documents)["query validateTargetUrl($url: String!) {\n validateTargetUrl(targetUrl: $url) {\n isValid\n redirects {\n url\n violations {\n summary\n detail\n }\n }\n }\n}"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment User on User {\n email\n fullName\n id\n role\n }\n"): (typeof documents)["\n fragment User on User {\n email\n fullName\n id\n role\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query LoadUser($id: String!) {\n user(id: $id) {\n ...User\n }\n }\n \n"): (typeof documents)["\n query LoadUser($id: String!) {\n user(id: $id) {\n ...User\n }\n }\n \n"]; +/** + * 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 UpdateUser($input: UpdateUserInput!) {\n updateUser(updateUserInput: $input) {\n ...User\n }\n }\n \n"): (typeof documents)["\n mutation UpdateUser($input: UpdateUserInput!) {\n updateUser(updateUserInput: $input) {\n ...User\n }\n }\n \n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "fragment User on User {\n email\n fullName\n id\n role\n}\n\nquery LoadUser($id: String!) {\n user(id: $id) {\n ...User\n }\n}\n\nmutation UpdateUser($input: UpdateUserInput!) {\n updateUser(updateUserInput: $input) {\n ...User\n }\n}"): (typeof documents)["fragment User on User {\n email\n fullName\n id\n role\n}\n\nquery LoadUser($id: String!) {\n user(id: $id) {\n ...User\n }\n}\n\nmutation UpdateUser($input: UpdateUserInput!) {\n updateUser(updateUserInput: $input) {\n ...User\n }\n}"]; + +export function graphql(source: string) { + return (documents as any)[source] ?? {}; +} + +export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never; \ No newline at end of file diff --git a/src/graphql-client/graphql.ts b/src/graphql-client/graphql.ts new file mode 100644 index 00000000..1b2afdbc --- /dev/null +++ b/src/graphql-client/graphql.ts @@ -0,0 +1,1919 @@ +/* eslint-disable */ +import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + /** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */ + DateTime: { input: string; output: string; } + /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ + JSONObject: { input: object; output: object; } + /** The `Numeric` datatype represents a fixed-precision number, which does not suffer from the rounding errors of a javascript floating point number. It's always returned as a string, but for input types either a string or number can be used, though strings are preferred to avoid risk of inaccuracy. */ + Numeric: { input: string | number; output: string; } +}; + +export type ActiveGeocodesEntry = { + __typename?: 'ActiveGeocodesEntry'; + code: Scalars['String']['output']; + name: Scalars['String']['output']; +}; + +export type ActiveGeocodesQueryDto = { + __typename?: 'ActiveGeocodesQueryDTO'; + data: Array; +}; + +export type Ad = { + __typename?: 'Ad'; + creative: Creative; + id: Scalars['String']['output']; + /** @deprecated price configuration has been moved to ad set */ + price: Scalars['Numeric']['output']; + priceType: ConfirmationType; + /** @deprecated rewardPaymentTokenValue has been moved to ad set */ + rewardPaymentTokenValue: Scalars['Numeric']['output']; + state: Scalars['String']['output']; + webhooks: Array; +}; + +export type AdSet = { + __typename?: 'AdSet'; + ads: Array; + /** @deprecated has been moved to campaign level */ + bannedKeywords?: Maybe>; + billingType?: Maybe; + brandedDesktopPrice?: Maybe; + brandedMobilePrice?: Maybe; + conversions: Array; + createdAt: Scalars['DateTime']['output']; + externalId?: Maybe; + /** @deprecated price changes are now allowed */ + hasConfirmations: Scalars['Boolean']['output']; + id: Scalars['String']['output']; + keywordSimilarity?: Maybe; + keywords?: Maybe>; + modifiedAt: Scalars['DateTime']['output']; + name: Scalars['String']['output']; + negativeKeywords?: Maybe>; + negativeTriggerUrls?: Maybe>; + nonBrandedDesktopPrice?: Maybe; + nonBrandedMobilePrice?: Maybe; + optimized?: Maybe; + oses: Array; + perDay: Scalars['Float']['output']; + price: Scalars['Numeric']['output']; + rewardPaymentTokenValue: Scalars['Numeric']['output']; + segments: Array; + state: Scalars['String']['output']; + targetingTerms?: Maybe>; + totalMax: Scalars['Float']['output']; + triggerUrls?: Maybe>; +}; + + +export type AdSetAdsArgs = { + includeDeleted?: InputMaybe; +}; + +export type Address = { + __typename?: 'Address'; + city: Scalars['String']['output']; + country: Scalars['String']['output']; + createdAt: Scalars['DateTime']['output']; + id: Scalars['String']['output']; + modifiedAt: Scalars['DateTime']['output']; + state: Scalars['String']['output']; + street1: Scalars['String']['output']; + street2?: Maybe; + zipcode: Scalars['String']['output']; +}; + +export type Advertiser = { + __typename?: 'Advertiser'; + accountManager?: Maybe; + additionalBillingEmails?: Maybe>; + agreed: Scalars['Boolean']['output']; + billingAddress?: Maybe
; + billingEmail?: Maybe; + campaigns: Array; + createdAt: Scalars['DateTime']['output']; + createdSource: AdvertiserSource; + creatives: Array; + description?: Maybe; + id: Scalars['String']['output']; + images: Array; + marketingChannel?: Maybe; + modifiedAt: Scalars['DateTime']['output']; + name: Scalars['String']['output']; + phone?: Maybe; + prices: Array; + publicKey?: Maybe; + referrer?: Maybe; + selfServiceManageCampaign: Scalars['Boolean']['output']; + selfServiceSetPrice: Scalars['Boolean']['output']; + state: Scalars['String']['output']; + url?: Maybe; + users: Array; +}; + +export type AdvertiserCampaignFilter = { + /** exclude all campaigns whose time range is completely before this time */ + from?: InputMaybe; + /** include ads */ + includeAds?: InputMaybe; + /** include creative sets */ + includeCreativeSets?: InputMaybe; +}; + +export type AdvertiserFilter = { + state?: InputMaybe; +}; + +export type AdvertiserImage = { + __typename?: 'AdvertiserImage'; + createdAt: Scalars['DateTime']['output']; + format: CampaignFormat; + id: Scalars['String']['output']; + imageUrl: Scalars['String']['output']; + name: Scalars['String']['output']; +}; + +export type AdvertiserPrice = { + __typename?: 'AdvertiserPrice'; + billingModelPrice: Scalars['Numeric']['output']; + billingType: BillingType; + format: CampaignFormat; + isDefault: Scalars['Boolean']['output']; +}; + +export type AdvertiserPriceInput = { + billingModelPrice: Scalars['Numeric']['input']; + billingType: BillingType; + format: CampaignFormat; +}; + +export enum AdvertiserSource { + Managed = 'MANAGED', + SelfServe = 'SELF_SERVE' +} + +export type ApproveCampaignInput = { + campaignId: Scalars['String']['input']; +}; + +export enum BillingType { + Cpc = 'CPC', + Cpm = 'CPM', + Cpsv = 'CPSV' +} + +export type Campaign = { + __typename?: 'Campaign'; + accountManager?: Maybe; + adSets: Array; + advertiser: Advertiser; + /** For Search campaigns, keywords the campaign must not be shown against */ + bannedKeywords?: Maybe>; + /** + * For Search campaigns, the keyword that matches the 'brand' + * @deprecated use brandedKeywords instead + */ + brandedKeyword?: Maybe; + /** For Search campaigns, the keywords that match the 'brand' */ + brandedKeywords?: Maybe>; + budget: Scalars['Float']['output']; + comments: Array; + confirmationsSummary: ConfirmationsSummaryQueryDto; + createdAt: Scalars['DateTime']['output']; + currency: Scalars['String']['output']; + dailyBudget: Scalars['Float']['output']; + dailyCap: Scalars['Float']['output']; + dailyPacingIndex: Scalars['Float']['output']; + dailySpend: Scalars['Float']['output']; + dayPartings: Array; + /** For NTP SI campaigns, the proportion of day allocated from 0 (none) to 1 (dedicated) */ + dayProportion?: Maybe; + endAt: Scalars['DateTime']['output']; + engagements: Array; + engagementsByCountry: Array; + externalId?: Maybe; + format: CampaignFormat; + geoTargets: Array; + hasPaymentIntent: Scalars['Boolean']['output']; + id: Scalars['String']['output']; + modifiedAt: Scalars['DateTime']['output']; + name: Scalars['String']['output']; + pacingIndex?: Maybe; + pacingOverride: Scalars['Boolean']['output']; + pacingStrategy: CampaignPacingStrategies; + passThroughRate: Scalars['Float']['output']; + paymentType: PaymentType; + performance: PerformanceResults; + priority: Scalars['Float']['output']; + radomPaymentId?: Maybe; + rate: Scalars['Float']['output']; + source: CampaignSource; + spent: Scalars['Float']['output']; + startAt: Scalars['DateTime']['output']; + state: Scalars['String']['output']; + stripePaymentId?: Maybe; + type: CampaignType; +}; + + +export type CampaignPerformanceArgs = { + filter?: CampaignPerformanceFilter; +}; + +export type CampaignComment = { + __typename?: 'CampaignComment'; + createdAt: Scalars['DateTime']['output']; + id: Scalars['String']['output']; + modifiedAt: Scalars['DateTime']['output']; + note: Scalars['String']['output']; + user: User; +}; + +export type CampaignFilter = { + /** only include campaigns for this format */ + format?: InputMaybe; + /** exclude all campaigns whose time range is completely before this time */ + from?: InputMaybe; + /** only include campaigns with this source */ + source?: InputMaybe; + /** only include campaigns with this state */ + state?: InputMaybe; + /** exclude all campaigns whose time range is completely after this time */ + to?: InputMaybe; +}; + +export enum CampaignFormat { + NewsDisplayAd = 'NEWS_DISPLAY_AD', + NtpSi = 'NTP_SI', + PushNotification = 'PUSH_NOTIFICATION', + Search = 'SEARCH', + SearchHomepage = 'SEARCH_HOMEPAGE' +} + +export enum CampaignPacingStrategies { + ModelV1 = 'MODEL_V1', + Original = 'ORIGINAL' +} + +export type CampaignPerformanceFilter = { + /** include only metrics for responses for all these countries */ + country?: InputMaybe>; + /** include metrics starting from this time (inclusive) */ + from?: InputMaybe; + /** include only metrics for responses for all these operating systems */ + os?: InputMaybe>; + /** include only metrics for responses for all these segments */ + segment?: InputMaybe>; + /** include metrics before this time (inclusive) */ + to?: InputMaybe; +}; + +export enum CampaignRejection { + InappropriateContent = 'INAPPROPRIATE_CONTENT', + InvalidLandingPage = 'INVALID_LANDING_PAGE', + Other = 'OTHER', + ProhibitedCategory = 'PROHIBITED_CATEGORY' +} + +export enum CampaignSource { + Direct = 'DIRECT', + Managed = 'MANAGED', + Network = 'NETWORK', + SelfServe = 'SELF_SERVE' +} + +export enum CampaignType { + Barter = 'BARTER', + Cause = 'CAUSE', + Fixed = 'FIXED', + Free = 'FREE', + House = 'HOUSE', + MakeGood = 'MAKE_GOOD', + Paid = 'PAID', + Preemptive = 'PREEMPTIVE', + Trial = 'TRIAL' +} + +export type CampaignsPerCountryEntry = { + __typename?: 'CampaignsPerCountryEntry'; + count: Scalars['Int']['output']; + country: Scalars['String']['output']; + name: Scalars['String']['output']; +}; + +export type CampaignsPerCountryQueryDto = { + __typename?: 'CampaignsPerCountryQueryDTO'; + data: Array; +}; + +export type CampaignsPerCurrencyEntry = { + __typename?: 'CampaignsPerCurrencyEntry'; + count: Scalars['Int']['output']; + currency: Scalars['String']['output']; +}; + +export type CampaignsPerCurrencyQueryDto = { + __typename?: 'CampaignsPerCurrencyQueryDTO'; + data: Array; +}; + +export type Change = { + __typename?: 'Change'; + createdAt: Scalars['DateTime']['output']; + currentValue?: Maybe; + id: Scalars['String']['output']; + modifiedAt: Scalars['DateTime']['output']; + previousValue?: Maybe; + referenceColumnName: Scalars['String']['output']; + referenceId: Scalars['String']['output']; + referenceTableName: Scalars['String']['output']; + user: User; + userId: Scalars['String']['output']; +}; + +export type ChangeFilter = { + /** exclude all changes whose time range is completely before this time */ + createdAfter?: InputMaybe; + /** include changes made by system user */ + includeSystemUser?: InputMaybe; + /** limit the amount of results returned */ + limit?: InputMaybe; + /** only include changes for this reference id */ + referenceId?: InputMaybe; + /** only include changes for this set of reference ids */ + referenceIds?: InputMaybe>; +}; + +export enum ConfirmationType { + Bookmark = 'BOOKMARK', + Click = 'CLICK', + ClientView = 'CLIENT_VIEW', + Conversion = 'CONVERSION', + Dismiss = 'DISMISS', + Downvote = 'DOWNVOTE', + Flag = 'FLAG', + Land30 = 'LAND30', + Land60 = 'LAND60', + Landclick = 'LANDCLICK', + Landed = 'LANDED', + Media_25 = 'MEDIA_25', + Media_100 = 'MEDIA_100', + MediaPlay = 'MEDIA_PLAY', + Upvote = 'UPVOTE', + View = 'VIEW' +} + +export type ConfirmationsSummaryEntry = { + __typename?: 'ConfirmationsSummaryEntry'; + android: Scalars['Int']['output']; + date: Scalars['DateTime']['output']; + iOS: Scalars['Int']['output']; + linux: Scalars['Int']['output']; + macOS: Scalars['Int']['output']; + other: Scalars['Int']['output']; + type: Scalars['String']['output']; + windows: Scalars['Int']['output']; +}; + +export type ConfirmationsSummaryQueryDto = { + __typename?: 'ConfirmationsSummaryQueryDTO'; + data: Array; +}; + +export type Conversion = { + __typename?: 'Conversion'; + createdAt: Scalars['DateTime']['output']; + extractExternalId: Scalars['Boolean']['output']; + id: Scalars['String']['output']; + modifiedAt: Scalars['DateTime']['output']; + observationWindow: Scalars['Float']['output']; + trailingAsteriskNotRequired: Scalars['Boolean']['output']; + type: Scalars['String']['output']; + urlPattern: Scalars['String']['output']; +}; + +export type CountryEngagement = { + __typename?: 'CountryEngagement'; + click: Scalars['Float']['output']; + conversion: Scalars['Float']['output']; + country: Scalars['String']['output']; + dismiss: Scalars['Float']['output']; + landed: Scalars['Float']['output']; + spend?: Maybe; + view: Scalars['Float']['output']; +}; + +export type CreateAdInput = { + creative?: InputMaybe; + creativeId?: InputMaybe; + creativeSetId?: InputMaybe; + id?: InputMaybe; + webhooks?: InputMaybe>; +}; + +export type CreateAdSetInput = { + ads?: InputMaybe>; + bannedKeywords?: InputMaybe>; + billingType: Scalars['String']['input']; + brandedDesktopPrice?: InputMaybe; + brandedMobilePrice?: InputMaybe; + campaignId?: InputMaybe; + conversions?: InputMaybe>; + externalId?: InputMaybe; + keywordSimilarity?: InputMaybe; + keywords?: InputMaybe>; + name?: InputMaybe; + negativeKeywords?: InputMaybe>; + negativeTriggerUrls?: InputMaybe>; + nonBrandedDesktopPrice?: InputMaybe; + nonBrandedMobilePrice?: InputMaybe; + oses?: InputMaybe>; + perDay: Scalars['Float']['input']; + /** The price in the owning campaign's currency for each single confirmation of the priceType specified. Note therefore that the caller is responsible for dividing cost-per-mille by 1000. */ + price: Scalars['Numeric']['input']; + segments: Array; + splitTestGroup?: InputMaybe; + state?: InputMaybe; + targetingTerms?: InputMaybe>; + totalMax: Scalars['Float']['input']; + triggerUrls?: InputMaybe>; +}; + +export type CreateAddressInput = { + city: Scalars['String']['input']; + country: Scalars['String']['input']; + state: Scalars['String']['input']; + street1: Scalars['String']['input']; + street2?: InputMaybe; + zipcode: Scalars['String']['input']; +}; + +export type CreateAdvertiserImageInput = { + advertiserId: Scalars['String']['input']; + format: CampaignFormat; + imageUrl: Scalars['String']['input']; + name: Scalars['String']['input']; +}; + +export type CreateAdvertiserInput = { + accountManagerId?: InputMaybe; + additionalBillingEmails?: InputMaybe>; + billingAddress?: InputMaybe; + billingEmail?: InputMaybe; + billingModelPrices?: InputMaybe>; + description?: InputMaybe; + marketingChannel?: InputMaybe; + name: Scalars['String']['input']; + phone?: InputMaybe; + referrer?: InputMaybe; + selfServiceManageCampaign?: InputMaybe; + state?: InputMaybe; + url?: InputMaybe; + userId?: InputMaybe; +}; + +export type CreateCampaignInput = { + accountManagerId?: InputMaybe; + adSets?: InputMaybe>; + advertiserId: Scalars['String']['input']; + bannedKeywords?: InputMaybe>; + brandedKeyword?: InputMaybe; + brandedKeywords?: InputMaybe>; + budget: Scalars['Numeric']['input']; + currency?: Scalars['String']['input']; + dailyBudget?: InputMaybe; + dailyCap?: Scalars['Float']['input']; + dayPartings?: InputMaybe>; + dayProportion?: InputMaybe; + endAt: Scalars['DateTime']['input']; + externalId?: InputMaybe; + format: CampaignFormat; + geoTargets: Array; + name: Scalars['String']['input']; + pacingStrategy?: InputMaybe; + paymentType?: InputMaybe; + priority?: InputMaybe; + source: Scalars['String']['input']; + startAt: Scalars['DateTime']['input']; + state: Scalars['String']['input']; + type?: CampaignType; + userId?: InputMaybe; +}; + +export type CreateCommentInput = { + campaignId: Scalars['String']['input']; + note: Scalars['String']['input']; +}; + +export type CreateConversionInput = { + extractExternalId?: InputMaybe; + observationWindow: Scalars['Float']['input']; + trailingAsteriskNotRequired?: InputMaybe; + type: Scalars['String']['input']; + urlPattern: Scalars['String']['input']; +}; + +export type CreateInPageCreativeInput = { + advertiserId: Scalars['String']['input']; + endAt?: InputMaybe; + name: Scalars['String']['input']; + payload: InPagePayloadInput; + startAt?: InputMaybe; + state: Scalars['String']['input']; + type: CreateTypeInput; + userId?: InputMaybe; +}; + +export type CreateNewTabPageCreativeInput = { + advertiserId: Scalars['String']['input']; + endAt?: InputMaybe; + name: Scalars['String']['input']; + payload: NewTabPagePayloadInput; + startAt?: InputMaybe; + state: Scalars['String']['input']; + type: CreateTypeInput; +}; + +export type CreateNotificationCreativeInput = { + advertiserId: Scalars['String']['input']; + endAt?: InputMaybe; + name: Scalars['String']['input']; + payload: NotificationPayloadInput; + startAt?: InputMaybe; + state: Scalars['String']['input']; + type: CreateTypeInput; + userId?: InputMaybe; +}; + +export type CreateOsInput = { + code: Scalars['String']['input']; + name: Scalars['String']['input']; +}; + +export type CreateSegmentInput = { + code: Scalars['String']['input']; + name: Scalars['String']['input']; +}; + +export type CreateTypeInput = { + code: Scalars['String']['input']; + name?: InputMaybe; +}; + +export type CreateUserInput = { + email: Scalars['String']['input']; + emailVerified: Scalars['Boolean']['input']; + fullName: Scalars['String']['input']; + password?: InputMaybe; + role: Scalars['String']['input']; +}; + +export type Creative = { + __typename?: 'Creative'; + advertiser: Advertiser; + createdAt: Scalars['DateTime']['output']; + endAt?: Maybe; + id: Scalars['String']['output']; + modifiedAt: Scalars['DateTime']['output']; + name: Scalars['String']['output']; + /** @deprecated use one of the specific payload types instead */ + payload: Payload; + /** populated for in_page creatives only */ + payloadInPage?: Maybe; + /** populated for inline_content creatives only */ + payloadInlineContent?: Maybe; + /** populated for new_tab_page creatives only */ + payloadNewTabPage?: Maybe; + /** populated for notification creatives only */ + payloadNotification?: Maybe; + /** populated for promoted_content creatives only */ + payloadPromotedContent?: Maybe; + /** populated for search SERP creatives only */ + payloadSearch?: Maybe; + /** populated for search homepage creatives only */ + payloadSearchHomepage?: Maybe; + startAt?: Maybe; + state: Scalars['String']['output']; + type: CreativeType; +}; + +export type CreativeFilter = { + /** only include creatives with this state */ + state?: InputMaybe; +}; + +export type CreativeInput = { + advertiserId: Scalars['String']['input']; + endAt?: InputMaybe; + name: Scalars['String']['input']; + payloadInPage?: InputMaybe; + payloadInlineContent?: InputMaybe; + payloadNewTabPage?: InputMaybe; + payloadNotification?: InputMaybe; + payloadPromotedContent?: InputMaybe; + payloadSearch?: InputMaybe; + payloadSearchHomepage?: InputMaybe; + startAt?: InputMaybe; + state: Scalars['String']['input']; + type: CreateTypeInput; +}; + +export type CreativeType = { + __typename?: 'CreativeType'; + code: Scalars['String']['output']; + name: Scalars['String']['output']; +}; + +export type CreativeTypeInput = { + code: Scalars['String']['input']; + name: Scalars['String']['input']; +}; + +export type DayParting = { + __typename?: 'DayParting'; + dow: Scalars['String']['output']; + endMinute: Scalars['Float']['output']; + startMinute: Scalars['Float']['output']; +}; + +export type DayPartingInput = { + dow: Scalars['String']['input']; + endMinute: Scalars['Float']['input']; + startMinute: Scalars['Float']['input']; +}; + +export type DeleteAdInput = { + id: Scalars['String']['input']; +}; + +export type Dimensions = { + __typename?: 'Dimensions'; + ad: Ad; + adSet: AdSet; + campaign: Campaign; + country: Scalars['String']['output']; + day: Scalars['DateTime']['output']; + hour: Scalars['DateTime']['output']; + os: Scalars['String']['output']; + segment?: Maybe; +}; + +export type Engagement = { + __typename?: 'Engagement'; + android: Scalars['Float']['output']; + click: Scalars['Numeric']['output']; + clickthroughConversion: Scalars['Numeric']['output']; + conversion: Scalars['Numeric']['output']; + cost: Scalars['Float']['output']; + count: Scalars['Float']['output']; + createdat: Scalars['DateTime']['output']; + creativeid: Scalars['String']['output']; + creativeinstanceid: Scalars['String']['output']; + creativename: Scalars['String']['output']; + creativepayload: Scalars['String']['output']; + creativesetid: Scalars['String']['output']; + creativesetname?: Maybe; + creativestate: Scalars['String']['output']; + currency: Scalars['String']['output']; + dismiss: Scalars['Numeric']['output']; + downvote: Scalars['Numeric']['output']; + ios: Scalars['Float']['output']; + landed: Scalars['Numeric']['output']; + linux: Scalars['Float']['output']; + macos: Scalars['Float']['output']; + other: Scalars['Float']['output']; + price: Scalars['Float']['output']; + pricetype: Scalars['String']['output']; + spend: Scalars['Numeric']['output']; + type: Scalars['String']['output']; + upvote: Scalars['Numeric']['output']; + view: Scalars['Numeric']['output']; + viewthroughConversion: Scalars['Numeric']['output']; + windows: Scalars['Float']['output']; +}; + +export type EngagementOverview = { + __typename?: 'EngagementOverview'; + campaignId: Scalars['String']['output']; + click: Scalars['Float']['output']; + date: Scalars['DateTime']['output']; + landed: Scalars['Float']['output']; + spend?: Maybe; + view: Scalars['Float']['output']; +}; + +export type FocalPoint = { + __typename?: 'FocalPoint'; + x: Scalars['Float']['output']; + y: Scalars['Float']['output']; +}; + +export type FocalPointInput = { + x: Scalars['Float']['input']; + y: Scalars['Float']['input']; +}; + +export type Geocode = { + __typename?: 'Geocode'; + code: Scalars['String']['output']; + name: Scalars['String']['output']; +}; + +export type GeocodeInput = { + code: Scalars['String']['input']; + name?: InputMaybe; +}; + +export type InPagePayload = { + __typename?: 'InPagePayload'; + creativeUrl: Scalars['String']['output']; + /** size of the creative, e.g. 1024x768 */ + size: Scalars['String']['output']; + targetUrl: Scalars['String']['output']; +}; + +export type InPagePayloadInput = { + creativeUrl: Scalars['String']['input']; + /** size of the creative, e.g. 1024x768 */ + size: Scalars['String']['input']; + targetUrl: Scalars['String']['input']; +}; + +export type InlineContentPayload = { + __typename?: 'InlineContentPayload'; + ctaText: Scalars['String']['output']; + description: Scalars['String']['output']; + dimensions: Scalars['String']['output']; + imageUrl: Scalars['String']['output']; + targetUrl: Scalars['String']['output']; + title: Scalars['String']['output']; +}; + +export type InlineContentPayloadInput = { + ctaText: Scalars['String']['input']; + description: Scalars['String']['input']; + dimensions: Scalars['String']['input']; + imageUrl: Scalars['String']['input']; + targetUrl: Scalars['String']['input']; + title: Scalars['String']['input']; +}; + +export type Logo = { + __typename?: 'Logo'; + alt: Scalars['String']['output']; + companyName: Scalars['String']['output']; + destinationUrl: Scalars['String']['output']; + imageUrl: Scalars['String']['output']; +}; + +export type LogoInput = { + alt: Scalars['String']['input']; + companyName: Scalars['String']['input']; + destinationUrl: Scalars['String']['input']; + imageUrl: Scalars['String']['input']; +}; + +/** Rates calculated from metrics. Multiply by 100 to see as a percentage. */ +export type MetricRates = { + __typename?: 'MetricRates'; + /** Number of clicks for every impression */ + clickThrough: Scalars['Numeric']['output']; + /** Number of conversions for every click */ + clickToConversion: Scalars['Numeric']['output']; + /** Number of site vists for every click */ + clickToSiteVisit: Scalars['Numeric']['output']; + /** Spend for every impression */ + costPerAcquisition: Scalars['Numeric']['output']; + /** Number of dismissals for every impression */ + impressionToDismiss: Scalars['Numeric']['output']; + /** Number of site vists for every impression */ + impressionToSiteVisit: Scalars['Numeric']['output']; +}; + +export type Metrics = { + __typename?: 'Metrics'; + click: Scalars['Numeric']['output']; + clickThroughConversion: Scalars['Numeric']['output']; + conversion: Scalars['Numeric']['output']; + dismiss: Scalars['Numeric']['output']; + downvote: Scalars['Numeric']['output']; + impression: Scalars['Numeric']['output']; + /** @deprecated use siteVisit instead */ + land: Scalars['Numeric']['output']; + nominalSpendUsd: Scalars['Numeric']['output']; + rates: MetricRates; + siteVisit: Scalars['Numeric']['output']; + spendUsd: Scalars['Numeric']['output']; + upvote: Scalars['Numeric']['output']; + /** @deprecated use impression instead */ + view: Scalars['Numeric']['output']; + viewThroughConversion: Scalars['Numeric']['output']; +}; + +export type Mutation = { + __typename?: 'Mutation'; + approveAdvertiser: Advertiser; + approveAdvertiserRegistration: Advertiser; + approveCampaign: Campaign; + createAdSet: AdSet; + createAdvertiser: Advertiser; + createAdvertiserImage: AdvertiserImage; + createCampaign: Campaign; + createComment: CampaignComment; + createCreative: Creative; + /** @deprecated use createCreative instead */ + createInPageCreative: Creative; + /** @deprecated use createCreative instead */ + createNewTabPageCreative: Creative; + createNotificationCreative: Creative; + createUser: User; + /** Logically deletes the ad */ + deleteAd: Ad; + rejectAdvertiser: Advertiser; + rejectAdvertiserRegistration: Registration; + rejectCampaign: Campaign; + rejectCreative: Creative; + /** @deprecated This actually updates the state of the creative, not the ad as its name suggests! */ + updateAd: Ad; + updateAdSet: AdSet; + updateAdvertiser: Advertiser; + updateCampaign: Campaign; + updateCreative: Creative; + updateNotificationCreative: Creative; + updateUser: User; +}; + + +export type MutationApproveAdvertiserArgs = { + id: Scalars['String']['input']; +}; + + +export type MutationApproveAdvertiserRegistrationArgs = { + id: Scalars['String']['input']; +}; + + +export type MutationApproveCampaignArgs = { + approveCampaignInput: ApproveCampaignInput; +}; + + +export type MutationCreateAdSetArgs = { + createAdSetInput: CreateAdSetInput; +}; + + +export type MutationCreateAdvertiserArgs = { + createAdvertiserInput: CreateAdvertiserInput; +}; + + +export type MutationCreateAdvertiserImageArgs = { + createImageInput: CreateAdvertiserImageInput; +}; + + +export type MutationCreateCampaignArgs = { + createCampaignInput: CreateCampaignInput; +}; + + +export type MutationCreateCommentArgs = { + createCommentInput: CreateCommentInput; +}; + + +export type MutationCreateCreativeArgs = { + creative: CreativeInput; +}; + + +export type MutationCreateInPageCreativeArgs = { + createInPageCreativeInput: CreateInPageCreativeInput; +}; + + +export type MutationCreateNewTabPageCreativeArgs = { + createNewTabPageCreativeInput: CreateNewTabPageCreativeInput; +}; + + +export type MutationCreateNotificationCreativeArgs = { + createNotificationCreativeInput: CreateNotificationCreativeInput; +}; + + +export type MutationCreateUserArgs = { + createUserInput: CreateUserInput; +}; + + +export type MutationDeleteAdArgs = { + deleteAdInput: DeleteAdInput; +}; + + +export type MutationRejectAdvertiserArgs = { + id: Scalars['String']['input']; + reason: Scalars['String']['input']; +}; + + +export type MutationRejectAdvertiserRegistrationArgs = { + id: Scalars['String']['input']; + ignore?: Scalars['Boolean']['input']; + reason: Scalars['String']['input']; +}; + + +export type MutationRejectCampaignArgs = { + rejectCampaignInput: RejectCampaignInput; +}; + + +export type MutationRejectCreativeArgs = { + id: Scalars['String']['input']; + reason: Scalars['String']['input']; +}; + + +export type MutationUpdateAdArgs = { + updateAdInput: UpdateAdInput; +}; + + +export type MutationUpdateAdSetArgs = { + updateAdSetInput: UpdateAdSetInput; +}; + + +export type MutationUpdateAdvertiserArgs = { + updateAdvertiserInput: UpdateAdvertiserInput; +}; + + +export type MutationUpdateCampaignArgs = { + updateCampaignInput: UpdateCampaignInput; +}; + + +export type MutationUpdateCreativeArgs = { + creative: CreativeInput; + id: Scalars['String']['input']; +}; + + +export type MutationUpdateNotificationCreativeArgs = { + updateNotificationCreativeInput: UpdateNotificationCreativeInput; +}; + + +export type MutationUpdateUserArgs = { + updateUserInput: UpdateUserInput; +}; + +export type NewTabPagePayload = { + __typename?: 'NewTabPagePayload'; + logo?: Maybe; + wallpapers?: Maybe>; +}; + +export type NewTabPagePayloadInput = { + logo?: InputMaybe; + wallpapers?: InputMaybe>; +}; + +export type NotificationPayload = { + __typename?: 'NotificationPayload'; + body: Scalars['String']['output']; + targetUrl: Scalars['String']['output']; + title: Scalars['String']['output']; +}; + +export type NotificationPayloadInput = { + body: Scalars['String']['input']; + targetUrl: Scalars['String']['input']; + title: Scalars['String']['input']; +}; + +export type Os = { + __typename?: 'OS'; + code: Scalars['String']['output']; + createdAt: Scalars['DateTime']['output']; + id: Scalars['String']['output']; + modifiedAt: Scalars['DateTime']['output']; + name: Scalars['String']['output']; +}; + +export type Payload = { + __typename?: 'Payload'; + body?: Maybe; + creativeUrl?: Maybe; + logo?: Maybe; + size?: Maybe; + targetUrl?: Maybe; + title?: Maybe; + wallpapers?: Maybe>; +}; + +export enum PaymentType { + ManualBat = 'MANUAL_BAT', + Netsuite = 'NETSUITE', + Radom = 'RADOM', + Stripe = 'STRIPE' +} + +/** For NTT campaigns, metric values are ranged with min and max values. In this case, metrics is equivalent to `min`, though the min-max range should usually be shown in preference. For other campaign formats, `metrics` `min` and `max` are all set to the same values. */ +export type Performance = { + __typename?: 'Performance'; + dimensions: Dimensions; + max: Metrics; + metrics: Metrics; + min: Metrics; +}; + +export type PerformanceFilter = { + /** include metrics for all these advertisers' campaigns */ + advertiserIds?: InputMaybe>; + /** include metrics for all these campaigns */ + campaignIds?: InputMaybe>; + /** include only metrics for responses for all these countries */ + country?: InputMaybe>; + /** include metrics starting from this time (inclusive) */ + from?: InputMaybe; + /** include only metrics for responses for all these operating systems */ + os?: InputMaybe>; + /** include only metrics for responses for all these segments */ + segment?: InputMaybe>; + /** include metrics before this time (inclusive) */ + to?: InputMaybe; +}; + +export type PerformanceResults = { + __typename?: 'PerformanceResults'; + total: PerformanceValues; + values: Array; +}; + +export type PerformanceValues = { + __typename?: 'PerformanceValues'; + max: Metrics; + metrics: Metrics; + min: Metrics; +}; + +export type PromotedContentPayload = { + __typename?: 'PromotedContentPayload'; + category: Scalars['String']['output']; + contentType: Scalars['String']['output']; + description: Scalars['String']['output']; + domain?: Maybe; + feed: Scalars['String']['output']; + ogImages: Scalars['Boolean']['output']; + title: Scalars['String']['output']; +}; + +export type PromotedContentPayloadInput = { + category: Scalars['String']['input']; + contentType: Scalars['String']['input']; + description: Scalars['String']['input']; + domain?: InputMaybe; + feed: Scalars['String']['input']; + ogImages: Scalars['Boolean']['input']; + title: Scalars['String']['input']; +}; + +export type Query = { + __typename?: 'Query'; + /** @deprecated use geocodes instead */ + activeGeocodes: ActiveGeocodesQueryDto; + ad?: Maybe; + adSet?: Maybe; + advertiser?: Maybe; + advertiserCampaigns?: Maybe; + advertiserCount: Scalars['Float']['output']; + advertisers: Array; + campaign?: Maybe; + campaignCount: Scalars['Int']['output']; + campaigns: Array; + campaignsPerCountry: CampaignsPerCountryQueryDto; + campaignsPerCurrency: CampaignsPerCurrencyQueryDto; + changes: Array; + confirmationCount: Scalars['Float']['output']; + creative?: Maybe; + creativeCampaigns: Array; + creatives: Array; + creativesCount: Scalars['Int']['output']; + engagementsOverview?: Maybe>; + geocodes: Array; + performance: PerformanceResults; + registrations: Registrations; + searchProspects: SearchProspects; + segments: SegmentsQueryDto; + targetingTerms: Array; + user: User; + userCount: Scalars['Int']['output']; + users: Array; + validateTargetUrl: TargetUrlValidation; +}; + + +export type QueryAdArgs = { + id: Scalars['String']['input']; + includeDeleted?: InputMaybe; +}; + + +export type QueryAdSetArgs = { + id: Scalars['String']['input']; +}; + + +export type QueryAdvertiserArgs = { + id: Scalars['String']['input']; +}; + + +export type QueryAdvertiserCampaignsArgs = { + filter?: InputMaybe; + id: Scalars['String']['input']; +}; + + +export type QueryAdvertiserCountArgs = { + filter?: InputMaybe; + state?: InputMaybe; +}; + + +export type QueryAdvertisersArgs = { + filter?: InputMaybe; +}; + + +export type QueryCampaignArgs = { + id: Scalars['String']['input']; +}; + + +export type QueryCampaignCountArgs = { + filter?: InputMaybe; +}; + + +export type QueryCampaignsArgs = { + filter?: InputMaybe; +}; + + +export type QueryChangesArgs = { + filter: ChangeFilter; +}; + + +export type QueryCreativeArgs = { + id: Scalars['String']['input']; +}; + + +export type QueryCreativeCampaignsArgs = { + advertiserId: Scalars['String']['input']; + creativeId: Scalars['String']['input']; +}; + + +export type QueryCreativesArgs = { + filter?: InputMaybe; +}; + + +export type QueryCreativesCountArgs = { + filter?: InputMaybe; +}; + + +export type QueryEngagementsOverviewArgs = { + advertiserId?: InputMaybe; + campaignIds?: InputMaybe>; + filter?: InputMaybe; +}; + + +export type QueryPerformanceArgs = { + filter?: PerformanceFilter; +}; + + +export type QueryUserArgs = { + id: Scalars['String']['input']; +}; + + +export type QueryValidateTargetUrlArgs = { + targetUrl: Scalars['String']['input']; +}; + +export type Redirect = { + __typename?: 'Redirect'; + /** @deprecated use violations and warnings instead */ + errors: Array; + url: Scalars['String']['output']; + violations: Array; + warnings: Array; +}; + +export type Registration = { + __typename?: 'Registration'; + businessName: Scalars['String']['output']; + createdAt: Scalars['DateTime']['output']; + description: Scalars['String']['output']; + email: Scalars['String']['output']; + fullName: Scalars['String']['output']; + id: Scalars['String']['output']; + marketingChannel?: Maybe; + state: RegistrationState; + url: Scalars['String']['output']; +}; + +export type RegistrationFilter = { + state?: InputMaybe; +}; + +export enum RegistrationState { + Approved = 'APPROVED', + Denied = 'DENIED', + UnderReview = 'UNDER_REVIEW' +} + +export type Registrations = { + __typename?: 'Registrations'; + all: Array; + count: Scalars['Float']['output']; +}; + + +export type RegistrationsAllArgs = { + filter?: InputMaybe; +}; + + +export type RegistrationsCountArgs = { + filter?: InputMaybe; +}; + +export type RejectCampaignInput = { + campaignId: Scalars['String']['input']; + message?: InputMaybe; + option: CampaignRejection; +}; + +export type SearchDomain = { + __typename?: 'SearchDomain'; + country: Scalars['String']['output']; + domain: Scalars['String']['output']; +}; + +export type SearchDomainEligibility = { + __typename?: 'SearchDomainEligibility'; + entries: Scalars['String']['output']; + estimatedClicks: Scalars['String']['output']; + estimatedQpw: Scalars['String']['output']; + status: Scalars['String']['output']; + trialBudget: Scalars['String']['output']; +}; + +export type SearchHomepagePayload = { + __typename?: 'SearchHomepagePayload'; + body: Scalars['String']['output']; + ctaText: Scalars['String']['output']; + imageDarkModeUrl?: Maybe; + imageUrl: Scalars['String']['output']; + targetUrl: Scalars['String']['output']; + title: Scalars['String']['output']; +}; + +export type SearchHomepagePayloadInput = { + body: Scalars['String']['input']; + ctaText?: Scalars['String']['input']; + imageDarkModeUrl?: InputMaybe; + imageUrl: Scalars['String']['input']; + targetUrl: Scalars['String']['input']; + title: Scalars['String']['input']; +}; + +export type SearchLandingPage = { + __typename?: 'SearchLandingPage'; + country: Scalars['String']['output']; + creatives: Array; + domain: Scalars['String']['output']; + queries: Array; + url: Scalars['String']['output']; +}; + +export type SearchLandingPageCreative = { + __typename?: 'SearchLandingPageCreative'; + body?: Maybe; + count: Scalars['Numeric']['output']; + lastSeen: Scalars['DateTime']['output']; + rank: Scalars['Numeric']['output']; + title: Scalars['String']['output']; +}; + +export type SearchLandingPageQuery = { + __typename?: 'SearchLandingPageQuery'; + count: Scalars['Numeric']['output']; + lastSeen: Scalars['DateTime']['output']; + query: Scalars['String']['output']; + rank: Scalars['Numeric']['output']; +}; + +export type SearchLandingPageWithStats = { + __typename?: 'SearchLandingPageWithStats'; + count: Scalars['Numeric']['output']; + country: Scalars['String']['output']; + creatives: Array; + domain: Scalars['String']['output']; + lastSeen: Scalars['DateTime']['output']; + queries: Array; + rank: Scalars['Numeric']['output']; + url: Scalars['String']['output']; +}; + +export type SearchPayload = { + __typename?: 'SearchPayload'; + body: Scalars['String']['output']; + /** ad-hoc parameters passed to search */ + meta?: Maybe; + /** optionally, how this creative should be rendered with the SERP */ + style?: Maybe; + targetUrl: Scalars['String']['output']; + title: Scalars['String']['output']; +}; + +export type SearchPayloadInput = { + body: Scalars['String']['input']; + /** ad-hoc parameters passed to search */ + meta?: InputMaybe; + /** optionally, how this creative should be rendered with the SERP */ + style?: InputMaybe; + targetUrl: Scalars['String']['input']; + title: Scalars['String']['input']; +}; + +export type SearchProspects = { + __typename?: 'SearchProspects'; + domains: Array; + eligibilityStats: SearchDomainEligibility; + landingPage: SearchLandingPage; + landingPages: Array; + landingPagesWithStats: Array; +}; + + +export type SearchProspectsDomainsArgs = { + country: Scalars['String']['input']; + limit?: InputMaybe; + offset?: InputMaybe; + partialDomain: Scalars['String']['input']; +}; + + +export type SearchProspectsEligibilityStatsArgs = { + country: Scalars['String']['input']; + domain: Scalars['String']['input']; +}; + + +export type SearchProspectsLandingPageArgs = { + country: Scalars['String']['input']; + domain: Scalars['String']['input']; + url: Scalars['String']['input']; +}; + + +export type SearchProspectsLandingPagesArgs = { + country: Scalars['String']['input']; + domain: Scalars['String']['input']; + urls: Array; +}; + + +export type SearchProspectsLandingPagesWithStatsArgs = { + country: Scalars['String']['input']; + domain: Scalars['String']['input']; + limit?: Scalars['Float']['input']; + offset?: Scalars['Float']['input']; +}; + +export type Segment = { + __typename?: 'Segment'; + code: Scalars['String']['output']; + createdAt: Scalars['DateTime']['output']; + id: Scalars['String']['output']; + modifiedAt: Scalars['DateTime']['output']; + name: Scalars['String']['output']; +}; + +export type SegmentsEntry = { + __typename?: 'SegmentsEntry'; + code: Scalars['String']['output']; + name: Scalars['String']['output']; +}; + +export type SegmentsQueryDto = { + __typename?: 'SegmentsQueryDTO'; + data: Array; +}; + +export type TargetUrlValidation = { + __typename?: 'TargetUrlValidation'; + /** @deprecated use redirects.violations and redirects.warnings instead */ + errors: Array; + isValid: Scalars['Boolean']['output']; + redirects: Array; +}; + +export type UpdateAdInput = { + creativeId?: InputMaybe; + creativeSetId?: InputMaybe; + id?: InputMaybe; + state?: InputMaybe; + webhooks?: InputMaybe>; +}; + +export type UpdateAdSetInput = { + ads?: InputMaybe>; + bannedKeywords?: InputMaybe>; + billingType?: InputMaybe; + brandedDesktopPrice?: InputMaybe; + brandedMobilePrice?: InputMaybe; + campaignId?: InputMaybe; + conversions?: InputMaybe>; + externalId?: InputMaybe; + id?: InputMaybe; + keywordSimilarity?: InputMaybe; + keywords?: InputMaybe>; + name?: InputMaybe; + negativeKeywords?: InputMaybe>; + negativeTriggerUrls?: InputMaybe>; + nonBrandedDesktopPrice?: InputMaybe; + nonBrandedMobilePrice?: InputMaybe; + optimized?: InputMaybe; + oses?: InputMaybe>; + perDay?: InputMaybe; + /** The price in the owning campaign's currency for each single confirmation of the priceType specified. Note therefore that the caller is responsible for dividing cost-per-mille by 1000. */ + price?: InputMaybe; + segments?: InputMaybe>; + splitTestGroup?: InputMaybe; + state?: InputMaybe; + targetingTerms?: InputMaybe>; + totalMax?: InputMaybe; + triggerUrls?: InputMaybe>; +}; + +export type UpdateAddressInput = { + city?: InputMaybe; + country?: InputMaybe; + /** Temporarily nullable so the frontend does not break */ + id?: InputMaybe; + state?: InputMaybe; + street1?: InputMaybe; + street2?: InputMaybe; + zipcode?: InputMaybe; +}; + +export type UpdateAdvertiserInput = { + accountManagerId?: InputMaybe; + additionalBillingEmails?: InputMaybe>; + /** Agreed to Terms And Conditions - Advertiser Facing Dashboard */ + agreed?: InputMaybe; + billingAddress?: InputMaybe; + billingEmail?: InputMaybe; + billingModelPrices?: InputMaybe>; + description?: InputMaybe; + id: Scalars['String']['input']; + marketingChannel?: InputMaybe; + name?: InputMaybe; + phone?: InputMaybe; + publicKey?: InputMaybe; + referrer?: InputMaybe; + selfServiceManageCampaign?: InputMaybe; + state?: InputMaybe; + url?: InputMaybe; + userId?: InputMaybe; + users?: InputMaybe>; +}; + +export type UpdateCampaignInput = { + accountManagerId?: InputMaybe; + adSets?: InputMaybe>; + advertiserId?: InputMaybe; + bannedKeywords?: InputMaybe>; + brandedKeyword?: InputMaybe; + brandedKeywords?: InputMaybe>; + budget?: InputMaybe; + currency?: InputMaybe; + dailyBudget?: InputMaybe; + dailyCap?: InputMaybe; + dayPartings?: InputMaybe>; + dayProportion?: InputMaybe; + endAt?: InputMaybe; + externalId?: InputMaybe; + geoTargets?: InputMaybe>; + id: Scalars['String']['input']; + name?: InputMaybe; + pacingOverride?: InputMaybe; + pacingStrategy?: InputMaybe; + passThroughRate?: InputMaybe; + paymentType?: InputMaybe; + priority?: InputMaybe; + startAt?: InputMaybe; + state?: InputMaybe; + stripePaymentId?: InputMaybe; + type?: InputMaybe; +}; + +export type UpdateConversionsInput = { + extractExternalId?: InputMaybe; + id?: InputMaybe; + observationWindow?: InputMaybe; + trailingAsteriskNotRequired?: InputMaybe; + type?: InputMaybe; + urlPattern?: InputMaybe; +}; + +export type UpdateNotificationCreativeInput = { + advertiserId?: InputMaybe; + creativeId?: InputMaybe; + endAt?: InputMaybe; + name?: InputMaybe; + payload?: InputMaybe; + startAt?: InputMaybe; + state?: InputMaybe; + type?: InputMaybe; + userId?: InputMaybe; +}; + +export type UpdateOSesInput = { + code?: InputMaybe; + name?: InputMaybe; +}; + +export type UpdateSegmentInput = { + code?: InputMaybe; + name?: InputMaybe; +}; + +export type UpdateUserInput = { + email?: InputMaybe; + emailVerified?: InputMaybe; + fullName?: InputMaybe; + id?: InputMaybe; + password?: InputMaybe; + role?: InputMaybe; +}; + +export type User = { + __typename?: 'User'; + advertisers: Array; + createdAt: Scalars['String']['output']; + email: Scalars['String']['output']; + emailVerified: Scalars['Boolean']['output']; + fullName: Scalars['String']['output']; + id: Scalars['String']['output']; + role: Scalars['String']['output']; +}; + +export type ValidationDetail = { + __typename?: 'ValidationDetail'; + detail: Scalars['String']['output']; + summary: Scalars['String']['output']; +}; + +export type Wallpaper = { + __typename?: 'Wallpaper'; + focalPoint: FocalPoint; + imageUrl: Scalars['String']['output']; +}; + +export type WallpaperInput = { + focalPoint: FocalPointInput; + imageUrl: Scalars['String']['input']; +}; + +export type Webhook = { + __typename?: 'Webhook'; + type: Scalars['String']['output']; + url: Scalars['String']['output']; +}; + +export type CreateWebhookInput = { + type: Scalars['String']['input']; + url: Scalars['String']['input']; +}; + +export type AdFragment = { __typename?: 'Ad', id: string, state: string, price: string, priceType: ConfirmationType, 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 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, price: string, priceType: ConfirmationType, 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 AdSetWithDeletedAdsFragment = { __typename?: 'AdSet', id: string, createdAt: string, name: string, state: string, billingType?: string | null, oses: Array<{ __typename?: 'OS', code: string, name: string }>, segments: Array<{ __typename?: 'Segment', code: string, name: string }>, conversions: Array<{ __typename?: 'Conversion', id: string }>, ads: Array<{ __typename?: 'Ad', id: string, state: string, price: string, priceType: ConfirmationType, 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 CreateAdSetMutationVariables = Exact<{ + createAdSetInput: CreateAdSetInput; +}>; + + +export type CreateAdSetMutation = { __typename?: 'Mutation', createAdSet: { __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, price: string, priceType: ConfirmationType, 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 UpdateAdSetMutationVariables = Exact<{ + updateAdSetInput: UpdateAdSetInput; +}>; + + +export type UpdateAdSetMutation = { __typename?: 'Mutation', updateAdSet: { __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, price: string, priceType: ConfirmationType, 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 AdvertiserBillingAddressFragment = { __typename?: 'Advertiser', billingAddress?: { __typename?: 'Address', id: string, street1: string, street2?: string | null, city: string, country: string, state: string, zipcode: string } | null }; + +export type AdvertiserSummaryFragment = { __typename?: 'Advertiser', id: string, name: string, state: string, billingEmail?: string | null, additionalBillingEmails?: Array | null, createdAt: string, modifiedAt: string, publicKey?: string | null }; + +export type AdvertiserFragment = { __typename?: 'Advertiser', referrer?: string | null, phone?: string | null, selfServiceManageCampaign: boolean, selfServiceSetPrice: boolean, id: string, name: string, state: string, billingEmail?: string | null, additionalBillingEmails?: Array | null, createdAt: string, modifiedAt: 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, spent: number, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null }> }; + +export type AdvertiserImageFragment = { __typename?: 'AdvertiserImage', name: string, imageUrl: string, format: CampaignFormat, id: string, createdAt: string }; + +export type AdvertiserPriceFragment = { __typename?: 'AdvertiserPrice', billingModelPrice: string, billingType: BillingType, format: CampaignFormat }; + +export type AdvertiserQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +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 AdvertiserCampaignsQueryVariables = Exact<{ + id: Scalars['String']['input']; + filter?: InputMaybe; +}>; + + +export type AdvertiserCampaignsQuery = { __typename?: 'Query', advertiserCampaigns?: { __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, spent: number, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null }> } | null }; + +export type AdvertiserImagesQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type AdvertiserImagesQuery = { __typename?: 'Query', advertiser?: { __typename?: 'Advertiser', images: Array<{ __typename?: 'AdvertiserImage', name: string, imageUrl: string, format: CampaignFormat, id: string, createdAt: string }> } | null }; + +export type AdvertiserPricesQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type AdvertiserPricesQuery = { __typename?: 'Query', advertiser?: { __typename?: 'Advertiser', prices: Array<{ __typename?: 'AdvertiserPrice', billingModelPrice: string, billingType: BillingType, format: CampaignFormat }> } | null }; + +export type AdvertiserBillingAddressQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type AdvertiserBillingAddressQuery = { __typename?: 'Query', advertiser?: { __typename?: 'Advertiser', id: string, billingAddress?: { __typename?: 'Address', id: string, street1: string, street2?: string | null, city: string, country: string, state: string, zipcode: string } | null } | null }; + +export type UploadAdvertiserImageMutationVariables = Exact<{ + input: CreateAdvertiserImageInput; +}>; + + +export type UploadAdvertiserImageMutation = { __typename?: 'Mutation', createAdvertiserImage: { __typename?: 'AdvertiserImage', name: string } }; + +export type EngagementFragment = { __typename?: 'Engagement', creativeinstanceid: string, createdat: string, type: string, pricetype: string, creativesetname?: string | null, creativesetid: string, creativename: string, creativeid: string, creativestate: string, creativepayload: string, view: string, click: string, viewthroughConversion: string, clickthroughConversion: string, conversion: string, dismiss: string, downvote: string, landed: string, spend: string, upvote: string, price: number, android: number, ios: number, linux: number, macos: number, windows: number }; + +export type CampaignWithEngagementsFragment = { __typename?: 'Campaign', id: string, name: string, state: string, budget: number, spent: number, currency: string, createdAt: string, startAt: string, endAt: string, pacingIndex?: number | null, format: CampaignFormat, adSets: Array<{ __typename?: 'AdSet', id: string, conversions: Array<{ __typename?: 'Conversion', id: string, type: string, extractExternalId: boolean }> }>, engagements: Array<{ __typename?: 'Engagement', creativeinstanceid: string, createdat: string, type: string, pricetype: string, creativesetname?: string | null, creativesetid: string, creativename: string, creativeid: string, creativestate: string, creativepayload: string, view: string, click: string, viewthroughConversion: string, clickthroughConversion: string, conversion: string, dismiss: string, downvote: string, landed: string, spend: string, upvote: string, price: number, android: number, ios: number, linux: number, macos: number, windows: number }> }; + +export type CampaignMetricSummaryValuesFragment = { __typename?: 'Metrics', click: string, impression: string, siteVisit: string, spendUsd: string, rates: { __typename?: 'MetricRates', clickThrough: string } }; + +export type CampaignMetricDetailValuesFragment = { __typename?: 'Metrics', click: string, impression: string, siteVisit: string, conversion: string, dismiss: string, spendUsd: string, rates: { __typename?: 'MetricRates', clickThrough: string, clickToConversion: string, costPerAcquisition: string } }; + +export type DailyValuesFragment = { __typename?: 'Performance', dimensions: { __typename?: 'Dimensions', day: string }, metrics: { __typename?: 'Metrics', click: string, impression: string, siteVisit: string, conversion: string, dismiss: string, spendUsd: string, rates: { __typename?: 'MetricRates', clickThrough: string, clickToConversion: string, costPerAcquisition: string } } }; + +export type AdSetValuesFragment = { __typename?: 'Performance', dimensions: { __typename?: 'Dimensions', adSet: { __typename?: 'AdSet', id: string, name: string, state: string, billingType?: string | null } }, metrics: { __typename?: 'Metrics', click: string, impression: string, siteVisit: string, conversion: string, dismiss: string, spendUsd: string, rates: { __typename?: 'MetricRates', clickThrough: string, clickToConversion: string, costPerAcquisition: string } } }; + +export type AnalyticOverviewQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type AnalyticOverviewQuery = { __typename?: 'Query', campaign?: { __typename?: 'Campaign', id: string, name: string, state: string, budget: number, spent: number, currency: string, createdAt: string, startAt: string, endAt: string, pacingIndex?: number | null, format: CampaignFormat, adSets: Array<{ __typename?: 'AdSet', id: string, conversions: Array<{ __typename?: 'Conversion', id: string, type: string, extractExternalId: boolean }> }>, engagements: Array<{ __typename?: 'Engagement', creativeinstanceid: string, createdat: string, type: string, pricetype: string, creativesetname?: string | null, creativesetid: string, creativename: string, creativeid: string, creativestate: string, creativepayload: string, view: string, click: string, viewthroughConversion: string, clickthroughConversion: string, conversion: string, dismiss: string, downvote: string, landed: string, spend: string, upvote: string, price: number, android: number, ios: number, linux: number, macos: number, windows: number }> } | null }; + +export type CampaignMetricsQueryVariables = Exact<{ + campaignIds: Array | Scalars['String']['input']; +}>; + + +export type CampaignMetricsQuery = { __typename?: 'Query', performance: { __typename?: 'PerformanceResults', values: Array<{ __typename?: 'Performance', dimensions: { __typename?: 'Dimensions', campaign: { __typename?: 'Campaign', id: string } }, metrics: { __typename?: 'Metrics', click: string, impression: string, siteVisit: string, spendUsd: string, rates: { __typename?: 'MetricRates', clickThrough: string } } }> } }; + +export type FetchDailyMetricsForCampaignQueryVariables = Exact<{ + filter: PerformanceFilter; +}>; + + +export type FetchDailyMetricsForCampaignQuery = { __typename?: 'Query', performance: { __typename?: 'PerformanceResults', values: Array<{ __typename?: 'Performance', dimensions: { __typename?: 'Dimensions', day: string }, metrics: { __typename?: 'Metrics', click: string, impression: string, siteVisit: string, conversion: string, dismiss: string, spendUsd: string, rates: { __typename?: 'MetricRates', clickThrough: string, clickToConversion: string, costPerAcquisition: string } } }>, total: { __typename?: 'PerformanceValues', metrics: { __typename?: 'Metrics', click: string, impression: string, siteVisit: string, conversion: string, dismiss: string, spendUsd: string, rates: { __typename?: 'MetricRates', clickThrough: string, clickToConversion: string, costPerAcquisition: string } } } } }; + +export type FetchAdSetMetricsForCampaignQueryVariables = Exact<{ + filter: PerformanceFilter; +}>; + + +export type FetchAdSetMetricsForCampaignQuery = { __typename?: 'Query', performance: { __typename?: 'PerformanceResults', values: Array<{ __typename?: 'Performance', dimensions: { __typename?: 'Dimensions', adSet: { __typename?: 'AdSet', id: string, name: string, state: string, billingType?: string | null } }, metrics: { __typename?: 'Metrics', click: string, impression: string, siteVisit: string, conversion: string, dismiss: string, spendUsd: string, rates: { __typename?: 'MetricRates', clickThrough: string, clickToConversion: string, costPerAcquisition: string } } }> } }; + +export type CampaignFragment = { __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, spent: number, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, paymentType: PaymentType, dayProportion?: number | null, stripePaymentId?: string | null, hasPaymentIntent: boolean, dayPartings: Array<{ __typename?: 'DayParting', dow: string, startMinute: number, endMinute: number }>, geoTargets: Array<{ __typename?: 'Geocode', code: string, name: string }>, adSets: Array<{ __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, price: string, priceType: ConfirmationType, 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 } }> }>, advertiser: { __typename?: 'Advertiser', id: string } }; + +export type CampaignSummaryFragment = { __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, spent: number, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null }; + +export type CampaignAdsFragment = { __typename?: 'Campaign', id: string, name: string, state: string, startAt: string, endAt: string, source: CampaignSource, currency: string, format: CampaignFormat, advertiser: { __typename?: 'Advertiser', id: string }, adSets: Array<{ __typename?: 'AdSet', id: string, createdAt: string, name: string, state: string, billingType?: string | null, oses: Array<{ __typename?: 'OS', code: string, name: string }>, segments: Array<{ __typename?: 'Segment', code: string, name: string }>, conversions: Array<{ __typename?: 'Conversion', id: string }>, ads: Array<{ __typename?: 'Ad', id: string, state: string, price: string, priceType: ConfirmationType, 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 LoadCampaignQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type LoadCampaignQuery = { __typename?: 'Query', campaign?: { __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, spent: number, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, paymentType: PaymentType, dayProportion?: number | null, stripePaymentId?: string | null, hasPaymentIntent: boolean, dayPartings: Array<{ __typename?: 'DayParting', dow: string, startMinute: number, endMinute: number }>, geoTargets: Array<{ __typename?: 'Geocode', code: string, name: string }>, adSets: Array<{ __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, price: string, priceType: ConfirmationType, 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 } }> }>, advertiser: { __typename?: 'Advertiser', id: string } } | null }; + +export type LoadCampaignAdsQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type LoadCampaignAdsQuery = { __typename?: 'Query', campaign?: { __typename?: 'Campaign', id: string, name: string, state: string, startAt: string, endAt: string, source: CampaignSource, currency: string, format: CampaignFormat, advertiser: { __typename?: 'Advertiser', id: string }, adSets: Array<{ __typename?: 'AdSet', id: string, createdAt: string, name: string, state: string, billingType?: string | null, oses: Array<{ __typename?: 'OS', code: string, name: string }>, segments: Array<{ __typename?: 'Segment', code: string, name: string }>, conversions: Array<{ __typename?: 'Conversion', id: string }>, ads: Array<{ __typename?: 'Ad', id: string, state: string, price: string, priceType: ConfirmationType, 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 } }> }> } | null }; + +export type LoadCampaignSummaryQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type LoadCampaignSummaryQuery = { __typename?: 'Query', campaign?: { __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, spent: number, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null } | null }; + +export type CreateCampaignMutationVariables = Exact<{ + input: CreateCampaignInput; +}>; + + +export type CreateCampaignMutation = { __typename?: 'Mutation', createCampaign: { __typename?: 'Campaign', id: string, paymentType: PaymentType } }; + +export type UpdateCampaignMutationVariables = Exact<{ + input: UpdateCampaignInput; +}>; + + +export type UpdateCampaignMutation = { __typename?: 'Mutation', updateCampaign: { __typename?: 'Campaign', id: string, paymentType: PaymentType, stripePaymentId?: string | null } }; + +export type GeocodeFragment = { __typename?: 'Geocode', code: string, name: string }; + +export type SegmentFragment = { __typename?: 'SegmentsEntry', code: string, name: string }; + +export type ActiveGeocodesQueryVariables = Exact<{ [key: string]: never; }>; + + +export type ActiveGeocodesQuery = { __typename?: 'Query', geocodes: Array<{ __typename?: 'Geocode', code: string, name: string }> }; + +export type SegmentsQueryVariables = Exact<{ [key: string]: never; }>; + + +export type SegmentsQuery = { __typename?: 'Query', segments: { __typename?: 'SegmentsQueryDTO', data: Array<{ __typename?: 'SegmentsEntry', code: string, name: string }> } }; + +export type CreativeFragment = { __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 AdvertiserCreativesQueryVariables = Exact<{ + advertiserId: Scalars['String']['input']; +}>; + + +export type AdvertiserCreativesQuery = { __typename?: 'Query', advertiser?: { __typename?: 'Advertiser', id: string, creatives: Array<{ __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 }> } | null }; + +export type CreateCreativeMutationVariables = Exact<{ + input: CreativeInput; +}>; + + +export type CreateCreativeMutation = { __typename?: 'Mutation', createCreative: { __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 UpdateCreativeMutationVariables = Exact<{ + id: Scalars['String']['input']; + input: CreativeInput; +}>; + + +export type UpdateCreativeMutation = { __typename?: 'Mutation', updateCreative: { __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 LoadCreativeQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type LoadCreativeQuery = { __typename?: 'Query', 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 } | null }; + +export type CampaignsForCreativeQueryVariables = Exact<{ + creativeId: Scalars['String']['input']; + advertiserId: Scalars['String']['input']; +}>; + + +export type CampaignsForCreativeQuery = { __typename?: 'Query', creativeCampaigns: Array<{ __typename?: 'Campaign', id: string, name: string, state: string, format: CampaignFormat }> }; + +export type ValidateTargetUrlQueryVariables = Exact<{ + url: Scalars['String']['input']; +}>; + + +export type ValidateTargetUrlQuery = { __typename?: 'Query', validateTargetUrl: { __typename?: 'TargetUrlValidation', isValid: boolean, redirects: Array<{ __typename?: 'Redirect', url: string, violations: Array<{ __typename?: 'ValidationDetail', summary: string, detail: string }> }> } }; + +export type UserFragment = { __typename?: 'User', email: string, fullName: string, id: string, role: string }; + +export type LoadUserQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type LoadUserQuery = { __typename?: 'Query', user: { __typename?: 'User', email: string, fullName: string, id: string, role: string } }; + +export type UpdateUserMutationVariables = Exact<{ + input: UpdateUserInput; +}>; + + +export type UpdateUserMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', email: string, fullName: string, id: string, role: string } }; + +export const AdvertiserBillingAddressFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserBillingAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Advertiser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"street1"}},{"kind":"Field","name":{"kind":"Name","value":"street2"}},{"kind":"Field","name":{"kind":"Name","value":"city"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"zipcode"}}]}}]}}]} as unknown as DocumentNode; +export const AdvertiserSummaryFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserSummary"},"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":"state"}},{"kind":"Field","name":{"kind":"Name","value":"billingEmail"}},{"kind":"Field","name":{"kind":"Name","value":"additionalBillingEmails"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"modifiedAt"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]} as unknown as DocumentNode; +export const AdvertiserFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Advertiser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Advertiser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserSummary"}},{"kind":"Field","name":{"kind":"Name","value":"referrer"}},{"kind":"Field","name":{"kind":"Name","value":"phone"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceManageCampaign"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceSetPrice"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserSummary"},"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":"state"}},{"kind":"Field","name":{"kind":"Name","value":"billingEmail"}},{"kind":"Field","name":{"kind":"Name","value":"additionalBillingEmails"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"modifiedAt"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]} as unknown as DocumentNode; +export const CampaignSummaryFragmentDoc = {"kind":"Document","definitions":[{"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":"spent"}},{"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":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}}]}}]} as unknown as DocumentNode; +export const AdvertiserCampaignsFragmentDoc = {"kind":"Document","definitions":[{"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"}}]}}]}},{"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":"spent"}},{"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":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}}]}}]} as unknown as DocumentNode; +export const AdvertiserImageFragmentDoc = {"kind":"Document","definitions":[{"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 AdvertiserPriceFragmentDoc = {"kind":"Document","definitions":[{"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; +export const EngagementFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Engagement"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Engagement"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"creativeinstanceid"}},{"kind":"Field","name":{"kind":"Name","value":"createdat"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"pricetype"}},{"kind":"Field","name":{"kind":"Name","value":"creativesetname"}},{"kind":"Field","name":{"kind":"Name","value":"creativesetid"}},{"kind":"Field","name":{"kind":"Name","value":"creativename"}},{"kind":"Field","name":{"kind":"Name","value":"creativeid"}},{"kind":"Field","name":{"kind":"Name","value":"creativestate"}},{"kind":"Field","name":{"kind":"Name","value":"creativepayload"}},{"kind":"Field","name":{"kind":"Name","value":"view"}},{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"viewthroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"clickthroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"kind":"Field","name":{"kind":"Name","value":"landed"}},{"kind":"Field","name":{"kind":"Name","value":"spend"}},{"kind":"Field","name":{"kind":"Name","value":"upvote"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"android"}},{"kind":"Field","name":{"kind":"Name","value":"ios"}},{"kind":"Field","name":{"kind":"Name","value":"linux"}},{"kind":"Field","name":{"kind":"Name","value":"macos"}},{"kind":"Field","name":{"kind":"Name","value":"windows"}}]}}]} as unknown as DocumentNode; +export const CampaignWithEngagementsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignWithEngagements"},"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":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"spent"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"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":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"pacingIndex"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"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":"type"}},{"kind":"Field","name":{"kind":"Name","value":"extractExternalId"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"engagements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Engagement"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Engagement"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Engagement"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"creativeinstanceid"}},{"kind":"Field","name":{"kind":"Name","value":"createdat"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"pricetype"}},{"kind":"Field","name":{"kind":"Name","value":"creativesetname"}},{"kind":"Field","name":{"kind":"Name","value":"creativesetid"}},{"kind":"Field","name":{"kind":"Name","value":"creativename"}},{"kind":"Field","name":{"kind":"Name","value":"creativeid"}},{"kind":"Field","name":{"kind":"Name","value":"creativestate"}},{"kind":"Field","name":{"kind":"Name","value":"creativepayload"}},{"kind":"Field","name":{"kind":"Name","value":"view"}},{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"viewthroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"clickthroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"kind":"Field","name":{"kind":"Name","value":"landed"}},{"kind":"Field","name":{"kind":"Name","value":"spend"}},{"kind":"Field","name":{"kind":"Name","value":"upvote"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"android"}},{"kind":"Field","name":{"kind":"Name","value":"ios"}},{"kind":"Field","name":{"kind":"Name","value":"linux"}},{"kind":"Field","name":{"kind":"Name","value":"macos"}},{"kind":"Field","name":{"kind":"Name","value":"windows"}}]}}]} as unknown as DocumentNode; +export const CampaignMetricSummaryValuesFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignMetricSummaryValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clickThrough"}}]}}]}}]} as unknown as DocumentNode; +export const CampaignMetricDetailValuesFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignMetricDetailValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clickThrough"}},{"kind":"Field","name":{"kind":"Name","value":"clickToConversion"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}}]} as unknown as DocumentNode; +export const DailyValuesFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DailyValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Performance"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dimensions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"day"}}]}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignMetricDetailValues"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignMetricDetailValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clickThrough"}},{"kind":"Field","name":{"kind":"Name","value":"clickToConversion"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}}]} as unknown as DocumentNode; +export const AdSetValuesFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSetValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Performance"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dimensions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adSet"},"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":"billingType"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignMetricDetailValues"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignMetricDetailValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clickThrough"}},{"kind":"Field","name":{"kind":"Name","value":"clickToConversion"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}}]} as unknown as DocumentNode; +export const CreativeFragmentDoc = {"kind":"Document","definitions":[{"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":"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":"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"}}]}}]}}]} as unknown as DocumentNode; +export const AdFragmentDoc = {"kind":"Document","definitions":[{"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"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":"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":"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"}}]}}]}}]} as unknown as DocumentNode; +export const AdSetFragmentDoc = {"kind":"Document","definitions":[{"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"}}]}}]}},{"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":"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":"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}}]} as unknown as DocumentNode; +export const CampaignFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Campaign"},"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":"spent"}},{"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":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"stripePaymentId"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"hasPaymentIntent"}},{"kind":"Field","name":{"kind":"Name","value":"dayPartings"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dow"}},{"kind":"Field","name":{"kind":"Name","value":"startMinute"}},{"kind":"Field","name":{"kind":"Name","value":"endMinute"}}]}},{"kind":"Field","name":{"kind":"Name","value":"geoTargets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSet"}}]}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"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":"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":"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"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 AdSetWithDeletedAdsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSetWithDeletedAds"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"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":"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":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"ads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"includeDeleted"},"value":{"kind":"BooleanValue","value":true}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Ad"}}]}}]}},{"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":"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":"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}}]} as unknown as DocumentNode; +export const CampaignAdsFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignAds"},"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":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSetWithDeletedAds"}}]}}]}},{"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":"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":"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSetWithDeletedAds"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"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":"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":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"ads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"includeDeleted"},"value":{"kind":"BooleanValue","value":true}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Ad"}}]}}]}}]} as unknown as DocumentNode; +export const GeocodeFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Geocode"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Geocode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; +export const SegmentFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Segment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SegmentsEntry"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; +export const UserFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"fullName"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]} 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":"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":"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"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":"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":"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"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":"spent"}},{"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":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}}]}},{"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":"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":"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; +export const AdvertiserBillingAddressDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"advertiserBillingAddress"},"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":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserBillingAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserBillingAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Advertiser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"street1"}},{"kind":"Field","name":{"kind":"Name","value":"street2"}},{"kind":"Field","name":{"kind":"Name","value":"city"}},{"kind":"Field","name":{"kind":"Name","value":"country"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"zipcode"}}]}}]}}]} as unknown as DocumentNode; +export const UploadAdvertiserImageDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"uploadAdvertiserImage"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateAdvertiserImageInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createAdvertiserImage"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"createImageInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; +export const AnalyticOverviewDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"analyticOverview"},"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":"campaign"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignWithEngagements"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Engagement"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Engagement"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"creativeinstanceid"}},{"kind":"Field","name":{"kind":"Name","value":"createdat"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"pricetype"}},{"kind":"Field","name":{"kind":"Name","value":"creativesetname"}},{"kind":"Field","name":{"kind":"Name","value":"creativesetid"}},{"kind":"Field","name":{"kind":"Name","value":"creativename"}},{"kind":"Field","name":{"kind":"Name","value":"creativeid"}},{"kind":"Field","name":{"kind":"Name","value":"creativestate"}},{"kind":"Field","name":{"kind":"Name","value":"creativepayload"}},{"kind":"Field","name":{"kind":"Name","value":"view"}},{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"viewthroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"clickthroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"kind":"Field","name":{"kind":"Name","value":"landed"}},{"kind":"Field","name":{"kind":"Name","value":"spend"}},{"kind":"Field","name":{"kind":"Name","value":"upvote"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"kind":"Field","name":{"kind":"Name","value":"price"}},{"kind":"Field","name":{"kind":"Name","value":"android"}},{"kind":"Field","name":{"kind":"Name","value":"ios"}},{"kind":"Field","name":{"kind":"Name","value":"linux"}},{"kind":"Field","name":{"kind":"Name","value":"macos"}},{"kind":"Field","name":{"kind":"Name","value":"windows"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignWithEngagements"},"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":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"spent"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"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":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"pacingIndex"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"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":"type"}},{"kind":"Field","name":{"kind":"Name","value":"extractExternalId"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"engagements"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Engagement"}}]}}]}}]} as unknown as DocumentNode; +export const CampaignMetricsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"campaignMetrics"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"campaignIds"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"performance"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"campaignIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"campaignIds"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"values"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dimensions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"campaign"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignMetricSummaryValues"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignMetricSummaryValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clickThrough"}}]}}]}}]} as unknown as DocumentNode; +export const FetchDailyMetricsForCampaignDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"fetchDailyMetricsForCampaign"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PerformanceFilter"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"performance"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"values"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DailyValues"}}]}},{"kind":"Field","name":{"kind":"Name","value":"total"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignMetricDetailValues"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignMetricDetailValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clickThrough"}},{"kind":"Field","name":{"kind":"Name","value":"clickToConversion"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DailyValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Performance"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dimensions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"day"}}]}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignMetricDetailValues"}}]}}]}}]} as unknown as DocumentNode; +export const FetchAdSetMetricsForCampaignDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"fetchAdSetMetricsForCampaign"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"PerformanceFilter"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"performance"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"values"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSetValues"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignMetricDetailValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"rates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"clickThrough"}},{"kind":"Field","name":{"kind":"Name","value":"clickToConversion"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSetValues"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Performance"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dimensions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adSet"},"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":"billingType"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignMetricDetailValues"}}]}}]}}]} as unknown as DocumentNode; +export const LoadCampaignDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LoadCampaign"},"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":"campaign"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Campaign"}}]}}]}},{"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":"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":"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"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"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Campaign"},"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":"spent"}},{"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":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"stripePaymentId"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"hasPaymentIntent"}},{"kind":"Field","name":{"kind":"Name","value":"dayPartings"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"dow"}},{"kind":"Field","name":{"kind":"Name","value":"startMinute"}},{"kind":"Field","name":{"kind":"Name","value":"endMinute"}}]}},{"kind":"Field","name":{"kind":"Name","value":"geoTargets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSet"}}]}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; +export const LoadCampaignAdsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LoadCampaignAds"},"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":"campaign"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignAds"}}]}}]}},{"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":"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":"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":"price"}},{"kind":"Field","name":{"kind":"Name","value":"priceType"}},{"kind":"Field","name":{"kind":"Name","value":"creative"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdSetWithDeletedAds"},"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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"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":"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":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"ads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"includeDeleted"},"value":{"kind":"BooleanValue","value":true}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Ad"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignAds"},"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":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdSetWithDeletedAds"}}]}}]}}]} as unknown as DocumentNode; +export const LoadCampaignSummaryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LoadCampaignSummary"},"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":"campaign"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}}]}}]}},{"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":"spent"}},{"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":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}}]}}]} as unknown as DocumentNode; +export const CreateCampaignDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateCampaign"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreateCampaignInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createCampaign"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"createCampaignInput"},"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":"paymentType"}}]}}]}}]} as unknown as DocumentNode; +export const UpdateCampaignDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCampaign"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateCampaignInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateCampaign"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"updateCampaignInput"},"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":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"stripePaymentId"}}]}}]}}]} as unknown as DocumentNode; +export const ActiveGeocodesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ActiveGeocodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"geocodes"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Geocode"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Geocode"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Geocode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; +export const SegmentsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"segments"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"data"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Segment"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Segment"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SegmentsEntry"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"code"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; +export const AdvertiserCreativesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"advertiserCreatives"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"advertiserId"}},"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":"advertiserId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"creatives"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}}]}},{"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":"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":"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"}}]}}]}}]} as unknown as DocumentNode; +export const CreateCreativeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"createCreative"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreativeInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createCreative"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"creative"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"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":"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":"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"}}]}}]}}]} as unknown as DocumentNode; +export const UpdateCreativeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"updateCreative"},"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":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CreativeInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateCreative"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"creative"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"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":"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":"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"}}]}}]}}]} as unknown as DocumentNode; +export const LoadCreativeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"loadCreative"},"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":"creative"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Creative"}}]}}]}},{"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":"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":"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"}}]}}]}}]} as unknown as DocumentNode; +export const CampaignsForCreativeDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"campaignsForCreative"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"creativeId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"advertiserId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"creativeCampaigns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"creativeId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"creativeId"}}},{"kind":"Argument","name":{"kind":"Name","value":"advertiserId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"advertiserId"}}}],"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":"format"}}]}}]}}]} as unknown as DocumentNode; +export const ValidateTargetUrlDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"validateTargetUrl"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"url"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"validateTargetUrl"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"targetUrl"},"value":{"kind":"Variable","name":{"kind":"Name","value":"url"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isValid"}},{"kind":"Field","name":{"kind":"Name","value":"redirects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"violations"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"summary"}},{"kind":"Field","name":{"kind":"Name","value":"detail"}}]}}]}}]}}]}}]} as unknown as DocumentNode; +export const LoadUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"LoadUser"},"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":"user"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"fullName"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]} as unknown as DocumentNode; +export const UpdateUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateUserInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"updateUserInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"User"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"email"}},{"kind":"Field","name":{"kind":"Name","value":"fullName"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/src/graphql-client/index.ts b/src/graphql-client/index.ts new file mode 100644 index 00000000..af783993 --- /dev/null +++ b/src/graphql-client/index.ts @@ -0,0 +1 @@ +export * from "./gql"; \ No newline at end of file diff --git a/src/graphql/ad-set.generated.tsx b/src/graphql/ad-set.generated.tsx deleted file mode 100644 index f6614263..00000000 --- a/src/graphql/ad-set.generated.tsx +++ /dev/null @@ -1,503 +0,0 @@ -import type * as Types from "./types"; - -import { gql } from "@apollo/client"; -import { CreativeFragmentDoc } from "./creative.generated"; -import * as Apollo from "@apollo/client"; -const defaultOptions = {} as const; -export type AdSetFragment = { - id: string; - price: string; - createdAt: string; - billingType?: string | null; - name: string; - totalMax: number; - perDay: number; - state: string; - segments: Array<{ code: string; name: string }>; - oses: Array<{ code: string; name: string }>; - conversions: Array<{ - id: string; - type: string; - urlPattern: string; - observationWindow: number; - }>; - ads: Array<{ - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { body: string; title: string; targetUrl: string } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; - }>; -}; - -export type AdFragment = { - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { body: string; title: string; targetUrl: string } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; -}; - -export type AdSetWithDeletedAdsFragment = { - id: string; - createdAt: string; - name: string; - state: string; - billingType?: string | null; - oses: Array<{ code: string; name: string }>; - segments: Array<{ code: string; name: string }>; - conversions: Array<{ id: string }>; - ads: Array<{ - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { body: string; title: string; targetUrl: string } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; - }>; -}; - -export type CreateAdSetMutationVariables = Types.Exact<{ - createAdSetInput: Types.CreateAdSetInput; -}>; - -export type CreateAdSetMutation = { - createAdSet: { - id: string; - price: string; - createdAt: string; - billingType?: string | null; - name: string; - totalMax: number; - perDay: number; - state: string; - segments: Array<{ code: string; name: string }>; - oses: Array<{ code: string; name: string }>; - conversions: Array<{ - id: string; - type: string; - urlPattern: string; - observationWindow: number; - }>; - ads: Array<{ - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; - }>; - }; -}; - -export type UpdateAdSetMutationVariables = Types.Exact<{ - updateAdSetInput: Types.UpdateAdSetInput; -}>; - -export type UpdateAdSetMutation = { - updateAdSet: { - id: string; - price: string; - createdAt: string; - billingType?: string | null; - name: string; - totalMax: number; - perDay: number; - state: string; - segments: Array<{ code: string; name: string }>; - oses: Array<{ code: string; name: string }>; - conversions: Array<{ - id: string; - type: string; - urlPattern: string; - observationWindow: number; - }>; - ads: Array<{ - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; - }>; - }; -}; - -export const AdFragmentDoc = gql` - fragment Ad on Ad { - id - state - price - priceType - creative { - ...Creative - } - } - ${CreativeFragmentDoc} -`; -export const AdSetFragmentDoc = gql` - fragment AdSet on AdSet { - id - price - createdAt - billingType - name - totalMax - perDay - state - segments { - code - name - } - oses { - code - name - } - conversions { - id - type - urlPattern - observationWindow - } - ads { - ...Ad - } - } - ${AdFragmentDoc} -`; -export const AdSetWithDeletedAdsFragmentDoc = gql` - fragment AdSetWithDeletedAds on AdSet { - id - createdAt - name - state - billingType - oses { - code - name - } - segments { - code - name - } - conversions { - id - } - ads(includeDeleted: true) { - ...Ad - } - } - ${AdFragmentDoc} -`; -export const CreateAdSetDocument = gql` - mutation createAdSet($createAdSetInput: CreateAdSetInput!) { - createAdSet(createAdSetInput: $createAdSetInput) { - ...AdSet - } - } - ${AdSetFragmentDoc} -`; -export type CreateAdSetMutationFn = Apollo.MutationFunction< - CreateAdSetMutation, - CreateAdSetMutationVariables ->; - -/** - * __useCreateAdSetMutation__ - * - * To run a mutation, you first call `useCreateAdSetMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateAdSetMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [createAdSetMutation, { data, loading, error }] = useCreateAdSetMutation({ - * variables: { - * createAdSetInput: // value for 'createAdSetInput' - * }, - * }); - */ -export function useCreateAdSetMutation( - baseOptions?: Apollo.MutationHookOptions< - CreateAdSetMutation, - CreateAdSetMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation( - CreateAdSetDocument, - options, - ); -} -export type CreateAdSetMutationHookResult = ReturnType< - typeof useCreateAdSetMutation ->; -export type CreateAdSetMutationResult = - Apollo.MutationResult; -export type CreateAdSetMutationOptions = Apollo.BaseMutationOptions< - CreateAdSetMutation, - CreateAdSetMutationVariables ->; -export const UpdateAdSetDocument = gql` - mutation updateAdSet($updateAdSetInput: UpdateAdSetInput!) { - updateAdSet(updateAdSetInput: $updateAdSetInput) { - ...AdSet - } - } - ${AdSetFragmentDoc} -`; -export type UpdateAdSetMutationFn = Apollo.MutationFunction< - UpdateAdSetMutation, - UpdateAdSetMutationVariables ->; - -/** - * __useUpdateAdSetMutation__ - * - * To run a mutation, you first call `useUpdateAdSetMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateAdSetMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [updateAdSetMutation, { data, loading, error }] = useUpdateAdSetMutation({ - * variables: { - * updateAdSetInput: // value for 'updateAdSetInput' - * }, - * }); - */ -export function useUpdateAdSetMutation( - baseOptions?: Apollo.MutationHookOptions< - UpdateAdSetMutation, - UpdateAdSetMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation( - UpdateAdSetDocument, - options, - ); -} -export type UpdateAdSetMutationHookResult = ReturnType< - typeof useUpdateAdSetMutation ->; -export type UpdateAdSetMutationResult = - Apollo.MutationResult; -export type UpdateAdSetMutationOptions = Apollo.BaseMutationOptions< - UpdateAdSetMutation, - UpdateAdSetMutationVariables ->; diff --git a/src/graphql/advertiser.generated.tsx b/src/graphql/advertiser.generated.tsx deleted file mode 100644 index 544918c6..00000000 --- a/src/graphql/advertiser.generated.tsx +++ /dev/null @@ -1,777 +0,0 @@ -import type * as Types from "./types"; - -import { gql } from "@apollo/client"; -import { CampaignSummaryFragmentDoc } from "./campaign.generated"; -import * as Apollo from "@apollo/client"; -const defaultOptions = {} as const; -export type AdvertiserSummaryFragment = { - id: string; - name: string; - state: string; - billingEmail?: string | null; - additionalBillingEmails?: Array | null; - createdAt: string; - modifiedAt: string; - publicKey?: string | null; -}; - -export type AdvertiserBillingAddressFragment = { - billingAddress?: { - id: string; - street1: string; - street2?: string | null; - city: string; - country: string; - state: string; - zipcode: string; - } | null; -}; - -export type AdvertiserFragment = { - referrer?: string | null; - phone?: string | null; - selfServiceManageCampaign: boolean; - selfServiceSetPrice: boolean; - id: string; - name: string; - state: string; - billingEmail?: string | null; - additionalBillingEmails?: Array | null; - createdAt: string; - modifiedAt: string; - publicKey?: string | null; -}; - -export type AdvertiserQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type AdvertiserQuery = { - advertiser?: { id: string; publicKey?: string | null } | null; -}; - -export type UpdateAdvertiserMutationVariables = Types.Exact<{ - updateAdvertiserInput: Types.UpdateAdvertiserInput; -}>; - -export type UpdateAdvertiserMutation = { - updateAdvertiser: { id: string; publicKey?: string | null }; -}; - -export type AdvertiserCampaignsFragment = { - id: string; - name: string; - selfServiceManageCampaign: boolean; - selfServiceSetPrice: boolean; - campaigns: Array<{ - id: string; - name: string; - state: string; - dailyCap: number; - priority: number; - passThroughRate: number; - pacingOverride: boolean; - pacingStrategy: Types.CampaignPacingStrategies; - externalId?: string | null; - currency: string; - budget: number; - paymentType: Types.PaymentType; - spent: number; - createdAt: string; - startAt: string; - endAt: string; - source: Types.CampaignSource; - type: Types.CampaignType; - format: Types.CampaignFormat; - dayProportion?: number | null; - }>; -}; - -export type AdvertiserCampaignsQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; - filter?: Types.InputMaybe; -}>; - -export type AdvertiserCampaignsQuery = { - advertiserCampaigns?: { - id: string; - name: string; - selfServiceManageCampaign: boolean; - selfServiceSetPrice: boolean; - campaigns: Array<{ - id: string; - name: string; - state: string; - dailyCap: number; - priority: number; - passThroughRate: number; - pacingOverride: boolean; - pacingStrategy: Types.CampaignPacingStrategies; - externalId?: string | null; - currency: string; - budget: number; - paymentType: Types.PaymentType; - spent: number; - createdAt: string; - startAt: string; - endAt: string; - source: Types.CampaignSource; - type: Types.CampaignType; - format: Types.CampaignFormat; - dayProportion?: number | null; - }>; - } | null; -}; - -export type AdvertiserImageFragment = { - name: string; - imageUrl: string; - format: Types.CampaignFormat; - id: string; - createdAt: string; -}; - -export type AdvertiserPriceFragment = { - billingModelPrice: string; - billingType: Types.BillingType; - format: Types.CampaignFormat; -}; - -export type AdvertiserImagesQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type AdvertiserImagesQuery = { - advertiser?: { - images: Array<{ - name: string; - imageUrl: string; - format: Types.CampaignFormat; - id: string; - createdAt: string; - }>; - } | null; -}; - -export type AdvertiserPricesQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type AdvertiserPricesQuery = { - advertiser?: { - prices: Array<{ - billingModelPrice: string; - billingType: Types.BillingType; - format: Types.CampaignFormat; - }>; - } | null; -}; - -export type AdvertiserBillingAddressQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type AdvertiserBillingAddressQuery = { - advertiser?: { - id: string; - billingAddress?: { - id: string; - street1: string; - street2?: string | null; - city: string; - country: string; - state: string; - zipcode: string; - } | null; - } | null; -}; - -export type UploadAdvertiserImageMutationVariables = Types.Exact<{ - input: Types.CreateAdvertiserImageInput; -}>; - -export type UploadAdvertiserImageMutation = { - createAdvertiserImage: { name: string }; -}; - -export const AdvertiserBillingAddressFragmentDoc = gql` - fragment AdvertiserBillingAddress on Advertiser { - billingAddress { - id - street1 - street2 - city - country - state - zipcode - } - } -`; -export const AdvertiserSummaryFragmentDoc = gql` - fragment AdvertiserSummary on Advertiser { - id - name - state - billingEmail - additionalBillingEmails - createdAt - modifiedAt - publicKey - } -`; -export const AdvertiserFragmentDoc = gql` - fragment Advertiser on Advertiser { - ...AdvertiserSummary - referrer - phone - selfServiceManageCampaign - selfServiceSetPrice - } - ${AdvertiserSummaryFragmentDoc} -`; -export const AdvertiserCampaignsFragmentDoc = gql` - fragment AdvertiserCampaigns on Advertiser { - id - name - selfServiceManageCampaign - selfServiceSetPrice - campaigns { - ...CampaignSummary - } - } - ${CampaignSummaryFragmentDoc} -`; -export const AdvertiserImageFragmentDoc = gql` - fragment AdvertiserImage on AdvertiserImage { - name - imageUrl - format - id - createdAt - } -`; -export const AdvertiserPriceFragmentDoc = gql` - fragment AdvertiserPrice on AdvertiserPrice { - billingModelPrice - billingType - format - } -`; -export const AdvertiserDocument = gql` - query advertiser($id: String!) { - advertiser(id: $id) { - id - publicKey - } - } -`; - -/** - * __useAdvertiserQuery__ - * - * To run a query within a React component, call `useAdvertiserQuery` and pass it any options that fit your needs. - * When your component renders, `useAdvertiserQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAdvertiserQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useAdvertiserQuery( - baseOptions: Apollo.QueryHookOptions< - AdvertiserQuery, - AdvertiserQueryVariables - > & - ( - | { variables: AdvertiserQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - AdvertiserDocument, - options, - ); -} -export function useAdvertiserLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - AdvertiserQuery, - AdvertiserQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - AdvertiserDocument, - options, - ); -} -export function useAdvertiserSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - AdvertiserQuery, - AdvertiserQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery( - AdvertiserDocument, - options, - ); -} -export type AdvertiserQueryHookResult = ReturnType; -export type AdvertiserLazyQueryHookResult = ReturnType< - typeof useAdvertiserLazyQuery ->; -export type AdvertiserSuspenseQueryHookResult = ReturnType< - typeof useAdvertiserSuspenseQuery ->; -export type AdvertiserQueryResult = Apollo.QueryResult< - AdvertiserQuery, - AdvertiserQueryVariables ->; -export function refetchAdvertiserQuery(variables: AdvertiserQueryVariables) { - return { query: AdvertiserDocument, variables: variables }; -} -export const UpdateAdvertiserDocument = gql` - mutation updateAdvertiser($updateAdvertiserInput: UpdateAdvertiserInput!) { - updateAdvertiser(updateAdvertiserInput: $updateAdvertiserInput) { - id - publicKey - } - } -`; -export type UpdateAdvertiserMutationFn = Apollo.MutationFunction< - UpdateAdvertiserMutation, - UpdateAdvertiserMutationVariables ->; - -/** - * __useUpdateAdvertiserMutation__ - * - * To run a mutation, you first call `useUpdateAdvertiserMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateAdvertiserMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [updateAdvertiserMutation, { data, loading, error }] = useUpdateAdvertiserMutation({ - * variables: { - * updateAdvertiserInput: // value for 'updateAdvertiserInput' - * }, - * }); - */ -export function useUpdateAdvertiserMutation( - baseOptions?: Apollo.MutationHookOptions< - UpdateAdvertiserMutation, - UpdateAdvertiserMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - UpdateAdvertiserMutation, - UpdateAdvertiserMutationVariables - >(UpdateAdvertiserDocument, options); -} -export type UpdateAdvertiserMutationHookResult = ReturnType< - typeof useUpdateAdvertiserMutation ->; -export type UpdateAdvertiserMutationResult = - Apollo.MutationResult; -export type UpdateAdvertiserMutationOptions = Apollo.BaseMutationOptions< - UpdateAdvertiserMutation, - UpdateAdvertiserMutationVariables ->; -export const AdvertiserCampaignsDocument = gql` - query advertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) { - advertiserCampaigns(id: $id, filter: $filter) { - ...AdvertiserCampaigns - } - } - ${AdvertiserCampaignsFragmentDoc} -`; - -/** - * __useAdvertiserCampaignsQuery__ - * - * To run a query within a React component, call `useAdvertiserCampaignsQuery` and pass it any options that fit your needs. - * When your component renders, `useAdvertiserCampaignsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAdvertiserCampaignsQuery({ - * variables: { - * id: // value for 'id' - * filter: // value for 'filter' - * }, - * }); - */ -export function useAdvertiserCampaignsQuery( - baseOptions: Apollo.QueryHookOptions< - AdvertiserCampaignsQuery, - AdvertiserCampaignsQueryVariables - > & - ( - | { variables: AdvertiserCampaignsQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - AdvertiserCampaignsQuery, - AdvertiserCampaignsQueryVariables - >(AdvertiserCampaignsDocument, options); -} -export function useAdvertiserCampaignsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - AdvertiserCampaignsQuery, - AdvertiserCampaignsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - AdvertiserCampaignsQuery, - AdvertiserCampaignsQueryVariables - >(AdvertiserCampaignsDocument, options); -} -export function useAdvertiserCampaignsSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - AdvertiserCampaignsQuery, - AdvertiserCampaignsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - AdvertiserCampaignsQuery, - AdvertiserCampaignsQueryVariables - >(AdvertiserCampaignsDocument, options); -} -export type AdvertiserCampaignsQueryHookResult = ReturnType< - typeof useAdvertiserCampaignsQuery ->; -export type AdvertiserCampaignsLazyQueryHookResult = ReturnType< - typeof useAdvertiserCampaignsLazyQuery ->; -export type AdvertiserCampaignsSuspenseQueryHookResult = ReturnType< - typeof useAdvertiserCampaignsSuspenseQuery ->; -export type AdvertiserCampaignsQueryResult = Apollo.QueryResult< - AdvertiserCampaignsQuery, - AdvertiserCampaignsQueryVariables ->; -export function refetchAdvertiserCampaignsQuery( - variables: AdvertiserCampaignsQueryVariables, -) { - return { query: AdvertiserCampaignsDocument, variables: variables }; -} -export const AdvertiserImagesDocument = gql` - query advertiserImages($id: String!) { - advertiser(id: $id) { - images { - ...AdvertiserImage - } - } - } - ${AdvertiserImageFragmentDoc} -`; - -/** - * __useAdvertiserImagesQuery__ - * - * To run a query within a React component, call `useAdvertiserImagesQuery` and pass it any options that fit your needs. - * When your component renders, `useAdvertiserImagesQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAdvertiserImagesQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useAdvertiserImagesQuery( - baseOptions: Apollo.QueryHookOptions< - AdvertiserImagesQuery, - AdvertiserImagesQueryVariables - > & - ( - | { variables: AdvertiserImagesQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - AdvertiserImagesDocument, - options, - ); -} -export function useAdvertiserImagesLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - AdvertiserImagesQuery, - AdvertiserImagesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - AdvertiserImagesQuery, - AdvertiserImagesQueryVariables - >(AdvertiserImagesDocument, options); -} -export function useAdvertiserImagesSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - AdvertiserImagesQuery, - AdvertiserImagesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - AdvertiserImagesQuery, - AdvertiserImagesQueryVariables - >(AdvertiserImagesDocument, options); -} -export type AdvertiserImagesQueryHookResult = ReturnType< - typeof useAdvertiserImagesQuery ->; -export type AdvertiserImagesLazyQueryHookResult = ReturnType< - typeof useAdvertiserImagesLazyQuery ->; -export type AdvertiserImagesSuspenseQueryHookResult = ReturnType< - typeof useAdvertiserImagesSuspenseQuery ->; -export type AdvertiserImagesQueryResult = Apollo.QueryResult< - AdvertiserImagesQuery, - AdvertiserImagesQueryVariables ->; -export function refetchAdvertiserImagesQuery( - variables: AdvertiserImagesQueryVariables, -) { - return { query: AdvertiserImagesDocument, variables: variables }; -} -export const AdvertiserPricesDocument = gql` - query advertiserPrices($id: String!) { - advertiser(id: $id) { - prices { - ...AdvertiserPrice - } - } - } - ${AdvertiserPriceFragmentDoc} -`; - -/** - * __useAdvertiserPricesQuery__ - * - * To run a query within a React component, call `useAdvertiserPricesQuery` and pass it any options that fit your needs. - * When your component renders, `useAdvertiserPricesQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAdvertiserPricesQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useAdvertiserPricesQuery( - baseOptions: Apollo.QueryHookOptions< - AdvertiserPricesQuery, - AdvertiserPricesQueryVariables - > & - ( - | { variables: AdvertiserPricesQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - AdvertiserPricesDocument, - options, - ); -} -export function useAdvertiserPricesLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - AdvertiserPricesQuery, - AdvertiserPricesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - AdvertiserPricesQuery, - AdvertiserPricesQueryVariables - >(AdvertiserPricesDocument, options); -} -export function useAdvertiserPricesSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - AdvertiserPricesQuery, - AdvertiserPricesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - AdvertiserPricesQuery, - AdvertiserPricesQueryVariables - >(AdvertiserPricesDocument, options); -} -export type AdvertiserPricesQueryHookResult = ReturnType< - typeof useAdvertiserPricesQuery ->; -export type AdvertiserPricesLazyQueryHookResult = ReturnType< - typeof useAdvertiserPricesLazyQuery ->; -export type AdvertiserPricesSuspenseQueryHookResult = ReturnType< - typeof useAdvertiserPricesSuspenseQuery ->; -export type AdvertiserPricesQueryResult = Apollo.QueryResult< - AdvertiserPricesQuery, - AdvertiserPricesQueryVariables ->; -export function refetchAdvertiserPricesQuery( - variables: AdvertiserPricesQueryVariables, -) { - return { query: AdvertiserPricesDocument, variables: variables }; -} -export const AdvertiserBillingAddressDocument = gql` - query advertiserBillingAddress($id: String!) { - advertiser(id: $id) { - id - ...AdvertiserBillingAddress - } - } - ${AdvertiserBillingAddressFragmentDoc} -`; - -/** - * __useAdvertiserBillingAddressQuery__ - * - * To run a query within a React component, call `useAdvertiserBillingAddressQuery` and pass it any options that fit your needs. - * When your component renders, `useAdvertiserBillingAddressQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAdvertiserBillingAddressQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useAdvertiserBillingAddressQuery( - baseOptions: Apollo.QueryHookOptions< - AdvertiserBillingAddressQuery, - AdvertiserBillingAddressQueryVariables - > & - ( - | { variables: AdvertiserBillingAddressQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - AdvertiserBillingAddressQuery, - AdvertiserBillingAddressQueryVariables - >(AdvertiserBillingAddressDocument, options); -} -export function useAdvertiserBillingAddressLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - AdvertiserBillingAddressQuery, - AdvertiserBillingAddressQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - AdvertiserBillingAddressQuery, - AdvertiserBillingAddressQueryVariables - >(AdvertiserBillingAddressDocument, options); -} -export function useAdvertiserBillingAddressSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - AdvertiserBillingAddressQuery, - AdvertiserBillingAddressQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - AdvertiserBillingAddressQuery, - AdvertiserBillingAddressQueryVariables - >(AdvertiserBillingAddressDocument, options); -} -export type AdvertiserBillingAddressQueryHookResult = ReturnType< - typeof useAdvertiserBillingAddressQuery ->; -export type AdvertiserBillingAddressLazyQueryHookResult = ReturnType< - typeof useAdvertiserBillingAddressLazyQuery ->; -export type AdvertiserBillingAddressSuspenseQueryHookResult = ReturnType< - typeof useAdvertiserBillingAddressSuspenseQuery ->; -export type AdvertiserBillingAddressQueryResult = Apollo.QueryResult< - AdvertiserBillingAddressQuery, - AdvertiserBillingAddressQueryVariables ->; -export function refetchAdvertiserBillingAddressQuery( - variables: AdvertiserBillingAddressQueryVariables, -) { - return { query: AdvertiserBillingAddressDocument, variables: variables }; -} -export const UploadAdvertiserImageDocument = gql` - mutation uploadAdvertiserImage($input: CreateAdvertiserImageInput!) { - createAdvertiserImage(createImageInput: $input) { - name - } - } -`; -export type UploadAdvertiserImageMutationFn = Apollo.MutationFunction< - UploadAdvertiserImageMutation, - UploadAdvertiserImageMutationVariables ->; - -/** - * __useUploadAdvertiserImageMutation__ - * - * To run a mutation, you first call `useUploadAdvertiserImageMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUploadAdvertiserImageMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [uploadAdvertiserImageMutation, { data, loading, error }] = useUploadAdvertiserImageMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUploadAdvertiserImageMutation( - baseOptions?: Apollo.MutationHookOptions< - UploadAdvertiserImageMutation, - UploadAdvertiserImageMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - UploadAdvertiserImageMutation, - UploadAdvertiserImageMutationVariables - >(UploadAdvertiserImageDocument, options); -} -export type UploadAdvertiserImageMutationHookResult = ReturnType< - typeof useUploadAdvertiserImageMutation ->; -export type UploadAdvertiserImageMutationResult = - Apollo.MutationResult; -export type UploadAdvertiserImageMutationOptions = Apollo.BaseMutationOptions< - UploadAdvertiserImageMutation, - UploadAdvertiserImageMutationVariables ->; diff --git a/src/graphql/analytics-overview.generated.tsx b/src/graphql/analytics-overview.generated.tsx deleted file mode 100644 index 87ceb18d..00000000 --- a/src/graphql/analytics-overview.generated.tsx +++ /dev/null @@ -1,765 +0,0 @@ -import type * as Types from "./types"; - -import { gql } from "@apollo/client"; -import * as Apollo from "@apollo/client"; -const defaultOptions = {} as const; -export type EngagementFragment = { - creativeinstanceid: string; - createdat: string; - type: string; - pricetype: string; - creativesetname?: string | null; - creativesetid: string; - creativename: string; - creativeid: string; - creativestate: string; - creativepayload: string; - view: string; - click: string; - viewthroughConversion: string; - clickthroughConversion: string; - conversion: string; - dismiss: string; - downvote: string; - landed: string; - spend: string; - upvote: string; - price: number; - android: number; - ios: number; - linux: number; - macos: number; - windows: number; -}; - -export type CampaignWithEngagementsFragment = { - id: string; - name: string; - state: string; - budget: number; - spent: number; - currency: string; - createdAt: string; - startAt: string; - endAt: string; - pacingIndex?: number | null; - format: Types.CampaignFormat; - adSets: Array<{ - id: string; - conversions: Array<{ - id: string; - type: string; - extractExternalId: boolean; - }>; - }>; - engagements: Array<{ - creativeinstanceid: string; - createdat: string; - type: string; - pricetype: string; - creativesetname?: string | null; - creativesetid: string; - creativename: string; - creativeid: string; - creativestate: string; - creativepayload: string; - view: string; - click: string; - viewthroughConversion: string; - clickthroughConversion: string; - conversion: string; - dismiss: string; - downvote: string; - landed: string; - spend: string; - upvote: string; - price: number; - android: number; - ios: number; - linux: number; - macos: number; - windows: number; - }>; -}; - -export type AnalyticOverviewQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type AnalyticOverviewQuery = { - campaign?: { - id: string; - name: string; - state: string; - budget: number; - spent: number; - currency: string; - createdAt: string; - startAt: string; - endAt: string; - pacingIndex?: number | null; - format: Types.CampaignFormat; - adSets: Array<{ - id: string; - conversions: Array<{ - id: string; - type: string; - extractExternalId: boolean; - }>; - }>; - engagements: Array<{ - creativeinstanceid: string; - createdat: string; - type: string; - pricetype: string; - creativesetname?: string | null; - creativesetid: string; - creativename: string; - creativeid: string; - creativestate: string; - creativepayload: string; - view: string; - click: string; - viewthroughConversion: string; - clickthroughConversion: string; - conversion: string; - dismiss: string; - downvote: string; - landed: string; - spend: string; - upvote: string; - price: number; - android: number; - ios: number; - linux: number; - macos: number; - windows: number; - }>; - } | null; -}; - -export type CampaignMetricSummaryValuesFragment = { - click: string; - impression: string; - siteVisit: string; - spendUsd: string; - rates: { clickThrough: string }; -}; - -export type CampaignMetricsQueryVariables = Types.Exact<{ - campaignIds: - | Array - | Types.Scalars["String"]["input"]; -}>; - -export type CampaignMetricsQuery = { - performance: { - values: Array<{ - dimensions: { campaign?: { id: string } | null }; - metrics: { - click: string; - impression: string; - siteVisit: string; - spendUsd: string; - rates: { clickThrough: string }; - }; - }>; - }; -}; - -export type CampaignMetricDetailValuesFragment = { - click: string; - impression: string; - siteVisit: string; - conversion: string; - dismiss: string; - spendUsd: string; - rates: { - clickThrough: string; - clickToConversion: string; - costPerAcquisition: string; - }; -}; - -export type DailyValuesFragment = { - dimensions: { day?: string | null }; - metrics: { - click: string; - impression: string; - siteVisit: string; - conversion: string; - dismiss: string; - spendUsd: string; - rates: { - clickThrough: string; - clickToConversion: string; - costPerAcquisition: string; - }; - }; -}; - -export type FetchDailyMetricsForCampaignQueryVariables = Types.Exact<{ - filter: Types.PerformanceFilter; -}>; - -export type FetchDailyMetricsForCampaignQuery = { - performance: { - values: Array<{ - dimensions: { day?: string | null }; - metrics: { - click: string; - impression: string; - siteVisit: string; - conversion: string; - dismiss: string; - spendUsd: string; - rates: { - clickThrough: string; - clickToConversion: string; - costPerAcquisition: string; - }; - }; - }>; - total: { - metrics: { - click: string; - impression: string; - siteVisit: string; - conversion: string; - dismiss: string; - spendUsd: string; - rates: { - clickThrough: string; - clickToConversion: string; - costPerAcquisition: string; - }; - }; - }; - }; -}; - -export type AdSetValuesFragment = { - dimensions: { - adSet?: { - id: string; - name: string; - state: string; - billingType?: string | null; - } | null; - }; - metrics: { - click: string; - impression: string; - siteVisit: string; - conversion: string; - dismiss: string; - spendUsd: string; - rates: { - clickThrough: string; - clickToConversion: string; - costPerAcquisition: string; - }; - }; -}; - -export type FetchAdSetMetricsForCampaignQueryVariables = Types.Exact<{ - filter: Types.PerformanceFilter; -}>; - -export type FetchAdSetMetricsForCampaignQuery = { - performance: { - values: Array<{ - dimensions: { - adSet?: { - id: string; - name: string; - state: string; - billingType?: string | null; - } | null; - }; - metrics: { - click: string; - impression: string; - siteVisit: string; - conversion: string; - dismiss: string; - spendUsd: string; - rates: { - clickThrough: string; - clickToConversion: string; - costPerAcquisition: string; - }; - }; - }>; - }; -}; - -export const EngagementFragmentDoc = gql` - fragment Engagement on Engagement { - creativeinstanceid - createdat - type - pricetype - creativesetname - creativesetid - creativename - creativeid - creativestate - creativepayload - view - click - viewthroughConversion - clickthroughConversion - conversion - dismiss - downvote - landed - spend - upvote - downvote - price - android - ios - linux - macos - windows - } -`; -export const CampaignWithEngagementsFragmentDoc = gql` - fragment CampaignWithEngagements on Campaign { - id - name - state - budget - spent - currency - createdAt - startAt - endAt - currency - pacingIndex - format - adSets { - id - conversions { - id - type - extractExternalId - } - } - engagements { - ...Engagement - } - } - ${EngagementFragmentDoc} -`; -export const CampaignMetricSummaryValuesFragmentDoc = gql` - fragment CampaignMetricSummaryValues on Metrics { - click - impression - siteVisit - spendUsd - rates { - clickThrough - } - } -`; -export const CampaignMetricDetailValuesFragmentDoc = gql` - fragment CampaignMetricDetailValues on Metrics { - click - impression - siteVisit - conversion - dismiss - spendUsd - rates { - clickThrough - clickToConversion - costPerAcquisition - } - } -`; -export const DailyValuesFragmentDoc = gql` - fragment DailyValues on Performance { - dimensions { - day - } - metrics { - ...CampaignMetricDetailValues - } - } - ${CampaignMetricDetailValuesFragmentDoc} -`; -export const AdSetValuesFragmentDoc = gql` - fragment AdSetValues on Performance { - dimensions { - adSet { - id - name - state - billingType - } - } - metrics { - ...CampaignMetricDetailValues - } - } - ${CampaignMetricDetailValuesFragmentDoc} -`; -export const AnalyticOverviewDocument = gql` - query analyticOverview($id: String!) { - campaign(id: $id) { - ...CampaignWithEngagements - } - } - ${CampaignWithEngagementsFragmentDoc} -`; - -/** - * __useAnalyticOverviewQuery__ - * - * To run a query within a React component, call `useAnalyticOverviewQuery` and pass it any options that fit your needs. - * When your component renders, `useAnalyticOverviewQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAnalyticOverviewQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useAnalyticOverviewQuery( - baseOptions: Apollo.QueryHookOptions< - AnalyticOverviewQuery, - AnalyticOverviewQueryVariables - > & - ( - | { variables: AnalyticOverviewQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - AnalyticOverviewDocument, - options, - ); -} -export function useAnalyticOverviewLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - AnalyticOverviewQuery, - AnalyticOverviewQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - AnalyticOverviewQuery, - AnalyticOverviewQueryVariables - >(AnalyticOverviewDocument, options); -} -export function useAnalyticOverviewSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - AnalyticOverviewQuery, - AnalyticOverviewQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - AnalyticOverviewQuery, - AnalyticOverviewQueryVariables - >(AnalyticOverviewDocument, options); -} -export type AnalyticOverviewQueryHookResult = ReturnType< - typeof useAnalyticOverviewQuery ->; -export type AnalyticOverviewLazyQueryHookResult = ReturnType< - typeof useAnalyticOverviewLazyQuery ->; -export type AnalyticOverviewSuspenseQueryHookResult = ReturnType< - typeof useAnalyticOverviewSuspenseQuery ->; -export type AnalyticOverviewQueryResult = Apollo.QueryResult< - AnalyticOverviewQuery, - AnalyticOverviewQueryVariables ->; -export function refetchAnalyticOverviewQuery( - variables: AnalyticOverviewQueryVariables, -) { - return { query: AnalyticOverviewDocument, variables: variables }; -} -export const CampaignMetricsDocument = gql` - query campaignMetrics($campaignIds: [String!]!) { - performance(filter: { campaignIds: $campaignIds }) { - values { - dimensions { - campaign { - id - } - } - metrics { - ...CampaignMetricSummaryValues - } - } - } - } - ${CampaignMetricSummaryValuesFragmentDoc} -`; - -/** - * __useCampaignMetricsQuery__ - * - * To run a query within a React component, call `useCampaignMetricsQuery` and pass it any options that fit your needs. - * When your component renders, `useCampaignMetricsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useCampaignMetricsQuery({ - * variables: { - * campaignIds: // value for 'campaignIds' - * }, - * }); - */ -export function useCampaignMetricsQuery( - baseOptions: Apollo.QueryHookOptions< - CampaignMetricsQuery, - CampaignMetricsQueryVariables - > & - ( - | { variables: CampaignMetricsQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - CampaignMetricsDocument, - options, - ); -} -export function useCampaignMetricsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - CampaignMetricsQuery, - CampaignMetricsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - CampaignMetricsQuery, - CampaignMetricsQueryVariables - >(CampaignMetricsDocument, options); -} -export function useCampaignMetricsSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - CampaignMetricsQuery, - CampaignMetricsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - CampaignMetricsQuery, - CampaignMetricsQueryVariables - >(CampaignMetricsDocument, options); -} -export type CampaignMetricsQueryHookResult = ReturnType< - typeof useCampaignMetricsQuery ->; -export type CampaignMetricsLazyQueryHookResult = ReturnType< - typeof useCampaignMetricsLazyQuery ->; -export type CampaignMetricsSuspenseQueryHookResult = ReturnType< - typeof useCampaignMetricsSuspenseQuery ->; -export type CampaignMetricsQueryResult = Apollo.QueryResult< - CampaignMetricsQuery, - CampaignMetricsQueryVariables ->; -export function refetchCampaignMetricsQuery( - variables: CampaignMetricsQueryVariables, -) { - return { query: CampaignMetricsDocument, variables: variables }; -} -export const FetchDailyMetricsForCampaignDocument = gql` - query fetchDailyMetricsForCampaign($filter: PerformanceFilter!) { - performance(filter: $filter) { - values { - ...DailyValues - } - total { - metrics { - ...CampaignMetricDetailValues - } - } - } - } - ${DailyValuesFragmentDoc} - ${CampaignMetricDetailValuesFragmentDoc} -`; - -/** - * __useFetchDailyMetricsForCampaignQuery__ - * - * To run a query within a React component, call `useFetchDailyMetricsForCampaignQuery` and pass it any options that fit your needs. - * When your component renders, `useFetchDailyMetricsForCampaignQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFetchDailyMetricsForCampaignQuery({ - * variables: { - * filter: // value for 'filter' - * }, - * }); - */ -export function useFetchDailyMetricsForCampaignQuery( - baseOptions: Apollo.QueryHookOptions< - FetchDailyMetricsForCampaignQuery, - FetchDailyMetricsForCampaignQueryVariables - > & - ( - | { - variables: FetchDailyMetricsForCampaignQueryVariables; - skip?: boolean; - } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - FetchDailyMetricsForCampaignQuery, - FetchDailyMetricsForCampaignQueryVariables - >(FetchDailyMetricsForCampaignDocument, options); -} -export function useFetchDailyMetricsForCampaignLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - FetchDailyMetricsForCampaignQuery, - FetchDailyMetricsForCampaignQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - FetchDailyMetricsForCampaignQuery, - FetchDailyMetricsForCampaignQueryVariables - >(FetchDailyMetricsForCampaignDocument, options); -} -export function useFetchDailyMetricsForCampaignSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - FetchDailyMetricsForCampaignQuery, - FetchDailyMetricsForCampaignQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - FetchDailyMetricsForCampaignQuery, - FetchDailyMetricsForCampaignQueryVariables - >(FetchDailyMetricsForCampaignDocument, options); -} -export type FetchDailyMetricsForCampaignQueryHookResult = ReturnType< - typeof useFetchDailyMetricsForCampaignQuery ->; -export type FetchDailyMetricsForCampaignLazyQueryHookResult = ReturnType< - typeof useFetchDailyMetricsForCampaignLazyQuery ->; -export type FetchDailyMetricsForCampaignSuspenseQueryHookResult = ReturnType< - typeof useFetchDailyMetricsForCampaignSuspenseQuery ->; -export type FetchDailyMetricsForCampaignQueryResult = Apollo.QueryResult< - FetchDailyMetricsForCampaignQuery, - FetchDailyMetricsForCampaignQueryVariables ->; -export function refetchFetchDailyMetricsForCampaignQuery( - variables: FetchDailyMetricsForCampaignQueryVariables, -) { - return { query: FetchDailyMetricsForCampaignDocument, variables: variables }; -} -export const FetchAdSetMetricsForCampaignDocument = gql` - query fetchAdSetMetricsForCampaign($filter: PerformanceFilter!) { - performance(filter: $filter) { - values { - ...AdSetValues - } - } - } - ${AdSetValuesFragmentDoc} -`; - -/** - * __useFetchAdSetMetricsForCampaignQuery__ - * - * To run a query within a React component, call `useFetchAdSetMetricsForCampaignQuery` and pass it any options that fit your needs. - * When your component renders, `useFetchAdSetMetricsForCampaignQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useFetchAdSetMetricsForCampaignQuery({ - * variables: { - * filter: // value for 'filter' - * }, - * }); - */ -export function useFetchAdSetMetricsForCampaignQuery( - baseOptions: Apollo.QueryHookOptions< - FetchAdSetMetricsForCampaignQuery, - FetchAdSetMetricsForCampaignQueryVariables - > & - ( - | { - variables: FetchAdSetMetricsForCampaignQueryVariables; - skip?: boolean; - } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - FetchAdSetMetricsForCampaignQuery, - FetchAdSetMetricsForCampaignQueryVariables - >(FetchAdSetMetricsForCampaignDocument, options); -} -export function useFetchAdSetMetricsForCampaignLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - FetchAdSetMetricsForCampaignQuery, - FetchAdSetMetricsForCampaignQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - FetchAdSetMetricsForCampaignQuery, - FetchAdSetMetricsForCampaignQueryVariables - >(FetchAdSetMetricsForCampaignDocument, options); -} -export function useFetchAdSetMetricsForCampaignSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - FetchAdSetMetricsForCampaignQuery, - FetchAdSetMetricsForCampaignQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - FetchAdSetMetricsForCampaignQuery, - FetchAdSetMetricsForCampaignQueryVariables - >(FetchAdSetMetricsForCampaignDocument, options); -} -export type FetchAdSetMetricsForCampaignQueryHookResult = ReturnType< - typeof useFetchAdSetMetricsForCampaignQuery ->; -export type FetchAdSetMetricsForCampaignLazyQueryHookResult = ReturnType< - typeof useFetchAdSetMetricsForCampaignLazyQuery ->; -export type FetchAdSetMetricsForCampaignSuspenseQueryHookResult = ReturnType< - typeof useFetchAdSetMetricsForCampaignSuspenseQuery ->; -export type FetchAdSetMetricsForCampaignQueryResult = Apollo.QueryResult< - FetchAdSetMetricsForCampaignQuery, - FetchAdSetMetricsForCampaignQueryVariables ->; -export function refetchFetchAdSetMetricsForCampaignQuery( - variables: FetchAdSetMetricsForCampaignQueryVariables, -) { - return { query: FetchAdSetMetricsForCampaignDocument, variables: variables }; -} diff --git a/src/graphql/campaign.generated.tsx b/src/graphql/campaign.generated.tsx deleted file mode 100644 index 43b45247..00000000 --- a/src/graphql/campaign.generated.tsx +++ /dev/null @@ -1,876 +0,0 @@ -import type * as Types from "./types"; - -import { gql } from "@apollo/client"; -import { - AdSetFragmentDoc, - AdSetWithDeletedAdsFragmentDoc, -} from "./ad-set.generated"; -import * as Apollo from "@apollo/client"; -const defaultOptions = {} as const; -export type CampaignFragment = { - id: string; - name: string; - state: string; - dailyCap: number; - priority: number; - passThroughRate: number; - pacingOverride: boolean; - pacingStrategy: Types.CampaignPacingStrategies; - externalId?: string | null; - currency: string; - budget: number; - spent: number; - createdAt: string; - startAt: string; - endAt: string; - source: Types.CampaignSource; - type: Types.CampaignType; - format: Types.CampaignFormat; - paymentType: Types.PaymentType; - dayProportion?: number | null; - stripePaymentId?: string | null; - hasPaymentIntent: boolean; - dayPartings: Array<{ dow: string; startMinute: number; endMinute: number }>; - geoTargets: Array<{ code: string; name: string }>; - adSets: Array<{ - id: string; - price: string; - createdAt: string; - billingType?: string | null; - name: string; - totalMax: number; - perDay: number; - state: string; - segments: Array<{ code: string; name: string }>; - oses: Array<{ code: string; name: string }>; - conversions: Array<{ - id: string; - type: string; - urlPattern: string; - observationWindow: number; - }>; - ads: Array<{ - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; - }>; - }>; - advertiser: { id: string }; -}; - -export type CampaignSummaryFragment = { - id: string; - name: string; - state: string; - dailyCap: number; - priority: number; - passThroughRate: number; - pacingOverride: boolean; - pacingStrategy: Types.CampaignPacingStrategies; - externalId?: string | null; - currency: string; - budget: number; - paymentType: Types.PaymentType; - spent: number; - createdAt: string; - startAt: string; - endAt: string; - source: Types.CampaignSource; - type: Types.CampaignType; - format: Types.CampaignFormat; - dayProportion?: number | null; -}; - -export type CampaignAdsFragment = { - id: string; - name: string; - state: string; - startAt: string; - endAt: string; - source: Types.CampaignSource; - currency: string; - format: Types.CampaignFormat; - advertiser: { id: string }; - adSets: Array<{ - id: string; - createdAt: string; - name: string; - state: string; - billingType?: string | null; - oses: Array<{ code: string; name: string }>; - segments: Array<{ code: string; name: string }>; - conversions: Array<{ id: string }>; - ads: Array<{ - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; - }>; - }>; -}; - -export type LoadCampaignQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type LoadCampaignQuery = { - campaign?: { - id: string; - name: string; - state: string; - dailyCap: number; - priority: number; - passThroughRate: number; - pacingOverride: boolean; - pacingStrategy: Types.CampaignPacingStrategies; - externalId?: string | null; - currency: string; - budget: number; - spent: number; - createdAt: string; - startAt: string; - endAt: string; - source: Types.CampaignSource; - type: Types.CampaignType; - format: Types.CampaignFormat; - paymentType: Types.PaymentType; - dayProportion?: number | null; - stripePaymentId?: string | null; - hasPaymentIntent: boolean; - dayPartings: Array<{ dow: string; startMinute: number; endMinute: number }>; - geoTargets: Array<{ code: string; name: string }>; - adSets: Array<{ - id: string; - price: string; - createdAt: string; - billingType?: string | null; - name: string; - totalMax: number; - perDay: number; - state: string; - segments: Array<{ code: string; name: string }>; - oses: Array<{ code: string; name: string }>; - conversions: Array<{ - id: string; - type: string; - urlPattern: string; - observationWindow: number; - }>; - ads: Array<{ - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; - }>; - }>; - advertiser: { id: string }; - } | null; -}; - -export type LoadCampaignAdsQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type LoadCampaignAdsQuery = { - campaign?: { - id: string; - name: string; - state: string; - startAt: string; - endAt: string; - source: Types.CampaignSource; - currency: string; - format: Types.CampaignFormat; - advertiser: { id: string }; - adSets: Array<{ - id: string; - createdAt: string; - name: string; - state: string; - billingType?: string | null; - oses: Array<{ code: string; name: string }>; - segments: Array<{ code: string; name: string }>; - conversions: Array<{ id: string }>; - ads: Array<{ - id: string; - state: string; - price: string; - priceType: Types.ConfirmationType; - creative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; - }>; - }>; - } | null; -}; - -export type LoadCampaignSummaryQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type LoadCampaignSummaryQuery = { - campaign?: { - id: string; - name: string; - state: string; - dailyCap: number; - priority: number; - passThroughRate: number; - pacingOverride: boolean; - pacingStrategy: Types.CampaignPacingStrategies; - externalId?: string | null; - currency: string; - budget: number; - paymentType: Types.PaymentType; - spent: number; - createdAt: string; - startAt: string; - endAt: string; - source: Types.CampaignSource; - type: Types.CampaignType; - format: Types.CampaignFormat; - dayProportion?: number | null; - } | null; -}; - -export type CreateCampaignMutationVariables = Types.Exact<{ - input: Types.CreateCampaignInput; -}>; - -export type CreateCampaignMutation = { - createCampaign: { id: string; paymentType: Types.PaymentType }; -}; - -export type UpdateCampaignMutationVariables = Types.Exact<{ - input: Types.UpdateCampaignInput; -}>; - -export type UpdateCampaignMutation = { - updateCampaign: { - id: string; - paymentType: Types.PaymentType; - stripePaymentId?: string | null; - }; -}; - -export const CampaignFragmentDoc = gql` - fragment Campaign on Campaign { - id - name - state - dailyCap - priority - passThroughRate - pacingOverride - pacingStrategy - externalId - currency - budget - spent - createdAt - startAt - endAt - source - type - format - paymentType - dayProportion - stripePaymentId - paymentType - hasPaymentIntent - dayPartings { - dow - startMinute - endMinute - } - geoTargets { - code - name - } - adSets { - ...AdSet - } - advertiser { - id - } - } - ${AdSetFragmentDoc} -`; -export const CampaignSummaryFragmentDoc = gql` - fragment CampaignSummary on Campaign { - id - name - state - dailyCap - priority - passThroughRate - pacingOverride - pacingStrategy - externalId - currency - budget - paymentType - spent - createdAt - startAt - endAt - source - type - format - paymentType - dayProportion - } -`; -export const CampaignAdsFragmentDoc = gql` - fragment CampaignAds on Campaign { - id - name - state - startAt - endAt - source - currency - format - advertiser { - id - } - adSets { - ...AdSetWithDeletedAds - } - } - ${AdSetWithDeletedAdsFragmentDoc} -`; -export const LoadCampaignDocument = gql` - query LoadCampaign($id: String!) { - campaign(id: $id) { - ...Campaign - } - } - ${CampaignFragmentDoc} -`; - -/** - * __useLoadCampaignQuery__ - * - * To run a query within a React component, call `useLoadCampaignQuery` and pass it any options that fit your needs. - * When your component renders, `useLoadCampaignQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useLoadCampaignQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useLoadCampaignQuery( - baseOptions: Apollo.QueryHookOptions< - LoadCampaignQuery, - LoadCampaignQueryVariables - > & - ( - | { variables: LoadCampaignQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - LoadCampaignDocument, - options, - ); -} -export function useLoadCampaignLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - LoadCampaignQuery, - LoadCampaignQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - LoadCampaignDocument, - options, - ); -} -export function useLoadCampaignSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - LoadCampaignQuery, - LoadCampaignQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery( - LoadCampaignDocument, - options, - ); -} -export type LoadCampaignQueryHookResult = ReturnType< - typeof useLoadCampaignQuery ->; -export type LoadCampaignLazyQueryHookResult = ReturnType< - typeof useLoadCampaignLazyQuery ->; -export type LoadCampaignSuspenseQueryHookResult = ReturnType< - typeof useLoadCampaignSuspenseQuery ->; -export type LoadCampaignQueryResult = Apollo.QueryResult< - LoadCampaignQuery, - LoadCampaignQueryVariables ->; -export function refetchLoadCampaignQuery( - variables: LoadCampaignQueryVariables, -) { - return { query: LoadCampaignDocument, variables: variables }; -} -export const LoadCampaignAdsDocument = gql` - query LoadCampaignAds($id: String!) { - campaign(id: $id) { - ...CampaignAds - } - } - ${CampaignAdsFragmentDoc} -`; - -/** - * __useLoadCampaignAdsQuery__ - * - * To run a query within a React component, call `useLoadCampaignAdsQuery` and pass it any options that fit your needs. - * When your component renders, `useLoadCampaignAdsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useLoadCampaignAdsQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useLoadCampaignAdsQuery( - baseOptions: Apollo.QueryHookOptions< - LoadCampaignAdsQuery, - LoadCampaignAdsQueryVariables - > & - ( - | { variables: LoadCampaignAdsQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - LoadCampaignAdsDocument, - options, - ); -} -export function useLoadCampaignAdsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - LoadCampaignAdsQuery, - LoadCampaignAdsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - LoadCampaignAdsQuery, - LoadCampaignAdsQueryVariables - >(LoadCampaignAdsDocument, options); -} -export function useLoadCampaignAdsSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - LoadCampaignAdsQuery, - LoadCampaignAdsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - LoadCampaignAdsQuery, - LoadCampaignAdsQueryVariables - >(LoadCampaignAdsDocument, options); -} -export type LoadCampaignAdsQueryHookResult = ReturnType< - typeof useLoadCampaignAdsQuery ->; -export type LoadCampaignAdsLazyQueryHookResult = ReturnType< - typeof useLoadCampaignAdsLazyQuery ->; -export type LoadCampaignAdsSuspenseQueryHookResult = ReturnType< - typeof useLoadCampaignAdsSuspenseQuery ->; -export type LoadCampaignAdsQueryResult = Apollo.QueryResult< - LoadCampaignAdsQuery, - LoadCampaignAdsQueryVariables ->; -export function refetchLoadCampaignAdsQuery( - variables: LoadCampaignAdsQueryVariables, -) { - return { query: LoadCampaignAdsDocument, variables: variables }; -} -export const LoadCampaignSummaryDocument = gql` - query LoadCampaignSummary($id: String!) { - campaign(id: $id) { - ...CampaignSummary - } - } - ${CampaignSummaryFragmentDoc} -`; - -/** - * __useLoadCampaignSummaryQuery__ - * - * To run a query within a React component, call `useLoadCampaignSummaryQuery` and pass it any options that fit your needs. - * When your component renders, `useLoadCampaignSummaryQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useLoadCampaignSummaryQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useLoadCampaignSummaryQuery( - baseOptions: Apollo.QueryHookOptions< - LoadCampaignSummaryQuery, - LoadCampaignSummaryQueryVariables - > & - ( - | { variables: LoadCampaignSummaryQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - LoadCampaignSummaryQuery, - LoadCampaignSummaryQueryVariables - >(LoadCampaignSummaryDocument, options); -} -export function useLoadCampaignSummaryLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - LoadCampaignSummaryQuery, - LoadCampaignSummaryQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - LoadCampaignSummaryQuery, - LoadCampaignSummaryQueryVariables - >(LoadCampaignSummaryDocument, options); -} -export function useLoadCampaignSummarySuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - LoadCampaignSummaryQuery, - LoadCampaignSummaryQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - LoadCampaignSummaryQuery, - LoadCampaignSummaryQueryVariables - >(LoadCampaignSummaryDocument, options); -} -export type LoadCampaignSummaryQueryHookResult = ReturnType< - typeof useLoadCampaignSummaryQuery ->; -export type LoadCampaignSummaryLazyQueryHookResult = ReturnType< - typeof useLoadCampaignSummaryLazyQuery ->; -export type LoadCampaignSummarySuspenseQueryHookResult = ReturnType< - typeof useLoadCampaignSummarySuspenseQuery ->; -export type LoadCampaignSummaryQueryResult = Apollo.QueryResult< - LoadCampaignSummaryQuery, - LoadCampaignSummaryQueryVariables ->; -export function refetchLoadCampaignSummaryQuery( - variables: LoadCampaignSummaryQueryVariables, -) { - return { query: LoadCampaignSummaryDocument, variables: variables }; -} -export const CreateCampaignDocument = gql` - mutation CreateCampaign($input: CreateCampaignInput!) { - createCampaign(createCampaignInput: $input) { - id - paymentType - } - } -`; -export type CreateCampaignMutationFn = Apollo.MutationFunction< - CreateCampaignMutation, - CreateCampaignMutationVariables ->; - -/** - * __useCreateCampaignMutation__ - * - * To run a mutation, you first call `useCreateCampaignMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateCampaignMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [createCampaignMutation, { data, loading, error }] = useCreateCampaignMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateCampaignMutation( - baseOptions?: Apollo.MutationHookOptions< - CreateCampaignMutation, - CreateCampaignMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - CreateCampaignMutation, - CreateCampaignMutationVariables - >(CreateCampaignDocument, options); -} -export type CreateCampaignMutationHookResult = ReturnType< - typeof useCreateCampaignMutation ->; -export type CreateCampaignMutationResult = - Apollo.MutationResult; -export type CreateCampaignMutationOptions = Apollo.BaseMutationOptions< - CreateCampaignMutation, - CreateCampaignMutationVariables ->; -export const UpdateCampaignDocument = gql` - mutation UpdateCampaign($input: UpdateCampaignInput!) { - updateCampaign(updateCampaignInput: $input) { - id - paymentType - stripePaymentId - } - } -`; -export type UpdateCampaignMutationFn = Apollo.MutationFunction< - UpdateCampaignMutation, - UpdateCampaignMutationVariables ->; - -/** - * __useUpdateCampaignMutation__ - * - * To run a mutation, you first call `useUpdateCampaignMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateCampaignMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [updateCampaignMutation, { data, loading, error }] = useUpdateCampaignMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateCampaignMutation( - baseOptions?: Apollo.MutationHookOptions< - UpdateCampaignMutation, - UpdateCampaignMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - UpdateCampaignMutation, - UpdateCampaignMutationVariables - >(UpdateCampaignDocument, options); -} -export type UpdateCampaignMutationHookResult = ReturnType< - typeof useUpdateCampaignMutation ->; -export type UpdateCampaignMutationResult = - Apollo.MutationResult; -export type UpdateCampaignMutationOptions = Apollo.BaseMutationOptions< - UpdateCampaignMutation, - UpdateCampaignMutationVariables ->; diff --git a/src/graphql/common.generated.tsx b/src/graphql/common.generated.tsx deleted file mode 100644 index 206a6e28..00000000 --- a/src/graphql/common.generated.tsx +++ /dev/null @@ -1,186 +0,0 @@ -import type * as Types from "./types"; - -import { gql } from "@apollo/client"; -import * as Apollo from "@apollo/client"; -const defaultOptions = {} as const; -export type GeocodeFragment = { code: string; name: string }; - -export type SegmentFragment = { code: string; name: string }; - -export type ActiveGeocodesQueryVariables = Types.Exact<{ - [key: string]: never; -}>; - -export type ActiveGeocodesQuery = { - geocodes: Array<{ code: string; name: string }>; -}; - -export type SegmentsQueryVariables = Types.Exact<{ [key: string]: never }>; - -export type SegmentsQuery = { - segments: { data: Array<{ code: string; name: string }> }; -}; - -export const GeocodeFragmentDoc = gql` - fragment Geocode on Geocode { - code - name - } -`; -export const SegmentFragmentDoc = gql` - fragment Segment on SegmentsEntry { - code - name - } -`; -export const ActiveGeocodesDocument = gql` - query ActiveGeocodes { - geocodes { - ...Geocode - } - } - ${GeocodeFragmentDoc} -`; - -/** - * __useActiveGeocodesQuery__ - * - * To run a query within a React component, call `useActiveGeocodesQuery` and pass it any options that fit your needs. - * When your component renders, `useActiveGeocodesQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useActiveGeocodesQuery({ - * variables: { - * }, - * }); - */ -export function useActiveGeocodesQuery( - baseOptions?: Apollo.QueryHookOptions< - ActiveGeocodesQuery, - ActiveGeocodesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - ActiveGeocodesDocument, - options, - ); -} -export function useActiveGeocodesLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - ActiveGeocodesQuery, - ActiveGeocodesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - ActiveGeocodesDocument, - options, - ); -} -export function useActiveGeocodesSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - ActiveGeocodesQuery, - ActiveGeocodesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - ActiveGeocodesQuery, - ActiveGeocodesQueryVariables - >(ActiveGeocodesDocument, options); -} -export type ActiveGeocodesQueryHookResult = ReturnType< - typeof useActiveGeocodesQuery ->; -export type ActiveGeocodesLazyQueryHookResult = ReturnType< - typeof useActiveGeocodesLazyQuery ->; -export type ActiveGeocodesSuspenseQueryHookResult = ReturnType< - typeof useActiveGeocodesSuspenseQuery ->; -export type ActiveGeocodesQueryResult = Apollo.QueryResult< - ActiveGeocodesQuery, - ActiveGeocodesQueryVariables ->; -export function refetchActiveGeocodesQuery( - variables?: ActiveGeocodesQueryVariables, -) { - return { query: ActiveGeocodesDocument, variables: variables }; -} -export const SegmentsDocument = gql` - query Segments { - segments { - data { - ...Segment - } - } - } - ${SegmentFragmentDoc} -`; - -/** - * __useSegmentsQuery__ - * - * To run a query within a React component, call `useSegmentsQuery` and pass it any options that fit your needs. - * When your component renders, `useSegmentsQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useSegmentsQuery({ - * variables: { - * }, - * }); - */ -export function useSegmentsQuery( - baseOptions?: Apollo.QueryHookOptions, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - SegmentsDocument, - options, - ); -} -export function useSegmentsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - SegmentsQuery, - SegmentsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - SegmentsDocument, - options, - ); -} -export function useSegmentsSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - SegmentsQuery, - SegmentsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery( - SegmentsDocument, - options, - ); -} -export type SegmentsQueryHookResult = ReturnType; -export type SegmentsLazyQueryHookResult = ReturnType< - typeof useSegmentsLazyQuery ->; -export type SegmentsSuspenseQueryHookResult = ReturnType< - typeof useSegmentsSuspenseQuery ->; -export type SegmentsQueryResult = Apollo.QueryResult< - SegmentsQuery, - SegmentsQueryVariables ->; -export function refetchSegmentsQuery(variables?: SegmentsQueryVariables) { - return { query: SegmentsDocument, variables: variables }; -} diff --git a/src/graphql/creative.generated.tsx b/src/graphql/creative.generated.tsx deleted file mode 100644 index cfbdc4ad..00000000 --- a/src/graphql/creative.generated.tsx +++ /dev/null @@ -1,678 +0,0 @@ -import type * as Types from "./types"; - -import { gql } from "@apollo/client"; -import * as Apollo from "@apollo/client"; -const defaultOptions = {} as const; -export type CreativeFragment = { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { body: string; title: string; targetUrl: string } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; -}; - -export type AdvertiserCreativesQueryVariables = Types.Exact<{ - advertiserId: Types.Scalars["String"]["input"]; -}>; - -export type AdvertiserCreativesQuery = { - advertiser?: { - id: string; - creatives: Array<{ - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { body: string; title: string; targetUrl: string } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }>; - } | null; -}; - -export type CreateCreativeMutationVariables = Types.Exact<{ - input: Types.CreativeInput; -}>; - -export type CreateCreativeMutation = { - createCreative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { body: string; title: string; targetUrl: string } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; -}; - -export type UpdateCreativeMutationVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; - input: Types.CreativeInput; -}>; - -export type UpdateCreativeMutation = { - updateCreative: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { body: string; title: string; targetUrl: string } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - }; -}; - -export type LoadCreativeQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type LoadCreativeQuery = { - creative?: { - id: string; - createdAt: string; - modifiedAt: string; - name: string; - state: string; - type: { code: string }; - payloadNotification?: { - body: string; - title: string; - targetUrl: string; - } | null; - payloadNewTabPage?: { - logo?: { - imageUrl: string; - alt: string; - companyName: string; - destinationUrl: string; - } | null; - wallpapers?: Array<{ - imageUrl: string; - focalPoint: { x: number; y: number }; - }> | null; - } | null; - payloadInlineContent?: { - title: string; - ctaText: string; - imageUrl: string; - targetUrl: string; - dimensions: string; - description: string; - } | null; - payloadSearch?: { body: string; title: string; targetUrl: string } | null; - payloadSearchHomepage?: { - body: string; - imageUrl: string; - imageDarkModeUrl?: string | null; - targetUrl: string; - title: string; - ctaText: string; - } | null; - } | null; -}; - -export type CampaignsForCreativeQueryVariables = Types.Exact<{ - creativeId: Types.Scalars["String"]["input"]; - advertiserId: Types.Scalars["String"]["input"]; -}>; - -export type CampaignsForCreativeQuery = { - creativeCampaigns: Array<{ - id: string; - name: string; - state: string; - format: Types.CampaignFormat; - }>; -}; - -export const CreativeFragmentDoc = gql` - fragment Creative on Creative { - id - createdAt - modifiedAt - name - state - type { - code - } - payloadNotification { - body - title - targetUrl - } - payloadNewTabPage { - logo { - imageUrl - alt - companyName - destinationUrl - } - wallpapers { - imageUrl - focalPoint { - x - y - } - } - } - payloadInlineContent { - title - ctaText - imageUrl - targetUrl - dimensions - description - } - payloadNotification { - body - title - targetUrl - } - payloadSearch { - body - title - targetUrl - } - payloadSearchHomepage { - body - imageUrl - imageDarkModeUrl - targetUrl - title - ctaText - } - } -`; -export const AdvertiserCreativesDocument = gql` - query advertiserCreatives($advertiserId: String!) { - advertiser(id: $advertiserId) { - id - creatives { - ...Creative - } - } - } - ${CreativeFragmentDoc} -`; - -/** - * __useAdvertiserCreativesQuery__ - * - * To run a query within a React component, call `useAdvertiserCreativesQuery` and pass it any options that fit your needs. - * When your component renders, `useAdvertiserCreativesQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useAdvertiserCreativesQuery({ - * variables: { - * advertiserId: // value for 'advertiserId' - * }, - * }); - */ -export function useAdvertiserCreativesQuery( - baseOptions: Apollo.QueryHookOptions< - AdvertiserCreativesQuery, - AdvertiserCreativesQueryVariables - > & - ( - | { variables: AdvertiserCreativesQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - AdvertiserCreativesQuery, - AdvertiserCreativesQueryVariables - >(AdvertiserCreativesDocument, options); -} -export function useAdvertiserCreativesLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - AdvertiserCreativesQuery, - AdvertiserCreativesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - AdvertiserCreativesQuery, - AdvertiserCreativesQueryVariables - >(AdvertiserCreativesDocument, options); -} -export function useAdvertiserCreativesSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - AdvertiserCreativesQuery, - AdvertiserCreativesQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - AdvertiserCreativesQuery, - AdvertiserCreativesQueryVariables - >(AdvertiserCreativesDocument, options); -} -export type AdvertiserCreativesQueryHookResult = ReturnType< - typeof useAdvertiserCreativesQuery ->; -export type AdvertiserCreativesLazyQueryHookResult = ReturnType< - typeof useAdvertiserCreativesLazyQuery ->; -export type AdvertiserCreativesSuspenseQueryHookResult = ReturnType< - typeof useAdvertiserCreativesSuspenseQuery ->; -export type AdvertiserCreativesQueryResult = Apollo.QueryResult< - AdvertiserCreativesQuery, - AdvertiserCreativesQueryVariables ->; -export function refetchAdvertiserCreativesQuery( - variables: AdvertiserCreativesQueryVariables, -) { - return { query: AdvertiserCreativesDocument, variables: variables }; -} -export const CreateCreativeDocument = gql` - mutation createCreative($input: CreativeInput!) { - createCreative(creative: $input) { - ...Creative - } - } - ${CreativeFragmentDoc} -`; -export type CreateCreativeMutationFn = Apollo.MutationFunction< - CreateCreativeMutation, - CreateCreativeMutationVariables ->; - -/** - * __useCreateCreativeMutation__ - * - * To run a mutation, you first call `useCreateCreativeMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateCreativeMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [createCreativeMutation, { data, loading, error }] = useCreateCreativeMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateCreativeMutation( - baseOptions?: Apollo.MutationHookOptions< - CreateCreativeMutation, - CreateCreativeMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - CreateCreativeMutation, - CreateCreativeMutationVariables - >(CreateCreativeDocument, options); -} -export type CreateCreativeMutationHookResult = ReturnType< - typeof useCreateCreativeMutation ->; -export type CreateCreativeMutationResult = - Apollo.MutationResult; -export type CreateCreativeMutationOptions = Apollo.BaseMutationOptions< - CreateCreativeMutation, - CreateCreativeMutationVariables ->; -export const UpdateCreativeDocument = gql` - mutation updateCreative($id: String!, $input: CreativeInput!) { - updateCreative(id: $id, creative: $input) { - ...Creative - } - } - ${CreativeFragmentDoc} -`; -export type UpdateCreativeMutationFn = Apollo.MutationFunction< - UpdateCreativeMutation, - UpdateCreativeMutationVariables ->; - -/** - * __useUpdateCreativeMutation__ - * - * To run a mutation, you first call `useUpdateCreativeMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateCreativeMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [updateCreativeMutation, { data, loading, error }] = useUpdateCreativeMutation({ - * variables: { - * id: // value for 'id' - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateCreativeMutation( - baseOptions?: Apollo.MutationHookOptions< - UpdateCreativeMutation, - UpdateCreativeMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation< - UpdateCreativeMutation, - UpdateCreativeMutationVariables - >(UpdateCreativeDocument, options); -} -export type UpdateCreativeMutationHookResult = ReturnType< - typeof useUpdateCreativeMutation ->; -export type UpdateCreativeMutationResult = - Apollo.MutationResult; -export type UpdateCreativeMutationOptions = Apollo.BaseMutationOptions< - UpdateCreativeMutation, - UpdateCreativeMutationVariables ->; -export const LoadCreativeDocument = gql` - query loadCreative($id: String!) { - creative(id: $id) { - ...Creative - } - } - ${CreativeFragmentDoc} -`; - -/** - * __useLoadCreativeQuery__ - * - * To run a query within a React component, call `useLoadCreativeQuery` and pass it any options that fit your needs. - * When your component renders, `useLoadCreativeQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useLoadCreativeQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useLoadCreativeQuery( - baseOptions: Apollo.QueryHookOptions< - LoadCreativeQuery, - LoadCreativeQueryVariables - > & - ( - | { variables: LoadCreativeQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - LoadCreativeDocument, - options, - ); -} -export function useLoadCreativeLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - LoadCreativeQuery, - LoadCreativeQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - LoadCreativeDocument, - options, - ); -} -export function useLoadCreativeSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - LoadCreativeQuery, - LoadCreativeQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery( - LoadCreativeDocument, - options, - ); -} -export type LoadCreativeQueryHookResult = ReturnType< - typeof useLoadCreativeQuery ->; -export type LoadCreativeLazyQueryHookResult = ReturnType< - typeof useLoadCreativeLazyQuery ->; -export type LoadCreativeSuspenseQueryHookResult = ReturnType< - typeof useLoadCreativeSuspenseQuery ->; -export type LoadCreativeQueryResult = Apollo.QueryResult< - LoadCreativeQuery, - LoadCreativeQueryVariables ->; -export function refetchLoadCreativeQuery( - variables: LoadCreativeQueryVariables, -) { - return { query: LoadCreativeDocument, variables: variables }; -} -export const CampaignsForCreativeDocument = gql` - query campaignsForCreative($creativeId: String!, $advertiserId: String!) { - creativeCampaigns(creativeId: $creativeId, advertiserId: $advertiserId) { - id - name - state - format - } - } -`; - -/** - * __useCampaignsForCreativeQuery__ - * - * To run a query within a React component, call `useCampaignsForCreativeQuery` and pass it any options that fit your needs. - * When your component renders, `useCampaignsForCreativeQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useCampaignsForCreativeQuery({ - * variables: { - * creativeId: // value for 'creativeId' - * advertiserId: // value for 'advertiserId' - * }, - * }); - */ -export function useCampaignsForCreativeQuery( - baseOptions: Apollo.QueryHookOptions< - CampaignsForCreativeQuery, - CampaignsForCreativeQueryVariables - > & - ( - | { variables: CampaignsForCreativeQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - CampaignsForCreativeQuery, - CampaignsForCreativeQueryVariables - >(CampaignsForCreativeDocument, options); -} -export function useCampaignsForCreativeLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - CampaignsForCreativeQuery, - CampaignsForCreativeQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - CampaignsForCreativeQuery, - CampaignsForCreativeQueryVariables - >(CampaignsForCreativeDocument, options); -} -export function useCampaignsForCreativeSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - CampaignsForCreativeQuery, - CampaignsForCreativeQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - CampaignsForCreativeQuery, - CampaignsForCreativeQueryVariables - >(CampaignsForCreativeDocument, options); -} -export type CampaignsForCreativeQueryHookResult = ReturnType< - typeof useCampaignsForCreativeQuery ->; -export type CampaignsForCreativeLazyQueryHookResult = ReturnType< - typeof useCampaignsForCreativeLazyQuery ->; -export type CampaignsForCreativeSuspenseQueryHookResult = ReturnType< - typeof useCampaignsForCreativeSuspenseQuery ->; -export type CampaignsForCreativeQueryResult = Apollo.QueryResult< - CampaignsForCreativeQuery, - CampaignsForCreativeQueryVariables ->; -export function refetchCampaignsForCreativeQuery( - variables: CampaignsForCreativeQueryVariables, -) { - return { query: CampaignsForCreativeDocument, variables: variables }; -} diff --git a/src/graphql/types.ts b/src/graphql/types.ts deleted file mode 100644 index 25807c58..00000000 --- a/src/graphql/types.ts +++ /dev/null @@ -1,600 +0,0 @@ -export type Maybe = T | null; -export type InputMaybe = Maybe; -export type Exact = { - [K in keyof T]: T[K]; -}; -export type MakeOptional = Omit & { - [SubKey in K]?: Maybe; -}; -export type MakeMaybe = Omit & { - [SubKey in K]: Maybe; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; -/** All built-in and custom scalars, mapped to their actual values */ -export type Scalars = { - ID: { input: string; output: string }; - String: { input: string; output: string }; - Boolean: { input: boolean; output: boolean }; - Int: { input: number; output: number }; - Float: { input: number; output: number }; - /** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */ - DateTime: { input: string; output: string }; - /** The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf). */ - JSONObject: { input: object; output: object }; - /** The `Numeric` datatype represents a fixed-precision number, which does not suffer from the rounding errors of a javascript floating point number. It's always returned as a string, but for input types either a string or number can be used, though strings are preferred to avoid risk of inaccuracy. */ - Numeric: { input: string | number; output: string }; -}; - -export type AdvertiserCampaignFilter = { - /** exclude all campaigns whose time range is completely before this time */ - from?: InputMaybe; - /** include ads */ - includeAds?: InputMaybe; - /** include creative sets */ - includeCreativeSets?: InputMaybe; -}; - -export type AdvertiserPriceInput = { - billingModelPrice: Scalars["Numeric"]["input"]; - billingType: BillingType; - format: CampaignFormat; -}; - -export enum AdvertiserSource { - Managed = "MANAGED", - SelfServe = "SELF_SERVE", -} - -export type ApproveCampaignInput = { - campaignId: Scalars["String"]["input"]; -}; - -export enum BillingType { - Cpc = "CPC", - Cpm = "CPM", - Cpsv = "CPSV", -} - -export type CampaignFilter = { - /** only include campaigns for this format */ - format?: InputMaybe; - /** exclude all campaigns whose time range is completely before this time */ - from?: InputMaybe; - /** only include campaigns with this source */ - source?: InputMaybe; - /** only include campaigns with this state */ - state?: InputMaybe; - /** exclude all campaigns whose time range is completely after this time */ - to?: InputMaybe; -}; - -export enum CampaignFormat { - NewsDisplayAd = "NEWS_DISPLAY_AD", - NtpSi = "NTP_SI", - PushNotification = "PUSH_NOTIFICATION", - Search = "SEARCH", - SearchHomepage = "SEARCH_HOMEPAGE", -} - -export enum CampaignPacingStrategies { - ModelV1 = "MODEL_V1", - Original = "ORIGINAL", -} - -export type CampaignPerformanceFilter = { - /** include metrics starting from this time (inclusive) */ - from?: InputMaybe; - /** include metrics before this time (inclusive) */ - to?: InputMaybe; -}; - -export enum CampaignRejection { - InappropriateContent = "INAPPROPRIATE_CONTENT", - InvalidLandingPage = "INVALID_LANDING_PAGE", - Other = "OTHER", - ProhibitedCategory = "PROHIBITED_CATEGORY", -} - -export enum CampaignSource { - Direct = "DIRECT", - Managed = "MANAGED", - Network = "NETWORK", - SelfServe = "SELF_SERVE", -} - -export enum CampaignType { - Barter = "BARTER", - Cause = "CAUSE", - Fixed = "FIXED", - Free = "FREE", - House = "HOUSE", - MakeGood = "MAKE_GOOD", - Paid = "PAID", - Preemptive = "PREEMPTIVE", - Trial = "TRIAL", -} - -export type ChangeFilter = { - /** exclude all changes whose time range is completely before this time */ - createdAfter?: InputMaybe; - /** include changes made by system user */ - includeSystemUser?: InputMaybe; - /** limit the amount of results returned */ - limit?: InputMaybe; - /** only include changes for this reference id */ - referenceId?: InputMaybe; - /** only include changes for this set of reference ids */ - referenceIds?: InputMaybe>; -}; - -export enum ConfirmationType { - Bookmark = "BOOKMARK", - Click = "CLICK", - ClientView = "CLIENT_VIEW", - Conversion = "CONVERSION", - Dismiss = "DISMISS", - Downvote = "DOWNVOTE", - Flag = "FLAG", - Land30 = "LAND30", - Land60 = "LAND60", - Landclick = "LANDCLICK", - Landed = "LANDED", - Upvote = "UPVOTE", - View = "VIEW", -} - -export type CreateAdInput = { - creative?: InputMaybe; - creativeId?: InputMaybe; - creativeSetId?: InputMaybe; - id?: InputMaybe; - webhooks?: InputMaybe>; -}; - -export type CreateAdSetInput = { - ads?: InputMaybe>; - bannedKeywords?: InputMaybe>; - billingType: Scalars["String"]["input"]; - brandedDesktopPrice?: InputMaybe; - brandedMobilePrice?: InputMaybe; - campaignId?: InputMaybe; - conversions?: InputMaybe>; - externalId?: InputMaybe; - keywordSimilarity?: InputMaybe; - keywords?: InputMaybe>; - name?: InputMaybe; - negativeKeywords?: InputMaybe>; - negativeTriggerUrls?: InputMaybe>; - nonBrandedDesktopPrice?: InputMaybe; - nonBrandedMobilePrice?: InputMaybe; - oses?: InputMaybe>; - perDay: Scalars["Float"]["input"]; - /** The price in the owning campaign's currency for each single confirmation of the priceType specified. Note therefore that the caller is responsible for dividing cost-per-mille by 1000. */ - price: Scalars["Numeric"]["input"]; - segments: Array; - splitTestGroup?: InputMaybe; - state?: InputMaybe; - targetingTerms?: InputMaybe>; - totalMax: Scalars["Float"]["input"]; - triggerUrls?: InputMaybe>; -}; - -export type CreateAddressInput = { - city: Scalars["String"]["input"]; - country: Scalars["String"]["input"]; - state: Scalars["String"]["input"]; - street1: Scalars["String"]["input"]; - street2?: InputMaybe; - zipcode: Scalars["String"]["input"]; -}; - -export type CreateAdvertiserImageInput = { - advertiserId: Scalars["String"]["input"]; - format: CampaignFormat; - imageUrl: Scalars["String"]["input"]; - name: Scalars["String"]["input"]; -}; - -export type CreateAdvertiserInput = { - accountManagerId?: InputMaybe; - additionalBillingEmails?: InputMaybe>; - billingAddress?: InputMaybe; - billingEmail?: InputMaybe; - billingModelPrices?: InputMaybe>; - description?: InputMaybe; - marketingChannel?: InputMaybe; - name: Scalars["String"]["input"]; - phone?: InputMaybe; - referrer?: InputMaybe; - selfServiceManageCampaign?: InputMaybe; - state?: InputMaybe; - url?: InputMaybe; - userId?: InputMaybe; -}; - -export type CreateCampaignInput = { - accountManagerId?: InputMaybe; - adSets?: InputMaybe>; - advertiserId: Scalars["String"]["input"]; - bannedKeywords?: InputMaybe>; - brandedKeyword?: InputMaybe; - brandedKeywords?: InputMaybe>; - budget: Scalars["Float"]["input"]; - currency?: Scalars["String"]["input"]; - dailyBudget?: InputMaybe; - dailyCap: Scalars["Float"]["input"]; - dayPartings?: InputMaybe>; - dayProportion?: InputMaybe; - endAt: Scalars["DateTime"]["input"]; - externalId?: InputMaybe; - format: CampaignFormat; - geoTargets: Array; - name: Scalars["String"]["input"]; - pacingStrategy?: InputMaybe; - paymentType?: InputMaybe; - priority?: InputMaybe; - source: Scalars["String"]["input"]; - startAt: Scalars["DateTime"]["input"]; - state: Scalars["String"]["input"]; - type?: CampaignType; - userId?: InputMaybe; -}; - -export type CreateCommentInput = { - campaignId: Scalars["String"]["input"]; - note: Scalars["String"]["input"]; -}; - -export type CreateConversionInput = { - extractExternalId?: InputMaybe; - observationWindow: Scalars["Float"]["input"]; - trailingAsteriskNotRequired?: InputMaybe; - type: Scalars["String"]["input"]; - urlPattern: Scalars["String"]["input"]; -}; - -export type CreateInPageCreativeInput = { - advertiserId: Scalars["String"]["input"]; - endAt?: InputMaybe; - name: Scalars["String"]["input"]; - payload: InPagePayloadInput; - startAt?: InputMaybe; - state: Scalars["String"]["input"]; - type: CreateTypeInput; - userId?: InputMaybe; -}; - -export type CreateNewTabPageCreativeInput = { - advertiserId: Scalars["String"]["input"]; - endAt?: InputMaybe; - name: Scalars["String"]["input"]; - payload: NewTabPagePayloadInput; - startAt?: InputMaybe; - state: Scalars["String"]["input"]; - type: CreateTypeInput; -}; - -export type CreateNotificationCreativeInput = { - advertiserId: Scalars["String"]["input"]; - endAt?: InputMaybe; - name: Scalars["String"]["input"]; - payload: NotificationPayloadInput; - startAt?: InputMaybe; - state: Scalars["String"]["input"]; - type: CreateTypeInput; - userId?: InputMaybe; -}; - -export type CreateOsInput = { - code: Scalars["String"]["input"]; - name: Scalars["String"]["input"]; -}; - -export type CreateSegmentInput = { - code: Scalars["String"]["input"]; - name: Scalars["String"]["input"]; -}; - -export type CreateTypeInput = { - code: Scalars["String"]["input"]; - name?: InputMaybe; -}; - -export type CreateUserInput = { - email: Scalars["String"]["input"]; - emailVerified: Scalars["Boolean"]["input"]; - fullName: Scalars["String"]["input"]; - password?: InputMaybe; - role: Scalars["String"]["input"]; -}; - -export type CreativeFilter = { - /** only include creatives with this state */ - state?: InputMaybe; -}; - -export type CreativeInput = { - advertiserId: Scalars["String"]["input"]; - endAt?: InputMaybe; - name: Scalars["String"]["input"]; - payloadInPage?: InputMaybe; - payloadInlineContent?: InputMaybe; - payloadNewTabPage?: InputMaybe; - payloadNotification?: InputMaybe; - payloadPromotedContent?: InputMaybe; - payloadSearch?: InputMaybe; - payloadSearchHomepage?: InputMaybe; - startAt?: InputMaybe; - state: Scalars["String"]["input"]; - type: CreateTypeInput; -}; - -export type CreativeTypeInput = { - code: Scalars["String"]["input"]; - name: Scalars["String"]["input"]; -}; - -export type DayPartingInput = { - dow: Scalars["String"]["input"]; - endMinute: Scalars["Float"]["input"]; - startMinute: Scalars["Float"]["input"]; -}; - -export type DeleteAdInput = { - id: Scalars["String"]["input"]; -}; - -export type FocalPointInput = { - x: Scalars["Float"]["input"]; - y: Scalars["Float"]["input"]; -}; - -export type GeocodeInput = { - code: Scalars["String"]["input"]; - name?: InputMaybe; -}; - -export type InPagePayloadInput = { - creativeUrl: Scalars["String"]["input"]; - /** size of the creative, e.g. 1024x768 */ - size: Scalars["String"]["input"]; - targetUrl: Scalars["String"]["input"]; -}; - -export type InlineContentPayloadInput = { - ctaText: Scalars["String"]["input"]; - description: Scalars["String"]["input"]; - dimensions: Scalars["String"]["input"]; - imageUrl: Scalars["String"]["input"]; - targetUrl: Scalars["String"]["input"]; - title: Scalars["String"]["input"]; -}; - -export type LogoInput = { - alt: Scalars["String"]["input"]; - companyName: Scalars["String"]["input"]; - destinationUrl: Scalars["String"]["input"]; - imageUrl: Scalars["String"]["input"]; -}; - -export type NewTabPagePayloadInput = { - logo?: InputMaybe; - wallpapers?: InputMaybe>; -}; - -export type NotificationPayloadInput = { - body: Scalars["String"]["input"]; - targetUrl: Scalars["String"]["input"]; - title: Scalars["String"]["input"]; -}; - -export enum PaymentType { - ManualBat = "MANUAL_BAT", - Netsuite = "NETSUITE", - Radom = "RADOM", - Stripe = "STRIPE", -} - -export type PerformanceFilter = { - /** include metrics for all these advertisers' campaigns */ - advertiserIds?: InputMaybe>; - /** include metrics for all these campaigns */ - campaignIds?: InputMaybe>; - /** include metrics starting from this time (inclusive) */ - from?: InputMaybe; - /** include metrics before this time (inclusive) */ - to?: InputMaybe; -}; - -export type PromotedContentPayloadInput = { - category: Scalars["String"]["input"]; - contentType: Scalars["String"]["input"]; - description: Scalars["String"]["input"]; - domain?: InputMaybe; - feed: Scalars["String"]["input"]; - ogImages: Scalars["Boolean"]["input"]; - title: Scalars["String"]["input"]; -}; - -export type RejectCampaignInput = { - campaignId: Scalars["String"]["input"]; - message?: InputMaybe; - option: CampaignRejection; -}; - -export type SearchHomepagePayloadInput = { - body: Scalars["String"]["input"]; - ctaText?: Scalars["String"]["input"]; - imageDarkModeUrl?: InputMaybe; - imageUrl: Scalars["String"]["input"]; - targetUrl: Scalars["String"]["input"]; - title: Scalars["String"]["input"]; -}; - -export type SearchPayloadInput = { - body: Scalars["String"]["input"]; - /** ad-hoc parameters passed to search */ - meta?: InputMaybe; - /** optionally, how this creative should be rendered with the SERP */ - style?: InputMaybe; - targetUrl: Scalars["String"]["input"]; - title: Scalars["String"]["input"]; -}; - -export type UpdateAdInput = { - creativeId?: InputMaybe; - creativeSetId?: InputMaybe; - id?: InputMaybe; - state?: InputMaybe; - webhooks?: InputMaybe>; -}; - -export type UpdateAdSetInput = { - ads?: InputMaybe>; - bannedKeywords?: InputMaybe>; - billingType?: InputMaybe; - brandedDesktopPrice?: InputMaybe; - brandedMobilePrice?: InputMaybe; - campaignId?: InputMaybe; - conversions?: InputMaybe>; - externalId?: InputMaybe; - id?: InputMaybe; - keywordSimilarity?: InputMaybe; - keywords?: InputMaybe>; - name?: InputMaybe; - negativeKeywords?: InputMaybe>; - negativeTriggerUrls?: InputMaybe>; - nonBrandedDesktopPrice?: InputMaybe; - nonBrandedMobilePrice?: InputMaybe; - optimized?: InputMaybe; - oses?: InputMaybe>; - perDay?: InputMaybe; - /** The price in the owning campaign's currency for each single confirmation of the priceType specified. Note therefore that the caller is responsible for dividing cost-per-mille by 1000. */ - price?: InputMaybe; - segments?: InputMaybe>; - splitTestGroup?: InputMaybe; - state?: InputMaybe; - targetingTerms?: InputMaybe>; - totalMax?: InputMaybe; - triggerUrls?: InputMaybe>; -}; - -export type UpdateAddressInput = { - city?: InputMaybe; - country?: InputMaybe; - /** Temporarily nullable so the frontend does not break */ - id?: InputMaybe; - state?: InputMaybe; - street1?: InputMaybe; - street2?: InputMaybe; - zipcode?: InputMaybe; -}; - -export type UpdateAdvertiserInput = { - accountManagerId?: InputMaybe; - additionalBillingEmails?: InputMaybe>; - /** Agreed to Terms And Conditions - Advertiser Facing Dashboard */ - agreed?: InputMaybe; - billingAddress?: InputMaybe; - billingEmail?: InputMaybe; - billingModelPrices?: InputMaybe>; - description?: InputMaybe; - id: Scalars["String"]["input"]; - marketingChannel?: InputMaybe; - name?: InputMaybe; - phone?: InputMaybe; - publicKey?: InputMaybe; - referrer?: InputMaybe; - selfServiceManageCampaign?: InputMaybe; - state?: InputMaybe; - url?: InputMaybe; - userId?: InputMaybe; - users?: InputMaybe>; -}; - -export type UpdateCampaignInput = { - accountManagerId?: InputMaybe; - adSets?: InputMaybe>; - advertiserId?: InputMaybe; - bannedKeywords?: InputMaybe>; - brandedKeyword?: InputMaybe; - brandedKeywords?: InputMaybe>; - budget?: InputMaybe; - currency?: InputMaybe; - dailyBudget?: InputMaybe; - dailyCap?: InputMaybe; - dayPartings?: InputMaybe>; - dayProportion?: InputMaybe; - endAt?: InputMaybe; - externalId?: InputMaybe; - geoTargets?: InputMaybe>; - id: Scalars["String"]["input"]; - name?: InputMaybe; - pacingOverride?: InputMaybe; - pacingStrategy?: InputMaybe; - passThroughRate?: InputMaybe; - paymentType?: InputMaybe; - priority?: InputMaybe; - startAt?: InputMaybe; - state?: InputMaybe; - stripePaymentId?: InputMaybe; - type?: InputMaybe; -}; - -export type UpdateConversionsInput = { - extractExternalId?: InputMaybe; - id?: InputMaybe; - observationWindow?: InputMaybe; - trailingAsteriskNotRequired?: InputMaybe; - type?: InputMaybe; - urlPattern?: InputMaybe; -}; - -export type UpdateNotificationCreativeInput = { - advertiserId?: InputMaybe; - creativeId?: InputMaybe; - endAt?: InputMaybe; - name?: InputMaybe; - payload?: InputMaybe; - startAt?: InputMaybe; - state?: InputMaybe; - type?: InputMaybe; - userId?: InputMaybe; -}; - -export type UpdateOSesInput = { - code?: InputMaybe; - name?: InputMaybe; -}; - -export type UpdateSegmentInput = { - code?: InputMaybe; - name?: InputMaybe; -}; - -export type UpdateUserInput = { - email?: InputMaybe; - emailVerified?: InputMaybe; - fullName?: InputMaybe; - id?: InputMaybe; - password?: InputMaybe; - role?: InputMaybe; -}; - -export type WallpaperInput = { - focalPoint: FocalPointInput; - imageUrl: Scalars["String"]["input"]; -}; - -export type CreateWebhookInput = { - type: Scalars["String"]["input"]; - url: Scalars["String"]["input"]; -}; diff --git a/src/graphql/url.generated.tsx b/src/graphql/url.generated.tsx deleted file mode 100644 index e4565bdf..00000000 --- a/src/graphql/url.generated.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import type * as Types from "./types"; - -import { gql } from "@apollo/client"; -import * as Apollo from "@apollo/client"; -const defaultOptions = {} as const; -export type ValidateTargetUrlQueryVariables = Types.Exact<{ - url: Types.Scalars["String"]["input"]; -}>; - -export type ValidateTargetUrlQuery = { - validateTargetUrl: { - isValid: boolean; - redirects: Array<{ - url: string; - violations: Array<{ summary: string; detail: string }>; - }>; - }; -}; - -export const ValidateTargetUrlDocument = gql` - query validateTargetUrl($url: String!) { - validateTargetUrl(targetUrl: $url) { - isValid - redirects { - url - violations { - summary - detail - } - } - } - } -`; - -/** - * __useValidateTargetUrlQuery__ - * - * To run a query within a React component, call `useValidateTargetUrlQuery` and pass it any options that fit your needs. - * When your component renders, `useValidateTargetUrlQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useValidateTargetUrlQuery({ - * variables: { - * url: // value for 'url' - * }, - * }); - */ -export function useValidateTargetUrlQuery( - baseOptions: Apollo.QueryHookOptions< - ValidateTargetUrlQuery, - ValidateTargetUrlQueryVariables - > & - ( - | { variables: ValidateTargetUrlQueryVariables; skip?: boolean } - | { skip: boolean } - ), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - ValidateTargetUrlQuery, - ValidateTargetUrlQueryVariables - >(ValidateTargetUrlDocument, options); -} -export function useValidateTargetUrlLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - ValidateTargetUrlQuery, - ValidateTargetUrlQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - ValidateTargetUrlQuery, - ValidateTargetUrlQueryVariables - >(ValidateTargetUrlDocument, options); -} -export function useValidateTargetUrlSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - ValidateTargetUrlQuery, - ValidateTargetUrlQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery< - ValidateTargetUrlQuery, - ValidateTargetUrlQueryVariables - >(ValidateTargetUrlDocument, options); -} -export type ValidateTargetUrlQueryHookResult = ReturnType< - typeof useValidateTargetUrlQuery ->; -export type ValidateTargetUrlLazyQueryHookResult = ReturnType< - typeof useValidateTargetUrlLazyQuery ->; -export type ValidateTargetUrlSuspenseQueryHookResult = ReturnType< - typeof useValidateTargetUrlSuspenseQuery ->; -export type ValidateTargetUrlQueryResult = Apollo.QueryResult< - ValidateTargetUrlQuery, - ValidateTargetUrlQueryVariables ->; -export function refetchValidateTargetUrlQuery( - variables: ValidateTargetUrlQueryVariables, -) { - return { query: ValidateTargetUrlDocument, variables: variables }; -} diff --git a/src/graphql/user.generated.tsx b/src/graphql/user.generated.tsx deleted file mode 100644 index 3aaeabe5..00000000 --- a/src/graphql/user.generated.tsx +++ /dev/null @@ -1,160 +0,0 @@ -import type * as Types from "./types"; - -import { gql } from "@apollo/client"; -import * as Apollo from "@apollo/client"; -const defaultOptions = {} as const; -export type UserFragment = { - email: string; - fullName: string; - id: string; - role: string; -}; - -export type LoadUserQueryVariables = Types.Exact<{ - id: Types.Scalars["String"]["input"]; -}>; - -export type LoadUserQuery = { - user: { email: string; fullName: string; id: string; role: string }; -}; - -export type UpdateUserMutationVariables = Types.Exact<{ - input: Types.UpdateUserInput; -}>; - -export type UpdateUserMutation = { - updateUser: { email: string; fullName: string; id: string; role: string }; -}; - -export const UserFragmentDoc = gql` - fragment User on User { - email - fullName - id - role - } -`; -export const LoadUserDocument = gql` - query LoadUser($id: String!) { - user(id: $id) { - ...User - } - } - ${UserFragmentDoc} -`; - -/** - * __useLoadUserQuery__ - * - * To run a query within a React component, call `useLoadUserQuery` and pass it any options that fit your needs. - * When your component renders, `useLoadUserQuery` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useLoadUserQuery({ - * variables: { - * id: // value for 'id' - * }, - * }); - */ -export function useLoadUserQuery( - baseOptions: Apollo.QueryHookOptions & - ({ variables: LoadUserQueryVariables; skip?: boolean } | { skip: boolean }), -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery( - LoadUserDocument, - options, - ); -} -export function useLoadUserLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - LoadUserQuery, - LoadUserQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery( - LoadUserDocument, - options, - ); -} -export function useLoadUserSuspenseQuery( - baseOptions?: Apollo.SuspenseQueryHookOptions< - LoadUserQuery, - LoadUserQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useSuspenseQuery( - LoadUserDocument, - options, - ); -} -export type LoadUserQueryHookResult = ReturnType; -export type LoadUserLazyQueryHookResult = ReturnType< - typeof useLoadUserLazyQuery ->; -export type LoadUserSuspenseQueryHookResult = ReturnType< - typeof useLoadUserSuspenseQuery ->; -export type LoadUserQueryResult = Apollo.QueryResult< - LoadUserQuery, - LoadUserQueryVariables ->; -export function refetchLoadUserQuery(variables: LoadUserQueryVariables) { - return { query: LoadUserDocument, variables: variables }; -} -export const UpdateUserDocument = gql` - mutation UpdateUser($input: UpdateUserInput!) { - updateUser(updateUserInput: $input) { - ...User - } - } - ${UserFragmentDoc} -`; -export type UpdateUserMutationFn = Apollo.MutationFunction< - UpdateUserMutation, - UpdateUserMutationVariables ->; - -/** - * __useUpdateUserMutation__ - * - * To run a mutation, you first call `useUpdateUserMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useUpdateUserMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @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; - * - * @example - * const [updateUserMutation, { data, loading, error }] = useUpdateUserMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useUpdateUserMutation( - baseOptions?: Apollo.MutationHookOptions< - UpdateUserMutation, - UpdateUserMutationVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useMutation( - UpdateUserDocument, - options, - ); -} -export type UpdateUserMutationHookResult = ReturnType< - typeof useUpdateUserMutation ->; -export type UpdateUserMutationResult = - Apollo.MutationResult; -export type UpdateUserMutationOptions = Apollo.BaseMutationOptions< - UpdateUserMutation, - UpdateUserMutationVariables ->; diff --git a/src/user/adSet/AdSetList.tsx b/src/user/adSet/AdSetList.tsx index 9c89fc82..28e5c0b0 100644 --- a/src/user/adSet/AdSetList.tsx +++ b/src/user/adSet/AdSetList.tsx @@ -2,10 +2,8 @@ import { Chip } from "@mui/material"; import { Status } from "@/components/Campaigns/Status"; import _ from "lodash"; import { adSetOnOffState } from "@/components/Datagrid/renderers"; -import { CampaignAdsFragment } from "@/graphql/campaign.generated"; -import { CampaignSource } from "@/graphql/types"; +import { CampaignAdsFragment, CampaignSource } from "@/graphql-client/graphql"; import { StatsMetric } from "@/user/analytics/analyticsOverview/types"; -import { AdSetWithDeletedAdsFragment } from "@/graphql/ad-set.generated"; import { AdDetailTable } from "@/user/views/user/AdDetailTable"; import { displayFromCampaignState } from "@/util/displayState"; import { uiLabelsForBillingType } from "@/util/billingType"; @@ -13,6 +11,7 @@ import { GridColDef } from "@mui/x-data-grid"; import { segmentNameWithNoDash } from "@/util/segment"; import { useLingui } from "@lingui/react"; import { msg, Trans } from "@lingui/macro"; +import { AdSetWithDeletedAdsFragment } from "@/graphql-client/graphql"; interface Props { loading: boolean; diff --git a/src/user/ads/AdList.tsx b/src/user/ads/AdList.tsx index 8b6a81dd..a6a97050 100644 --- a/src/user/ads/AdList.tsx +++ b/src/user/ads/AdList.tsx @@ -1,12 +1,14 @@ import _ from "lodash"; import { isDateInThePast } from "@/util/isAfterEndDate"; -import { AdFragment } from "@/graphql/ad-set.generated"; -import { CampaignSource } from "@/graphql/types"; -import { CampaignAdsFragment } from "@/graphql/campaign.generated"; +import { + AdFragment, + CampaignAdsFragment, + CampaignSource, + CreativeFragment, +} from "@/graphql-client/graphql"; import { StatsMetric } from "@/user/analytics/analyticsOverview/types"; import { AdDetailTable } from "@/user/views/user/AdDetailTable"; import { GridColDef } from "@mui/x-data-grid"; -import { CreativeFragment } from "@/graphql/creative.generated"; import { Box } from "@mui/material"; import { useLingui } from "@lingui/react"; import { msg, Trans } from "@lingui/macro"; diff --git a/src/user/ads/AdsExistingAd.tsx b/src/user/ads/AdsExistingAd.tsx index b82f95a3..f0d82062 100644 --- a/src/user/ads/AdsExistingAd.tsx +++ b/src/user/ads/AdsExistingAd.tsx @@ -8,12 +8,12 @@ import { Modal, } from "@mui/material"; import { useFormikContext } from "formik"; -import { CampaignFormat } from "@/graphql/types"; -import _ from "lodash"; import { + AdvertiserCreativesDocument, + CampaignFormat, CreativeFragment, - useAdvertiserCreativesQuery, -} from "@/graphql/creative.generated"; +} from "@/graphql-client/graphql"; +import _ from "lodash"; import { isCreativeTypeApplicableToCampaignFormat } from "@/user/library"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { CampaignForm } from "@/user/views/adsManager/types"; @@ -25,6 +25,7 @@ import { useAdvertiserCreatives } from "@/user/hooks/useAdvertiserCreatives"; import { modalStyles } from "@/theme"; import { msg, Trans } from "@lingui/macro"; import { useLingui } from "@lingui/react"; +import { useQuery } from "@apollo/client"; function filterCreativesBasedOnCampaignFormat( creatives: CreativeFragment[], @@ -45,7 +46,7 @@ export function AdsExistingAd() { const { advertiser } = useAdvertiser(); const original = useRef([]); const [options, setOptions] = useState(); - const { loading } = useAdvertiserCreativesQuery({ + const { loading } = useQuery(AdvertiserCreativesDocument, { variables: { advertiserId: advertiser.id }, onCompleted(data) { const creativeOptionList = _.orderBy( diff --git a/src/user/ads/NewAd.tsx b/src/user/ads/NewAd.tsx index c0c46b07..370eef9b 100644 --- a/src/user/ads/NewAd.tsx +++ b/src/user/ads/NewAd.tsx @@ -10,7 +10,7 @@ import { initialCreative, } from "@/user/views/adsManager/types"; import { FormContext } from "@/state/context"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { Trans } from "@lingui/macro"; export function NewAd() { diff --git a/src/user/analytics/analyticsOverview/components/EngagementHeader.tsx b/src/user/analytics/analyticsOverview/components/EngagementHeader.tsx index 7e035d5b..70a981ec 100644 --- a/src/user/analytics/analyticsOverview/components/EngagementHeader.tsx +++ b/src/user/analytics/analyticsOverview/components/EngagementHeader.tsx @@ -1,9 +1,9 @@ import { Box, Button, Stack, Typography } from "@mui/material"; import { Status } from "@/components/Campaigns/Status"; -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; import { MessageDescriptor } from "@lingui/core"; import { msg } from "@lingui/macro"; import { Trans } from "@lingui/react"; +import { CampaignSummaryFragment } from "@/graphql-client/graphql"; interface HeaderProps { onSetGroup: (s: string) => void; diff --git a/src/user/analytics/analyticsOverview/components/ReportUtils.tsx b/src/user/analytics/analyticsOverview/components/ReportUtils.tsx index c8659847..1fbf053f 100644 --- a/src/user/analytics/analyticsOverview/components/ReportUtils.tsx +++ b/src/user/analytics/analyticsOverview/components/ReportUtils.tsx @@ -1,7 +1,7 @@ import { Box } from "@mui/material"; import { DateRangePicker } from "@/components/Date/DateRangePicker"; import { DashboardButton } from "@/components/Button/DashboardButton"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import _ from "lodash"; import { ReportMenu } from "@/user/reporting/ReportMenu"; import { Dayjs } from "dayjs"; diff --git a/src/user/analytics/analyticsOverview/lib/ads.library.ts b/src/user/analytics/analyticsOverview/lib/ads.library.ts index 425bba95..b60d205d 100644 --- a/src/user/analytics/analyticsOverview/lib/ads.library.ts +++ b/src/user/analytics/analyticsOverview/lib/ads.library.ts @@ -1,7 +1,7 @@ import _ from "lodash"; -import { EngagementFragment } from "@/graphql/analytics-overview.generated"; import { StatsMetric } from "@/user/analytics/analyticsOverview/types"; import { processStats } from "@/user/analytics/analyticsOverview/lib/overview.library"; +import { EngagementFragment } from "@/graphql-client/graphql"; export function adEngagements( engagements: EngagementFragment[], diff --git a/src/user/analytics/analyticsOverview/lib/os.library.ts b/src/user/analytics/analyticsOverview/lib/os.library.ts index fc5cc129..d207ad2e 100644 --- a/src/user/analytics/analyticsOverview/lib/os.library.ts +++ b/src/user/analytics/analyticsOverview/lib/os.library.ts @@ -1,6 +1,6 @@ import { calculateMetric } from "./overview.library"; -import { EngagementFragment } from "@/graphql/analytics-overview.generated"; import { OS, OSMetric } from "../types"; +import { EngagementFragment } from "@/graphql-client/graphql"; export function processOs(engagements: EngagementFragment[]) { const stats: OSMetric = { diff --git a/src/user/analytics/analyticsOverview/lib/overview.library.ts b/src/user/analytics/analyticsOverview/lib/overview.library.ts index 8096fb97..170071cd 100644 --- a/src/user/analytics/analyticsOverview/lib/overview.library.ts +++ b/src/user/analytics/analyticsOverview/lib/overview.library.ts @@ -6,10 +6,10 @@ import { StatsMetric, Tooltip, } from "@/user/analytics/analyticsOverview/types"; -import { EngagementFragment } from "@/graphql/analytics-overview.generated"; import BigNumber from "bignumber.js"; import { t } from "@lingui/macro"; import dayjs from "dayjs"; +import { EngagementFragment } from "@/graphql-client/graphql"; type MetricDataSet = { metric1DataSet: number[][]; diff --git a/src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx b/src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx index ba1d774e..93ce0c78 100644 --- a/src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx +++ b/src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx @@ -1,9 +1,5 @@ import { Alert, Box, Divider, Skeleton } from "@mui/material"; import { useState } from "react"; -import { - CampaignWithEngagementsFragment, - EngagementFragment, -} from "@/graphql/analytics-overview.generated"; import { prepareChart, processData, @@ -17,6 +13,10 @@ import { ApolloError } from "@apollo/client"; import { usePersistMetricFilter } from "@/user/analytics/analyticsOverview/hooks/usePersistMetricFilter"; import { HighchartsWrapper } from "@/user/analytics/analyticsOverview/components/HighchartsWrapper"; import { msg, Trans } from "@lingui/macro"; +import { + CampaignWithEngagementsFragment, + EngagementFragment, +} from "@/graphql-client/graphql"; interface Props { loading: boolean; diff --git a/src/user/analytics/analyticsOverview/reports/os/OsOverview.tsx b/src/user/analytics/analyticsOverview/reports/os/OsOverview.tsx index 15330a28..7de3db7b 100644 --- a/src/user/analytics/analyticsOverview/reports/os/OsOverview.tsx +++ b/src/user/analytics/analyticsOverview/reports/os/OsOverview.tsx @@ -1,8 +1,8 @@ import { Box, Stack } from "@mui/material"; -import { EngagementFragment } from "@/graphql/analytics-overview.generated"; import { mapOsStats, processOs } from "../../lib/os.library"; import { OsPieChart } from "./components/OsPieChart"; import { OsBarChart } from "./components/OsBarChart"; +import { EngagementFragment } from "@/graphql-client/graphql"; interface Props { engagements: EngagementFragment[]; diff --git a/src/user/analytics/renderers/index.tsx b/src/user/analytics/renderers/index.tsx index bfc1059f..85e01777 100644 --- a/src/user/analytics/renderers/index.tsx +++ b/src/user/analytics/renderers/index.tsx @@ -1,7 +1,9 @@ import { Box, Skeleton, Typography } from "@mui/material"; import { renderMonetaryAmount } from "@/components/Datagrid/renderers"; -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; -import { CampaignFormat } from "@/graphql/types"; +import { + CampaignFormat, + CampaignSummaryFragment, +} from "@/graphql-client/graphql"; import { StatsMetric } from "@/user/analytics/analyticsOverview/types"; import { toLocaleString } from "@/util/bignumber"; diff --git a/src/user/analytics/search/AdSetBreakdown.tsx b/src/user/analytics/search/AdSetBreakdown.tsx index 804a77a0..41e71977 100644 --- a/src/user/analytics/search/AdSetBreakdown.tsx +++ b/src/user/analytics/search/AdSetBreakdown.tsx @@ -2,18 +2,19 @@ import { msg } from "@lingui/macro"; import { useLingui } from "@lingui/react"; import { DataGrid, GridColDef } from "@mui/x-data-grid"; import { Status } from "@/components/Campaigns/Status"; -import { - AdSetValuesFragment, - useFetchAdSetMetricsForCampaignQuery, -} from "@/graphql/analytics-overview.generated"; -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; import { uiLabelsForBillingType } from "@/util/billingType"; import { displayFromCampaignState } from "@/util/displayState"; import { MetricDefinition, getMetricListForCampaign } from "./metrics"; import { RenderMetric } from "./RenderMetric"; import { i18n } from "@lingui/core"; import lodash from "lodash"; -import { PerformanceFilter } from "@/graphql/types"; +import { + AdSetValuesFragment, + CampaignSummaryFragment, + FetchAdSetMetricsForCampaignDocument, + PerformanceFilter, +} from "@/graphql-client/graphql"; +import { useQuery } from "@apollo/client"; function getColumnDefinitionForMetric(metric: MetricDefinition): GridColDef { return { @@ -37,7 +38,7 @@ interface Props { export function AdSetBreakdown({ campaignSummary, filter }: Props) { const { _ } = useLingui(); - const { data, loading } = useFetchAdSetMetricsForCampaignQuery({ + const { data, loading } = useQuery(FetchAdSetMetricsForCampaignDocument, { variables: { filter, }, diff --git a/src/user/analytics/search/MetricSelector.tsx b/src/user/analytics/search/MetricSelector.tsx index cff9991b..9bccbbe0 100644 --- a/src/user/analytics/search/MetricSelector.tsx +++ b/src/user/analytics/search/MetricSelector.tsx @@ -2,8 +2,8 @@ import { Box, Switch, Tooltip, Typography, switchClasses } from "@mui/material"; import { MetricDefinition } from "./metrics"; import { RenderMetric } from "./RenderMetric"; import { useMetricSelection } from "./hooks"; -import { CampaignMetricDetailValuesFragment } from "@/graphql/analytics-overview.generated"; import { Trans } from "@lingui/react"; +import { CampaignMetricDetailValuesFragment } from "@/graphql-client/graphql"; interface Props { metricDefinition: MetricDefinition; diff --git a/src/user/analytics/search/MetricsList.tsx b/src/user/analytics/search/MetricsList.tsx index eb7d1404..dd30cd7e 100644 --- a/src/user/analytics/search/MetricsList.tsx +++ b/src/user/analytics/search/MetricsList.tsx @@ -1,7 +1,9 @@ +import { + CampaignSummaryFragment, + CampaignMetricDetailValuesFragment, +} from "@/graphql-client/graphql"; import { getMetricListForCampaign } from "./metrics"; import { MetricSelector } from "./MetricSelector"; -import { CampaignMetricDetailValuesFragment } from "@/graphql/analytics-overview.generated"; -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; interface Props { campaign: CampaignSummaryFragment; diff --git a/src/user/analytics/search/OverTimeGraph.tsx b/src/user/analytics/search/OverTimeGraph.tsx index 3d5e9e00..0cf0541d 100644 --- a/src/user/analytics/search/OverTimeGraph.tsx +++ b/src/user/analytics/search/OverTimeGraph.tsx @@ -1,4 +1,4 @@ -import { DailyValuesFragment } from "@/graphql/analytics-overview.generated"; +import { DailyValuesFragment } from "@/graphql-client/graphql"; import { useMetricSelection } from "./hooks"; import { makeLineChartSeries } from "./series"; import { HighchartsWrapper } from "@/user/analytics/analyticsOverview/components/HighchartsWrapper"; diff --git a/src/user/analytics/search/metrics.ts b/src/user/analytics/search/metrics.ts index d41d00ae..fe69bb64 100644 --- a/src/user/analytics/search/metrics.ts +++ b/src/user/analytics/search/metrics.ts @@ -1,8 +1,10 @@ import { msg } from "@lingui/macro"; import BigNumber from "bignumber.js"; -import { CampaignMetricDetailValuesFragment } from "@/graphql/analytics-overview.generated"; -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; import { MessageDescriptor } from "@lingui/core"; +import { + CampaignMetricDetailValuesFragment, + CampaignSummaryFragment, +} from "@/graphql-client/graphql"; export type MetricType = "number" | "rate" | "usd"; diff --git a/src/user/analytics/search/series.test.ts b/src/user/analytics/search/series.test.ts index bbaad4e5..3d9925e7 100644 --- a/src/user/analytics/search/series.test.ts +++ b/src/user/analytics/search/series.test.ts @@ -2,8 +2,8 @@ import { getMetricDefinition } from "./metrics"; import { makeLineChartSeries } from "./series"; import assert from "node:assert"; import { DeepPartial } from "@apollo/client/utilities"; -import { DailyValuesFragment } from "@/graphql/analytics-overview.generated"; import dayjs from "dayjs"; +import { DailyValuesFragment } from "@/graphql-client/graphql"; it("should populate zero values for missing days in the date range", () => { // why? we show a line graph. If there are missing days, the graph will draw the line diff --git a/src/user/analytics/search/series.ts b/src/user/analytics/search/series.ts index 7c233e2a..c64fd3b8 100644 --- a/src/user/analytics/search/series.ts +++ b/src/user/analytics/search/series.ts @@ -1,9 +1,9 @@ import { MetricDefinition } from "./metrics"; import { SeriesSplineOptions, SeriesTooltipOptionsObject } from "highcharts"; import BigNumber from "bignumber.js"; -import { DailyValuesFragment } from "@/graphql/analytics-overview.generated"; import { i18n } from "@lingui/core"; import dayjs from "dayjs"; +import { DailyValuesFragment } from "@/graphql-client/graphql"; function populateZeroValues(data: [number, number][]): [number, number][] { if (data.length === 0) { diff --git a/src/user/campaignList/CampaignList.tsx b/src/user/campaignList/CampaignList.tsx index 560fcf18..1bb40ed0 100644 --- a/src/user/campaignList/CampaignList.tsx +++ b/src/user/campaignList/CampaignList.tsx @@ -8,12 +8,6 @@ import { import { Link as RouterLink } from "react-router-dom"; import { Status } from "@/components/Campaigns/Status"; import { isDateInThePast } from "@/util/isAfterEndDate"; -import { AdvertiserCampaignsFragment } from "@/graphql/advertiser.generated"; -import { - CampaignMetricSummaryValuesFragment, - useCampaignMetricsQuery, -} from "@/graphql/analytics-overview.generated"; -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; import { DataGrid, GridColDef } from "@mui/x-data-grid"; import { CustomToolbar } from "@/components/Datagrid/CustomToolbar"; import { CloneCampaign } from "@/components/Campaigns/CloneCampaign"; @@ -23,7 +17,14 @@ import { stringFilterOperators } from "@/components/Datagrid/stringFilterOperato import { useLingui } from "@lingui/react"; import { msg } from "@lingui/macro"; import { MetricValue } from "./MetricValue"; -import { CampaignFormat } from "@/graphql/types"; +import { + AdvertiserCampaignsFragment, + CampaignFormat, + CampaignMetricSummaryValuesFragment, + CampaignMetricsDocument, + CampaignSummaryFragment, +} from "@/graphql-client/graphql"; +import { useQuery } from "@apollo/client"; interface Props { advertiser?: AdvertiserCampaignsFragment | null; @@ -33,7 +34,7 @@ export function CampaignList({ advertiser }: Props) { const { _: lingui } = useLingui(); const [selectedCampaign, setSelectedCampaign] = useState(); - const { data, loading } = useCampaignMetricsQuery({ + const { data, loading } = useQuery(CampaignMetricsDocument, { variables: { campaignIds: (advertiser?.campaigns ?? []) .filter((c) => c.format !== CampaignFormat.NtpSi) diff --git a/src/user/campaignList/EditButton.tsx b/src/user/campaignList/EditButton.tsx index ebf20f5f..67f09f7e 100644 --- a/src/user/campaignList/EditButton.tsx +++ b/src/user/campaignList/EditButton.tsx @@ -1,5 +1,8 @@ -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; -import { CampaignFormat, CampaignSource } from "@/graphql/types"; +import { + CampaignFormat, + CampaignSource, + CampaignSummaryFragment, +} from "@/graphql-client/graphql"; import { Button, Tooltip } from "@mui/material"; import { Link as RouterLink } from "react-router-dom"; import EditIcon from "@mui/icons-material/Edit"; diff --git a/src/user/hooks/useAdvertiserWithPrices.tsx b/src/user/hooks/useAdvertiserWithPrices.tsx index 6329f218..adb83348 100644 --- a/src/user/hooks/useAdvertiserWithPrices.tsx +++ b/src/user/hooks/useAdvertiserWithPrices.tsx @@ -1,14 +1,15 @@ import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; -import { - AdvertiserPriceFragment, - useAdvertiserPricesQuery, -} from "@/graphql/advertiser.generated"; import { useState } from "react"; import { IAdvertiser } from "@/auth/context/auth.interface"; import _ from "lodash"; -import { BillingType } from "@/graphql/types"; +import { + AdvertiserPriceFragment, + AdvertiserPricesDocument, + BillingType, +} from "@/graphql-client/graphql"; import { Billing } from "@/user/views/adsManager/types"; import { t } from "@lingui/macro"; +import { useQuery } from "@apollo/client"; export type AdvertiserPrice = Omit & { billingType: Billing; @@ -29,7 +30,7 @@ export function useAdvertiserWithPrices(params: Params = {}) { }); const [error, setError] = useState(); - const { loading } = useAdvertiserPricesQuery({ + const { loading } = useQuery(AdvertiserPricesDocument, { variables: { id: advertiser.id }, onCompleted(data) { const prices = data.advertiser?.prices ?? []; diff --git a/src/user/library/index.test.ts b/src/user/library/index.test.ts index 13133b94..5828bd70 100644 --- a/src/user/library/index.test.ts +++ b/src/user/library/index.test.ts @@ -1,4 +1,3 @@ -import { CampaignFragment } from "@/graphql/campaign.generated"; import { describe, expect, it } from "vitest"; import { editCampaignValues, @@ -8,12 +7,14 @@ import { } from "."; import { CampaignFormat, + CampaignFragment, CampaignPacingStrategies, CampaignSource, CampaignType, ConfirmationType, + CreativeFragment, PaymentType, -} from "@/graphql/types"; +} from "@/graphql-client/graphql"; import { produce } from "immer"; import { AdSetForm, @@ -21,8 +22,7 @@ import { Creative, } from "@/user/views/adsManager/types"; import _ from "lodash"; -import { AdFragment, AdSetFragment } from "@/graphql/ad-set.generated"; -import { CreativeFragment } from "@/graphql/creative.generated"; +import { AdFragment, AdSetFragment } from "@/graphql-client/graphql"; import { DeepPartial } from "@apollo/client/utilities"; const BASE_CPM_CAMPAIGN_FRAGMENT: Readonly = { diff --git a/src/user/library/index.ts b/src/user/library/index.ts index 45616244..c9e4fb29 100644 --- a/src/user/library/index.ts +++ b/src/user/library/index.ts @@ -1,10 +1,11 @@ import { CampaignFormat, + CampaignFragment, CreateCampaignInput, + CreativeFragment, UpdateCampaignInput, -} from "@/graphql/types"; -import { CampaignFragment } from "@/graphql/campaign.generated"; -import { AdFragment, AdSetFragment } from "@/graphql/ad-set.generated"; +} from "@/graphql-client/graphql"; +import { AdFragment, AdSetFragment } from "@/graphql-client/graphql"; import { AdSetForm, Billing, @@ -16,7 +17,6 @@ import { } from "@/user/views/adsManager/types"; import _ from "lodash"; import BigNumber from "bignumber.js"; -import { CreativeFragment } from "@/graphql/creative.generated"; import { t } from "@lingui/macro"; import dayjs from "dayjs"; diff --git a/src/user/settings/NewKeyPairModal.tsx b/src/user/settings/NewKeyPairModal.tsx index bd34ef60..6772e8db 100644 --- a/src/user/settings/NewKeyPairModal.tsx +++ b/src/user/settings/NewKeyPairModal.tsx @@ -6,7 +6,6 @@ import { TextField, Typography, } from "@mui/material"; -import { useUpdateAdvertiserMutation } from "@/graphql/advertiser.generated"; import tweetnacl from "tweetnacl"; import { useRef, useState } from "react"; import { IAdvertiser } from "@/auth/context/auth.interface"; @@ -14,6 +13,8 @@ import { CardContainer } from "@/components/Card/CardContainer"; 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"; interface Props { advertiser: IAdvertiser; @@ -31,7 +32,7 @@ export function NewKeyPairModal({ advertiser }: Props) { const [newKeypairModalState, setNewKeypairModalState] = useState("disclaimer"); - const [updateAdvertiser] = useUpdateAdvertiserMutation({ + const [updateAdvertiser] = useMutation(UpdateAdvertiserDocument, { variables: { updateAdvertiserInput: { id: advertiser.id, diff --git a/src/user/settings/UserForm.tsx b/src/user/settings/UserForm.tsx index f9a5ec11..66ef7e67 100644 --- a/src/user/settings/UserForm.tsx +++ b/src/user/settings/UserForm.tsx @@ -4,7 +4,6 @@ import { useUser } from "@/auth/hooks/queries/useUser"; import { CardContainer } from "@/components/Card/CardContainer"; import { Form, Formik, FormikValues } from "formik"; import { FormikTextField } from "@/form/FormikHelpers"; -import { useUpdateUserMutation } from "@/graphql/user.generated"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; import { UserSchema } from "@/validation/UserSchema"; import _ from "lodash"; @@ -12,6 +11,8 @@ import { FormikSubmitButton } from "@/form/FormikButton"; import { useTrackMatomoEvent } from "@/hooks/useTrackWithMatomo"; import { msg, Trans } from "@lingui/macro"; import { useLingui } from "@lingui/react"; +import { UpdateUserDocument } from "@/graphql-client/graphql"; +import { useMutation } from "@apollo/client"; export function UserForm() { const user = useUser(); @@ -24,7 +25,7 @@ export function UserForm() { return ; } - const [updateUser] = useUpdateUserMutation({ + const [updateUser] = useMutation(UpdateUserDocument, { onCompleted(user) { trackMatomoEvent("user", "update"); setInitialVals(user.updateUser); diff --git a/src/user/views/adsManager/types/index.ts b/src/user/views/adsManager/types/index.ts index 9d33fba3..9acc440e 100644 --- a/src/user/views/adsManager/types/index.ts +++ b/src/user/views/adsManager/types/index.ts @@ -1,4 +1,8 @@ -import { CampaignFormat, CreativeInput, PaymentType } from "@/graphql/types"; +import { + CampaignFormat, + CreativeInput, + PaymentType, +} from "@/graphql-client/graphql"; import { defaultEndDate, defaultStartDate } from "@/form/DateFieldHelpers"; import { MIN_PER_CAMPAIGN } from "@/validation/CampaignSchema"; import { AdvertiserWithPrices } from "@/user/hooks/useAdvertiserWithPrices"; diff --git a/src/user/views/adsManager/views/advanced/components/adSet/AdSetFields.tsx b/src/user/views/adsManager/views/advanced/components/adSet/AdSetFields.tsx index f3764bd9..2c41a07e 100644 --- a/src/user/views/adsManager/views/advanced/components/adSet/AdSetFields.tsx +++ b/src/user/views/adsManager/views/advanced/components/adSet/AdSetFields.tsx @@ -8,7 +8,7 @@ import { adSetOnOffState } from "@/components/Datagrid/renderers"; import { Stack, Typography } from "@mui/material"; import { useFormikContext } from "formik"; import { CampaignForm } from "@/user/views/adsManager/types"; -import { CampaignSource } from "@/graphql/types"; +import { CampaignSource } from "@/graphql-client/graphql"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { Status } from "@/components/Campaigns/Status"; import { displayFromCampaignState } from "@/util/displayState"; diff --git a/src/user/views/adsManager/views/advanced/components/adSet/fields/AdSetAds.tsx b/src/user/views/adsManager/views/advanced/components/adSet/fields/AdSetAds.tsx index a6964c91..c30c5097 100644 --- a/src/user/views/adsManager/views/advanced/components/adSet/fields/AdSetAds.tsx +++ b/src/user/views/adsManager/views/advanced/components/adSet/fields/AdSetAds.tsx @@ -7,7 +7,7 @@ import { isCreativeTypeApplicableToCampaignFormat } from "@/user/library"; import { NewAd } from "@/user/ads/NewAd"; import { AdsExistingAd } from "@/user/ads/AdsExistingAd"; import { ShowAdsButton } from "@/user/ads/ShowAdsButton"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { NotificationAd } from "@/user/ads/NotificationAd"; import { InlineContentAd } from "@/user/ads/InlineContentAd"; import { modalStyles } from "@/theme"; diff --git a/src/user/views/adsManager/views/advanced/components/adSet/fields/PickerFields.tsx b/src/user/views/adsManager/views/advanced/components/adSet/fields/PickerFields.tsx index c45cd315..a29b8efd 100644 --- a/src/user/views/adsManager/views/advanced/components/adSet/fields/PickerFields.tsx +++ b/src/user/views/adsManager/views/advanced/components/adSet/fields/PickerFields.tsx @@ -3,9 +3,8 @@ import { SegmentPicker } from "@/components/Segment/SegmentPicker"; import { PlatformPicker } from "@/components/Platform/PlatformPicker"; import { CardContainer } from "@/components/Card/CardContainer"; import { useField } from "formik"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat, SegmentFragment } from "@/graphql-client/graphql"; import { useEffect } from "react"; -import { SegmentFragment } from "@/graphql/common.generated"; import { LearnMoreButton } from "@/components/Button/LearnMoreButton"; import { Trans } from "@lingui/macro"; diff --git a/src/user/views/adsManager/views/advanced/components/campaign/components/BillingModelSelect.tsx b/src/user/views/adsManager/views/advanced/components/campaign/components/BillingModelSelect.tsx index 0d9f06d5..19766b5e 100644 --- a/src/user/views/adsManager/views/advanced/components/campaign/components/BillingModelSelect.tsx +++ b/src/user/views/adsManager/views/advanced/components/campaign/components/BillingModelSelect.tsx @@ -2,7 +2,7 @@ import { List, ListItemButton, Stack, Typography } from "@mui/material"; import { renderMonetaryAmount } from "@/components/Datagrid/renderers"; import { useIsEdit } from "@/form/FormikHelpers"; import { useField } from "formik"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { AdvertiserPrice } from "@/user/hooks/useAdvertiserWithPrices"; import { Billing } from "@/user/views/adsManager/types"; import { uiLabelsForCampaignFormat } from "@/util/campaign"; diff --git a/src/user/views/adsManager/views/advanced/components/campaign/components/CustomPriceSelect.tsx b/src/user/views/adsManager/views/advanced/components/campaign/components/CustomPriceSelect.tsx index 788909e8..1344cda5 100644 --- a/src/user/views/adsManager/views/advanced/components/campaign/components/CustomPriceSelect.tsx +++ b/src/user/views/adsManager/views/advanced/components/campaign/components/CustomPriceSelect.tsx @@ -4,7 +4,7 @@ import { useIsEdit, } from "@/form/FormikHelpers"; import { useField } from "formik"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { InputAdornment, Stack } from "@mui/material"; import { uiLabelsForBillingType } from "@/util/billingType"; import { useLingui } from "@lingui/react"; diff --git a/src/user/views/adsManager/views/advanced/components/campaign/fields/FormatField.tsx b/src/user/views/adsManager/views/advanced/components/campaign/fields/FormatField.tsx index 7ebb179d..f96421f2 100644 --- a/src/user/views/adsManager/views/advanced/components/campaign/fields/FormatField.tsx +++ b/src/user/views/adsManager/views/advanced/components/campaign/fields/FormatField.tsx @@ -9,7 +9,7 @@ import { } from "@mui/material"; import { CardContainer } from "@/components/Card/CardContainer"; import { useField } from "formik"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { useIsEdit } from "@/form/FormikHelpers"; import { Billing } from "@/user/views/adsManager/types"; import { AdvertiserPrice } from "@/user/hooks/useAdvertiserWithPrices"; diff --git a/src/user/views/adsManager/views/advanced/components/campaign/fields/PaymentMethodField.tsx b/src/user/views/adsManager/views/advanced/components/campaign/fields/PaymentMethodField.tsx index e509d0dd..47bcba01 100644 --- a/src/user/views/adsManager/views/advanced/components/campaign/fields/PaymentMethodField.tsx +++ b/src/user/views/adsManager/views/advanced/components/campaign/fields/PaymentMethodField.tsx @@ -1,6 +1,6 @@ import { Stack, Typography } from "@mui/material"; import { FormikRadioControl, useIsEdit } from "@/form/FormikHelpers"; -import { PaymentType } from "@/graphql/types"; +import { PaymentType } from "@/graphql-client/graphql"; import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { CardContainer } from "@/components/Card/CardContainer"; import { LearnMoreButton } from "@/components/Button/LearnMoreButton"; diff --git a/src/user/views/adsManager/views/advanced/components/form/EditCampaign.tsx b/src/user/views/adsManager/views/advanced/components/form/EditCampaign.tsx index 1c6af9f8..7fc7fac0 100644 --- a/src/user/views/adsManager/views/advanced/components/form/EditCampaign.tsx +++ b/src/user/views/adsManager/views/advanced/components/form/EditCampaign.tsx @@ -3,21 +3,22 @@ import { Formik } from "formik"; import { CampaignForm } from "../../../../types"; import { CampaignSchema } from "@/validation/CampaignSchema"; import { editCampaignValues, transformEditForm } from "@/user/library"; -import { - useLoadCampaignQuery, - useUpdateCampaignMutation, -} from "@/graphql/campaign.generated"; import { useHistory, useParams } from "react-router-dom"; import { BaseForm } from "./components/BaseForm"; import { useCreatePaymentSession } from "@/checkout/hooks/useCreatePaymentSession"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; -import { refetchAdvertiserCampaignsQuery } from "@/graphql/advertiser.generated"; import { useContext } from "react"; import { FilterContext } from "@/state/context"; import { useAdvertiserWithPrices } from "@/user/hooks/useAdvertiserWithPrices"; import { useTrackWithMatomo } from "@/hooks/useTrackWithMatomo"; import { msg } from "@lingui/macro"; import { useLingui } from "@lingui/react"; +import { + AdvertiserCampaignsDocument, + LoadCampaignDocument, + UpdateCampaignDocument, +} from "@/graphql-client/graphql"; +import { useMutation, useQuery } from "@apollo/client"; interface Params { campaignId: string; @@ -42,13 +43,13 @@ export function EditCampaign() { data: initialData, loading: qLoading, error, - } = useLoadCampaignQuery({ + } = useQuery(LoadCampaignDocument, { variables: { id: params.campaignId }, fetchPolicy: "cache-and-network", }); const hasPaymentIntent = initialData?.campaign?.hasPaymentIntent; - const [mutation] = useUpdateCampaignMutation({ + const [mutation] = useMutation(UpdateCampaignDocument, { onCompleted(data) { trackMatomoEvent("campaign", "update-success"); if (hasPaymentIntent) { @@ -65,10 +66,11 @@ export function EditCampaign() { }, refetchQueries: [ { - ...refetchAdvertiserCampaignsQuery({ + query: AdvertiserCampaignsDocument, + variables: { id: data.id, filter: { from: fromDate?.toISOString() }, - }), + }, }, ], }); diff --git a/src/user/views/adsManager/views/advanced/components/form/NewCampaign.tsx b/src/user/views/adsManager/views/advanced/components/form/NewCampaign.tsx index eda1cf1f..bfa7a56e 100644 --- a/src/user/views/adsManager/views/advanced/components/form/NewCampaign.tsx +++ b/src/user/views/adsManager/views/advanced/components/form/NewCampaign.tsx @@ -4,21 +4,24 @@ import { useContext, useState } from "react"; import { CampaignForm, initialCampaign } from "../../../../types"; import { CampaignSchema } from "@/validation/CampaignSchema"; import { transformNewForm } from "@/user/library"; -import { useCreateCampaignMutation } from "@/graphql/campaign.generated"; import { useHistory, useParams } from "react-router-dom"; import { BaseForm } from "./components/BaseForm"; import { PersistFormValues } from "@/form/PersistFormValues"; import { DraftContext, FilterContext } from "@/state/context"; import { useCreatePaymentSession } from "@/checkout/hooks/useCreatePaymentSession"; -import { PaymentType } from "@/graphql/types"; +import { + AdvertiserCampaignsDocument, + CreateCampaignDocument, + PaymentType, +} from "@/graphql-client/graphql"; import { useUser } from "@/auth/hooks/queries/useUser"; -import { refetchAdvertiserCampaignsQuery } from "@/graphql/advertiser.generated"; import { useAdvertiserWithPrices } from "@/user/hooks/useAdvertiserWithPrices"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; import _ from "lodash"; import { useTrackWithMatomo } from "@/hooks/useTrackWithMatomo"; import { msg } from "@lingui/macro"; import { useLingui } from "@lingui/react"; +import { useMutation } from "@apollo/client"; interface Params { draftId: string; @@ -47,7 +50,7 @@ export function NewCampaign() { }, }); - const [mutation] = useCreateCampaignMutation({ + const [mutation] = useMutation(CreateCampaignDocument, { onCompleted(data) { trackMatomoEvent("campaign", "creation-success"); const campaign = data.createCampaign; @@ -68,10 +71,11 @@ export function NewCampaign() { }, refetchQueries: [ { - ...refetchAdvertiserCampaignsQuery({ + query: AdvertiserCampaignsDocument, + variables: { id: data.id, filter: { from: fromDate?.toISOString() }, - }), + }, }, ], }); diff --git a/src/user/views/adsManager/views/advanced/components/review/components/AdSetReview.tsx b/src/user/views/adsManager/views/advanced/components/review/components/AdSetReview.tsx index 0c0914b9..55b08586 100644 --- a/src/user/views/adsManager/views/advanced/components/review/components/AdSetReview.tsx +++ b/src/user/views/adsManager/views/advanced/components/review/components/AdSetReview.tsx @@ -3,7 +3,7 @@ import { FormikErrors } from "formik"; import { ConversionDisplay } from "@/components/Conversion/ConversionDisplay"; import { ReviewField } from "./ReviewField"; import { ReviewContainer } from "@/user/views/adsManager/views/advanced/components/review/components/ReviewContainer"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { CreativeSpecificPreview } from "@/components/Creatives/CreativeSpecificPreview"; import { segmentNameWithNoDash } from "@/util/segment"; import { msg } from "@lingui/macro"; diff --git a/src/user/views/user/AdDetailTable.tsx b/src/user/views/user/AdDetailTable.tsx index a73fbaa4..0da92e28 100644 --- a/src/user/views/user/AdDetailTable.tsx +++ b/src/user/views/user/AdDetailTable.tsx @@ -1,5 +1,4 @@ -import { CampaignAdsFragment } from "@/graphql/campaign.generated"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignAdsFragment, CampaignFormat } from "@/graphql-client/graphql"; import { StatsMetric } from "@/user/analytics/analyticsOverview/types"; import { renderStatsCell } from "@/user/analytics/renderers"; import { DataGrid, GridColDef, GridValidRowModel } from "@mui/x-data-grid"; diff --git a/src/user/views/user/CampaignDetails.tsx b/src/user/views/user/CampaignDetails.tsx index a88543b3..4315372a 100644 --- a/src/user/views/user/CampaignDetails.tsx +++ b/src/user/views/user/CampaignDetails.tsx @@ -1,16 +1,19 @@ import { useState } from "react"; import DatasetIcon from "@mui/icons-material/Dataset"; import LibraryBooksIcon from "@mui/icons-material/LibraryBooks"; -import { useLoadCampaignAdsQuery } from "@/graphql/campaign.generated"; import { useParams } from "react-router-dom"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; import { Box, Skeleton, Tab, Tabs } from "@mui/material"; import { AdSetList } from "@/user/adSet/AdSetList"; import { AdList } from "@/user/ads/AdList"; -import { EngagementFragment } from "@/graphql/analytics-overview.generated"; import { adEngagements } from "@/user/analytics/analyticsOverview/lib/ads.library"; import { msg } from "@lingui/macro"; import { useLingui } from "@lingui/react"; +import { + EngagementFragment, + LoadCampaignAdsDocument, +} from "@/graphql-client/graphql"; +import { useQuery } from "@apollo/client"; interface Params { campaignId: string; @@ -24,7 +27,7 @@ interface Props { export function CampaignDetails({ engagements, engagementLoading }: Props) { const params = useParams(); const { _ } = useLingui(); - const { data, loading, error } = useLoadCampaignAdsQuery({ + const { data, loading, error } = useQuery(LoadCampaignAdsDocument, { variables: { id: params.campaignId }, fetchPolicy: "cache-and-network", }); diff --git a/src/user/views/user/CampaignReportViewSelector.tsx b/src/user/views/user/CampaignReportViewSelector.tsx index b1a538fc..4d54e704 100644 --- a/src/user/views/user/CampaignReportViewSelector.tsx +++ b/src/user/views/user/CampaignReportViewSelector.tsx @@ -1,12 +1,15 @@ import { Box, LinearProgress } from "@mui/material"; import { AlwaysOnFormButton } from "@/components/Button/AlwaysOnFormButton"; -import { useLoadCampaignSummaryQuery } from "@/graphql/campaign.generated"; import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo"; import { useParams } from "react-router-dom"; -import { CampaignFormat } from "@/graphql/types"; +import { + CampaignFormat, + LoadCampaignSummaryDocument, +} from "@/graphql-client/graphql"; import { ConsultAccountManager } from "./reports/ConsultAccountManager"; import { OriginalCampaignReportView } from "./reports/OriginalCampaignReportView"; import { SearchCampaignReportView } from "./reports/SearchCampaignReportView"; +import { useQuery } from "@apollo/client"; interface Params { campaignId: string; @@ -20,7 +23,7 @@ export function CampaignReportViewSelector() { const { campaignId } = useParams(); - const { data } = useLoadCampaignSummaryQuery({ + const { data } = useQuery(LoadCampaignSummaryDocument, { variables: { id: campaignId, }, diff --git a/src/user/views/user/CampaignView.tsx b/src/user/views/user/CampaignView.tsx index bb216200..c5b91e79 100644 --- a/src/user/views/user/CampaignView.tsx +++ b/src/user/views/user/CampaignView.tsx @@ -1,6 +1,5 @@ import { Box, Skeleton } from "@mui/material"; import { useContext } from "react"; -import { useAdvertiserCampaignsQuery } from "@/graphql/advertiser.generated"; import { CampaignAgeFilter } from "@/components/Campaigns/CampaignAgeFilter"; import { CampaignList } from "@/user/campaignList/CampaignList"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; @@ -10,13 +9,15 @@ import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; import { FilterContext } from "@/state/context"; import { useTrackMatomoPageView } from "@/hooks/useTrackWithMatomo"; import { Trans, msg } from "@lingui/macro"; +import { AdvertiserCampaignsDocument } from "@/graphql-client/graphql"; +import { useQuery } from "@apollo/client"; export function CampaignView() { useTrackMatomoPageView({ documentTitle: "Advertiser Campaigns" }); const { advertiser } = useAdvertiser(); const { fromDate } = useContext(FilterContext); - const { loading, data, error } = useAdvertiserCampaignsQuery({ + const { loading, data, error } = useQuery(AdvertiserCampaignsDocument, { variables: { id: advertiser.id, filter: { from: fromDate?.toISOString() }, diff --git a/src/user/views/user/reports/OriginalCampaignReportView.tsx b/src/user/views/user/reports/OriginalCampaignReportView.tsx index 3a9919c6..64b2cbec 100644 --- a/src/user/views/user/reports/OriginalCampaignReportView.tsx +++ b/src/user/views/user/reports/OriginalCampaignReportView.tsx @@ -1,5 +1,4 @@ import { useState } from "react"; -import { useAnalyticOverviewQuery } from "@/graphql/analytics-overview.generated"; import { Box } from "@mui/material"; import ReportUtils from "@/user/analytics/analyticsOverview/components/ReportUtils"; import { EngagementsOverview } from "@/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview"; @@ -8,8 +7,12 @@ import { CollapseBox } from "@/components/Collapse/CollapseBox"; import { OsOverview } from "@/user/analytics/analyticsOverview/reports/os/OsOverview"; import { useLingui } from "@lingui/react"; import { msg } from "@lingui/macro"; -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; +import { + AnalyticOverviewDocument, + CampaignSummaryFragment, +} from "@/graphql-client/graphql"; import dayjs, { Dayjs } from "dayjs"; +import { useQuery } from "@apollo/client"; interface Props { campaignSummary: CampaignSummaryFragment; @@ -29,7 +32,7 @@ export function OriginalCampaignReportView({ campaignSummary }: Props) { } }; - const { loading, data, error } = useAnalyticOverviewQuery({ + const { loading, data, error } = useQuery(AnalyticOverviewDocument, { variables: { id: campaignSummary.id, }, diff --git a/src/user/views/user/reports/SearchCampaignReportView.tsx b/src/user/views/user/reports/SearchCampaignReportView.tsx index 023fa87c..dcdae0b6 100644 --- a/src/user/views/user/reports/SearchCampaignReportView.tsx +++ b/src/user/views/user/reports/SearchCampaignReportView.tsx @@ -5,9 +5,11 @@ import { Status } from "@/components/Campaigns/Status"; import { CardContainer } from "@/components/Card/CardContainer"; import { DateRangePicker } from "@/components/Date/DateRangePicker"; import { ErrorDetail } from "@/components/Error/ErrorDetail"; -import { useFetchDailyMetricsForCampaignQuery } from "@/graphql/analytics-overview.generated"; -import { CampaignSummaryFragment } from "@/graphql/campaign.generated"; -import { PerformanceFilter } from "@/graphql/types"; +import { + PerformanceFilter, + CampaignSummaryFragment, + FetchDailyMetricsForCampaignDocument, +} from "@/graphql-client/graphql"; import { useState } from "react"; import { AdSetBreakdown } from "@/user/analytics/search/AdSetBreakdown"; import { MetricsList } from "@/user/analytics/search/MetricsList"; @@ -15,6 +17,7 @@ import { OverTimeGraph } from "@/user/analytics/search/OverTimeGraph"; import { useMetricSelection } from "@/user/analytics/search/hooks"; import { ReportMenu } from "@/user/reporting/ReportMenu"; import dayjs from "dayjs"; +import { useQuery } from "@apollo/client"; interface Props { campaignSummary: CampaignSummaryFragment; @@ -33,7 +36,7 @@ export function SearchCampaignReportView({ campaignSummary }: Props) { to: endDate.toISOString(), }; - const { data, error } = useFetchDailyMetricsForCampaignQuery({ + const { data, error } = useQuery(FetchDailyMetricsForCampaignDocument, { variables: { filter, }, diff --git a/src/util/campaign.ts b/src/util/campaign.ts index 78225749..64372716 100644 --- a/src/util/campaign.ts +++ b/src/util/campaign.ts @@ -1,4 +1,4 @@ -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import { t } from "@lingui/macro"; export function uiLabelsForCampaignFormat(format: CampaignFormat): string { diff --git a/src/validation/CampaignSchema.test.ts b/src/validation/CampaignSchema.test.ts index 0adc2712..15338995 100644 --- a/src/validation/CampaignSchema.test.ts +++ b/src/validation/CampaignSchema.test.ts @@ -1,5 +1,8 @@ import { produce } from "immer"; -import { CampaignFormat, CampaignPacingStrategies } from "@/graphql/types"; +import { + CampaignFormat, + CampaignPacingStrategies, +} from "@/graphql-client/graphql"; import { CampaignSchema } from "./CampaignSchema"; import { describe } from "vitest"; import { AdvertiserPrice } from "@/user/hooks/useAdvertiserWithPrices"; diff --git a/src/validation/CampaignSchema.tsx b/src/validation/CampaignSchema.tsx index 1367823f..c4910b29 100644 --- a/src/validation/CampaignSchema.tsx +++ b/src/validation/CampaignSchema.tsx @@ -17,7 +17,7 @@ import { TrailingAsteriskRegex, } from "@/validation/regex"; import { CreativeSchema } from "@/validation/CreativeSchema"; -import { CampaignFormat } from "@/graphql/types"; +import { CampaignFormat } from "@/graphql-client/graphql"; import BigNumber from "bignumber.js"; import { AdvertiserPrice } from "@/user/hooks/useAdvertiserWithPrices"; import { Billing } from "@/user/views/adsManager/types";