diff --git a/package.json b/package.json index 3bd58e220..0e13335dd 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "@parcel/watcher": "2.4.1", "@types/lodash": "4.17.9", "@types/papaparse": "5.3.14", - "@types/react": "18.3.9", + "@types/react": "18.3.10", "@types/react-dom": "18.3.0", "@types/react-router-dom": "5.3.3", "@types/react-window": "1.8.8", @@ -80,10 +80,10 @@ "eslint": "8.57.1", "eslint-config-prettier": "9.1.0", "eslint-plugin-lingui": "0.3.0", - "eslint-plugin-react": "7.36.1", + "eslint-plugin-react": "7.37.0", "eslint-plugin-react-hooks": "4.6.2", "husky": "9.1.6", - "knip": "5.30.5", + "knip": "5.30.6", "lint-staged": "15.2.10", "npm-run-all2": "6.2.3", "prettier": "3.3.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c04b6a8b4..9e03dee0f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,13 +17,13 @@ importers: dependencies: '@apollo/client': specifier: 3.11.8 - version: 3.11.8(@types/react@18.3.9)(graphql-ws@5.16.0(graphql@16.9.0))(graphql@16.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 3.11.8(@types/react@18.3.10)(graphql-ws@5.16.0(graphql@16.9.0))(graphql@16.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@emotion/react': specifier: 11.13.3 - version: 11.13.3(@types/react@18.3.9)(react@18.3.1) + version: 11.13.3(@types/react@18.3.10)(react@18.3.1) '@emotion/styled': specifier: 11.13.0 - version: 11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) + version: 11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) '@fontsource/inter': specifier: 5.1.0 version: 5.1.0 @@ -59,19 +59,19 @@ importers: version: 4.11.4(react@18.3.1) '@mui/icons-material': specifier: 6.1.1 - version: 6.1.1(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) + version: 6.1.1(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) '@mui/lab': specifier: 6.0.0-beta.10 - version: 6.0.0-beta.10(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 6.0.0-beta.10(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/material': specifier: 6.1.1 - version: 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/x-data-grid': specifier: 7.18.0 - version: 7.18.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 7.18.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mui/x-date-pickers': specifier: 7.18.0 - version: 7.18.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(date-fns@3.6.0)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 7.18.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(date-fns@3.6.0)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) bignumber.js: specifier: 9.1.2 version: 9.1.2 @@ -155,8 +155,8 @@ importers: specifier: 5.3.14 version: 5.3.14 '@types/react': - specifier: 18.3.9 - version: 18.3.9 + specifier: 18.3.10 + version: 18.3.10 '@types/react-dom': specifier: 18.3.0 version: 18.3.0 @@ -185,8 +185,8 @@ importers: specifier: 0.3.0 version: 0.3.0(eslint@8.57.1)(typescript@5.6.2) eslint-plugin-react: - specifier: 7.36.1 - version: 7.36.1(eslint@8.57.1) + specifier: 7.37.0 + version: 7.37.0(eslint@8.57.1) eslint-plugin-react-hooks: specifier: 4.6.2 version: 4.6.2(eslint@8.57.1) @@ -194,8 +194,8 @@ importers: specifier: 9.1.6 version: 9.1.6 knip: - specifier: 5.30.5 - version: 5.30.5(@types/node@20.13.0)(typescript@5.6.2) + specifier: 5.30.6 + version: 5.30.6(@types/node@20.13.0)(typescript@5.6.2) lint-staged: specifier: 15.2.10 version: 15.2.10 @@ -1793,8 +1793,8 @@ packages: '@types/react-window@1.8.8': resolution: {integrity: sha512-8Ls660bHR1AUA2kuRvVG9D/4XpRC6wjAaPT9dil7Ckc76eP9TKWZwwmgfq8Q1LANX3QNDnoU4Zp48A3w+zK69Q==} - '@types/react@18.3.9': - resolution: {integrity: sha512-+BpAVyTpJkNWWSSnaLBk6ePpHLOGJKnEQNbINNovPWzvEUyAe3e+/d494QdEh71RekM/qV7lw6jzf1HGrJyAtQ==} + '@types/react@18.3.10': + resolution: {integrity: sha512-02sAAlBnP39JgXwkAq3PeU9DVaaGpZyF3MGcC0MKgQVkZor5IiiDAipVaxQHtDJAmO4GIy/rVBy/LzVj76Cyqg==} '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -2539,8 +2539,8 @@ packages: peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - eslint-plugin-react@7.36.1: - resolution: {integrity: sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA==} + eslint-plugin-react@7.37.0: + resolution: {integrity: sha512-IHBePmfWH5lKhJnJ7WB1V+v/GolbB0rjS8XYVCSQCZKaQCAUhMoVoOEn1Ef8Z8Wf0a7l8KTJvuZg5/e4qrZ6nA==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 @@ -3182,8 +3182,8 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - knip@5.30.5: - resolution: {integrity: sha512-opta1VVKAfIzhvj1iyOr/3SgSDC6jYPoUaYkvjftNqMTeURppYY5VqrAa5DOcJnIsdcAdyoIKHUFg9NRiFaM5w==} + knip@5.30.6: + resolution: {integrity: sha512-YkcnRVl0N99xZ7eaXE7KlH/4cPTCn6BGuk9KxINEdCMFN3yita2vGBizApy97ZOHgghy8tb589gQ3xvLMFIO4w==} engines: {node: '>=18.6.0'} hasBin: true peerDependencies: @@ -4513,7 +4513,7 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@apollo/client@3.11.8(@types/react@18.3.9)(graphql-ws@5.16.0(graphql@16.9.0))(graphql@16.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@apollo/client@3.11.8(@types/react@18.3.10)(graphql-ws@5.16.0(graphql@16.9.0))(graphql@16.9.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) '@wry/caches': 1.0.1 @@ -4524,7 +4524,7 @@ snapshots: hoist-non-react-statics: 3.3.2 optimism: 0.18.0 prop-types: 15.8.1 - rehackt: 0.1.0(@types/react@18.3.9)(react@18.3.1) + rehackt: 0.1.0(@types/react@18.3.10)(react@18.3.1) response-iterator: 0.2.6 symbol-observable: 4.0.0 ts-invariant: 0.10.3 @@ -4932,7 +4932,7 @@ snapshots: '@emotion/memoize@0.9.0': {} - '@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1)': + '@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 '@emotion/babel-plugin': 11.12.0 @@ -4944,7 +4944,7 @@ snapshots: hoist-non-react-statics: 3.3.2 react: 18.3.1 optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 '@emotion/serialize@1.3.1': dependencies: @@ -4956,18 +4956,18 @@ snapshots: '@emotion/sheet@1.4.0': {} - '@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1)': + '@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 '@emotion/babel-plugin': 11.12.0 '@emotion/is-prop-valid': 1.3.0 - '@emotion/react': 11.13.3(@types/react@18.3.9)(react@18.3.1) + '@emotion/react': 11.13.3(@types/react@18.3.10)(react@18.3.1) '@emotion/serialize': 1.3.1 '@emotion/use-insertion-effect-with-fallbacks': 1.1.0(react@18.3.1) '@emotion/utils': 1.4.0 react: 18.3.1 optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 '@emotion/unitless@0.10.0': {} @@ -5949,54 +5949,54 @@ snapshots: dependencies: moo: 0.5.2 - '@mui/base@5.0.0-beta.58(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/base@5.0.0-beta.58(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 '@floating-ui/react-dom': 2.1.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/types': 7.2.17(@types/react@18.3.9) - '@mui/utils': 6.0.0-rc.0(@types/react@18.3.9)(react@18.3.1) + '@mui/types': 7.2.17(@types/react@18.3.10) + '@mui/utils': 6.0.0-rc.0(@types/react@18.3.10)(react@18.3.1) '@popperjs/core': 2.11.8 clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 '@mui/core-downloads-tracker@6.1.1': {} - '@mui/icons-material@6.1.1(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.9)(react@18.3.1)': + '@mui/icons-material@6.1.1(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/material': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/material': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: 18.3.1 optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 - '@mui/lab@6.0.0-beta.10(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/lab@6.0.0-beta.10(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/base': 5.0.0-beta.58(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/material': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/system': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) - '@mui/types': 7.2.17(@types/react@18.3.9) - '@mui/utils': 6.1.1(@types/react@18.3.9)(react@18.3.1) + '@mui/base': 5.0.0-beta.58(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/material': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/system': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) + '@mui/types': 7.2.17(@types/react@18.3.10) + '@mui/utils': 6.1.1(@types/react@18.3.10)(react@18.3.1) clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) optionalDependencies: - '@emotion/react': 11.13.3(@types/react@18.3.9)(react@18.3.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) - '@types/react': 18.3.9 + '@emotion/react': 11.13.3(@types/react@18.3.10)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) + '@types/react': 18.3.10 - '@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 '@mui/core-downloads-tracker': 6.1.1 - '@mui/system': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) - '@mui/types': 7.2.17(@types/react@18.3.9) - '@mui/utils': 6.1.1(@types/react@18.3.9)(react@18.3.1) + '@mui/system': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) + '@mui/types': 7.2.17(@types/react@18.3.10) + '@mui/utils': 6.1.1(@types/react@18.3.10)(react@18.3.1) '@popperjs/core': 2.11.8 '@types/react-transition-group': 4.4.11 clsx: 2.1.1 @@ -6007,20 +6007,20 @@ snapshots: react-is: 18.3.1 react-transition-group: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) optionalDependencies: - '@emotion/react': 11.13.3(@types/react@18.3.9)(react@18.3.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) - '@types/react': 18.3.9 + '@emotion/react': 11.13.3(@types/react@18.3.10)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) + '@types/react': 18.3.10 - '@mui/private-theming@6.1.1(@types/react@18.3.9)(react@18.3.1)': + '@mui/private-theming@6.1.1(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/utils': 6.1.1(@types/react@18.3.9)(react@18.3.1) + '@mui/utils': 6.1.1(@types/react@18.3.10)(react@18.3.1) prop-types: 15.8.1 react: 18.3.1 optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 - '@mui/styled-engine@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(react@18.3.1)': + '@mui/styled-engine@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 '@emotion/cache': 11.13.1 @@ -6029,90 +6029,90 @@ snapshots: prop-types: 15.8.1 react: 18.3.1 optionalDependencies: - '@emotion/react': 11.13.3(@types/react@18.3.9)(react@18.3.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) + '@emotion/react': 11.13.3(@types/react@18.3.10)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) - '@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1)': + '@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/private-theming': 6.1.1(@types/react@18.3.9)(react@18.3.1) - '@mui/styled-engine': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(react@18.3.1) - '@mui/types': 7.2.17(@types/react@18.3.9) - '@mui/utils': 6.1.1(@types/react@18.3.9)(react@18.3.1) + '@mui/private-theming': 6.1.1(@types/react@18.3.10)(react@18.3.1) + '@mui/styled-engine': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(react@18.3.1) + '@mui/types': 7.2.17(@types/react@18.3.10) + '@mui/utils': 6.1.1(@types/react@18.3.10)(react@18.3.1) clsx: 2.1.1 csstype: 3.1.3 prop-types: 15.8.1 react: 18.3.1 optionalDependencies: - '@emotion/react': 11.13.3(@types/react@18.3.9)(react@18.3.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) - '@types/react': 18.3.9 + '@emotion/react': 11.13.3(@types/react@18.3.10)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) + '@types/react': 18.3.10 - '@mui/types@7.2.17(@types/react@18.3.9)': + '@mui/types@7.2.17(@types/react@18.3.10)': optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 - '@mui/utils@5.16.6(@types/react@18.3.9)(react@18.3.1)': + '@mui/utils@5.16.6(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/types': 7.2.17(@types/react@18.3.9) + '@mui/types': 7.2.17(@types/react@18.3.10) '@types/prop-types': 15.7.12 clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 react-is: 18.3.1 optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 - '@mui/utils@6.0.0-rc.0(@types/react@18.3.9)(react@18.3.1)': + '@mui/utils@6.0.0-rc.0(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/types': 7.2.17(@types/react@18.3.9) + '@mui/types': 7.2.17(@types/react@18.3.10) '@types/prop-types': 15.7.12 clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 react-is: 18.3.1 optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 - '@mui/utils@6.1.1(@types/react@18.3.9)(react@18.3.1)': + '@mui/utils@6.1.1(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/types': 7.2.17(@types/react@18.3.9) + '@mui/types': 7.2.17(@types/react@18.3.10) '@types/prop-types': 15.7.12 clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 react-is: 18.3.1 optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 - '@mui/x-data-grid@7.18.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/x-data-grid@7.18.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/material': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/system': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) - '@mui/utils': 5.16.6(@types/react@18.3.9)(react@18.3.1) - '@mui/x-internals': 7.18.0(@types/react@18.3.9)(react@18.3.1) + '@mui/material': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/system': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) + '@mui/utils': 5.16.6(@types/react@18.3.10)(react@18.3.1) + '@mui/x-internals': 7.18.0(@types/react@18.3.10)(react@18.3.1) clsx: 2.1.1 prop-types: 15.8.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) reselect: 5.1.1 optionalDependencies: - '@emotion/react': 11.13.3(@types/react@18.3.9)(react@18.3.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) + '@emotion/react': 11.13.3(@types/react@18.3.10)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) transitivePeerDependencies: - '@types/react' - '@mui/x-date-pickers@7.18.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(date-fns@3.6.0)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@mui/x-date-pickers@7.18.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@mui/material@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mui/system@6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(date-fns@3.6.0)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/material': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@mui/system': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) - '@mui/utils': 5.16.6(@types/react@18.3.9)(react@18.3.1) - '@mui/x-internals': 7.18.0(@types/react@18.3.9)(react@18.3.1) + '@mui/material': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@mui/system': 6.1.1(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@emotion/styled@11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) + '@mui/utils': 5.16.6(@types/react@18.3.10)(react@18.3.1) + '@mui/x-internals': 7.18.0(@types/react@18.3.10)(react@18.3.1) '@types/react-transition-group': 4.4.11 clsx: 2.1.1 prop-types: 15.8.1 @@ -6120,17 +6120,17 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-transition-group: 4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) optionalDependencies: - '@emotion/react': 11.13.3(@types/react@18.3.9)(react@18.3.1) - '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.9)(react@18.3.1))(@types/react@18.3.9)(react@18.3.1) + '@emotion/react': 11.13.3(@types/react@18.3.10)(react@18.3.1) + '@emotion/styled': 11.13.0(@emotion/react@11.13.3(@types/react@18.3.10)(react@18.3.1))(@types/react@18.3.10)(react@18.3.1) date-fns: 3.6.0 dayjs: 1.11.13 transitivePeerDependencies: - '@types/react' - '@mui/x-internals@7.18.0(@types/react@18.3.9)(react@18.3.1)': + '@mui/x-internals@7.18.0(@types/react@18.3.10)(react@18.3.1)': dependencies: '@babel/runtime': 7.25.6 - '@mui/utils': 5.16.6(@types/react@18.3.9)(react@18.3.1) + '@mui/utils': 5.16.6(@types/react@18.3.10)(react@18.3.1) react: 18.3.1 transitivePeerDependencies: - '@types/react' @@ -6310,7 +6310,7 @@ snapshots: '@types/hoist-non-react-statics@3.3.5': dependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 hoist-non-react-statics: 3.3.2 '@types/istanbul-lib-coverage@2.0.6': {} @@ -6343,28 +6343,28 @@ snapshots: '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 '@types/react-router-dom@5.3.3': dependencies: '@types/history': 4.7.11 - '@types/react': 18.3.9 + '@types/react': 18.3.10 '@types/react-router': 5.1.20 '@types/react-router@5.1.20': dependencies: '@types/history': 4.7.11 - '@types/react': 18.3.9 + '@types/react': 18.3.10 '@types/react-transition-group@4.4.11': dependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 '@types/react-window@1.8.8': dependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 - '@types/react@18.3.9': + '@types/react@18.3.10': dependencies: '@types/prop-types': 15.7.12 csstype: 3.1.3 @@ -7338,7 +7338,7 @@ snapshots: dependencies: eslint: 8.57.1 - eslint-plugin-react@7.36.1(eslint@8.57.1): + eslint-plugin-react@7.37.0(eslint@8.57.1): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -8074,7 +8074,7 @@ snapshots: dependencies: json-buffer: 3.0.1 - knip@5.30.5(@types/node@20.13.0)(typescript@5.6.2): + knip@5.30.6(@types/node@20.13.0)(typescript@5.6.2): dependencies: '@nodelib/fs.walk': 1.2.8 '@snyk/github-codeowners': 1.1.0 @@ -8637,9 +8637,9 @@ snapshots: es-errors: 1.3.0 set-function-name: 2.0.2 - rehackt@0.1.0(@types/react@18.3.9)(react@18.3.1): + rehackt@0.1.0(@types/react@18.3.10)(react@18.3.1): optionalDependencies: - '@types/react': 18.3.9 + '@types/react': 18.3.10 react: 18.3.1 relay-runtime@12.0.0: diff --git a/src/components/Campaigns/CloseCampaignModal.tsx b/src/components/Campaigns/CloseCampaignModal.tsx new file mode 100644 index 000000000..c0df6ca57 --- /dev/null +++ b/src/components/Campaigns/CloseCampaignModal.tsx @@ -0,0 +1,134 @@ +import { graphql } from "@/graphql-client/index"; +import { Box, Button, Modal, Stack, Typography } from "@mui/material"; +import { useContext, useState } from "react"; +import { modalStyles } from "@/theme"; +import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; +import { useMutation } from "@apollo/client"; +import BigNumber from "bignumber.js"; +import { Trans } from "@lingui/macro"; +import { useHistory } from "react-router-dom"; +import { FilterContext } from "@/state/context"; +import { + AdvertiserCampaignsDocument, + CampaignSummaryFragment, +} from "@/graphql-client/graphql"; +import CancelIcon from "@mui/icons-material/Cancel"; + +const ForceCampaignComplete = graphql(` + mutation ForceCampaignComplete($id: String!) { + forceCampaignCompletionAndTransferFunds(id: $id) + } +`); + +interface Props { + campaign?: Pick< + CampaignSummaryFragment, + "id" | "hasInProcessOrCompleteTransfer" | "adsManagerCurrentBalance" + >; + type: "form" | "inline"; + disabled?: boolean; +} + +export function CloseCampaignModal({ campaign, type, disabled }: Props) { + const history = useHistory(); + const [open, setOpen] = useState(false); + const { advertiser } = useAdvertiser(); + const { fromDate } = useContext(FilterContext); + + const [mutate, { loading: mutating }] = useMutation(ForceCampaignComplete, { + variables: { id: campaign?.id ?? "" }, + }); + + const isInline = type === "inline"; + const currentBalance = BigNumber(campaign?.adsManagerCurrentBalance ?? 0); + const hasNoBalance = currentBalance.lte(0); + if (!isInline && hasNoBalance) return null; + const hasInProcessOrCompleteTransfer = + campaign?.hasInProcessOrCompleteTransfer ?? false; + + const doMutate = () => { + mutate({ + refetchQueries: [ + { + query: AdvertiserCampaignsDocument, + variables: { + id: advertiser.id, + filter: { from: fromDate?.toISOString() }, + }, + }, + ], + onCompleted: (data) => { + if (window.confirm(data.forceCampaignCompletionAndTransferFunds)) { + history.replace("/user/main/campaign"); + } else { + window.location.reload(); + } + }, + }); + }; + + return ( + <> + + setOpen(false)}> + + + You are about to close this campaign. + + + + + Closing a campaign will immediately stop it from running. Once it + has stopped running, any remaining funds will be transferred back + to your account in 24-48 hours. + + + + + + + + + + + ); +} diff --git a/src/components/Datagrid/renderers.tsx b/src/components/Datagrid/renderers.tsx index 2140fd7e9..961e70953 100644 --- a/src/components/Datagrid/renderers.tsx +++ b/src/components/Datagrid/renderers.tsx @@ -73,7 +73,7 @@ export const StandardRenderers: Record = { }; export function renderMonetaryAmount( - value: BigNumber | number, + value: BigNumber | number | string, currency: string, ) { const val = BigNumber(value); diff --git a/src/components/Steps/ActionButtons.tsx b/src/components/Steps/ActionButtons.tsx index 6e6179e00..729689de3 100644 --- a/src/components/Steps/ActionButtons.tsx +++ b/src/components/Steps/ActionButtons.tsx @@ -7,6 +7,7 @@ import ArrowBackIcon from "@mui/icons-material/ArrowBack"; import RemoveIcon from "@mui/icons-material/Remove"; import { Link as RouterLink } from "react-router-dom"; import { Trans } from "@lingui/macro"; +import { CloseCampaignSidebar } from "@/components/Steps/CloseCampaignSidebar"; export function ActionButtons() { const { values } = useFormikContext(); @@ -37,6 +38,8 @@ export function ActionButtons() { > Return to dashboard + + ); } diff --git a/src/components/Steps/CloseCampaignSidebar.tsx b/src/components/Steps/CloseCampaignSidebar.tsx new file mode 100644 index 000000000..e47982aec --- /dev/null +++ b/src/components/Steps/CloseCampaignSidebar.tsx @@ -0,0 +1,35 @@ +import { graphql } from "@/graphql-client/index"; +import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; +import { useQuery } from "@apollo/client"; +import { useField } from "formik"; +import { CloseCampaignModal } from "@/components/Campaigns/CloseCampaignModal"; + +const CampaignTransferStatus = graphql(` + query CampaignTransferStatus($id: String!) { + campaign(id: $id) { + id + adsManagerCurrentBalance + hasInProcessOrCompleteTransfer + } + } +`); + +export function CloseCampaignSidebar() { + const [, meta] = useField("id"); + const { advertiser } = useAdvertiser(); + + const { data, loading } = useQuery(CampaignTransferStatus, { + variables: { id: meta.value ?? "" }, + skip: + !meta.value || + (!advertiser.selfServiceManageCampaign && advertiser.selfServiceSetPrice), + fetchPolicy: "cache-and-network", + }); + + if (!data || !data?.campaign || loading) return null; + const campaign = data.campaign; + + return ( + + ); +} diff --git a/src/graphql-client/gql.ts b/src/graphql-client/gql.ts index 3d3aaf64b..f271eab9a 100644 --- a/src/graphql-client/gql.ts +++ b/src/graphql-client/gql.ts @@ -17,10 +17,12 @@ const documents = { "\n mutation AdsManagerUpdateCreativeState($id: String!, $state: String!) {\n adsManagerUpdateCreativeState(id: $id, state: $state) {\n id\n }\n }\n": types.AdsManagerUpdateCreativeStateDocument, "\n mutation AdsManagerUpdateCreativePayload(\n $input: AdsManagerUpdateCreativeInput!\n ) {\n adsManagerUpdateCreativePayload(adsManagerUpdateCreativeInput: $input) {\n id\n }\n }\n": types.AdsManagerUpdateCreativePayloadDocument, "\n mutation UpdateAdSetState($id: String!, $state: AdSetState!) {\n adsManagerUpdateAdSetState(id: $id, state: $state) {\n id\n }\n }\n ": types.UpdateAdSetStateDocument, + "\n mutation ForceCampaignComplete($id: String!) {\n forceCampaignCompletionAndTransferFunds(id: $id)\n }\n": types.ForceCampaignCompleteDocument, + "\n query CampaignTransferStatus($id: String!) {\n campaign(id: $id) {\n id\n adsManagerCurrentBalance\n hasInProcessOrCompleteTransfer\n }\n }\n": types.CampaignTransferStatusDocument, "fragment AdSet on AdSet {\n id\n price\n createdAt\n billingType\n name\n totalMax\n perDay\n state\n segments {\n code\n name\n }\n oses {\n code\n name\n }\n conversions {\n id\n type\n urlPattern\n observationWindow\n }\n ads {\n ...Ad\n }\n}\n\nfragment Ad on Ad {\n id\n state\n creative {\n ...Creative\n }\n}\n\nfragment AdSetWithDeletedAds on AdSet {\n id\n createdAt\n name\n state\n billingType\n oses {\n code\n name\n }\n segments {\n code\n name\n }\n conversions {\n id\n }\n ads(includeDeleted: true) {\n ...Ad\n }\n}": types.AdSetFragmentDoc, "fragment AdvertiserBillingAddress on Advertiser {\n billingAddress {\n id\n street1\n street2\n city\n country\n state\n zipcode\n }\n}\n\nquery Advertiser($id: String!) {\n advertiser(id: $id) {\n id\n publicKey\n }\n}\n\nfragment AdvertiserCampaigns on Advertiser {\n id\n name\n selfServiceManageCampaign\n selfServiceSetPrice\n campaigns {\n ...CampaignSummary\n }\n}\n\nquery AdvertiserCampaigns($id: String!, $filter: AdvertiserCampaignFilter) {\n advertiserCampaigns(id: $id, filter: $filter) {\n ...AdvertiserCampaigns\n }\n}\n\nfragment AdvertiserImage on AdvertiserImage {\n name\n imageUrl\n format\n id\n createdAt\n}\n\nfragment AdvertiserPrice on AdvertiserPrice {\n billingModelPrice\n billingType\n format\n}\n\nquery AdvertiserImages($id: String!) {\n advertiser(id: $id) {\n id\n images {\n ...AdvertiserImage\n }\n }\n}\n\nquery AdvertiserPrices($id: String!) {\n advertiser(id: $id) {\n id\n prices {\n ...AdvertiserPrice\n }\n }\n}\n\nquery AdvertiserBillingAddress($id: String!) {\n advertiser(id: $id) {\n id\n ...AdvertiserBillingAddress\n }\n}\n\nmutation UploadAdvertiserImage($input: CreateAdvertiserImageInput!) {\n createAdvertiserImage(createImageInput: $input) {\n id\n name\n }\n}": types.AdvertiserBillingAddressFragmentDoc, "fragment 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.CampaignMetricSummaryValuesFragmentDoc, - "fragment Campaign on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\n stripePaymentId\n hasPaymentIntent\n dayPartings {\n dow\n startMinute\n endMinute\n }\n geoTargets {\n code\n name\n }\n adSets {\n ...AdSet\n }\n advertiser {\n id\n }\n}\n\nfragment CampaignSummary on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n paymentType\n createdAt\n startAt\n endAt\n source\n type\n format\n dayProportion\n brandedKeywords\n advertiser {\n id\n name\n }\n}\n\nfragment CampaignAds on Campaign {\n id\n name\n state\n startAt\n endAt\n source\n currency\n format\n advertiser {\n id\n }\n adSets {\n ...AdSetWithDeletedAds\n }\n}\n\nquery LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n}\n\nquery LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n}\n\nmutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n}\n\nmutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n}": types.CampaignFragmentDoc, + "fragment Campaign on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n spent\n createdAt\n startAt\n endAt\n source\n type\n format\n paymentType\n dayProportion\n stripePaymentId\n hasPaymentIntent\n dayPartings {\n dow\n startMinute\n endMinute\n }\n geoTargets {\n code\n name\n }\n adSets {\n ...AdSet\n }\n advertiser {\n id\n }\n}\n\nfragment CampaignSummary on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n paymentType\n createdAt\n startAt\n endAt\n source\n type\n format\n dayProportion\n brandedKeywords\n adsManagerCurrentBalance\n hasInProcessOrCompleteTransfer\n advertiser {\n id\n name\n }\n}\n\nfragment CampaignAds on Campaign {\n id\n name\n state\n startAt\n endAt\n source\n currency\n format\n advertiser {\n id\n }\n adSets {\n ...AdSetWithDeletedAds\n }\n}\n\nquery LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n}\n\nquery LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n}\n\nmutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n}\n\nmutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n}": types.CampaignFragmentDoc, "fragment Geocode on Geocode {\n code\n name\n}\n\nfragment Segment on Segment {\n code\n name\n}\n\nquery ActiveGeocodes {\n geocodes {\n ...Geocode\n }\n}\n\nquery Segments {\n segments {\n data {\n ...Segment\n }\n }\n}": types.GeocodeFragmentDoc, "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 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\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, "fragment DisplayedMetrics on Metrics {\n impression\n click\n siteVisit\n conversion\n viewThroughConversion\n clickThroughConversion\n dismiss\n spendUsd\n upvote\n downvote\n rates {\n clickThrough\n clickToConversion\n clickToSiteVisit\n impressionToSiteVisit\n impressionToDismiss\n costPerAcquisition\n }\n}\n\nfragment DailyMetricValues on Performance {\n dimensions {\n day\n }\n metrics {\n ...DisplayedMetrics\n }\n}": types.DisplayedMetricsFragmentDoc, @@ -32,6 +34,7 @@ const documents = { "\n query OSBreakdown($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n dimensions {\n os\n }\n metrics {\n ...DisplayedMetrics\n }\n }\n }\n }\n": types.OsBreakdownDocument, "\n query HourlyGraph($filter: PerformanceFilter!) {\n performance(filter: $filter) {\n values {\n ...HourlyValues\n }\n }\n }\n\n fragment HourlyValues on Performance {\n dimensions {\n hour\n }\n metrics {\n ...DisplayedMetrics\n }\n }\n": types.HourlyGraphDocument, "\n mutation UpdateCurrentUser($input: UpdateCurrentUserInput!) {\n updateCurrentUser(input: $input) {\n ...User\n }\n }\n": types.UpdateCurrentUserDocument, + "\n query CurrentAdvertiserBalance($id: String!) {\n advertiser(id: $id) {\n id\n accountBalance\n }\n }\n": types.CurrentAdvertiserBalanceDocument, "\n mutation AdsManagerUpdateCampaign($input: AdsManagerUpdateCampaignInput!) {\n adsManagerUpdateCampaign(adsManagerUpdateCampaignInput: $input) {\n id\n }\n }\n": types.AdsManagerUpdateCampaignDocument, "\n query LoadCampaignSummary($id: String!) {\n campaign(id: $id) {\n ...CampaignOverview\n }\n }\n\n fragment CampaignOverview on Campaign {\n ...CampaignSummary\n adSets {\n id\n conversions {\n id\n extractExternalId\n }\n }\n }\n": types.LoadCampaignSummaryDocument, "\n query CreateSearchCampaignLandingPageList(\n $domain: String!\n $country: String!\n $offset: Float!\n $limit: Float!\n ) {\n searchProspects {\n landingPagesWithStats(\n country: $country\n domain: $domain\n offset: $offset\n limit: $limit\n ) {\n ...SearchProspectsLandingPageList\n }\n }\n }\n\n fragment SearchProspectsLandingPageList on SearchLandingPageWithStats {\n url\n rank\n lastSeen\n favicon\n creatives {\n title\n body\n lastSeen\n }\n }\n": types.CreateSearchCampaignLandingPageListDocument, @@ -68,6 +71,14 @@ export function graphql(source: "\n mutation AdsManagerUpdateCreativePayload(\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 UpdateAdSetState($id: String!, $state: AdSetState!) {\n adsManagerUpdateAdSetState(id: $id, state: $state) {\n id\n }\n }\n "): (typeof documents)["\n mutation UpdateAdSetState($id: String!, $state: AdSetState!) {\n adsManagerUpdateAdSetState(id: $id, state: $state) {\n id\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 ForceCampaignComplete($id: String!) {\n forceCampaignCompletionAndTransferFunds(id: $id)\n }\n"): (typeof documents)["\n mutation ForceCampaignComplete($id: String!) {\n forceCampaignCompletionAndTransferFunds(id: $id)\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 CampaignTransferStatus($id: String!) {\n campaign(id: $id) {\n id\n adsManagerCurrentBalance\n hasInProcessOrCompleteTransfer\n }\n }\n"): (typeof documents)["\n query CampaignTransferStatus($id: String!) {\n campaign(id: $id) {\n id\n adsManagerCurrentBalance\n hasInProcessOrCompleteTransfer\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -83,7 +94,7 @@ export function graphql(source: "fragment CampaignMetricSummaryValues on Metrics /** * 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 hasPaymentIntent\n dayPartings {\n dow\n startMinute\n endMinute\n }\n geoTargets {\n code\n name\n }\n adSets {\n ...AdSet\n }\n advertiser {\n id\n }\n}\n\nfragment CampaignSummary on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n paymentType\n createdAt\n startAt\n endAt\n source\n type\n format\n dayProportion\n brandedKeywords\n advertiser {\n id\n name\n }\n}\n\nfragment CampaignAds on Campaign {\n id\n name\n state\n startAt\n endAt\n source\n currency\n format\n advertiser {\n id\n }\n adSets {\n ...AdSetWithDeletedAds\n }\n}\n\nquery LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n}\n\nquery LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n}\n\nmutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n}\n\nmutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n}"): (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 hasPaymentIntent\n dayPartings {\n dow\n startMinute\n endMinute\n }\n geoTargets {\n code\n name\n }\n adSets {\n ...AdSet\n }\n advertiser {\n id\n }\n}\n\nfragment CampaignSummary on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n paymentType\n createdAt\n startAt\n endAt\n source\n type\n format\n dayProportion\n brandedKeywords\n advertiser {\n id\n name\n }\n}\n\nfragment CampaignAds on Campaign {\n id\n name\n state\n startAt\n endAt\n source\n currency\n format\n advertiser {\n id\n }\n adSets {\n ...AdSetWithDeletedAds\n }\n}\n\nquery LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n}\n\nquery LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n}\n\nmutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n}\n\nmutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n}"]; +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 hasPaymentIntent\n dayPartings {\n dow\n startMinute\n endMinute\n }\n geoTargets {\n code\n name\n }\n adSets {\n ...AdSet\n }\n advertiser {\n id\n }\n}\n\nfragment CampaignSummary on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n paymentType\n createdAt\n startAt\n endAt\n source\n type\n format\n dayProportion\n brandedKeywords\n adsManagerCurrentBalance\n hasInProcessOrCompleteTransfer\n advertiser {\n id\n name\n }\n}\n\nfragment CampaignAds on Campaign {\n id\n name\n state\n startAt\n endAt\n source\n currency\n format\n advertiser {\n id\n }\n adSets {\n ...AdSetWithDeletedAds\n }\n}\n\nquery LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n}\n\nquery LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n}\n\nmutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n}\n\nmutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n}"): (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 hasPaymentIntent\n dayPartings {\n dow\n startMinute\n endMinute\n }\n geoTargets {\n code\n name\n }\n adSets {\n ...AdSet\n }\n advertiser {\n id\n }\n}\n\nfragment CampaignSummary on Campaign {\n id\n name\n state\n dailyCap\n priority\n passThroughRate\n pacingOverride\n pacingStrategy\n externalId\n currency\n budget\n paymentType\n createdAt\n startAt\n endAt\n source\n type\n format\n dayProportion\n brandedKeywords\n adsManagerCurrentBalance\n hasInProcessOrCompleteTransfer\n advertiser {\n id\n name\n }\n}\n\nfragment CampaignAds on Campaign {\n id\n name\n state\n startAt\n endAt\n source\n currency\n format\n advertiser {\n id\n }\n adSets {\n ...AdSetWithDeletedAds\n }\n}\n\nquery LoadCampaign($id: String!) {\n campaign(id: $id) {\n ...Campaign\n }\n}\n\nquery LoadCampaignAds($id: String!) {\n campaign(id: $id) {\n ...CampaignAds\n }\n}\n\nmutation CreateCampaign($input: CreateCampaignInput!) {\n createCampaign(createCampaignInput: $input) {\n id\n paymentType\n }\n}\n\nmutation UpdateCampaign($input: UpdateCampaignInput!) {\n updateCampaign(updateCampaignInput: $input) {\n id\n paymentType\n stripePaymentId\n }\n}"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ @@ -128,6 +139,10 @@ export function graphql(source: "\n query HourlyGraph($filter: PerformanceFilte * 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 UpdateCurrentUser($input: UpdateCurrentUserInput!) {\n updateCurrentUser(input: $input) {\n ...User\n }\n }\n"): (typeof documents)["\n mutation UpdateCurrentUser($input: UpdateCurrentUserInput!) {\n updateCurrentUser(input: $input) {\n ...User\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 CurrentAdvertiserBalance($id: String!) {\n advertiser(id: $id) {\n id\n accountBalance\n }\n }\n"): (typeof documents)["\n query CurrentAdvertiserBalance($id: String!) {\n advertiser(id: $id) {\n id\n accountBalance\n }\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ diff --git a/src/graphql-client/graphql.ts b/src/graphql-client/graphql.ts index 48cccc33b..3a3805f64 100644 --- a/src/graphql-client/graphql.ts +++ b/src/graphql-client/graphql.ts @@ -166,6 +166,7 @@ export type AdsManagerUpdateNotificationPayloadInput = { export type Advertiser = { __typename?: 'Advertiser'; + accountBalance: Scalars['Numeric']['output']; accountManager?: Maybe; additionalBillingEmails?: Maybe>; agreed: Scalars['Boolean']['output']; @@ -178,6 +179,7 @@ export type Advertiser = { description?: Maybe; id: Scalars['String']['output']; images: Array; + ledgerEntries: Array; marketingChannel?: Maybe; modifiedAt: Scalars['DateTime']['output']; name: Scalars['String']['output']; @@ -220,6 +222,16 @@ export type AdvertiserImage = { name: Scalars['String']['output']; }; +export type AdvertiserLedgerEntry = { + __typename?: 'AdvertiserLedgerEntry'; + amount: Scalars['Numeric']['output']; + balance: Scalars['Numeric']['output']; + description: Scalars['String']['output']; + id: Scalars['String']['output']; + timestamp: Scalars['DateTime']['output']; + transactionType: LedgerTransactionType; +}; + export type AdvertiserPrice = { __typename?: 'AdvertiserPrice'; billingModelPrice: Scalars['Numeric']['output']; @@ -255,6 +267,7 @@ export type Campaign = { accountManager?: Maybe; adSetCount: Scalars['Int']['output']; adSets: Array; + adsManagerCurrentBalance: Scalars['Numeric']['output']; advertiser: Advertiser; /** For Search campaigns, keywords the campaign must not be shown against */ bannedKeywords?: Maybe>; @@ -279,17 +292,21 @@ export type Campaign = { effectiveState: CampaignEffectiveState; endAt: Scalars['DateTime']['output']; externalId?: Maybe; + externalPaymentUrl?: Maybe; format: CampaignFormat; geoTargets: Array; + hasInProcessOrCompleteTransfer: Scalars['Boolean']['output']; hasPaymentIntent: Scalars['Boolean']['output']; id: Scalars['String']['output']; modifiedAt: Scalars['DateTime']['output']; name: Scalars['String']['output']; + negativeKeywords?: Maybe>; pacingIndex?: Maybe; pacingOverride: Scalars['Boolean']['output']; pacingStrategy: CampaignPacingStrategies; passThroughRate: Scalars['Float']['output']; paymentType: PaymentType; + payments?: Maybe>; performance: PerformanceResults; priority: Scalars['Float']['output']; radomPaymentId?: Maybe; @@ -371,6 +388,19 @@ export enum CampaignPacingStrategies { Original = 'ORIGINAL' } +export type CampaignPaymentLedgerEntry = { + __typename?: 'CampaignPaymentLedgerEntry'; + amount: Scalars['Numeric']['output']; + balance: Scalars['Numeric']['output']; + currentBalance: Scalars['Numeric']['output']; + description: Scalars['String']['output']; + externalPaymentUrl?: Maybe; + id: Scalars['String']['output']; + paymentSource: PaymentEventSource; + timestamp: Scalars['DateTime']['output']; + transactionType: LedgerTransactionType; +}; + export type CampaignPerformanceFilter = { /** include only metrics for responses for all these countries */ country?: InputMaybe>; @@ -552,6 +582,7 @@ export type CreateCampaignInput = { format: CampaignFormat; geoTargets: Array; name: Scalars['String']['input']; + negativeKeywords?: InputMaybe>; pacingStrategy?: InputMaybe; paymentType?: InputMaybe; priority?: InputMaybe; @@ -757,6 +788,12 @@ export type InlineContentPayloadInput = { title: Scalars['String']['input']; }; +export enum LedgerTransactionType { + CampaignTransfer = 'campaign_transfer', + ExternalCredit = 'external_credit', + ExternalDebit = 'external_debit' +} + export type Logo = { __typename?: 'Logo'; alt: Scalars['String']['output']; @@ -825,9 +862,11 @@ export type Mutation = { createCampaign: Campaign; createComment: CampaignComment; createCreative: Creative; + createSearchPreview: SearchPreview; createUser: User; /** Logically deletes the ad */ deleteAd: Ad; + forceCampaignCompletionAndTransferFunds: Scalars['String']['output']; forceCampaignValidation?: Maybe; rejectAdvertiserRegistration: Registration; rejectCampaign: Campaign; @@ -915,6 +954,12 @@ export type MutationCreateCreativeArgs = { }; +export type MutationCreateSearchPreviewArgs = { + country: Scalars['String']['input']; + domain: Scalars['String']['input']; +}; + + export type MutationCreateUserArgs = { createUserInput: CreateUserInput; }; @@ -925,6 +970,11 @@ export type MutationDeleteAdArgs = { }; +export type MutationForceCampaignCompletionAndTransferFundsArgs = { + id: Scalars['String']['input']; +}; + + export type MutationForceCampaignValidationArgs = { id: Scalars['String']['input']; }; @@ -1025,7 +1075,14 @@ export type Payload = { wallpapers?: Maybe>; }; +export enum PaymentEventSource { + Brave = 'brave', + Radom = 'radom', + Stripe = 'stripe' +} + export enum PaymentType { + BraveLedger = 'BRAVE_LEDGER', ManualBat = 'MANUAL_BAT', Netsuite = 'NETSUITE', Radom = 'RADOM', @@ -1111,6 +1168,7 @@ export type Query = { geocodes: Array; performance: PerformanceResults; registrations: Registrations; + searchPreviews: Array; searchProspects: SearchProspects; segments: SegmentsQueryDto; user: User; @@ -1381,6 +1439,14 @@ export type SearchPayloadInput = { title: Scalars['String']['input']; }; +export type SearchPreview = { + __typename?: 'SearchPreview'; + country: Geocode; + domain: Scalars['String']['output']; + previewUrl: Scalars['String']['output']; + slug: Scalars['String']['output']; +}; + export type SearchProspects = { __typename?: 'SearchProspects'; domains: Array; @@ -1536,6 +1602,7 @@ export type UpdateCampaignInput = { geoTargets?: InputMaybe>; id: Scalars['String']['input']; name?: InputMaybe; + negativeKeywords?: InputMaybe>; pacingOverride?: InputMaybe; pacingStrategy?: InputMaybe; passThroughRate?: InputMaybe; @@ -1636,6 +1703,20 @@ export type UpdateAdSetStateMutationVariables = Exact<{ export type UpdateAdSetStateMutation = { __typename?: 'Mutation', adsManagerUpdateAdSetState: { __typename?: 'AdSet', id: string } }; +export type ForceCampaignCompleteMutationVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type ForceCampaignCompleteMutation = { __typename?: 'Mutation', forceCampaignCompletionAndTransferFunds: string }; + +export type CampaignTransferStatusQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type CampaignTransferStatusQuery = { __typename?: 'Query', campaign?: { __typename?: 'Campaign', id: string, adsManagerCurrentBalance: string, hasInProcessOrCompleteTransfer: boolean } | null }; + export type AdSetFragment = { __typename?: 'AdSet', id: string, price: string, createdAt: string, billingType?: string | null, name: string, totalMax: number, perDay: number, state: AdSetState, segments: Array<{ __typename?: 'Segment', code: string, name: string }>, oses: Array<{ __typename?: 'OS', code: string, name: string }>, conversions: Array<{ __typename?: 'Conversion', id: string, type: string, urlPattern: string, observationWindow: number }>, ads: Array<{ __typename?: 'Ad', id: string, state: string, creative: { __typename?: 'Creative', id: string, createdAt: string, modifiedAt: string, name: string, state: string, type: { __typename?: 'CreativeType', code: string }, payloadNotification?: { __typename?: 'NotificationPayload', body: string, title: string, targetUrl: string } | null, payloadNewTabPage?: { __typename?: 'NewTabPagePayload', logo?: { __typename?: 'Logo', imageUrl: string, alt: string, companyName: string, destinationUrl: string } | null, wallpapers?: Array<{ __typename?: 'Wallpaper', imageUrl: string, focalPoint: { __typename?: 'FocalPoint', x: number, y: number } }> | null } | null, payloadInlineContent?: { __typename?: 'InlineContentPayload', title: string, ctaText: string, imageUrl: string, targetUrl: string, dimensions: string, description: string } | null, payloadSearch?: { __typename?: 'SearchPayload', body: string, title: string, targetUrl: string } | null, payloadSearchHomepage?: { __typename?: 'SearchHomepagePayload', body: string, imageUrl: string, imageDarkModeUrl?: string | null, targetUrl: string, title: string, ctaText: string } | null } }> }; export type AdFragment = { __typename?: 'Ad', id: string, state: string, creative: { __typename?: 'Creative', id: string, createdAt: string, modifiedAt: string, name: string, state: string, type: { __typename?: 'CreativeType', code: string }, payloadNotification?: { __typename?: 'NotificationPayload', body: string, title: string, targetUrl: string } | null, payloadNewTabPage?: { __typename?: 'NewTabPagePayload', logo?: { __typename?: 'Logo', imageUrl: string, alt: string, companyName: string, destinationUrl: string } | null, wallpapers?: Array<{ __typename?: 'Wallpaper', imageUrl: string, focalPoint: { __typename?: 'FocalPoint', x: number, y: number } }> | null } | null, payloadInlineContent?: { __typename?: 'InlineContentPayload', title: string, ctaText: string, imageUrl: string, targetUrl: string, dimensions: string, description: string } | null, payloadSearch?: { __typename?: 'SearchPayload', body: string, title: string, targetUrl: string } | null, payloadSearchHomepage?: { __typename?: 'SearchHomepagePayload', body: string, imageUrl: string, imageDarkModeUrl?: string | null, targetUrl: string, title: string, ctaText: string } | null } }; @@ -1651,7 +1732,7 @@ export type AdvertiserQueryVariables = Exact<{ export type AdvertiserQuery = { __typename?: 'Query', advertiser?: { __typename?: 'Advertiser', id: string, publicKey?: string | null } | null }; -export type AdvertiserCampaignsFragment = { __typename?: 'Advertiser', id: string, name: string, selfServiceManageCampaign: boolean, selfServiceSetPrice: boolean, campaigns: Array<{ __typename?: 'Campaign', id: string, name: string, state: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, advertiser: { __typename?: 'Advertiser', id: string, name: string } }> }; +export type AdvertiserCampaignsFragment = { __typename?: 'Advertiser', id: string, name: string, selfServiceManageCampaign: boolean, selfServiceSetPrice: boolean, campaigns: Array<{ __typename?: 'Campaign', id: string, name: string, state: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, adsManagerCurrentBalance: string, hasInProcessOrCompleteTransfer: boolean, advertiser: { __typename?: 'Advertiser', id: string, name: string } }> }; export type AdvertiserCampaignsQueryVariables = Exact<{ id: Scalars['String']['input']; @@ -1659,7 +1740,7 @@ export type AdvertiserCampaignsQueryVariables = Exact<{ }>; -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: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, advertiser: { __typename?: 'Advertiser', id: string, name: string } }> } | null }; +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: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, adsManagerCurrentBalance: string, hasInProcessOrCompleteTransfer: boolean, advertiser: { __typename?: 'Advertiser', id: string, name: string } }> } | null }; export type AdvertiserImageFragment = { __typename?: 'AdvertiserImage', name: string, imageUrl: string, format: CampaignFormat, id: string, createdAt: string }; @@ -1724,7 +1805,7 @@ export type FetchAdSetMetricsForCampaignQuery = { __typename?: 'Query', performa export type CampaignFragment = { __typename?: 'Campaign', id: string, name: string, state: CampaignState, 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: AdSetState, segments: Array<{ __typename?: 'Segment', code: string, name: string }>, oses: Array<{ __typename?: 'OS', code: string, name: string }>, conversions: Array<{ __typename?: 'Conversion', id: string, type: string, urlPattern: string, observationWindow: number }>, ads: Array<{ __typename?: 'Ad', id: string, state: string, creative: { __typename?: 'Creative', id: string, createdAt: string, modifiedAt: string, name: string, state: string, type: { __typename?: 'CreativeType', code: string }, payloadNotification?: { __typename?: 'NotificationPayload', body: string, title: string, targetUrl: string } | null, payloadNewTabPage?: { __typename?: 'NewTabPagePayload', logo?: { __typename?: 'Logo', imageUrl: string, alt: string, companyName: string, destinationUrl: string } | null, wallpapers?: Array<{ __typename?: 'Wallpaper', imageUrl: string, focalPoint: { __typename?: 'FocalPoint', x: number, y: number } }> | null } | null, payloadInlineContent?: { __typename?: 'InlineContentPayload', title: string, ctaText: string, imageUrl: string, targetUrl: string, dimensions: string, description: string } | null, payloadSearch?: { __typename?: 'SearchPayload', body: string, title: string, targetUrl: string } | null, payloadSearchHomepage?: { __typename?: 'SearchHomepagePayload', body: string, imageUrl: string, imageDarkModeUrl?: string | null, targetUrl: string, title: string, ctaText: string } | null } }> }>, advertiser: { __typename?: 'Advertiser', id: string } }; -export type CampaignSummaryFragment = { __typename?: 'Campaign', id: string, name: string, state: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, advertiser: { __typename?: 'Advertiser', id: string, name: string } }; +export type CampaignSummaryFragment = { __typename?: 'Campaign', id: string, name: string, state: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, adsManagerCurrentBalance: string, hasInProcessOrCompleteTransfer: boolean, advertiser: { __typename?: 'Advertiser', id: string, name: string } }; export type CampaignAdsFragment = { __typename?: 'Campaign', id: string, name: string, state: CampaignState, 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: AdSetState, 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, 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 } }> }> }; @@ -1865,6 +1946,13 @@ export type UpdateCurrentUserMutationVariables = Exact<{ export type UpdateCurrentUserMutation = { __typename?: 'Mutation', updateCurrentUser: { __typename?: 'User', email: string, fullName: string, id: string, role: string } }; +export type CurrentAdvertiserBalanceQueryVariables = Exact<{ + id: Scalars['String']['input']; +}>; + + +export type CurrentAdvertiserBalanceQuery = { __typename?: 'Query', advertiser?: { __typename?: 'Advertiser', id: string, accountBalance: string } | null }; + export type AdsManagerUpdateCampaignMutationVariables = Exact<{ input: AdsManagerUpdateCampaignInput; }>; @@ -1877,9 +1965,9 @@ export type LoadCampaignSummaryQueryVariables = Exact<{ }>; -export type LoadCampaignSummaryQuery = { __typename?: 'Query', campaign?: { __typename?: 'Campaign', id: string, name: string, state: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, adSets: Array<{ __typename?: 'AdSet', id: string, conversions: Array<{ __typename?: 'Conversion', id: string, extractExternalId: boolean }> }>, advertiser: { __typename?: 'Advertiser', id: string, name: string } } | null }; +export type LoadCampaignSummaryQuery = { __typename?: 'Query', campaign?: { __typename?: 'Campaign', id: string, name: string, state: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, adsManagerCurrentBalance: string, hasInProcessOrCompleteTransfer: boolean, adSets: Array<{ __typename?: 'AdSet', id: string, conversions: Array<{ __typename?: 'Conversion', id: string, extractExternalId: boolean }> }>, advertiser: { __typename?: 'Advertiser', id: string, name: string } } | null }; -export type CampaignOverviewFragment = { __typename?: 'Campaign', id: string, name: string, state: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, adSets: Array<{ __typename?: 'AdSet', id: string, conversions: Array<{ __typename?: 'Conversion', id: string, extractExternalId: boolean }> }>, advertiser: { __typename?: 'Advertiser', id: string, name: string } }; +export type CampaignOverviewFragment = { __typename?: 'Campaign', id: string, name: string, state: CampaignState, dailyCap: number, priority: number, passThroughRate: number, pacingOverride: boolean, pacingStrategy: CampaignPacingStrategies, externalId?: string | null, currency: string, budget: number, paymentType: PaymentType, createdAt: string, startAt: string, endAt: string, source: CampaignSource, type: CampaignType, format: CampaignFormat, dayProportion?: number | null, brandedKeywords?: Array | null, adsManagerCurrentBalance: string, hasInProcessOrCompleteTransfer: boolean, adSets: Array<{ __typename?: 'AdSet', id: string, conversions: Array<{ __typename?: 'Conversion', id: string, extractExternalId: boolean }> }>, advertiser: { __typename?: 'Advertiser', id: string, name: string } }; export type CreateSearchCampaignLandingPageListQueryVariables = Exact<{ domain: Scalars['String']['input']; @@ -1905,8 +1993,8 @@ export type SearchProspectsLandingPageDetailQuery = { __typename?: 'Query', sear export type SearchProspectsLandingPageDetailFragment = { __typename?: 'SearchLandingPage', url: string, queries: Array<{ __typename?: 'SearchLandingPageQuery', query: 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 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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; -export const 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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; +export const 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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"adsManagerCurrentBalance"}},{"kind":"Field","name":{"kind":"Name","value":"hasInProcessOrCompleteTransfer"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; +export const 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":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"adsManagerCurrentBalance"}},{"kind":"Field","name":{"kind":"Name","value":"hasInProcessOrCompleteTransfer"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; export const 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 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; @@ -1925,15 +2013,17 @@ export const DisplayedMetricsFragmentDoc = {"kind":"Document","definitions":[{"k export const DailyMetricValuesFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DailyMetricValues"},"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":"DisplayedMetrics"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DisplayedMetrics"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"viewThroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"clickThroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"upvote"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"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":"clickToSiteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"impressionToSiteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"impressionToDismiss"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}}]} 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 HourlyValuesFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HourlyValues"},"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":"hour"}}]}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DisplayedMetrics"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DisplayedMetrics"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"viewThroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"clickThroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"upvote"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"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":"clickToSiteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"impressionToSiteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"impressionToDismiss"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}}]} as unknown as DocumentNode; -export const CampaignOverviewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignOverview"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"extractExternalId"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; +export const CampaignOverviewFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignOverview"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"extractExternalId"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"adsManagerCurrentBalance"}},{"kind":"Field","name":{"kind":"Name","value":"hasInProcessOrCompleteTransfer"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}}]} as unknown as DocumentNode; export const SearchProspectsLandingPageListFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SearchProspectsLandingPageList"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SearchLandingPageWithStats"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"rank"}},{"kind":"Field","name":{"kind":"Name","value":"lastSeen"}},{"kind":"Field","name":{"kind":"Name","value":"favicon"}},{"kind":"Field","name":{"kind":"Name","value":"creatives"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"lastSeen"}}]}}]}}]} as unknown as DocumentNode; export const SearchProspectsLandingPageDetailFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SearchProspectsLandingPageDetail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SearchLandingPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"queries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"query"}}]}}]}}]} as unknown as DocumentNode; export const UpdateAdvertiserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAdvertiser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AdsManagerUpdateAdvertiserInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adsManagerUpdateAdvertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"adsManagerUpdateAdvertiserInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"publicKey"}}]}}]}}]} as unknown as DocumentNode; export const AdsManagerUpdateCreativeStateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AdsManagerUpdateCreativeState"},"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":"state"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adsManagerUpdateCreativeState"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"state"},"value":{"kind":"Variable","name":{"kind":"Name","value":"state"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; export const AdsManagerUpdateCreativePayloadDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AdsManagerUpdateCreativePayload"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AdsManagerUpdateCreativeInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adsManagerUpdateCreativePayload"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"adsManagerUpdateCreativeInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; export const UpdateAdSetStateDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateAdSetState"},"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":"state"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AdSetState"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adsManagerUpdateAdSetState"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"state"},"value":{"kind":"Variable","name":{"kind":"Name","value":"state"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} as unknown as DocumentNode; +export const ForceCampaignCompleteDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ForceCampaignComplete"},"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":"forceCampaignCompletionAndTransferFunds"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}]}]}}]} as unknown as DocumentNode; +export const CampaignTransferStatusDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CampaignTransferStatus"},"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":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"adsManagerCurrentBalance"}},{"kind":"Field","name":{"kind":"Name","value":"hasInProcessOrCompleteTransfer"}}]}}]}}]} 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 AdvertiserCampaignsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserCampaigns"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserCampaignFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiserCampaigns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserCampaigns"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserCampaigns"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Advertiser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceManageCampaign"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceSetPrice"}},{"kind":"Field","name":{"kind":"Name","value":"campaigns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}}]}}]}}]} as unknown as DocumentNode; +export const AdvertiserCampaignsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserCampaigns"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserCampaignFilter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiserCampaigns"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserCampaigns"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"adsManagerCurrentBalance"}},{"kind":"Field","name":{"kind":"Name","value":"hasInProcessOrCompleteTransfer"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserCampaigns"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Advertiser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceManageCampaign"}},{"kind":"Field","name":{"kind":"Name","value":"selfServiceSetPrice"}},{"kind":"Field","name":{"kind":"Name","value":"campaigns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}}]}}]}}]} as unknown as DocumentNode; export const AdvertiserImagesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserImages"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"images"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserImage"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserImage"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserImage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"imageUrl"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}}]}}]} as unknown as DocumentNode; export const AdvertiserPricesDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AdvertiserPrices"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"prices"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"AdvertiserPrice"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"AdvertiserPrice"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"AdvertiserPrice"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"billingModelPrice"}},{"kind":"Field","name":{"kind":"Name","value":"billingType"}},{"kind":"Field","name":{"kind":"Name","value":"format"}}]}}]} as unknown as DocumentNode; 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; @@ -1959,7 +2049,8 @@ export const CreativeBreakdownDocument = {"kind":"Document","definitions":[{"kin export const OsBreakdownDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"OSBreakdown"},"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":"Field","name":{"kind":"Name","value":"dimensions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"os"}}]}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DisplayedMetrics"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DisplayedMetrics"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"viewThroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"clickThroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"upvote"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"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":"clickToSiteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"impressionToSiteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"impressionToDismiss"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}}]} as unknown as DocumentNode; export const HourlyGraphDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"HourlyGraph"},"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":"HourlyValues"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DisplayedMetrics"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Metrics"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"impression"}},{"kind":"Field","name":{"kind":"Name","value":"click"}},{"kind":"Field","name":{"kind":"Name","value":"siteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"conversion"}},{"kind":"Field","name":{"kind":"Name","value":"viewThroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"clickThroughConversion"}},{"kind":"Field","name":{"kind":"Name","value":"dismiss"}},{"kind":"Field","name":{"kind":"Name","value":"spendUsd"}},{"kind":"Field","name":{"kind":"Name","value":"upvote"}},{"kind":"Field","name":{"kind":"Name","value":"downvote"}},{"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":"clickToSiteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"impressionToSiteVisit"}},{"kind":"Field","name":{"kind":"Name","value":"impressionToDismiss"}},{"kind":"Field","name":{"kind":"Name","value":"costPerAcquisition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HourlyValues"},"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":"hour"}}]}},{"kind":"Field","name":{"kind":"Name","value":"metrics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DisplayedMetrics"}}]}}]}}]} as unknown as DocumentNode; export const UpdateCurrentUserDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateCurrentUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateCurrentUserInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateCurrentUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"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; +export const CurrentAdvertiserBalanceDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CurrentAdvertiserBalance"},"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":"accountBalance"}}]}}]}}]} as unknown as DocumentNode; export const AdsManagerUpdateCampaignDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AdsManagerUpdateCampaign"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AdsManagerUpdateCampaignInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"adsManagerUpdateCampaign"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"adsManagerUpdateCampaignInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}}]} 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":"CampaignOverview"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignOverview"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"extractExternalId"}}]}}]}}]}}]} 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":"CampaignOverview"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignSummary"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"state"}},{"kind":"Field","name":{"kind":"Name","value":"dailyCap"}},{"kind":"Field","name":{"kind":"Name","value":"priority"}},{"kind":"Field","name":{"kind":"Name","value":"passThroughRate"}},{"kind":"Field","name":{"kind":"Name","value":"pacingOverride"}},{"kind":"Field","name":{"kind":"Name","value":"pacingStrategy"}},{"kind":"Field","name":{"kind":"Name","value":"externalId"}},{"kind":"Field","name":{"kind":"Name","value":"currency"}},{"kind":"Field","name":{"kind":"Name","value":"budget"}},{"kind":"Field","name":{"kind":"Name","value":"paymentType"}},{"kind":"Field","name":{"kind":"Name","value":"createdAt"}},{"kind":"Field","name":{"kind":"Name","value":"startAt"}},{"kind":"Field","name":{"kind":"Name","value":"endAt"}},{"kind":"Field","name":{"kind":"Name","value":"source"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"format"}},{"kind":"Field","name":{"kind":"Name","value":"dayProportion"}},{"kind":"Field","name":{"kind":"Name","value":"brandedKeywords"}},{"kind":"Field","name":{"kind":"Name","value":"adsManagerCurrentBalance"}},{"kind":"Field","name":{"kind":"Name","value":"hasInProcessOrCompleteTransfer"}},{"kind":"Field","name":{"kind":"Name","value":"advertiser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CampaignOverview"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Campaign"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CampaignSummary"}},{"kind":"Field","name":{"kind":"Name","value":"adSets"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"conversions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"extractExternalId"}}]}}]}}]}}]} as unknown as DocumentNode; export const CreateSearchCampaignLandingPageListDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"CreateSearchCampaignLandingPageList"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"domain"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"offset"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"limit"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Float"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"searchProspects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"landingPagesWithStats"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"domain"},"value":{"kind":"Variable","name":{"kind":"Name","value":"domain"}}},{"kind":"Argument","name":{"kind":"Name","value":"offset"},"value":{"kind":"Variable","name":{"kind":"Name","value":"offset"}}},{"kind":"Argument","name":{"kind":"Name","value":"limit"},"value":{"kind":"Variable","name":{"kind":"Name","value":"limit"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SearchProspectsLandingPageList"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SearchProspectsLandingPageList"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SearchLandingPageWithStats"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"rank"}},{"kind":"Field","name":{"kind":"Name","value":"lastSeen"}},{"kind":"Field","name":{"kind":"Name","value":"favicon"}},{"kind":"Field","name":{"kind":"Name","value":"creatives"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"body"}},{"kind":"Field","name":{"kind":"Name","value":"lastSeen"}}]}}]}}]} as unknown as DocumentNode; export const SearchProspectsLandingPageDetailDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"SearchProspectsLandingPageDetail"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"domain"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"country"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"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":"searchProspects"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"landingPage"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"country"},"value":{"kind":"Variable","name":{"kind":"Name","value":"country"}}},{"kind":"Argument","name":{"kind":"Name","value":"domain"},"value":{"kind":"Variable","name":{"kind":"Name","value":"domain"}}},{"kind":"Argument","name":{"kind":"Name","value":"url"},"value":{"kind":"Variable","name":{"kind":"Name","value":"url"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"SearchProspectsLandingPageDetail"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"SearchProspectsLandingPageDetail"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"SearchLandingPage"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"url"}},{"kind":"Field","name":{"kind":"Name","value":"queries"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"query"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/src/graphql/ads-serve.graphql.schema.json b/src/graphql/ads-serve.graphql.schema.json index e6430eca0..a79b6706c 100644 --- a/src/graphql/ads-serve.graphql.schema.json +++ b/src/graphql/ads-serve.graphql.schema.json @@ -1479,6 +1479,22 @@ "description": null, "isOneOf": null, "fields": [ + { + "name": "accountBalance", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Numeric", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "accountManager", "description": null, @@ -1696,6 +1712,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "ledgerEntries", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AdvertiserLedgerEntry", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "marketingChannel", "description": null, @@ -2070,6 +2110,114 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "AdvertiserLedgerEntry", + "description": null, + "isOneOf": null, + "fields": [ + { + "name": "amount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Numeric", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "balance", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Numeric", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timestamp", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "transactionType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LedgerTransactionType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "AdvertiserPrice", @@ -2415,6 +2563,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "adsManagerCurrentBalance", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Numeric", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "advertiser", "description": null, @@ -2699,6 +2863,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "externalPaymentUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "format", "description": null, @@ -2739,6 +2915,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "hasInProcessOrCompleteTransfer", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "hasPaymentIntent", "description": null, @@ -2803,6 +2995,26 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "negativeKeywords", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "pacingIndex", "description": null, @@ -2879,6 +3091,26 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "payments", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CampaignPaymentLedgerEntry", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "performance", "description": null, @@ -3390,6 +3622,158 @@ ], "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "CampaignPaymentLedgerEntry", + "description": null, + "isOneOf": null, + "fields": [ + { + "name": "amount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Numeric", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "balance", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Numeric", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currentBalance", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Numeric", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "externalPaymentUrl", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "paymentSource", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "PaymentEventSource", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timestamp", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "transactionType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "LedgerTransactionType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "CampaignPerformanceFilter", @@ -5205,6 +5589,26 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "negativeKeywords", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "pacingStrategy", "description": null, @@ -7084,6 +7488,36 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "LedgerTransactionType", + "description": null, + "isOneOf": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "campaign_transfer", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "external_credit", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "external_debit", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "Logo", @@ -8096,6 +8530,55 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "createSearchPreview", + "description": null, + "args": [ + { + "name": "country", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "domain", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SearchPreview", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "createUser", "description": null, @@ -8162,6 +8645,39 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "forceCampaignCompletionAndTransferFunds", + "description": null, + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "forceCampaignValidation", "description": null, @@ -8966,6 +9482,36 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "PaymentEventSource", + "description": null, + "isOneOf": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "brave", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "radom", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "stripe", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "ENUM", "name": "PaymentType", @@ -8975,6 +9521,12 @@ "inputFields": null, "interfaces": null, "enumValues": [ + { + "name": "BRAVE_LEDGER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "MANUAL_BAT", "description": null, @@ -10151,6 +10703,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "searchPreviews", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SearchPreview", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "searchProspects", "description": null, @@ -11901,6 +12477,82 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "SearchPreview", + "description": null, + "isOneOf": null, + "fields": [ + { + "name": "country", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Geocode", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "domain", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "previewUrl", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "slug", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "SearchProspects", @@ -13505,6 +14157,26 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "negativeKeywords", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "pacingOverride", "description": null, diff --git a/src/graphql/campaign.graphql b/src/graphql/campaign.graphql index 12cb47fa5..f03a69512 100644 --- a/src/graphql/campaign.graphql +++ b/src/graphql/campaign.graphql @@ -59,6 +59,8 @@ fragment CampaignSummary on Campaign { format dayProportion brandedKeywords + adsManagerCurrentBalance + hasInProcessOrCompleteTransfer advertiser { id name diff --git a/src/locales/en.po b/src/locales/en.po index 0b9baade0..4b7c5d082 100644 --- a/src/locales/en.po +++ b/src/locales/en.po @@ -58,6 +58,12 @@ msgstr "About Brave Ads" msgid "Account" msgstr "Account" +msgid "Account Balance" +msgstr "Account Balance" + +msgid "Account Balance will be applied to this campaign" +msgstr "Account Balance will be applied to this campaign" + msgid "Account Settings" msgstr "Account Settings" @@ -154,6 +160,15 @@ msgstr "An ad from my Brave browser" msgid "An error has occurred while processing your request." msgstr "An error has occurred while processing your request." +msgid "and no additional charges will be incurred." +msgstr "and no additional charges will be incurred." + +msgid "and you will be charged {amountToCharge} USD." +msgstr "and you will be charged {amountToCharge} USD." + +#~ msgid "and you will not be charged." +#~ msgstr "and you will not be charged." + msgid "Android" msgstr "Android" @@ -382,6 +397,12 @@ msgstr "Cloning a campaign will take all properties including ad sets and ads, a msgid "Close" msgstr "Close" +msgid "Close Campaign" +msgstr "Close Campaign" + +msgid "Closing a campaign will immediately stop it from running. Once it has stopped running, any remaining funds will be transferred back to your account in 24-48 hours." +msgstr "Closing a campaign will immediately stop it from running. Once it has stopped running, any remaining funds will be transferred back to your account in 24-48 hours." + msgid "Complete" msgstr "Complete" @@ -568,6 +589,9 @@ msgstr "Don’t see the email?" #~ msgid "Don’t see the email? Check your spam folder or <0>try again." #~ msgstr "Don’t see the email? Check your spam folder or <0>try again." +#~ msgid "Don't show this message again" +#~ msgstr "Don't show this message again" + msgid "Download Report" msgstr "Download Report" @@ -946,6 +970,9 @@ msgstr "No" msgid "No {billingType} pricing available for {label}, contact selfserve@brave.com for help" msgstr "No {billingType} pricing available for {label}, contact selfserve@brave.com for help" +#~ msgid "no additional charge will be applied." +#~ msgstr "no additional charge will be applied." + msgid "No conversion URL setup" msgstr "No conversion URL setup" @@ -1324,6 +1351,9 @@ msgstr "The <0>Basic Attention Token (BAT) is Brave’s native crypto token. msgid "The campaign will likely stop running before the end date provided due to budget constraints." msgstr "The campaign will likely stop running before the end date provided due to budget constraints." +#~ msgid "The current balance for your account that you can attribute to a new Campaign." +#~ msgstr "The current balance for your account that you can attribute to a new Campaign." + msgid "The current value for this metric may be an underestimate." msgstr "The current value for this metric may be an underestimate." @@ -1528,6 +1558,9 @@ msgstr "Work email" msgid "Yes" msgstr "Yes" +msgid "You are about to close this campaign." +msgstr "You are about to close this campaign." + msgid "You are attempting to create a new keypair, this will replace any of your account’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." msgstr "You are attempting to create a new keypair, this will replace any of your account’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." @@ -1546,6 +1579,12 @@ msgstr "You may have access to multiple accounts. Switch between them here." msgid "You will soon receive an email with the next steps of registration. While you wait, we recommend you check out our help center to get helpful information for getting started with Brave Ads." msgstr "You will soon receive an email with the next steps of registration. While you wait, we recommend you check out our help center to get helpful information for getting started with Brave Ads." +msgid "Your account has a balance of {0} USD. This will be applied to your campaign" +msgstr "Your account has a balance of {0} USD. This will be applied to your campaign" + +#~ msgid "Your account has a balance of ${0} USD. This will be applied to your campaign" +#~ msgstr "Your account has a balance of ${0} USD. This will be applied to your campaign" + msgid "Your account’s new private key will be:" msgstr "Your account’s new private key will be:" @@ -1561,6 +1600,9 @@ msgstr "Your campaign has been created and is now being reviewed by our ads team msgid "Your campaign has been updated! <0/>If you added new ads, we’ll be in contact as soon as they are approved and activated. <1/>Thank you for using Brave Ads!" msgstr "Your campaign has been updated! <0/>If you added new ads, we’ll be in contact as soon as they are approved and activated. <1/>Thank you for using Brave Ads!" +msgid "Your current account balance" +msgstr "Your current account balance" + msgid "Your trial campaign will be reviewed by an Account Manager. Add any notes or questions for them here." msgstr "Your trial campaign will be reviewed by an Account Manager. Add any notes or questions for them here." diff --git a/src/locales/es.po b/src/locales/es.po index 6a6fe20b0..57c516777 100644 --- a/src/locales/es.po +++ b/src/locales/es.po @@ -63,6 +63,12 @@ msgstr "Acerca de Brave Ads" msgid "Account" msgstr "Cuenta" +msgid "Account Balance" +msgstr "" + +msgid "Account Balance will be applied to this campaign" +msgstr "" + msgid "Account Settings" msgstr "Configuración de la cuenta" @@ -159,6 +165,15 @@ msgstr "Un anuncio de mi navegador Brave" msgid "An error has occurred while processing your request." msgstr "Se ha producido un error al procesar su solicitud." +msgid "and no additional charges will be incurred." +msgstr "" + +msgid "and you will be charged {amountToCharge} USD." +msgstr "" + +#~ msgid "and you will not be charged." +#~ msgstr "" + msgid "Android" msgstr "Android" @@ -387,6 +402,12 @@ msgstr "Al clonar una campaña, se tomarán todas las propiedades, incluidos los msgid "Close" msgstr "Cerrar" +msgid "Close Campaign" +msgstr "" + +msgid "Closing a campaign will immediately stop it from running. Once it has stopped running, any remaining funds will be transferred back to your account in 24-48 hours." +msgstr "" + msgid "Complete" msgstr "Completar" @@ -573,6 +594,9 @@ msgstr "¿No ve el correo electrónico?" #~ msgid "Don’t see the email? Check your spam folder or <0>try again." #~ msgstr "Don’t see the email? Check your spam folder or <0>try again." +#~ msgid "Don't show this message again" +#~ msgstr "" + msgid "Download Report" msgstr "Descargar informe" @@ -951,6 +975,9 @@ msgstr "No" msgid "No {billingType} pricing available for {label}, contact selfserve@brave.com for help" msgstr "No hay precios de {billingType} disponibles para {label}, contacte a selfserve@brave.com para obtener ayuda" +#~ msgid "no additional charge will be applied." +#~ msgstr "" + msgid "No conversion URL setup" msgstr "No hay configuración de URL de conversión" @@ -1329,6 +1356,9 @@ msgstr "El <0>Basic Attention Token (BAT) es el token criptográfico nativo msgid "The campaign will likely stop running before the end date provided due to budget constraints." msgstr "Es probable que la campaña deje de publicarse antes de la fecha de finalización proporcionada debido a restricciones presupuestarias." +#~ msgid "The current balance for your account that you can attribute to a new Campaign." +#~ msgstr "" + msgid "The current value for this metric may be an underestimate." msgstr "El valor actual de esta métrica puede ser una subestimación." @@ -1533,6 +1563,9 @@ msgstr "Correo electrónico de trabajo" msgid "Yes" msgstr "Sí" +msgid "You are about to close this campaign." +msgstr "" + msgid "You are attempting to create a new keypair, this will replace any of your account’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." msgstr "Está intentando crear un nuevo par de claves, que reemplazará cualquiera de los pares de claves existentes de su cuenta. Tenga en cuenta que los pares de claves anteriores no se pueden recuperar ni utilizar una vez reemplazados." @@ -1551,6 +1584,12 @@ msgstr "Es posible que tenga acceso a varias cuentas. Cambie entre ellas aquí." msgid "You will soon receive an email with the next steps of registration. While you wait, we recommend you check out our help center to get helpful information for getting started with Brave Ads." msgstr "Pronto recibirá un correo electrónico con los próximos pasos del registro. Mientras espera, le recomendamos que consulte nuestro centro de ayuda para obtener información útil para comenzar con Brave Ads." +msgid "Your account has a balance of {0} USD. This will be applied to your campaign" +msgstr "" + +#~ msgid "Your account has a balance of ${0} USD. This will be applied to your campaign" +#~ msgstr "" + msgid "Your account’s new private key will be:" msgstr "La nueva clave privada de su cuenta será:" @@ -1566,6 +1605,9 @@ msgstr "Su campaña ha sido creada y ahora está siendo revisada por nuestro equ msgid "Your campaign has been updated! <0/>If you added new ads, we’ll be in contact as soon as they are approved and activated. <1/>Thank you for using Brave Ads!" msgstr "¡Su campaña ha sido actualizada! <0/>Si agregó nuevos anuncios, nos pondremos en contacto con usted tan pronto como se aprueben y activen. <1/>¡Gracias por usar Brave Ads!" +msgid "Your current account balance" +msgstr "" + msgid "Your trial campaign will be reviewed by an Account Manager. Add any notes or questions for them here." msgstr "Su campaña de prueba será revisada por un Gerente de Cuenta. Agregue cualquier nota o pregunta para ellos aquí." diff --git a/src/locales/pt.po b/src/locales/pt.po index 4338a44b3..bcb594bdd 100644 --- a/src/locales/pt.po +++ b/src/locales/pt.po @@ -63,6 +63,12 @@ msgstr "Sobre os Anúncios Brave" msgid "Account" msgstr "Conta" +msgid "Account Balance" +msgstr "" + +msgid "Account Balance will be applied to this campaign" +msgstr "" + msgid "Account Settings" msgstr "Configurações da Conta" @@ -159,6 +165,15 @@ msgstr "Um anúncio do meu navegador Brave" msgid "An error has occurred while processing your request." msgstr "Ocorreu um erro ao processar sua solicitação." +msgid "and no additional charges will be incurred." +msgstr "" + +msgid "and you will be charged {amountToCharge} USD." +msgstr "" + +#~ msgid "and you will not be charged." +#~ msgstr "" + msgid "Android" msgstr "Android" @@ -387,6 +402,12 @@ msgstr "Clonar uma campanha vai copiar todas as configurações, incluindo conju msgid "Close" msgstr "Fechar" +msgid "Close Campaign" +msgstr "" + +msgid "Closing a campaign will immediately stop it from running. Once it has stopped running, any remaining funds will be transferred back to your account in 24-48 hours." +msgstr "" + msgid "Complete" msgstr "Concluir" @@ -573,6 +594,9 @@ msgstr "" #~ msgid "Don’t see the email? Check your spam folder or <0>try again." #~ msgstr "Não recebeu o e-mail? Verifique sua pasta de spam ou <0>tente novamente." +#~ msgid "Don't show this message again" +#~ msgstr "" + msgid "Download Report" msgstr "Baixar Relatório" @@ -951,6 +975,9 @@ msgstr "Não" msgid "No {billingType} pricing available for {label}, contact selfserve@brave.com for help" msgstr "Não há preços de {billingType} disponíveis para {label}, entre em contato com selfserve@brave.com para obter ajuda" +#~ msgid "no additional charge will be applied." +#~ msgstr "" + msgid "No conversion URL setup" msgstr "Nenhuma configuração de URL de conversão" @@ -1329,6 +1356,9 @@ msgstr "O <0>Basic Attention Token (BAT) é a criptomoeda nativa do Brave. U msgid "The campaign will likely stop running before the end date provided due to budget constraints." msgstr "" +#~ msgid "The current balance for your account that you can attribute to a new Campaign." +#~ msgstr "" + msgid "The current value for this metric may be an underestimate." msgstr "O valor atual para esta métrica pode ser uma subestimativa." @@ -1533,6 +1563,9 @@ msgstr "E-mail corporativo" msgid "Yes" msgstr "Sim" +msgid "You are about to close this campaign." +msgstr "" + msgid "You are attempting to create a new keypair, this will replace any of your account’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." msgstr "Você está tentando criar um novo par de chaves, isso substituirá qualquer um dos pares de chaves existentes na sua conta. Observe que os pares de chaves anteriores não podem ser recuperados ou usados uma vez que forem substituídos." @@ -1551,6 +1584,12 @@ msgstr "Você pode ter acesso a várias contas. Alterne entre elas aqui." msgid "You will soon receive an email with the next steps of registration. While you wait, we recommend you check out our help center to get helpful information for getting started with Brave Ads." msgstr "Em breve, você receberá um e-mail com os próximos passos do cadastro. Enquanto isso, sugerimos que você dê uma olhada em nossa Central de Ajuda para obter informações úteis sobre como começar a usar os Anúncios Brave." +msgid "Your account has a balance of {0} USD. This will be applied to your campaign" +msgstr "" + +#~ msgid "Your account has a balance of ${0} USD. This will be applied to your campaign" +#~ msgstr "" + msgid "Your account’s new private key will be:" msgstr "A nova chave privada da sua conta será:" @@ -1563,6 +1602,9 @@ msgstr "Sua campanha foi criada e está sendo revisada por nossa equipe de anún msgid "Your campaign has been updated! <0/>If you added new ads, we’ll be in contact as soon as they are approved and activated. <1/>Thank you for using Brave Ads!" msgstr "Sua campanha foi atualizada! <0/>Se você adicionou novos anúncios, entraremos em contato assim que eles forem aprovados e ativados. <1/>Obrigado por usar os Anúncios Brave!" +msgid "Your current account balance" +msgstr "" + msgid "Your trial campaign will be reviewed by an Account Manager. Add any notes or questions for them here." msgstr "Sua campanha de teste será revisada por um Gerente de Conta. Adicione aqui quaisquer observações ou perguntas para eles." diff --git a/src/locales/test.po b/src/locales/test.po index 31df4db3d..dd8ee33ad 100644 --- a/src/locales/test.po +++ b/src/locales/test.po @@ -58,6 +58,12 @@ msgstr "" msgid "Account" msgstr "" +msgid "Account Balance" +msgstr "" + +msgid "Account Balance will be applied to this campaign" +msgstr "" + msgid "Account Settings" msgstr "" @@ -154,6 +160,15 @@ msgstr "" msgid "An error has occurred while processing your request." msgstr "" +msgid "and no additional charges will be incurred." +msgstr "" + +msgid "and you will be charged {amountToCharge} USD." +msgstr "" + +#~ msgid "and you will not be charged." +#~ msgstr "" + msgid "Android" msgstr "" @@ -382,6 +397,12 @@ msgstr "" msgid "Close" msgstr "" +msgid "Close Campaign" +msgstr "" + +msgid "Closing a campaign will immediately stop it from running. Once it has stopped running, any remaining funds will be transferred back to your account in 24-48 hours." +msgstr "" + msgid "Complete" msgstr "" @@ -568,6 +589,9 @@ msgstr "" #~ msgid "Don’t see the email? Check your spam folder or <0>try again." #~ msgstr "" +#~ msgid "Don't show this message again" +#~ msgstr "" + msgid "Download Report" msgstr "" @@ -946,6 +970,9 @@ msgstr "" msgid "No {billingType} pricing available for {label}, contact selfserve@brave.com for help" msgstr "" +#~ msgid "no additional charge will be applied." +#~ msgstr "" + msgid "No conversion URL setup" msgstr "" @@ -1324,6 +1351,9 @@ msgstr "" msgid "The campaign will likely stop running before the end date provided due to budget constraints." msgstr "" +#~ msgid "The current balance for your account that you can attribute to a new Campaign." +#~ msgstr "" + msgid "The current value for this metric may be an underestimate." msgstr "" @@ -1528,6 +1558,9 @@ msgstr "" msgid "Yes" msgstr "" +msgid "You are about to close this campaign." +msgstr "" + msgid "You are attempting to create a new keypair, this will replace any of your account’s existing keypairs. Please note, previous keypairs cannot be retrieved or used once replaced." msgstr "" @@ -1546,6 +1579,12 @@ msgstr "" msgid "You will soon receive an email with the next steps of registration. While you wait, we recommend you check out our help center to get helpful information for getting started with Brave Ads." msgstr "" +msgid "Your account has a balance of {0} USD. This will be applied to your campaign" +msgstr "" + +#~ msgid "Your account has a balance of ${0} USD. This will be applied to your campaign" +#~ msgstr "" + msgid "Your account’s new private key will be:" msgstr "" @@ -1561,6 +1600,9 @@ msgstr "" msgid "Your campaign has been updated! <0/>If you added new ads, we’ll be in contact as soon as they are approved and activated. <1/>Thank you for using Brave Ads!" msgstr "" +msgid "Your current account balance" +msgstr "" + msgid "Your trial campaign will be reviewed by an Account Manager. Add any notes or questions for them here." msgstr "" diff --git a/src/user/campaignList/CampaignList.tsx b/src/user/campaignList/CampaignList.tsx index a9b4f96e1..becd426b9 100644 --- a/src/user/campaignList/CampaignList.tsx +++ b/src/user/campaignList/CampaignList.tsx @@ -25,6 +25,7 @@ import { CampaignSummaryFragment, } from "@/graphql-client/graphql"; import { useQuery } from "@apollo/client"; +import { CloseCampaignModal } from "@/components/Campaigns/CloseCampaignModal"; interface Props { advertiser?: AdvertiserCampaignsFragment | null; @@ -220,6 +221,14 @@ export function CampaignList({ advertiser }: Props) { {advertiser?.selfServiceManageCampaign && ( )} + {advertiser?.selfServiceManageCampaign && + !advertiser?.selfServiceSetPrice && ( + + )} ); }; diff --git a/src/user/hooks/useGetAdvertiserAccountBalance.tsx b/src/user/hooks/useGetAdvertiserAccountBalance.tsx new file mode 100644 index 000000000..34dfd46a9 --- /dev/null +++ b/src/user/hooks/useGetAdvertiserAccountBalance.tsx @@ -0,0 +1,25 @@ +import { graphql } from "@/graphql-client/index"; +import { useQuery } from "@apollo/client"; +import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; + +const CurrentAdvertiserBalance = graphql(` + query CurrentAdvertiserBalance($id: String!) { + advertiser(id: $id) { + id + accountBalance + } + } +`); + +export function useGetAdvertiserAccountBalance() { + const { advertiser } = useAdvertiser(); + + const { loading, data } = useQuery(CurrentAdvertiserBalance, { + variables: { id: advertiser.id }, + skip: + advertiser.selfServiceSetPrice || !advertiser.selfServiceManageCampaign, + fetchPolicy: "cache-and-network", + }); + + return { loading, data }; +} diff --git a/src/user/settings/AccountBalance.tsx b/src/user/settings/AccountBalance.tsx new file mode 100644 index 000000000..fcce84f6b --- /dev/null +++ b/src/user/settings/AccountBalance.tsx @@ -0,0 +1,29 @@ +import { useAdvertiser } from "@/auth/hooks/queries/useAdvertiser"; +import { Trans } from "@lingui/macro"; +import { Skeleton, Typography } from "@mui/material"; +import { CardContainer } from "@/components/Card/CardContainer"; +import { useGetAdvertiserAccountBalance } from "@/user/hooks/useGetAdvertiserAccountBalance"; +import { renderMonetaryAmount } from "@/components/Datagrid/renderers"; + +export function AccountBalance() { + const { advertiser } = useAdvertiser(); + const { loading, data } = useGetAdvertiserAccountBalance(); + + if (!advertiser.selfServiceManageCampaign || advertiser.selfServiceSetPrice) { + return null; + } + + return ( + Account Balance}> + + Your current account balance + + {loading && } + {!loading && data && data.advertiser && ( + + {renderMonetaryAmount(data.advertiser.accountBalance, "USD")} + + )} + + ); +} diff --git a/src/user/settings/Settings.tsx b/src/user/settings/Settings.tsx index 121b4cfcb..d646dd758 100644 --- a/src/user/settings/Settings.tsx +++ b/src/user/settings/Settings.tsx @@ -19,6 +19,7 @@ import { NewKeyPairModal } from "@/user/settings/NewKeyPairModal"; import MiniSideBar from "@/components/Drawer/MiniSideBar"; import { useTrackWithMatomo } from "@/hooks/useTrackWithMatomo"; import { Trans } from "@lingui/macro"; +import { AccountBalance } from "@/user/settings/AccountBalance"; const Settings = () => { const { trackMatomoEvent } = useTrackWithMatomo({ @@ -73,6 +74,8 @@ const Settings = () => { + + 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 47bcba01f..ffedc5d8e 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,19 +1,42 @@ -import { Stack, Typography } from "@mui/material"; +import { Alert, AlertTitle, Stack, Typography } from "@mui/material"; import { FormikRadioControl, useIsEdit } from "@/form/FormikHelpers"; 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"; -import { Trans } from "@lingui/macro"; +import { t, Trans } from "@lingui/macro"; +import BigNumber from "bignumber.js"; +import { useField } from "formik"; +import { useCallback } from "react"; +import { useGetAdvertiserAccountBalance } from "@/user/hooks/useGetAdvertiserAccountBalance"; +import { formatUsd } from "@/user/library/format"; export function PaymentMethodField() { const { isDraft } = useIsEdit(); const { advertiser } = useAdvertiser(); + const [, meta] = useField("budget"); + const { loading, data } = useGetAdvertiserAccountBalance(); if (advertiser.selfServiceSetPrice) { return null; } + const balance = BigNumber(data?.advertiser?.accountBalance ?? "0"); + const amountOwed = useCallback( + (balance: BigNumber) => { + const budget = BigNumber(meta.value).minus(balance); + if (budget.lte(0)) return BigNumber(0); + return budget; + }, + [meta.value], + ); + + const chargeMessage = (b: BigNumber) => { + if (b.lte(0)) return t`and no additional charges will be incurred.`; + const amountToCharge = formatUsd(b); + return t`and you will be charged ${amountToCharge} USD.`; + }; + return ( Payment}> @@ -22,7 +45,7 @@ export function PaymentMethodField() { + {balance.gt(0) && isDraft && ( + + + Account Balance will be applied to this campaign + + + Your account has a balance of {formatUsd(balance)} USD. This will be + applied to your campaign + + {", "} + {chargeMessage(amountOwed(balance))} + + )} ); }