From 3b2fffc04374366f9891a353c21cf6e73052741a Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Wed, 4 Feb 2026 16:17:37 +0530 Subject: [PATCH 1/4] feat: added script for client generation --- bun.lock | 91 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 + script/api-client.ts | 7 ++++ 3 files changed, 100 insertions(+) create mode 100644 script/api-client.ts diff --git a/bun.lock b/bun.lock index 0d041fe0..541ea8e4 100644 --- a/bun.lock +++ b/bun.lock @@ -6,6 +6,7 @@ "name": "sentry", "devDependencies": { "@biomejs/biome": "2.3.8", + "@hey-api/openapi-ts": "0.91.1", "@sentry/bun": "10.38.0", "@sentry/esbuild-plugin": "^2.23.0", "@sentry/node": "10.38.0", @@ -143,6 +144,16 @@ "@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.12", "", { "os": "win32", "cpu": "x64" }, "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA=="], + "@hey-api/codegen-core": ["@hey-api/codegen-core@0.6.1", "", { "dependencies": { "@hey-api/types": "0.1.3", "ansi-colors": "4.1.3", "c12": "3.3.3", "color-support": "1.1.3" }, "peerDependencies": { "typescript": ">=5.5.3" } }, "sha512-khTIpxhKEAqmRmeLUnAFJQs4Sbg9RPokovJk9rRcC8B5MWH1j3/BRSqfpAIiJUBDU1+nbVg2RVCV+eQ174cdvw=="], + + "@hey-api/json-schema-ref-parser": ["@hey-api/json-schema-ref-parser@1.2.3", "", { "dependencies": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.1", "lodash": "^4.17.21" } }, "sha512-gRbyyTjzpFVNmbD+Upn3w4dWV+bCXGJbff3A7leDO/tfNxSz1xIb6Ad/5UKtvEW9kDt/2Uyc3XkFZ6rpafvbfQ=="], + + "@hey-api/openapi-ts": ["@hey-api/openapi-ts@0.91.1", "", { "dependencies": { "@hey-api/codegen-core": "0.6.1", "@hey-api/json-schema-ref-parser": "1.2.3", "@hey-api/shared": "0.1.1", "@hey-api/types": "0.1.3", "ansi-colors": "4.1.3", "color-support": "1.1.3", "commander": "14.0.2" }, "peerDependencies": { "typescript": ">=5.5.3" }, "bin": { "openapi-ts": "bin/run.js" } }, "sha512-d16WR35UtthK/ihAIwJaKxrj/zvb5LbYwtVJCyZFFMin2qzDU8Y3Lpk78ensAykrLoaDLzpd0iIyt9JCP5Qmww=="], + + "@hey-api/shared": ["@hey-api/shared@0.1.1", "", { "dependencies": { "@hey-api/codegen-core": "0.6.1", "@hey-api/json-schema-ref-parser": "1.2.3", "@hey-api/types": "0.1.3", "ansi-colors": "4.1.3", "cross-spawn": "7.0.6", "open": "11.0.0", "semver": "7.7.3" }, "peerDependencies": { "typescript": ">=5.5.3" } }, "sha512-/irgNGXw9TL5aKB3S7jCLgh07vgDFkYjSjz7vEWO9xEe6MUhx76zSFzkPspk2UrLghYayvmaKPf1ky4XjNI9ZQ=="], + + "@hey-api/types": ["@hey-api/types@0.1.3", "", { "peerDependencies": { "typescript": ">=5.5.3" } }, "sha512-mZaiPOWH761yD4GjDQvtjS2ZYLu5o5pI1TVSvV/u7cmbybv51/FVtinFBeaE1kFQCKZ8OQpn2ezjLBJrKsGATw=="], + "@isaacs/balanced-match": ["@isaacs/balanced-match@4.0.1", "", {}, "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ=="], "@isaacs/brace-expansion": ["@isaacs/brace-expansion@5.0.0", "", { "dependencies": { "@isaacs/balanced-match": "^4.0.1" } }, "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA=="], @@ -157,6 +168,8 @@ "@jridgewell/trace-mapping": ["@jridgewell/trace-mapping@0.3.31", "", { "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw=="], + "@jsdevtools/ono": ["@jsdevtools/ono@7.1.3", "", {}, "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg=="], + "@opentelemetry/api": ["@opentelemetry/api@1.9.0", "", {}, "sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg=="], "@opentelemetry/api-logs": ["@opentelemetry/api-logs@0.211.0", "", { "dependencies": { "@opentelemetry/api": "^1.3.0" } }, "sha512-swFdZq8MCdmdR22jTVGQDhwqDzcI4M10nhjXkLr1EsIzXgZBqm4ZlmmcWsg3TSNf+3mzgOiqveXmBLZuDi2Lgg=="], @@ -265,6 +278,8 @@ "@types/connect": ["@types/connect@3.4.38", "", { "dependencies": { "@types/node": "*" } }, "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug=="], + "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], + "@types/mysql": ["@types/mysql@2.15.27", "", { "dependencies": { "@types/node": "*" } }, "sha512-YfWiV16IY0OeBfBCk8+hXKmdTKrKlwKN1MNKAPBu5JYxLwBEZl7QzeEpGnlZb3VMGJrrGmB84gXiH+ofs/TezA=="], "@types/node": ["@types/node@22.19.7", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-MciR4AKGHWl7xwxkBa6xUGxQJ4VBOmPTF7sL+iGzuahOFaO0jHCsuEfS80pan1ef4gWId1oWOweIhrDEYLuaOw=="], @@ -285,8 +300,12 @@ "agent-base": ["agent-base@6.0.2", "", { "dependencies": { "debug": "4" } }, "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ=="], + "ansi-colors": ["ansi-colors@4.1.3", "", {}, "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw=="], + "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], + "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], "baseline-browser-mapping": ["baseline-browser-mapping@2.9.18", "", { "bin": { "baseline-browser-mapping": "dist/cli.js" } }, "sha512-e23vBV1ZLfjb9apvfPk4rHVu2ry6RIr2Wfs+O324okSidrX7pTAnEJPCh/O5BtRlr7QtZI7ktOP3vsqr7Z5XoA=="], @@ -301,6 +320,10 @@ "bun-types": ["bun-types@1.3.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-OlFwHcnNV99r//9v5IIOgQ9Uk37gZqrNMCcqEaExdkVq3Avwqok1bJFmvGMCkCE0FqzdY8VMOZpfpR3lwI+CsQ=="], + "bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="], + + "c12": ["c12@3.3.3", "", { "dependencies": { "chokidar": "^5.0.0", "confbox": "^0.2.2", "defu": "^6.1.4", "dotenv": "^17.2.3", "exsolve": "^1.0.8", "giget": "^2.0.0", "jiti": "^2.6.1", "ohash": "^2.0.11", "pathe": "^2.0.3", "perfect-debounce": "^2.0.0", "pkg-types": "^2.3.0", "rc9": "^2.1.2" }, "peerDependencies": { "magicast": "*" }, "optionalPeers": ["magicast"] }, "sha512-750hTRvgBy5kcMNPdh95Qo+XUBeGo8C7nsKSmedDmaQI+E0r82DwHeM6vBewDe4rGFbnxoa4V9pw+sPh5+Iz8Q=="], + "caniuse-lite": ["caniuse-lite@1.0.30001766", "", {}, "sha512-4C0lfJ0/YPjJQHagaE9x2Elb69CIqEPZeG0anQt9SIvIoOH4a4uaRl73IavyO+0qZh6MDLH//DrXThEYKHkmYA=="], "chalk": ["chalk@5.6.2", "", {}, "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA=="], @@ -311,14 +334,32 @@ "cjs-module-lexer": ["cjs-module-lexer@2.2.0", "", {}, "sha512-4bHTS2YuzUvtoLjdy+98ykbNB5jS0+07EvFNXerqZQJ89F7DI6ET7OQo/HJuW6K0aVsKA9hj9/RVb2kQVOrPDQ=="], + "color-support": ["color-support@1.1.3", "", { "bin": { "color-support": "bin.js" } }, "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="], + "commander": ["commander@14.0.2", "", {}, "sha512-TywoWNNRbhoD0BXs1P3ZEScW8W5iKrnbithIl0YH+uCmBd0QpPOA8yc82DS3BIE5Ma6FnBVUsJ7wVUDz4dvOWQ=="], + "confbox": ["confbox@0.2.2", "", {}, "sha512-1NB+BKqhtNipMsov4xI/NnhCKp9XG9NamYp5PVm9klAT0fsrNPjaFICsCFhNhwZJKNh7zB/3q8qXz0E9oaMNtQ=="], + + "consola": ["consola@3.4.2", "", {}, "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA=="], + "convert-source-map": ["convert-source-map@2.0.0", "", {}, "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="], + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], "deepmerge": ["deepmerge@4.3.1", "", {}, "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A=="], + "default-browser": ["default-browser@5.5.0", "", { "dependencies": { "bundle-name": "^4.1.0", "default-browser-id": "^5.0.0" } }, "sha512-H9LMLr5zwIbSxrmvikGuI/5KGhZ8E2zH3stkMgM5LpOWDutGM2JZaj460Udnf1a+946zc7YBgrqEWwbk7zHvGw=="], + + "default-browser-id": ["default-browser-id@5.0.1", "", {}, "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q=="], + + "define-lazy-prop": ["define-lazy-prop@3.0.0", "", {}, "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg=="], + + "defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="], + + "destr": ["destr@2.0.5", "", {}, "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA=="], + "dotenv": ["dotenv@16.6.1", "", {}, "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow=="], "electron-to-chromium": ["electron-to-chromium@1.5.278", "", {}, "sha512-dQ0tM1svDRQOwxnXxm+twlGTjr9Upvt8UFWAgmLsxEzFQxhbti4VwxmMjsDxVC51Zo84swW7FVCXEV+VAkhuPw=="], @@ -327,6 +368,8 @@ "escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="], + "exsolve": ["exsolve@1.0.8", "", {}, "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA=="], + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], @@ -341,6 +384,8 @@ "gensync": ["gensync@1.0.0-beta.2", "", {}, "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="], + "giget": ["giget@2.0.0", "", { "dependencies": { "citty": "^0.1.6", "consola": "^3.4.0", "defu": "^6.1.4", "node-fetch-native": "^1.6.6", "nypm": "^0.6.0", "pathe": "^2.0.3" }, "bin": { "giget": "dist/cli.mjs" } }, "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA=="], + "glob": ["glob@13.0.0", "", { "dependencies": { "minimatch": "^10.1.1", "minipass": "^7.1.2", "path-scurry": "^2.0.0" } }, "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA=="], "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], @@ -351,16 +396,28 @@ "is-binary-path": ["is-binary-path@2.1.0", "", { "dependencies": { "binary-extensions": "^2.0.0" } }, "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw=="], + "is-docker": ["is-docker@3.0.0", "", { "bin": { "is-docker": "cli.js" } }, "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ=="], + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + "is-in-ssh": ["is-in-ssh@1.0.0", "", {}, "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw=="], + + "is-inside-container": ["is-inside-container@1.0.0", "", { "dependencies": { "is-docker": "^3.0.0" }, "bin": { "is-inside-container": "cli.js" } }, "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA=="], + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + "is-wsl": ["is-wsl@3.1.0", "", { "dependencies": { "is-inside-container": "^1.0.0" } }, "sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw=="], + "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + "js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="], + "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], "json5": ["json5@2.2.3", "", { "bin": { "json5": "lib/cli.js" } }, "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="], @@ -371,6 +428,8 @@ "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], + "lodash": ["lodash@4.17.23", "", {}, "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w=="], + "lru-cache": ["lru-cache@11.2.4", "", {}, "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg=="], "magic-string": ["magic-string@0.30.8", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.4.15" } }, "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ=="], @@ -385,22 +444,32 @@ "node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], + "node-fetch-native": ["node-fetch-native@1.6.7", "", {}, "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q=="], + "node-releases": ["node-releases@2.0.27", "", {}, "sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA=="], "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], "nypm": ["nypm@0.6.4", "", { "dependencies": { "citty": "^0.2.0", "pathe": "^2.0.3", "tinyexec": "^1.0.2" }, "bin": { "nypm": "dist/cli.mjs" } }, "sha512-1TvCKjZyyklN+JJj2TS3P4uSQEInrM/HkkuSXsEzm1ApPgBffOn8gFguNnZf07r/1X6vlryfIqMUkJKQMzlZiw=="], + "ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="], + + "open": ["open@11.0.0", "", { "dependencies": { "default-browser": "^5.4.0", "define-lazy-prop": "^3.0.0", "is-in-ssh": "^1.0.0", "is-inside-container": "^1.0.0", "powershell-utils": "^0.1.0", "wsl-utils": "^0.3.0" } }, "sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw=="], + "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], "p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + "path-scurry": ["path-scurry@2.0.1", "", { "dependencies": { "lru-cache": "^11.0.0", "minipass": "^7.1.2" } }, "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA=="], "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], + "perfect-debounce": ["perfect-debounce@2.1.0", "", {}, "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g=="], + "pg-int8": ["pg-int8@1.0.1", "", {}, "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw=="], "pg-protocol": ["pg-protocol@1.11.0", "", {}, "sha512-pfsxk2M9M3BuGgDOfuy37VNRRX3jmKgMjcvAcWqNDpZSf4cUmv8HSOl5ViRQFsfARFn0KuUQTgLxVMbNq5NW3g=="], @@ -411,6 +480,8 @@ "picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], + "pkg-types": ["pkg-types@2.3.0", "", { "dependencies": { "confbox": "^0.2.2", "exsolve": "^1.0.7", "pathe": "^2.0.3" } }, "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig=="], + "postgres-array": ["postgres-array@2.0.0", "", {}, "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA=="], "postgres-bytea": ["postgres-bytea@1.0.1", "", {}, "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ=="], @@ -419,18 +490,28 @@ "postgres-interval": ["postgres-interval@1.2.0", "", { "dependencies": { "xtend": "^4.0.0" } }, "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ=="], + "powershell-utils": ["powershell-utils@0.1.0", "", {}, "sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A=="], + "progress": ["progress@2.0.3", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="], "proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="], "qrcode-terminal": ["qrcode-terminal@0.12.0", "", { "bin": { "qrcode-terminal": "./bin/qrcode-terminal.js" } }, "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ=="], + "rc9": ["rc9@2.1.2", "", { "dependencies": { "defu": "^6.1.4", "destr": "^2.0.3" } }, "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg=="], + "readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], "require-in-the-middle": ["require-in-the-middle@8.0.1", "", { "dependencies": { "debug": "^4.3.5", "module-details-from-path": "^1.0.3" } }, "sha512-QT7FVMXfWOYFbeRBF6nu+I6tr2Tf3u0q8RIEjNob/heKY/nh7drD/k7eeMFmSQgnTtCzLDcCu/XEnpW2wk4xCQ=="], + "run-applescript": ["run-applescript@7.1.0", "", {}, "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q=="], + "semver": ["semver@7.7.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q=="], + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="], "tinyexec": ["tinyexec@1.0.2", "", {}, "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg=="], @@ -467,6 +548,8 @@ "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + "wsl-utils": ["wsl-utils@0.3.1", "", { "dependencies": { "is-wsl": "^3.1.0", "powershell-utils": "^0.1.0" } }, "sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg=="], + "xtend": ["xtend@4.0.2", "", {}, "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="], "yallist": ["yallist@3.1.1", "", {}, "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="], @@ -489,6 +572,12 @@ "bun-types/@types/node": ["@types/node@20.19.30", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-WJtwWJu7UdlvzEAUm484QNg5eAoq5QR08KDNx7g45Usrs2NtOPiX8ugDqmKdXkyL03rBqU5dYNYVQetEpBHq2g=="], + "c12/chokidar": ["chokidar@5.0.0", "", { "dependencies": { "readdirp": "^5.0.0" } }, "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw=="], + + "c12/dotenv": ["dotenv@17.2.3", "", {}, "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w=="], + + "giget/citty": ["citty@0.1.6", "", { "dependencies": { "consola": "^3.2.3" } }, "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ=="], + "glob/minimatch": ["minimatch@10.1.1", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.0" } }, "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ=="], "readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], @@ -505,6 +594,8 @@ "@sentry/bundler-plugin-core/glob/path-scurry": ["path-scurry@1.11.1", "", { "dependencies": { "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" } }, "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA=="], + "c12/chokidar/readdirp": ["readdirp@5.0.0", "", {}, "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ=="], + "@sentry/bundler-plugin-core/glob/path-scurry/lru-cache": ["lru-cache@10.4.3", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="], "@sentry/bundler-plugin-core/glob/path-scurry/minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="], diff --git a/package.json b/package.json index c9549394..3b7818e9 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,13 @@ "test": "bun test", "test:unit": "bun test test/lib test/commands test/types", "test:e2e": "bun test test/e2e", + "generate:client": "bun run script/api-client.ts", "generate:skill": "bun run script/generate-skill.ts", "check:skill": "bun run script/check-skill.ts" }, "devDependencies": { "@biomejs/biome": "2.3.8", + "@hey-api/openapi-ts": "0.91.1", "@sentry/bun": "10.38.0", "@sentry/esbuild-plugin": "^2.23.0", "@sentry/node": "10.38.0", diff --git a/script/api-client.ts b/script/api-client.ts new file mode 100644 index 00000000..467485b9 --- /dev/null +++ b/script/api-client.ts @@ -0,0 +1,7 @@ +import { createClient } from "@hey-api/openapi-ts"; + +createClient({ + input: + "https://raw.githubusercontent.com/getsentry/sentry-api-schema/refs/heads/main/openapi-derefed.json", + output: "src/client", +}); From f2dcf7169b1cc789ab92bf355177cb383ba70ba1 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Wed, 4 Feb 2026 16:18:59 +0530 Subject: [PATCH 2/4] feat: initial client --- src/client/client.gen.ts | 16 + src/client/client/client.gen.ts | 288 + src/client/client/index.ts | 25 + src/client/client/types.gen.ts | 213 + src/client/client/utils.gen.ts | 316 + src/client/core/auth.gen.ts | 41 + src/client/core/bodySerializer.gen.ts | 84 + src/client/core/params.gen.ts | 169 + src/client/core/pathSerializer.gen.ts | 171 + src/client/core/queryKeySerializer.gen.ts | 117 + src/client/core/serverSentEvents.gen.ts | 243 + src/client/core/types.gen.ts | 104 + src/client/core/utils.gen.ts | 140 + src/client/index.ts | 1205 + src/client/sdk.gen.ts | 2784 ++ src/client/types.gen.ts | 32137 ++++++++++++++++++++ 16 files changed, 38053 insertions(+) create mode 100644 src/client/client.gen.ts create mode 100644 src/client/client/client.gen.ts create mode 100644 src/client/client/index.ts create mode 100644 src/client/client/types.gen.ts create mode 100644 src/client/client/utils.gen.ts create mode 100644 src/client/core/auth.gen.ts create mode 100644 src/client/core/bodySerializer.gen.ts create mode 100644 src/client/core/params.gen.ts create mode 100644 src/client/core/pathSerializer.gen.ts create mode 100644 src/client/core/queryKeySerializer.gen.ts create mode 100644 src/client/core/serverSentEvents.gen.ts create mode 100644 src/client/core/types.gen.ts create mode 100644 src/client/core/utils.gen.ts create mode 100644 src/client/index.ts create mode 100644 src/client/sdk.gen.ts create mode 100644 src/client/types.gen.ts diff --git a/src/client/client.gen.ts b/src/client/client.gen.ts new file mode 100644 index 00000000..cab3c701 --- /dev/null +++ b/src/client/client.gen.ts @@ -0,0 +1,16 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { type ClientOptions, type Config, createClient, createConfig } from './client'; +import type { ClientOptions as ClientOptions2 } from './types.gen'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = (override?: Config) => Config & T>; + +export const client = createClient(createConfig()); diff --git a/src/client/client/client.gen.ts b/src/client/client/client.gen.ts new file mode 100644 index 00000000..d2e55a14 --- /dev/null +++ b/src/client/client/client.gen.ts @@ -0,0 +1,288 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { createSseClient } from '../core/serverSentEvents.gen'; +import type { HttpMethod } from '../core/types.gen'; +import { getValidRequestBody } from '../core/utils.gen'; +import type { Client, Config, RequestOptions, ResolvedRequestOptions } from './types.gen'; +import { + buildUrl, + createConfig, + createInterceptors, + getParseAs, + mergeConfigs, + mergeHeaders, + setAuthParams, +} from './utils.gen'; + +type ReqInit = Omit & { + body?: any; + headers: ReturnType; +}; + +export const createClient = (config: Config = {}): Client => { + let _config = mergeConfigs(createConfig(), config); + + const getConfig = (): Config => ({ ..._config }); + + const setConfig = (config: Config): Config => { + _config = mergeConfigs(_config, config); + return getConfig(); + }; + + const interceptors = createInterceptors(); + + const beforeRequest = async (options: RequestOptions) => { + const opts = { + ..._config, + ...options, + fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, + headers: mergeHeaders(_config.headers, options.headers), + serializedBody: undefined, + }; + + if (opts.security) { + await setAuthParams({ + ...opts, + security: opts.security, + }); + } + + if (opts.requestValidator) { + await opts.requestValidator(opts); + } + + if (opts.body !== undefined && opts.bodySerializer) { + opts.serializedBody = opts.bodySerializer(opts.body); + } + + // remove Content-Type header if body is empty to avoid sending invalid requests + if (opts.body === undefined || opts.serializedBody === '') { + opts.headers.delete('Content-Type'); + } + + const url = buildUrl(opts); + + return { opts, url }; + }; + + const request: Client['request'] = async (options) => { + // @ts-expect-error + const { opts, url } = await beforeRequest(options); + const requestInit: ReqInit = { + redirect: 'follow', + ...opts, + body: getValidRequestBody(opts), + }; + + let request = new Request(url, requestInit); + + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } + } + + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = opts.fetch!; + let response: Response; + + try { + response = await _fetch(request); + } catch (error) { + // Handle fetch exceptions (AbortError, network errors, etc.) + let finalError = error; + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = (await fn(error, undefined as any, request, opts)) as unknown; + } + } + + finalError = finalError || ({} as unknown); + + if (opts.throwOnError) { + throw finalError; + } + + // Return error response + return opts.responseStyle === 'data' + ? undefined + : { + error: finalError, + request, + response: undefined as any, + }; + } + + for (const fn of interceptors.response.fns) { + if (fn) { + response = await fn(response, request, opts); + } + } + + const result = { + request, + response, + }; + + if (response.ok) { + const parseAs = + (opts.parseAs === 'auto' + ? getParseAs(response.headers.get('Content-Type')) + : opts.parseAs) ?? 'json'; + + if (response.status === 204 || response.headers.get('Content-Length') === '0') { + let emptyData: any; + switch (parseAs) { + case 'arrayBuffer': + case 'blob': + case 'text': + emptyData = await response[parseAs](); + break; + case 'formData': + emptyData = new FormData(); + break; + case 'stream': + emptyData = response.body; + break; + case 'json': + default: + emptyData = {}; + break; + } + return opts.responseStyle === 'data' + ? emptyData + : { + data: emptyData, + ...result, + }; + } + + let data: any; + switch (parseAs) { + case 'arrayBuffer': + case 'blob': + case 'formData': + case 'text': + data = await response[parseAs](); + break; + case 'json': { + // Some servers return 200 with no Content-Length and empty body. + // response.json() would throw; read as text and parse if non-empty. + const text = await response.text(); + data = text ? JSON.parse(text) : {}; + break; + } + case 'stream': + return opts.responseStyle === 'data' + ? response.body + : { + data: response.body, + ...result, + }; + } + + if (parseAs === 'json') { + if (opts.responseValidator) { + await opts.responseValidator(data); + } + + if (opts.responseTransformer) { + data = await opts.responseTransformer(data); + } + } + + return opts.responseStyle === 'data' + ? data + : { + data, + ...result, + }; + } + + const textError = await response.text(); + let jsonError: unknown; + + try { + jsonError = JSON.parse(textError); + } catch { + // noop + } + + const error = jsonError ?? textError; + let finalError = error; + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = (await fn(error, response, request, opts)) as string; + } + } + + finalError = finalError || ({} as string); + + if (opts.throwOnError) { + throw finalError; + } + + // TODO: we probably want to return error and improve types + return opts.responseStyle === 'data' + ? undefined + : { + error: finalError, + ...result, + }; + }; + + const makeMethodFn = (method: Uppercase) => (options: RequestOptions) => + request({ ...options, method }); + + const makeSseFn = (method: Uppercase) => async (options: RequestOptions) => { + const { opts, url } = await beforeRequest(options); + return createSseClient({ + ...opts, + body: opts.body as BodyInit | null | undefined, + headers: opts.headers as unknown as Record, + method, + onRequest: async (url, init) => { + let request = new Request(url, init); + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts); + } + } + return request; + }, + serializedBody: getValidRequestBody(opts) as BodyInit | null | undefined, + url, + }); + }; + + return { + buildUrl, + connect: makeMethodFn('CONNECT'), + delete: makeMethodFn('DELETE'), + get: makeMethodFn('GET'), + getConfig, + head: makeMethodFn('HEAD'), + interceptors, + options: makeMethodFn('OPTIONS'), + patch: makeMethodFn('PATCH'), + post: makeMethodFn('POST'), + put: makeMethodFn('PUT'), + request, + setConfig, + sse: { + connect: makeSseFn('CONNECT'), + delete: makeSseFn('DELETE'), + get: makeSseFn('GET'), + head: makeSseFn('HEAD'), + options: makeSseFn('OPTIONS'), + patch: makeSseFn('PATCH'), + post: makeSseFn('POST'), + put: makeSseFn('PUT'), + trace: makeSseFn('TRACE'), + }, + trace: makeMethodFn('TRACE'), + } as Client; +}; diff --git a/src/client/client/index.ts b/src/client/client/index.ts new file mode 100644 index 00000000..4602312a --- /dev/null +++ b/src/client/client/index.ts @@ -0,0 +1,25 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type { Auth } from "../core/auth.gen"; +export type { QuerySerializerOptions } from "../core/bodySerializer.gen"; +export { + formDataBodySerializer, + jsonBodySerializer, + urlSearchParamsBodySerializer, +} from "../core/bodySerializer.gen"; +export { buildClientParams } from "../core/params.gen"; +export { serializeQueryKeyValue } from "../core/queryKeySerializer.gen"; +export { createClient } from "./client.gen"; +export type { + Client, + ClientOptions, + Config, + CreateClientConfig, + Options, + RequestOptions, + RequestResult, + ResolvedRequestOptions, + ResponseStyle, + TDataShape, +} from "./types.gen"; +export { createConfig, mergeHeaders } from "./utils.gen"; diff --git a/src/client/client/types.gen.ts b/src/client/client/types.gen.ts new file mode 100644 index 00000000..cb6d0d54 --- /dev/null +++ b/src/client/client/types.gen.ts @@ -0,0 +1,213 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth } from '../core/auth.gen'; +import type { + ServerSentEventsOptions, + ServerSentEventsResult, +} from '../core/serverSentEvents.gen'; +import type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen'; +import type { Middleware } from './utils.gen'; + +export type ResponseStyle = 'data' | 'fields'; + +export interface Config + extends Omit, CoreConfig { + /** + * Base URL for all requests made by this client. + */ + baseUrl?: T['baseUrl']; + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch; + /** + * Please don't use the Fetch client for Next.js applications. The `next` + * options won't have any effect. + * + * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. + */ + next?: never; + /** + * Return the response data parsed in a specified format. By default, `auto` + * will infer the appropriate method from the `Content-Type` response header. + * You can override this behavior with any of the {@link Body} methods. + * Select `stream` if you don't want to parse response data at all. + * + * @default 'auto' + */ + parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text'; + /** + * Should we return only data or multiple fields (data, error, response, etc.)? + * + * @default 'fields' + */ + responseStyle?: ResponseStyle; + /** + * Throw an error instead of returning it in the response? + * + * @default false + */ + throwOnError?: T['throwOnError']; +} + +export interface RequestOptions< + TData = unknown, + TResponseStyle extends ResponseStyle = 'fields', + ThrowOnError extends boolean = boolean, + Url extends string = string, +> + extends + Config<{ + responseStyle: TResponseStyle; + throwOnError: ThrowOnError; + }>, + Pick< + ServerSentEventsOptions, + | 'onSseError' + | 'onSseEvent' + | 'sseDefaultRetryDelay' + | 'sseMaxRetryAttempts' + | 'sseMaxRetryDelay' + > { + /** + * Any body that you want to add to your request. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} + */ + body?: unknown; + path?: Record; + query?: Record; + /** + * Security mechanism(s) to use for the request. + */ + security?: ReadonlyArray; + url: Url; +} + +export interface ResolvedRequestOptions< + TResponseStyle extends ResponseStyle = 'fields', + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends RequestOptions { + serializedBody?: string; +} + +export type RequestResult< + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = boolean, + TResponseStyle extends ResponseStyle = 'fields', +> = ThrowOnError extends true + ? Promise< + TResponseStyle extends 'data' + ? TData extends Record + ? TData[keyof TData] + : TData + : { + data: TData extends Record ? TData[keyof TData] : TData; + request: Request; + response: Response; + } + > + : Promise< + TResponseStyle extends 'data' + ? (TData extends Record ? TData[keyof TData] : TData) | undefined + : ( + | { + data: TData extends Record ? TData[keyof TData] : TData; + error: undefined; + } + | { + data: undefined; + error: TError extends Record ? TError[keyof TError] : TError; + } + ) & { + request: Request; + response: Response; + } + >; + +export interface ClientOptions { + baseUrl?: string; + responseStyle?: ResponseStyle; + throwOnError?: boolean; +} + +type MethodFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'>, +) => RequestResult; + +type SseFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'>, +) => Promise>; + +type RequestFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = 'fields', +>( + options: Omit, 'method'> & + Pick>, 'method'>, +) => RequestResult; + +type BuildUrlFn = < + TData extends { + body?: unknown; + path?: Record; + query?: Record; + url: string; + }, +>( + options: TData & Options, +) => string; + +export type Client = CoreClient & { + interceptors: Middleware; +}; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T>; + +export interface TDataShape { + body?: unknown; + headers?: unknown; + path?: unknown; + query?: unknown; + url: string; +} + +type OmitKeys = Pick>; + +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, + TResponseStyle extends ResponseStyle = 'fields', +> = OmitKeys< + RequestOptions, + 'body' | 'path' | 'query' | 'url' +> & + ([TData] extends [never] ? unknown : Omit); diff --git a/src/client/client/utils.gen.ts b/src/client/client/utils.gen.ts new file mode 100644 index 00000000..b4bd2435 --- /dev/null +++ b/src/client/client/utils.gen.ts @@ -0,0 +1,316 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { getAuthToken } from '../core/auth.gen'; +import type { QuerySerializerOptions } from '../core/bodySerializer.gen'; +import { jsonBodySerializer } from '../core/bodySerializer.gen'; +import { + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from '../core/pathSerializer.gen'; +import { getUrl } from '../core/utils.gen'; +import type { Client, ClientOptions, Config, RequestOptions } from './types.gen'; + +export const createQuerySerializer = ({ + parameters = {}, + ...args +}: QuerySerializerOptions = {}) => { + const querySerializer = (queryParams: T) => { + const search: string[] = []; + if (queryParams && typeof queryParams === 'object') { + for (const name in queryParams) { + const value = queryParams[name]; + + if (value === undefined || value === null) { + continue; + } + + const options = parameters[name] || args; + + if (Array.isArray(value)) { + const serializedArray = serializeArrayParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: 'form', + value, + ...options.array, + }); + if (serializedArray) search.push(serializedArray); + } else if (typeof value === 'object') { + const serializedObject = serializeObjectParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: 'deepObject', + value: value as Record, + ...options.object, + }); + if (serializedObject) search.push(serializedObject); + } else { + const serializedPrimitive = serializePrimitiveParam({ + allowReserved: options.allowReserved, + name, + value: value as string, + }); + if (serializedPrimitive) search.push(serializedPrimitive); + } + } + } + return search.join('&'); + }; + return querySerializer; +}; + +/** + * Infers parseAs value from provided Content-Type header. + */ +export const getParseAs = (contentType: string | null): Exclude => { + if (!contentType) { + // If no Content-Type header is provided, the best we can do is return the raw response body, + // which is effectively the same as the 'stream' option. + return 'stream'; + } + + const cleanContent = contentType.split(';')[0]?.trim(); + + if (!cleanContent) { + return; + } + + if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) { + return 'json'; + } + + if (cleanContent === 'multipart/form-data') { + return 'formData'; + } + + if ( + ['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type)) + ) { + return 'blob'; + } + + if (cleanContent.startsWith('text/')) { + return 'text'; + } + + return; +}; + +const checkForExistence = ( + options: Pick & { + headers: Headers; + }, + name?: string, +): boolean => { + if (!name) { + return false; + } + if ( + options.headers.has(name) || + options.query?.[name] || + options.headers.get('Cookie')?.includes(`${name}=`) + ) { + return true; + } + return false; +}; + +export const setAuthParams = async ({ + security, + ...options +}: Pick, 'security'> & + Pick & { + headers: Headers; + }) => { + for (const auth of security) { + if (checkForExistence(options, auth.name)) { + continue; + } + + const token = await getAuthToken(auth, options.auth); + + if (!token) { + continue; + } + + const name = auth.name ?? 'Authorization'; + + switch (auth.in) { + case 'query': + if (!options.query) { + options.query = {}; + } + options.query[name] = token; + break; + case 'cookie': + options.headers.append('Cookie', `${name}=${token}`); + break; + case 'header': + default: + options.headers.set(name, token); + break; + } + } +}; + +export const buildUrl: Client['buildUrl'] = (options) => + getUrl({ + baseUrl: options.baseUrl as string, + path: options.path, + query: options.query, + querySerializer: + typeof options.querySerializer === 'function' + ? options.querySerializer + : createQuerySerializer(options.querySerializer), + url: options.url, + }); + +export const mergeConfigs = (a: Config, b: Config): Config => { + const config = { ...a, ...b }; + if (config.baseUrl?.endsWith('/')) { + config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1); + } + config.headers = mergeHeaders(a.headers, b.headers); + return config; +}; + +const headersEntries = (headers: Headers): Array<[string, string]> => { + const entries: Array<[string, string]> = []; + headers.forEach((value, key) => { + entries.push([key, value]); + }); + return entries; +}; + +export const mergeHeaders = ( + ...headers: Array['headers'] | undefined> +): Headers => { + const mergedHeaders = new Headers(); + for (const header of headers) { + if (!header) { + continue; + } + + const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header); + + for (const [key, value] of iterator) { + if (value === null) { + mergedHeaders.delete(key); + } else if (Array.isArray(value)) { + for (const v of value) { + mergedHeaders.append(key, v as string); + } + } else if (value !== undefined) { + // assume object headers are meant to be JSON stringified, i.e. their + // content value in OpenAPI specification is 'application/json' + mergedHeaders.set( + key, + typeof value === 'object' ? JSON.stringify(value) : (value as string), + ); + } + } + } + return mergedHeaders; +}; + +type ErrInterceptor = ( + error: Err, + response: Res, + request: Req, + options: Options, +) => Err | Promise; + +type ReqInterceptor = (request: Req, options: Options) => Req | Promise; + +type ResInterceptor = ( + response: Res, + request: Req, + options: Options, +) => Res | Promise; + +class Interceptors { + fns: Array = []; + + clear(): void { + this.fns = []; + } + + eject(id: number | Interceptor): void { + const index = this.getInterceptorIndex(id); + if (this.fns[index]) { + this.fns[index] = null; + } + } + + exists(id: number | Interceptor): boolean { + const index = this.getInterceptorIndex(id); + return Boolean(this.fns[index]); + } + + getInterceptorIndex(id: number | Interceptor): number { + if (typeof id === 'number') { + return this.fns[id] ? id : -1; + } + return this.fns.indexOf(id); + } + + update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false { + const index = this.getInterceptorIndex(id); + if (this.fns[index]) { + this.fns[index] = fn; + return id; + } + return false; + } + + use(fn: Interceptor): number { + this.fns.push(fn); + return this.fns.length - 1; + } +} + +export interface Middleware { + error: Interceptors>; + request: Interceptors>; + response: Interceptors>; +} + +export const createInterceptors = (): Middleware< + Req, + Res, + Err, + Options +> => ({ + error: new Interceptors>(), + request: new Interceptors>(), + response: new Interceptors>(), +}); + +const defaultQuerySerializer = createQuerySerializer({ + allowReserved: false, + array: { + explode: true, + style: 'form', + }, + object: { + explode: true, + style: 'deepObject', + }, +}); + +const defaultHeaders = { + 'Content-Type': 'application/json', +}; + +export const createConfig = ( + override: Config & T> = {}, +): Config & T> => ({ + ...jsonBodySerializer, + headers: defaultHeaders, + parseAs: 'auto', + querySerializer: defaultQuerySerializer, + ...override, +}); diff --git a/src/client/core/auth.gen.ts b/src/client/core/auth.gen.ts new file mode 100644 index 00000000..3ebf9947 --- /dev/null +++ b/src/client/core/auth.gen.ts @@ -0,0 +1,41 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type AuthToken = string | undefined; + +export interface Auth { + /** + * Which part of the request do we use to send the auth? + * + * @default 'header' + */ + in?: 'header' | 'query' | 'cookie'; + /** + * Header or query parameter name. + * + * @default 'Authorization' + */ + name?: string; + scheme?: 'basic' | 'bearer'; + type: 'apiKey' | 'http'; +} + +export const getAuthToken = async ( + auth: Auth, + callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, +): Promise => { + const token = typeof callback === 'function' ? await callback(auth) : callback; + + if (!token) { + return; + } + + if (auth.scheme === 'bearer') { + return `Bearer ${token}`; + } + + if (auth.scheme === 'basic') { + return `Basic ${btoa(token)}`; + } + + return token; +}; diff --git a/src/client/core/bodySerializer.gen.ts b/src/client/core/bodySerializer.gen.ts new file mode 100644 index 00000000..8ad92c9f --- /dev/null +++ b/src/client/core/bodySerializer.gen.ts @@ -0,0 +1,84 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen'; + +export type QuerySerializer = (query: Record) => string; + +export type BodySerializer = (body: any) => any; + +type QuerySerializerOptionsObject = { + allowReserved?: boolean; + array?: Partial>; + object?: Partial>; +}; + +export type QuerySerializerOptions = QuerySerializerOptionsObject & { + /** + * Per-parameter serialization overrides. When provided, these settings + * override the global array/object settings for specific parameter names. + */ + parameters?: Record; +}; + +const serializeFormDataPair = (data: FormData, key: string, value: unknown): void => { + if (typeof value === 'string' || value instanceof Blob) { + data.append(key, value); + } else if (value instanceof Date) { + data.append(key, value.toISOString()); + } else { + data.append(key, JSON.stringify(value)); + } +}; + +const serializeUrlSearchParamsPair = (data: URLSearchParams, key: string, value: unknown): void => { + if (typeof value === 'string') { + data.append(key, value); + } else { + data.append(key, JSON.stringify(value)); + } +}; + +export const formDataBodySerializer = { + bodySerializer: | Array>>( + body: T, + ): FormData => { + const data = new FormData(); + + Object.entries(body).forEach(([key, value]) => { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + value.forEach((v) => serializeFormDataPair(data, key, v)); + } else { + serializeFormDataPair(data, key, value); + } + }); + + return data; + }, +}; + +export const jsonBodySerializer = { + bodySerializer: (body: T): string => + JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)), +}; + +export const urlSearchParamsBodySerializer = { + bodySerializer: | Array>>(body: T): string => { + const data = new URLSearchParams(); + + Object.entries(body).forEach(([key, value]) => { + if (value === undefined || value === null) { + return; + } + if (Array.isArray(value)) { + value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)); + } else { + serializeUrlSearchParamsPair(data, key, value); + } + }); + + return data.toString(); + }, +}; diff --git a/src/client/core/params.gen.ts b/src/client/core/params.gen.ts new file mode 100644 index 00000000..6099cab1 --- /dev/null +++ b/src/client/core/params.gen.ts @@ -0,0 +1,169 @@ +// This file is auto-generated by @hey-api/openapi-ts + +type Slot = 'body' | 'headers' | 'path' | 'query'; + +export type Field = + | { + in: Exclude; + /** + * Field name. This is the name we want the user to see and use. + */ + key: string; + /** + * Field mapped name. This is the name we want to use in the request. + * If omitted, we use the same value as `key`. + */ + map?: string; + } + | { + in: Extract; + /** + * Key isn't required for bodies. + */ + key?: string; + map?: string; + } + | { + /** + * Field name. This is the name we want the user to see and use. + */ + key: string; + /** + * Field mapped name. This is the name we want to use in the request. + * If `in` is omitted, `map` aliases `key` to the transport layer. + */ + map: Slot; + }; + +export interface Fields { + allowExtra?: Partial>; + args?: ReadonlyArray; +} + +export type FieldsConfig = ReadonlyArray; + +const extraPrefixesMap: Record = { + $body_: 'body', + $headers_: 'headers', + $path_: 'path', + $query_: 'query', +}; +const extraPrefixes = Object.entries(extraPrefixesMap); + +type KeyMap = Map< + string, + | { + in: Slot; + map?: string; + } + | { + in?: never; + map: Slot; + } +>; + +const buildKeyMap = (fields: FieldsConfig, map?: KeyMap): KeyMap => { + if (!map) { + map = new Map(); + } + + for (const config of fields) { + if ('in' in config) { + if (config.key) { + map.set(config.key, { + in: config.in, + map: config.map, + }); + } + } else if ('key' in config) { + map.set(config.key, { + map: config.map, + }); + } else if (config.args) { + buildKeyMap(config.args, map); + } + } + + return map; +}; + +interface Params { + body: unknown; + headers: Record; + path: Record; + query: Record; +} + +const stripEmptySlots = (params: Params) => { + for (const [slot, value] of Object.entries(params)) { + if (value && typeof value === 'object' && !Object.keys(value).length) { + delete params[slot as Slot]; + } + } +}; + +export const buildClientParams = (args: ReadonlyArray, fields: FieldsConfig) => { + const params: Params = { + body: {}, + headers: {}, + path: {}, + query: {}, + }; + + const map = buildKeyMap(fields); + + let config: FieldsConfig[number] | undefined; + + for (const [index, arg] of args.entries()) { + if (fields[index]) { + config = fields[index]; + } + + if (!config) { + continue; + } + + if ('in' in config) { + if (config.key) { + const field = map.get(config.key)!; + const name = field.map || config.key; + if (field.in) { + (params[field.in] as Record)[name] = arg; + } + } else { + params.body = arg; + } + } else { + for (const [key, value] of Object.entries(arg ?? {})) { + const field = map.get(key); + + if (field) { + if (field.in) { + const name = field.map || key; + (params[field.in] as Record)[name] = value; + } else { + params[field.map] = value; + } + } else { + const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix)); + + if (extra) { + const [prefix, slot] = extra; + (params[slot] as Record)[key.slice(prefix.length)] = value; + } else if ('allowExtra' in config && config.allowExtra) { + for (const [slot, allowed] of Object.entries(config.allowExtra)) { + if (allowed) { + (params[slot as Slot] as Record)[key] = value; + break; + } + } + } + } + } + } + } + + stripEmptySlots(params); + + return params; +}; diff --git a/src/client/core/pathSerializer.gen.ts b/src/client/core/pathSerializer.gen.ts new file mode 100644 index 00000000..994b2848 --- /dev/null +++ b/src/client/core/pathSerializer.gen.ts @@ -0,0 +1,171 @@ +// This file is auto-generated by @hey-api/openapi-ts + +interface SerializeOptions extends SerializePrimitiveOptions, SerializerOptions {} + +interface SerializePrimitiveOptions { + allowReserved?: boolean; + name: string; +} + +export interface SerializerOptions { + /** + * @default true + */ + explode: boolean; + style: T; +} + +export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; +export type ArraySeparatorStyle = ArrayStyle | MatrixStyle; +type MatrixStyle = 'label' | 'matrix' | 'simple'; +export type ObjectStyle = 'form' | 'deepObject'; +type ObjectSeparatorStyle = ObjectStyle | MatrixStyle; + +interface SerializePrimitiveParam extends SerializePrimitiveOptions { + value: string; +} + +export const separatorArrayExplode = (style: ArraySeparatorStyle) => { + switch (style) { + case 'label': + return '.'; + case 'matrix': + return ';'; + case 'simple': + return ','; + default: + return '&'; + } +}; + +export const separatorArrayNoExplode = (style: ArraySeparatorStyle) => { + switch (style) { + case 'form': + return ','; + case 'pipeDelimited': + return '|'; + case 'spaceDelimited': + return '%20'; + default: + return ','; + } +}; + +export const separatorObjectExplode = (style: ObjectSeparatorStyle) => { + switch (style) { + case 'label': + return '.'; + case 'matrix': + return ';'; + case 'simple': + return ','; + default: + return '&'; + } +}; + +export const serializeArrayParam = ({ + allowReserved, + explode, + name, + style, + value, +}: SerializeOptions & { + value: unknown[]; +}) => { + if (!explode) { + const joinedValues = ( + allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) + ).join(separatorArrayNoExplode(style)); + switch (style) { + case 'label': + return `.${joinedValues}`; + case 'matrix': + return `;${name}=${joinedValues}`; + case 'simple': + return joinedValues; + default: + return `${name}=${joinedValues}`; + } + } + + const separator = separatorArrayExplode(style); + const joinedValues = value + .map((v) => { + if (style === 'label' || style === 'simple') { + return allowReserved ? v : encodeURIComponent(v as string); + } + + return serializePrimitiveParam({ + allowReserved, + name, + value: v as string, + }); + }) + .join(separator); + return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues; +}; + +export const serializePrimitiveParam = ({ + allowReserved, + name, + value, +}: SerializePrimitiveParam) => { + if (value === undefined || value === null) { + return ''; + } + + if (typeof value === 'object') { + throw new Error( + 'Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.', + ); + } + + return `${name}=${allowReserved ? value : encodeURIComponent(value)}`; +}; + +export const serializeObjectParam = ({ + allowReserved, + explode, + name, + style, + value, + valueOnly, +}: SerializeOptions & { + value: Record | Date; + valueOnly?: boolean; +}) => { + if (value instanceof Date) { + return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`; + } + + if (style !== 'deepObject' && !explode) { + let values: string[] = []; + Object.entries(value).forEach(([key, v]) => { + values = [...values, key, allowReserved ? (v as string) : encodeURIComponent(v as string)]; + }); + const joinedValues = values.join(','); + switch (style) { + case 'form': + return `${name}=${joinedValues}`; + case 'label': + return `.${joinedValues}`; + case 'matrix': + return `;${name}=${joinedValues}`; + default: + return joinedValues; + } + } + + const separator = separatorObjectExplode(style); + const joinedValues = Object.entries(value) + .map(([key, v]) => + serializePrimitiveParam({ + allowReserved, + name: style === 'deepObject' ? `${name}[${key}]` : key, + value: v as string, + }), + ) + .join(separator); + return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues; +}; diff --git a/src/client/core/queryKeySerializer.gen.ts b/src/client/core/queryKeySerializer.gen.ts new file mode 100644 index 00000000..5000df60 --- /dev/null +++ b/src/client/core/queryKeySerializer.gen.ts @@ -0,0 +1,117 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * JSON-friendly union that mirrors what Pinia Colada can hash. + */ +export type JsonValue = + | null + | string + | number + | boolean + | JsonValue[] + | { [key: string]: JsonValue }; + +/** + * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. + */ +export const queryKeyJsonReplacer = (_key: string, value: unknown) => { + if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { + return undefined; + } + if (typeof value === 'bigint') { + return value.toString(); + } + if (value instanceof Date) { + return value.toISOString(); + } + return value; +}; + +/** + * Safely stringifies a value and parses it back into a JsonValue. + */ +export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { + try { + const json = JSON.stringify(input, queryKeyJsonReplacer); + if (json === undefined) { + return undefined; + } + return JSON.parse(json) as JsonValue; + } catch { + return undefined; + } +}; + +/** + * Detects plain objects (including objects with a null prototype). + */ +const isPlainObject = (value: unknown): value is Record => { + if (value === null || typeof value !== 'object') { + return false; + } + const prototype = Object.getPrototypeOf(value as object); + return prototype === Object.prototype || prototype === null; +}; + +/** + * Turns URLSearchParams into a sorted JSON object for deterministic keys. + */ +const serializeSearchParams = (params: URLSearchParams): JsonValue => { + const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b)); + const result: Record = {}; + + for (const [key, value] of entries) { + const existing = result[key]; + if (existing === undefined) { + result[key] = value; + continue; + } + + if (Array.isArray(existing)) { + (existing as string[]).push(value); + } else { + result[key] = [existing, value]; + } + } + + return result; +}; + +/** + * Normalizes any accepted value into a JSON-friendly shape for query keys. + */ +export const serializeQueryKeyValue = (value: unknown): JsonValue | undefined => { + if (value === null) { + return null; + } + + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + return value; + } + + if (value === undefined || typeof value === 'function' || typeof value === 'symbol') { + return undefined; + } + + if (typeof value === 'bigint') { + return value.toString(); + } + + if (value instanceof Date) { + return value.toISOString(); + } + + if (Array.isArray(value)) { + return stringifyToJsonValue(value); + } + + if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) { + return serializeSearchParams(value); + } + + if (isPlainObject(value)) { + return stringifyToJsonValue(value); + } + + return undefined; +}; diff --git a/src/client/core/serverSentEvents.gen.ts b/src/client/core/serverSentEvents.gen.ts new file mode 100644 index 00000000..6aa6cf02 --- /dev/null +++ b/src/client/core/serverSentEvents.gen.ts @@ -0,0 +1,243 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Config } from './types.gen'; + +export type ServerSentEventsOptions = Omit & + Pick & { + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch; + /** + * Implementing clients can call request interceptors inside this hook. + */ + onRequest?: (url: string, init: RequestInit) => Promise; + /** + * Callback invoked when a network or parsing error occurs during streaming. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param error The error that occurred. + */ + onSseError?: (error: unknown) => void; + /** + * Callback invoked when an event is streamed from the server. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param event Event streamed from the server. + * @returns Nothing (void). + */ + onSseEvent?: (event: StreamEvent) => void; + serializedBody?: RequestInit['body']; + /** + * Default retry delay in milliseconds. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 3000 + */ + sseDefaultRetryDelay?: number; + /** + * Maximum number of retry attempts before giving up. + */ + sseMaxRetryAttempts?: number; + /** + * Maximum retry delay in milliseconds. + * + * Applies only when exponential backoff is used. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 30000 + */ + sseMaxRetryDelay?: number; + /** + * Optional sleep function for retry backoff. + * + * Defaults to using `setTimeout`. + */ + sseSleepFn?: (ms: number) => Promise; + url: string; + }; + +export interface StreamEvent { + data: TData; + event?: string; + id?: string; + retry?: number; +} + +export type ServerSentEventsResult = { + stream: AsyncGenerator< + TData extends Record ? TData[keyof TData] : TData, + TReturn, + TNext + >; +}; + +export const createSseClient = ({ + onRequest, + onSseError, + onSseEvent, + responseTransformer, + responseValidator, + sseDefaultRetryDelay, + sseMaxRetryAttempts, + sseMaxRetryDelay, + sseSleepFn, + url, + ...options +}: ServerSentEventsOptions): ServerSentEventsResult => { + let lastEventId: string | undefined; + + const sleep = sseSleepFn ?? ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))); + + const createStream = async function* () { + let retryDelay: number = sseDefaultRetryDelay ?? 3000; + let attempt = 0; + const signal = options.signal ?? new AbortController().signal; + + while (true) { + if (signal.aborted) break; + + attempt++; + + const headers = + options.headers instanceof Headers + ? options.headers + : new Headers(options.headers as Record | undefined); + + if (lastEventId !== undefined) { + headers.set('Last-Event-ID', lastEventId); + } + + try { + const requestInit: RequestInit = { + redirect: 'follow', + ...options, + body: options.serializedBody, + headers, + signal, + }; + let request = new Request(url, requestInit); + if (onRequest) { + request = await onRequest(url, requestInit); + } + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = options.fetch ?? globalThis.fetch; + const response = await _fetch(request); + + if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`); + + if (!response.body) throw new Error('No body in SSE response'); + + const reader = response.body.pipeThrough(new TextDecoderStream()).getReader(); + + let buffer = ''; + + const abortHandler = () => { + try { + reader.cancel(); + } catch { + // noop + } + }; + + signal.addEventListener('abort', abortHandler); + + try { + while (true) { + const { done, value } = await reader.read(); + if (done) break; + buffer += value; + // Normalize line endings: CRLF -> LF, then CR -> LF + buffer = buffer.replace(/\r\n/g, '\n').replace(/\r/g, '\n'); + + const chunks = buffer.split('\n\n'); + buffer = chunks.pop() ?? ''; + + for (const chunk of chunks) { + const lines = chunk.split('\n'); + const dataLines: Array = []; + let eventName: string | undefined; + + for (const line of lines) { + if (line.startsWith('data:')) { + dataLines.push(line.replace(/^data:\s*/, '')); + } else if (line.startsWith('event:')) { + eventName = line.replace(/^event:\s*/, ''); + } else if (line.startsWith('id:')) { + lastEventId = line.replace(/^id:\s*/, ''); + } else if (line.startsWith('retry:')) { + const parsed = Number.parseInt(line.replace(/^retry:\s*/, ''), 10); + if (!Number.isNaN(parsed)) { + retryDelay = parsed; + } + } + } + + let data: unknown; + let parsedJson = false; + + if (dataLines.length) { + const rawData = dataLines.join('\n'); + try { + data = JSON.parse(rawData); + parsedJson = true; + } catch { + data = rawData; + } + } + + if (parsedJson) { + if (responseValidator) { + await responseValidator(data); + } + + if (responseTransformer) { + data = await responseTransformer(data); + } + } + + onSseEvent?.({ + data, + event: eventName, + id: lastEventId, + retry: retryDelay, + }); + + if (dataLines.length) { + yield data as any; + } + } + } + } finally { + signal.removeEventListener('abort', abortHandler); + reader.releaseLock(); + } + + break; // exit loop on normal completion + } catch (error) { + // connection failed or aborted; retry after delay + onSseError?.(error); + + if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) { + break; // stop after firing error + } + + // exponential backoff: double retry each attempt, cap at 30s + const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000); + await sleep(backoff); + } + } + }; + + const stream = createStream(); + + return { stream }; +}; diff --git a/src/client/core/types.gen.ts b/src/client/core/types.gen.ts new file mode 100644 index 00000000..97463257 --- /dev/null +++ b/src/client/core/types.gen.ts @@ -0,0 +1,104 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth, AuthToken } from './auth.gen'; +import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen'; + +export type HttpMethod = + | 'connect' + | 'delete' + | 'get' + | 'head' + | 'options' + | 'patch' + | 'post' + | 'put' + | 'trace'; + +export type Client< + RequestFn = never, + Config = unknown, + MethodFn = never, + BuildUrlFn = never, + SseFn = never, +> = { + /** + * Returns the final request URL. + */ + buildUrl: BuildUrlFn; + getConfig: () => Config; + request: RequestFn; + setConfig: (config: Config) => Config; +} & { + [K in HttpMethod]: MethodFn; +} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } }); + +export interface Config { + /** + * Auth token or a function returning auth token. The resolved value will be + * added to the request payload as defined by its `security` array. + */ + auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken; + /** + * A function for serializing request body parameter. By default, + * {@link JSON.stringify()} will be used. + */ + bodySerializer?: BodySerializer | null; + /** + * An object containing any HTTP headers that you want to pre-populate your + * `Headers` object with. + * + * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} + */ + headers?: + | RequestInit['headers'] + | Record< + string, + string | number | boolean | (string | number | boolean)[] | null | undefined | unknown + >; + /** + * The request method. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} + */ + method?: Uppercase; + /** + * A function for serializing request query parameters. By default, arrays + * will be exploded in form style, objects will be exploded in deepObject + * style, and reserved characters are percent-encoded. + * + * This method will have no effect if the native `paramsSerializer()` Axios + * API function is used. + * + * {@link https://swagger.io/docs/specification/serialization/#query View examples} + */ + querySerializer?: QuerySerializer | QuerySerializerOptions; + /** + * A function validating request data. This is useful if you want to ensure + * the request conforms to the desired shape, so it can be safely sent to + * the server. + */ + requestValidator?: (data: unknown) => Promise; + /** + * A function transforming response data before it's returned. This is useful + * for post-processing data, e.g. converting ISO strings into Date objects. + */ + responseTransformer?: (data: unknown) => Promise; + /** + * A function validating response data. This is useful if you want to ensure + * the response conforms to the desired shape, so it can be safely passed to + * the transformers and returned to the user. + */ + responseValidator?: (data: unknown) => Promise; +} + +type IsExactlyNeverOrNeverUndefined = [T] extends [never] + ? true + : [T] extends [never | undefined] + ? [undefined] extends [T] + ? false + : true + : false; + +export type OmitNever> = { + [K in keyof T as IsExactlyNeverOrNeverUndefined extends true ? never : K]: T[K]; +}; diff --git a/src/client/core/utils.gen.ts b/src/client/core/utils.gen.ts new file mode 100644 index 00000000..e7ddbe35 --- /dev/null +++ b/src/client/core/utils.gen.ts @@ -0,0 +1,140 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { BodySerializer, QuerySerializer } from './bodySerializer.gen'; +import { + type ArraySeparatorStyle, + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from './pathSerializer.gen'; + +export interface PathSerializer { + path: Record; + url: string; +} + +export const PATH_PARAM_RE = /\{[^{}]+\}/g; + +export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => { + let url = _url; + const matches = _url.match(PATH_PARAM_RE); + if (matches) { + for (const match of matches) { + let explode = false; + let name = match.substring(1, match.length - 1); + let style: ArraySeparatorStyle = 'simple'; + + if (name.endsWith('*')) { + explode = true; + name = name.substring(0, name.length - 1); + } + + if (name.startsWith('.')) { + name = name.substring(1); + style = 'label'; + } else if (name.startsWith(';')) { + name = name.substring(1); + style = 'matrix'; + } + + const value = path[name]; + + if (value === undefined || value === null) { + continue; + } + + if (Array.isArray(value)) { + url = url.replace(match, serializeArrayParam({ explode, name, style, value })); + continue; + } + + if (typeof value === 'object') { + url = url.replace( + match, + serializeObjectParam({ + explode, + name, + style, + value: value as Record, + valueOnly: true, + }), + ); + continue; + } + + if (style === 'matrix') { + url = url.replace( + match, + `;${serializePrimitiveParam({ + name, + value: value as string, + })}`, + ); + continue; + } + + const replaceValue = encodeURIComponent( + style === 'label' ? `.${value as string}` : (value as string), + ); + url = url.replace(match, replaceValue); + } + } + return url; +}; + +export const getUrl = ({ + baseUrl, + path, + query, + querySerializer, + url: _url, +}: { + baseUrl?: string; + path?: Record; + query?: Record; + querySerializer: QuerySerializer; + url: string; +}) => { + const pathUrl = _url.startsWith('/') ? _url : `/${_url}`; + let url = (baseUrl ?? '') + pathUrl; + if (path) { + url = defaultPathSerializer({ path, url }); + } + let search = query ? querySerializer(query) : ''; + if (search.startsWith('?')) { + search = search.substring(1); + } + if (search) { + url += `?${search}`; + } + return url; +}; + +export function getValidRequestBody(options: { + body?: unknown; + bodySerializer?: BodySerializer | null; + serializedBody?: unknown; +}) { + const hasBody = options.body !== undefined; + const isSerializedBody = hasBody && options.bodySerializer; + + if (isSerializedBody) { + if ('serializedBody' in options) { + const hasSerializedBody = + options.serializedBody !== undefined && options.serializedBody !== ''; + + return hasSerializedBody ? options.serializedBody : null; + } + + // not all clients implement a serializedBody property (i.e. client-axios) + return options.body !== '' ? options.body : null; + } + + // plain/text body + if (hasBody) { + return options.body; + } + + // no body was provided + return undefined; +} diff --git a/src/client/index.ts b/src/client/index.ts new file mode 100644 index 00000000..c0dd889e --- /dev/null +++ b/src/client/index.ts @@ -0,0 +1,1205 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export { + addAMemberToAnOrganization, + addAnOrganizationMemberToATeam, + addASymbolSourceToAProject, + addATeamToAProject, + bulkDeleteAlerts, + bulkDeleteMonitors, + bulkMutateAListOfIssues, + bulkMutateAnOrganization_sIssues, + bulkRemoveAListOfIssues, + bulkRemoveAnOrganization_sIssues, + createADataForwarderForAnOrganization, + createADeploy, + createAMonitor, + createAMonitorForAProject, + createANewClientKey, + createANewDashboardForAnOrganization, + createANewProject, + createANewReleaseForAnOrganization, + createANewSavedQuery, + createANewTeam, + createAnAlertForAnOrganization, + createAnExternalTeam, + createAnExternalUser, + createASpikeProtectionNotificationAction, + createOrUpdateAnExternalIssue, + debugIssuesRelatedToSourceMapsForAGivenEvent, + deleteAClientKey, + deleteACustomIntegration, + deleteADataForwarderForAnOrganization, + deleteAMonitor, + deleteAMonitorOrMonitorEnvironments, + deleteAMonitorOrMonitorEnvironmentsForAProject, + deleteAnAlert, + deleteAnExternalIssue, + deleteAnExternalTeam, + deleteAnExternalUser, + deleteAnIndividualTeam, + deleteAnIntegrationForAnOrganization, + deleteAnOrganization_sCustomDashboard, + deleteAnOrganization_sDiscoverSavedQuery, + deleteAnOrganization_sRelease, + deleteAnOrganizationMember, + deleteAnOrganizationMemberFromATeam, + deleteAnOrganizationMemberViaScim, + deleteAnOrganizationRelease_sFile, + deleteAProject, + deleteAProjectRelease_sFile, + deleteAReplayInstance, + deleteASpecificProject_sDebugInformationFile, + deleteASpikeProtectionNotificationAction, + deleteASymbolSourceFromAProject, + deleteATeam, + deleteATeamFromAProject, + deprecatedCreateAMetricAlertRuleForAnOrganization, + deprecatedCreateAnIssueAlertRuleForAProject, + deprecatedDeleteAMetricAlertRule, + deprecatedDeleteAnIssueAlertRule, + deprecatedListAnOrganization_sMetricAlertRules, + deprecatedListAProject_sIssueAlertRules, + deprecatedRetrieveAMetricAlertRuleForAnOrganization, + deprecatedRetrieveAnIssueAlertRuleForAProject, + deprecatedUpdateAMetricAlertRule, + deprecatedUpdateAnIssueAlertRule, + disableSpikeProtection, + editAnOrganization_sCustomDashboard, + editAnOrganization_sDiscoverSavedQuery, + enableSpikeProtection, + fetchAlerts, + fetchAMonitor, + fetchAnAlert, + fetchAnOrganization_sMonitors, + getIntegrationProviderInformation, + getsSyncingStatusForRepositoriesForAnIntegratedOrg, + listAnIssue_sEvents, + listAnIssue_sHashes, + listAnOrganization_sAvailableIntegrations, + listAnOrganization_sClientKeys, + listAnOrganization_sCustomDashboards, + listAnOrganization_sDiscoverSavedQueries, + listAnOrganization_sEnvironments, + listAnOrganization_sIntegrationPlatformInstallations, + listAnOrganization_sIssues, + listAnOrganization_sMembers, + listAnOrganization_sPaginatedTeams, + listAnOrganization_sProjects, + listAnOrganization_sReleaseFiles, + listAnOrganization_sReleases, + listAnOrganization_sReplays, + listAnOrganization_sRepositories, + listAnOrganization_sScimMembers, + listAnOrganization_sSelectors, + listAnOrganization_sTeams, + listAnOrganization_sTrustedRelays, + listAnOrganizationRelease_sCommits, + listAProject_sClientKeys, + listAProject_sDataFilters, + listAProject_sDebugInformationFiles, + listAProject_sEnvironments, + listAProject_sErrorEvents, + listAProject_sIssues, + listAProject_sOrganizationMembers, + listAProject_sReleaseFiles, + listAProject_sServiceHooks, + listAProject_sTeams, + listAProject_sUserFeedback, + listAProject_sUsers, + listAProjectRelease_sCommits, + listARelease_sDeploys, + listARepository_sCommits, + listATag_sValues, + listATag_sValuesForAnIssue, + listATeam_sMembers, + listATeam_sProjects, + listAUser_sTeamsForAnOrganization, + listClickedNodes, + listRecordingSegments, + listSeerAiModels, + listSpikeProtectionNotifications, + listUsersWhoHaveViewedAReplay, + listYourOrganizations, + mutateAnOrganization_sAlerts, + mutateAnOrganization_sMonitors, + type Options, + provisionANewOrganizationMember, + provisionANewTeam, + queryAnIndividualOrganizationMember, + queryAnIndividualTeam, + queryExploreEventsInTableFormat, + queryExploreEventsInTimeseriesFormat, + regeneratesARepositoryUploadTokenAndReturnsTheNewToken, + registerANewServiceHook, + removeAnIssue, + removeAServiceHook, + resolveAnEventId, + resolveAShortId, + retrieveAClientKey, + retrieveACountOfReplaysForAGivenIssueOrTransaction, + retrieveACustomIntegrationByIdOrSlug, + retrieveAggregatedTestResultMetricsForRepository_Owner_AndOrganization, + retrieveAMonitor, + retrieveAMonitorForAProject, + retrieveAnEventForAProject, + retrieveAnIntegrationForAnOrganization, + retrieveAnIssue, + retrieveAnIssueEvent, + retrieveAnOrganization, + retrieveAnOrganization_sCustomDashboard, + retrieveAnOrganization_sDiscoverSavedQuery, + retrieveAnOrganization_sEventsCountByProject, + retrieveAnOrganization_sRelease, + retrieveAnOrganizationMember, + retrieveAnOrganizationRelease_sFile, + retrieveAProject, + retrieveAProject_sSymbolSources, + retrieveAProjectEnvironment, + retrieveAProjectRelease_sFile, + retrieveARecordingSegment, + retrieveAReplayInstance, + retrieveAServiceHook, + retrieveASpikeProtectionNotificationAction, + retrieveATeam, + retrieveCheckInsForAMonitor, + retrieveCheckInsForAMonitorByProject, + retrieveCustomIntegrationIssueLinksForTheGivenSentryIssue, + retrieveDataForwardersForAnOrganization, + retrieveEventCountsForAnOrganizationV2, + retrieveEventCountsForAProject, + retrieveFilesChangedInARelease_sCommits, + retrieveMonitorsForAnOrganization, + retrieveOwnershipConfigurationForAProject, + retrievePaginatedListOfTestResultsForRepository_Owner_AndOrganization, + retrieveReleaseHealthSessionStatistics, + retrieveSeerIssueFixState, + retrieveStatusesOfReleaseThresholdsAlpha, + retrievesAPaginatedListOfRepositoryTokensForAGivenOwner, + retrievesASingleRepositoryForAGivenOwner, + retrievesListOfBranchesForAGivenOwnerAndRepository, + retrievesListOfRepositoriesForAGivenOwner, + retrieveTagDetails, + retrieveTestSuitesBelongingToARepository_sTestResults, + retrieveTheCustomIntegrationsCreatedByAnOrganization, + startSeerIssueFix, + submitUserFeedback, + syncsRepositoriesFromAnIntegratedOrgWithGitHub, + updateAClientKey, + updateADataForwarderForAnOrganization, + updateAMonitor, + updateAMonitorById, + updateAMonitorForAProject, + updateAnAlertById, + updateAnExistingCustomIntegration, + updateAnExternalTeam, + updateAnExternalUser, + updateAnInboundDataFilter, + updateAnIssue, + updateAnOrganization, + updateAnOrganization_sRelease, + updateAnOrganizationMember_sAttributes, + updateAnOrganizationMember_sRoles, + updateAnOrganizationMember_sTeamRole, + updateAnOrganizationReleaseFile, + updateAProject, + updateAProject_sSymbolSource, + updateAProjectEnvironment, + updateAProjectReleaseFile, + updateAServiceHook, + updateASpikeProtectionNotificationAction, + updateATeam, + updateATeam_sAttributes, + updateOwnershipConfigurationForAProject, + uploadANewFile, + uploadANewOrganizationReleaseFile, + uploadANewProjectReleaseFile, +} from "./sdk.gen"; +export type { + AddAMemberToAnOrganizationData, + AddAMemberToAnOrganizationErrors, + AddAMemberToAnOrganizationResponse, + AddAMemberToAnOrganizationResponses, + AddAnOrganizationMemberToATeamData, + AddAnOrganizationMemberToATeamErrors, + AddAnOrganizationMemberToATeamResponse, + AddAnOrganizationMemberToATeamResponses, + AddASymbolSourceToAProjectData, + AddASymbolSourceToAProjectErrors, + AddASymbolSourceToAProjectResponse, + AddASymbolSourceToAProjectResponses, + AddATeamToAProjectData, + AddATeamToAProjectErrors, + AddATeamToAProjectResponse, + AddATeamToAProjectResponses, + AlertRule, + AutofixPostResponse, + AutofixRequest, + AutofixStateResponse, + BaseDataConditionGroupValidator, + BaseDetectorTypeValidator, + BaseTeam, + Branches, + BranchNode, + BulkDeleteAlertsData, + BulkDeleteAlertsErrors, + BulkDeleteAlertsResponse, + BulkDeleteAlertsResponses, + BulkDeleteMonitorsData, + BulkDeleteMonitorsErrors, + BulkDeleteMonitorsResponse, + BulkDeleteMonitorsResponses, + BulkMutateAListOfIssuesData, + BulkMutateAListOfIssuesErrors, + BulkMutateAListOfIssuesResponse, + BulkMutateAListOfIssuesResponses, + BulkMutateAnOrganizationSissuesData, + BulkMutateAnOrganizationSissuesErrors, + BulkMutateAnOrganizationSissuesResponse, + BulkMutateAnOrganizationSissuesResponses, + BulkRemoveAListOfIssuesData, + BulkRemoveAListOfIssuesErrors, + BulkRemoveAListOfIssuesResponse, + BulkRemoveAListOfIssuesResponses, + BulkRemoveAnOrganizationSissuesData, + BulkRemoveAnOrganizationSissuesErrors, + BulkRemoveAnOrganizationSissuesResponse, + BulkRemoveAnOrganizationSissuesResponses, + BulkUpdateAlerts, + BulkUpdateMonitors, + CheckInList, + ClientOptions, + Commit, + CommitPatchSet, + CommitSerializerResponse, + ConfigValidator, + CreateADataForwarderForAnOrganizationData, + CreateADataForwarderForAnOrganizationErrors, + CreateADataForwarderForAnOrganizationResponse, + CreateADataForwarderForAnOrganizationResponses, + CreateADeployData, + CreateADeployErrors, + CreateADeployResponse, + CreateADeployResponses, + CreateAMonitorData, + CreateAMonitorErrors, + CreateAMonitorForAProjectData, + CreateAMonitorForAProjectErrors, + CreateAMonitorForAProjectResponse, + CreateAMonitorForAProjectResponses, + CreateAMonitorResponse, + CreateAMonitorResponses, + CreateANewClientKeyData, + CreateANewClientKeyErrors, + CreateANewClientKeyResponse, + CreateANewClientKeyResponses, + CreateANewDashboardForAnOrganizationData, + CreateANewDashboardForAnOrganizationErrors, + CreateANewDashboardForAnOrganizationResponse, + CreateANewDashboardForAnOrganizationResponses, + CreateANewProjectData, + CreateANewProjectErrors, + CreateANewProjectResponse, + CreateANewProjectResponses, + CreateANewReleaseForAnOrganizationData, + CreateANewReleaseForAnOrganizationErrors, + CreateANewReleaseForAnOrganizationResponse, + CreateANewReleaseForAnOrganizationResponses, + CreateANewSavedQueryData, + CreateANewSavedQueryErrors, + CreateANewSavedQueryResponse, + CreateANewSavedQueryResponses, + CreateANewTeamData, + CreateANewTeamErrors, + CreateANewTeamResponse, + CreateANewTeamResponses, + CreateAnAlertForAnOrganizationData, + CreateAnAlertForAnOrganizationErrors, + CreateAnAlertForAnOrganizationResponse, + CreateAnAlertForAnOrganizationResponses, + CreateAnExternalTeamData, + CreateAnExternalTeamErrors, + CreateAnExternalTeamResponse, + CreateAnExternalTeamResponses, + CreateAnExternalUserData, + CreateAnExternalUserErrors, + CreateAnExternalUserResponse, + CreateAnExternalUserResponses, + CreateASpikeProtectionNotificationActionData, + CreateASpikeProtectionNotificationActionErrors, + CreateASpikeProtectionNotificationActionResponse, + CreateASpikeProtectionNotificationActionResponses, + CreateOrUpdateAnExternalIssueData, + CreateOrUpdateAnExternalIssueErrors, + CreateOrUpdateAnExternalIssueResponse, + CreateOrUpdateAnExternalIssueResponses, + Dashboard, + DashboardDetails, + DashboardDetailsModel, + DashboardListResponse, + DashboardPermissions, + DashboardWidget, + DashboardWidgetQuery, + DashboardWidgetQueryOnDemand, + DataForwarder, + DataForwarderResponse, + DebugIssuesRelatedToSourceMapsForAGivenEventData, + DebugIssuesRelatedToSourceMapsForAGivenEventErrors, + DebugIssuesRelatedToSourceMapsForAGivenEventResponse, + DebugIssuesRelatedToSourceMapsForAGivenEventResponses, + DeleteAClientKeyData, + DeleteAClientKeyErrors, + DeleteAClientKeyResponse, + DeleteAClientKeyResponses, + DeleteACustomIntegrationData, + DeleteACustomIntegrationErrors, + DeleteACustomIntegrationResponse, + DeleteACustomIntegrationResponses, + DeleteADataForwarderForAnOrganizationData, + DeleteADataForwarderForAnOrganizationErrors, + DeleteADataForwarderForAnOrganizationResponse, + DeleteADataForwarderForAnOrganizationResponses, + DeleteAMonitorData, + DeleteAMonitorErrors, + DeleteAMonitorOrMonitorEnvironmentsData, + DeleteAMonitorOrMonitorEnvironmentsErrors, + DeleteAMonitorOrMonitorEnvironmentsForAProjectData, + DeleteAMonitorOrMonitorEnvironmentsForAProjectErrors, + DeleteAMonitorOrMonitorEnvironmentsForAProjectResponses, + DeleteAMonitorOrMonitorEnvironmentsResponses, + DeleteAMonitorResponse, + DeleteAMonitorResponses, + DeleteAnAlertData, + DeleteAnAlertErrors, + DeleteAnAlertResponse, + DeleteAnAlertResponses, + DeleteAnExternalIssueData, + DeleteAnExternalIssueErrors, + DeleteAnExternalIssueResponse, + DeleteAnExternalIssueResponses, + DeleteAnExternalTeamData, + DeleteAnExternalTeamErrors, + DeleteAnExternalTeamResponse, + DeleteAnExternalTeamResponses, + DeleteAnExternalUserData, + DeleteAnExternalUserErrors, + DeleteAnExternalUserResponse, + DeleteAnExternalUserResponses, + DeleteAnIndividualTeamData, + DeleteAnIndividualTeamErrors, + DeleteAnIndividualTeamResponse, + DeleteAnIndividualTeamResponses, + DeleteAnIntegrationForAnOrganizationData, + DeleteAnIntegrationForAnOrganizationErrors, + DeleteAnIntegrationForAnOrganizationResponse, + DeleteAnIntegrationForAnOrganizationResponses, + DeleteAnOrganizationMemberData, + DeleteAnOrganizationMemberErrors, + DeleteAnOrganizationMemberFromATeamData, + DeleteAnOrganizationMemberFromATeamErrors, + DeleteAnOrganizationMemberFromATeamResponse, + DeleteAnOrganizationMemberFromATeamResponses, + DeleteAnOrganizationMemberResponse, + DeleteAnOrganizationMemberResponses, + DeleteAnOrganizationMemberViaScimData, + DeleteAnOrganizationMemberViaScimErrors, + DeleteAnOrganizationMemberViaScimResponse, + DeleteAnOrganizationMemberViaScimResponses, + DeleteAnOrganizationReleaseSFileData, + DeleteAnOrganizationReleaseSFileErrors, + DeleteAnOrganizationReleaseSFileResponse, + DeleteAnOrganizationReleaseSFileResponses, + DeleteAnOrganizationSCustomDashboardData, + DeleteAnOrganizationSCustomDashboardErrors, + DeleteAnOrganizationSCustomDashboardResponse, + DeleteAnOrganizationSCustomDashboardResponses, + DeleteAnOrganizationSDiscoverSavedQueryData, + DeleteAnOrganizationSDiscoverSavedQueryErrors, + DeleteAnOrganizationSDiscoverSavedQueryResponse, + DeleteAnOrganizationSDiscoverSavedQueryResponses, + DeleteAnOrganizationSReleaseData, + DeleteAnOrganizationSReleaseErrors, + DeleteAnOrganizationSReleaseResponse, + DeleteAnOrganizationSReleaseResponses, + DeleteAProjectData, + DeleteAProjectErrors, + DeleteAProjectReleaseSFileData, + DeleteAProjectReleaseSFileErrors, + DeleteAProjectReleaseSFileResponse, + DeleteAProjectReleaseSFileResponses, + DeleteAProjectResponse, + DeleteAProjectResponses, + DeleteAReplayInstanceData, + DeleteAReplayInstanceErrors, + DeleteAReplayInstanceResponse, + DeleteAReplayInstanceResponses, + DeleteASpecificProjectSDebugInformationFileData, + DeleteASpecificProjectSDebugInformationFileErrors, + DeleteASpecificProjectSDebugInformationFileResponse, + DeleteASpecificProjectSDebugInformationFileResponses, + DeleteASpikeProtectionNotificationActionData, + DeleteASpikeProtectionNotificationActionResponse, + DeleteASpikeProtectionNotificationActionResponses, + DeleteASymbolSourceFromAProjectData, + DeleteASymbolSourceFromAProjectErrors, + DeleteASymbolSourceFromAProjectResponse, + DeleteASymbolSourceFromAProjectResponses, + DeleteATeamData, + DeleteATeamErrors, + DeleteATeamFromAProjectData, + DeleteATeamFromAProjectErrors, + DeleteATeamFromAProjectResponse, + DeleteATeamFromAProjectResponses, + DeleteATeamResponse, + DeleteATeamResponses, + Deploy, + DeployResponse, + DeprecatedCreateAMetricAlertRuleForAnOrganizationData, + DeprecatedCreateAMetricAlertRuleForAnOrganizationErrors, + DeprecatedCreateAMetricAlertRuleForAnOrganizationResponse, + DeprecatedCreateAMetricAlertRuleForAnOrganizationResponses, + DeprecatedCreateAnIssueAlertRuleForAProjectData, + DeprecatedCreateAnIssueAlertRuleForAProjectErrors, + DeprecatedCreateAnIssueAlertRuleForAProjectResponse, + DeprecatedCreateAnIssueAlertRuleForAProjectResponses, + DeprecatedDeleteAMetricAlertRuleData, + DeprecatedDeleteAMetricAlertRuleErrors, + DeprecatedDeleteAMetricAlertRuleResponses, + DeprecatedDeleteAnIssueAlertRuleData, + DeprecatedDeleteAnIssueAlertRuleErrors, + DeprecatedDeleteAnIssueAlertRuleResponses, + DeprecatedListAnOrganizationSMetricAlertRulesData, + DeprecatedListAnOrganizationSMetricAlertRulesErrors, + DeprecatedListAnOrganizationSMetricAlertRulesResponse, + DeprecatedListAnOrganizationSMetricAlertRulesResponses, + DeprecatedListAProjectSissueAlertRulesData, + DeprecatedListAProjectSissueAlertRulesErrors, + DeprecatedListAProjectSissueAlertRulesResponse, + DeprecatedListAProjectSissueAlertRulesResponses, + DeprecatedRetrieveAMetricAlertRuleForAnOrganizationData, + DeprecatedRetrieveAMetricAlertRuleForAnOrganizationErrors, + DeprecatedRetrieveAMetricAlertRuleForAnOrganizationResponse, + DeprecatedRetrieveAMetricAlertRuleForAnOrganizationResponses, + DeprecatedRetrieveAnIssueAlertRuleForAProjectData, + DeprecatedRetrieveAnIssueAlertRuleForAProjectErrors, + DeprecatedRetrieveAnIssueAlertRuleForAProjectResponse, + DeprecatedRetrieveAnIssueAlertRuleForAProjectResponses, + DeprecatedUpdateAMetricAlertRuleData, + DeprecatedUpdateAMetricAlertRuleErrors, + DeprecatedUpdateAMetricAlertRuleResponse, + DeprecatedUpdateAMetricAlertRuleResponses, + DeprecatedUpdateAnIssueAlertRuleData, + DeprecatedUpdateAnIssueAlertRuleErrors, + DeprecatedUpdateAnIssueAlertRuleResponse, + DeprecatedUpdateAnIssueAlertRuleResponses, + DetailedOrganizationSerializerWithProjectsAndTeams, + DetailedProject, + Detector, + DisableSpikeProtectionData, + DisableSpikeProtectionErrors, + DisableSpikeProtectionResponses, + DiscoverSavedQuery, + DiscoverSavedQueryListResponse, + DiscoverSavedQueryModel, + DynamicSdkLoaderOption, + EditAnOrganizationSCustomDashboardData, + EditAnOrganizationSCustomDashboardErrors, + EditAnOrganizationSCustomDashboardResponse, + EditAnOrganizationSCustomDashboardResponses, + EditAnOrganizationSDiscoverSavedQueryData, + EditAnOrganizationSDiscoverSavedQueryErrors, + EditAnOrganizationSDiscoverSavedQueryResponse, + EditAnOrganizationSDiscoverSavedQueryResponses, + EnableSpikeProtectionData, + EnableSpikeProtectionErrors, + EnableSpikeProtectionResponses, + Environment, + EnvironmentProject, + EventIdLookupResponse, + ExternalActor, + ExternalTeam, + ExternalUser, + ExternalUserWritable, + FetchAlertsData, + FetchAlertsErrors, + FetchAlertsResponse, + FetchAlertsResponses, + FetchAMonitorData, + FetchAMonitorErrors, + FetchAMonitorResponse, + FetchAMonitorResponses, + FetchAnAlertData, + FetchAnAlertErrors, + FetchAnAlertResponse, + FetchAnAlertResponses, + FetchAnOrganizationSMonitorsData, + FetchAnOrganizationSMonitorsErrors, + FetchAnOrganizationSMonitorsResponse, + FetchAnOrganizationSMonitorsResponses, + Filters, + GetIntegrationProviderInformationData, + GetIntegrationProviderInformationErrors, + GetIntegrationProviderInformationResponse, + GetIntegrationProviderInformationResponses, + GetReplay, + GetReplayRecordingSegment, + GetReplayViewedBy, + GetsSyncingStatusForRepositoriesForAnIntegratedOrgData, + GetsSyncingStatusForRepositoriesForAnIntegratedOrgErrors, + GetsSyncingStatusForRepositoriesForAnIntegratedOrgResponse, + GetsSyncingStatusForRepositoriesForAnIntegratedOrgResponses, + GroupEventsResponseDict, + GroupExternalIssueResponse, + GroupValidator, + InCommitValidator, + IssueEventDetailsResponse, + Layout, + LegacyBrowserFilter, + LinkedDashboard, + ListAnIssueSEventsData, + ListAnIssueSEventsErrors, + ListAnIssueSEventsResponse, + ListAnIssueSEventsResponses, + ListAnIssueSHashesData, + ListAnIssueSHashesErrors, + ListAnIssueSHashesResponse, + ListAnIssueSHashesResponses, + ListAnOrganizationReleaseSCommitsData, + ListAnOrganizationReleaseSCommitsErrors, + ListAnOrganizationReleaseSCommitsResponse, + ListAnOrganizationReleaseSCommitsResponses, + ListAnOrganizationSAvailableIntegrationsData, + ListAnOrganizationSAvailableIntegrationsResponse, + ListAnOrganizationSAvailableIntegrationsResponses, + ListAnOrganizationSClientKeysData, + ListAnOrganizationSClientKeysErrors, + ListAnOrganizationSClientKeysResponse, + ListAnOrganizationSClientKeysResponses, + ListAnOrganizationSCustomDashboardsData, + ListAnOrganizationSCustomDashboardsErrors, + ListAnOrganizationSCustomDashboardsResponse, + ListAnOrganizationSCustomDashboardsResponses, + ListAnOrganizationSDiscoverSavedQueriesData, + ListAnOrganizationSDiscoverSavedQueriesErrors, + ListAnOrganizationSDiscoverSavedQueriesResponse, + ListAnOrganizationSDiscoverSavedQueriesResponses, + ListAnOrganizationSEnvironmentsData, + ListAnOrganizationSEnvironmentsErrors, + ListAnOrganizationSEnvironmentsResponse, + ListAnOrganizationSEnvironmentsResponses, + ListAnOrganizationSIntegrationPlatformInstallationsData, + ListAnOrganizationSIntegrationPlatformInstallationsErrors, + ListAnOrganizationSIntegrationPlatformInstallationsResponse, + ListAnOrganizationSIntegrationPlatformInstallationsResponses, + ListAnOrganizationSissuesData, + ListAnOrganizationSissuesErrors, + ListAnOrganizationSissuesResponse, + ListAnOrganizationSissuesResponses, + ListAnOrganizationSMembersData, + ListAnOrganizationSMembersErrors, + ListAnOrganizationSMembersResponse, + ListAnOrganizationSMembersResponses, + ListAnOrganizationSPaginatedTeamsData, + ListAnOrganizationSPaginatedTeamsErrors, + ListAnOrganizationSPaginatedTeamsResponse, + ListAnOrganizationSPaginatedTeamsResponses, + ListAnOrganizationSProjectsData, + ListAnOrganizationSProjectsErrors, + ListAnOrganizationSProjectsResponse, + ListAnOrganizationSProjectsResponses, + ListAnOrganizationSReleaseFilesData, + ListAnOrganizationSReleaseFilesErrors, + ListAnOrganizationSReleaseFilesResponse, + ListAnOrganizationSReleaseFilesResponses, + ListAnOrganizationSReleasesData, + ListAnOrganizationSReleasesErrors, + ListAnOrganizationSReleasesResponse, + ListAnOrganizationSReleasesResponses, + ListAnOrganizationSReplaysData, + ListAnOrganizationSReplaysErrors, + ListAnOrganizationSReplaysResponse, + ListAnOrganizationSReplaysResponses, + ListAnOrganizationSRepositoriesData, + ListAnOrganizationSRepositoriesErrors, + ListAnOrganizationSRepositoriesResponse, + ListAnOrganizationSRepositoriesResponses, + ListAnOrganizationSScimMembersData, + ListAnOrganizationSScimMembersErrors, + ListAnOrganizationSScimMembersResponse, + ListAnOrganizationSScimMembersResponses, + ListAnOrganizationSSelectorsData, + ListAnOrganizationSSelectorsErrors, + ListAnOrganizationSSelectorsResponse, + ListAnOrganizationSSelectorsResponses, + ListAnOrganizationSTeamsData, + ListAnOrganizationSTeamsErrors, + ListAnOrganizationSTeamsResponse, + ListAnOrganizationSTeamsResponses, + ListAnOrganizationSTrustedRelaysData, + ListAnOrganizationSTrustedRelaysErrors, + ListAnOrganizationSTrustedRelaysResponse, + ListAnOrganizationSTrustedRelaysResponses, + ListAProjectReleaseSCommitsData, + ListAProjectReleaseSCommitsErrors, + ListAProjectReleaseSCommitsResponse, + ListAProjectReleaseSCommitsResponses, + ListAProjectSClientKeysData, + ListAProjectSClientKeysErrors, + ListAProjectSClientKeysResponse, + ListAProjectSClientKeysResponses, + ListAProjectSDataFiltersData, + ListAProjectSDataFiltersErrors, + ListAProjectSDataFiltersResponse, + ListAProjectSDataFiltersResponses, + ListAProjectSDebugInformationFilesData, + ListAProjectSDebugInformationFilesErrors, + ListAProjectSDebugInformationFilesResponses, + ListAProjectSEnvironmentsData, + ListAProjectSEnvironmentsErrors, + ListAProjectSEnvironmentsResponse, + ListAProjectSEnvironmentsResponses, + ListAProjectSErrorEventsData, + ListAProjectSErrorEventsErrors, + ListAProjectSErrorEventsResponse, + ListAProjectSErrorEventsResponses, + ListAProjectSissuesData, + ListAProjectSissuesErrors, + ListAProjectSissuesResponse, + ListAProjectSissuesResponses, + ListAProjectSOrganizationMembersData, + ListAProjectSOrganizationMembersErrors, + ListAProjectSOrganizationMembersResponse, + ListAProjectSOrganizationMembersResponses, + ListAProjectSReleaseFilesData, + ListAProjectSReleaseFilesErrors, + ListAProjectSReleaseFilesResponse, + ListAProjectSReleaseFilesResponses, + ListAProjectSServiceHooksData, + ListAProjectSServiceHooksErrors, + ListAProjectSServiceHooksResponse, + ListAProjectSServiceHooksResponses, + ListAProjectSTeamsData, + ListAProjectSTeamsErrors, + ListAProjectSTeamsResponse, + ListAProjectSTeamsResponses, + ListAProjectSuserFeedbackData, + ListAProjectSuserFeedbackErrors, + ListAProjectSuserFeedbackResponse, + ListAProjectSuserFeedbackResponses, + ListAProjectSusersData, + ListAProjectSusersErrors, + ListAProjectSusersResponse, + ListAProjectSusersResponses, + ListAReleaseSDeploysData, + ListAReleaseSDeploysResponse, + ListAReleaseSDeploysResponses, + ListARepositorySCommitsData, + ListARepositorySCommitsErrors, + ListARepositorySCommitsResponse, + ListARepositorySCommitsResponses, + ListATagSValuesData, + ListATagSValuesErrors, + ListATagSValuesForAnIssueData, + ListATagSValuesForAnIssueErrors, + ListATagSValuesForAnIssueResponse, + ListATagSValuesForAnIssueResponses, + ListATagSValuesResponse, + ListATagSValuesResponses, + ListATeamSMembersData, + ListATeamSMembersErrors, + ListATeamSMembersResponse, + ListATeamSMembersResponses, + ListATeamSProjectsData, + ListATeamSProjectsErrors, + ListATeamSProjectsResponse, + ListATeamSProjectsResponses, + ListAuserSTeamsForAnOrganizationData, + ListAuserSTeamsForAnOrganizationErrors, + ListAuserSTeamsForAnOrganizationResponse, + ListAuserSTeamsForAnOrganizationResponses, + ListClickedNodesData, + ListClickedNodesErrors, + ListClickedNodesResponse, + ListClickedNodesResponses, + ListClientKeysResponse, + ListDataForwarderResponse, + ListDetectorSerializerResponse, + ListMemberOnTeamResponse, + ListMetricAlertRules, + ListOrganizationClientKeysResponse, + ListOrganizationIntegrationResponse, + ListOrganizationMemberResponse, + ListOrganizations, + ListOrgMembersResponse, + ListOrgTeamResponse, + ListProjectEnvironments, + ListRecordingSegmentsData, + ListRecordingSegmentsErrors, + ListRecordingSegmentsResponse, + ListRecordingSegmentsResponses, + ListReplayClicks, + ListReplayRecordingSegments, + ListReplays, + ListRules, + ListSeerAiModelsData, + ListSeerAiModelsResponse, + ListSeerAiModelsResponses, + ListSelectors, + ListSpikeProtectionNotificationsData, + ListSpikeProtectionNotificationsErrors, + ListSpikeProtectionNotificationsResponse, + ListSpikeProtectionNotificationsResponses, + ListTeamProjectResponse, + ListUsersWhoHaveViewedAReplayData, + ListUsersWhoHaveViewedAReplayErrors, + ListUsersWhoHaveViewedAReplayResponse, + ListUsersWhoHaveViewedAReplayResponses, + ListWorkflow, + ListYourOrganizationsData, + ListYourOrganizationsErrors, + ListYourOrganizationsResponse, + ListYourOrganizationsResponses, + Monitor, + MonitorList, + MonitorValidator, + MutateAnOrganizationSAlertsData, + MutateAnOrganizationSAlertsErrors, + MutateAnOrganizationSAlertsResponse, + MutateAnOrganizationSAlertsResponses, + MutateAnOrganizationSMonitorsData, + MutateAnOrganizationSMonitorsErrors, + MutateAnOrganizationSMonitorsResponse, + MutateAnOrganizationSMonitorsResponses, + NotificationAction, + Organization, + OrganizationAlertRuleDetailsPut, + OrganizationAlertRuleIndexPost, + OrganizationConfigIntegrationsEndpointResponse, + OrganizationDetailsPut, + OrganizationEnvironmentResponse, + OrganizationEventsResponseDict, + OrganizationEventsTimeseriesResponse, + OrganizationGroupIndexGetResponse, + OrganizationGroupIndexPutResponse, + OrganizationIntegrationResponse, + OrganizationMember, + OrganizationMemberRequest, + OrganizationMemberRequestWritable, + OrganizationMemberScim, + OrganizationMemberTeam, + OrganizationMemberTeamDetails, + OrganizationMemberWithRoles, + OrganizationProjectResponseDict, + OrganizationRelayResponse, + OrganizationRelease, + OrganizationSentryAppDetailsResponse, + OrganizationStatsSummaryResponse, + OrgReleaseResponse, + OutcomesResponse, + OutgoingNotificationAction, + PageInfo, + ProjectAdmin, + ProjectEventsResponseDict, + ProjectFilterResponse, + ProjectKey, + ProjectKeyPost, + ProjectOwnership, + ProjectOwnershipRequest, + ProjectPost, + ProjectRuleDetailsPut, + ProjectRulesPost, + ProjectSummary, + ProjectTeamsResponse, + ProjectWithTeam, + ProvisionANewOrganizationMemberData, + ProvisionANewOrganizationMemberErrors, + ProvisionANewOrganizationMemberResponse, + ProvisionANewOrganizationMemberResponses, + ProvisionANewTeamData, + ProvisionANewTeamErrors, + ProvisionANewTeamResponse, + ProvisionANewTeamResponses, + QueryAnIndividualOrganizationMemberData, + QueryAnIndividualOrganizationMemberErrors, + QueryAnIndividualOrganizationMemberResponse, + QueryAnIndividualOrganizationMemberResponses, + QueryAnIndividualTeamData, + QueryAnIndividualTeamErrors, + QueryAnIndividualTeamResponse, + QueryAnIndividualTeamResponses, + QueryExploreEventsInTableFormatData, + QueryExploreEventsInTableFormatErrors, + QueryExploreEventsInTableFormatResponse, + QueryExploreEventsInTableFormatResponses, + QueryExploreEventsInTimeseriesFormatData, + QueryExploreEventsInTimeseriesFormatErrors, + QueryExploreEventsInTimeseriesFormatResponse, + QueryExploreEventsInTimeseriesFormatResponses, + RateLimit, + RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenData, + RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenErrors, + RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponse, + RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses, + RegisterANewServiceHookData, + RegisterANewServiceHookErrors, + RegisterANewServiceHookResponse, + RegisterANewServiceHookResponses, + ReleaseHeadCommit, + ReleaseThresholdStatusResponse, + RemoveAnIssueData, + RemoveAnIssueErrors, + RemoveAnIssueResponses, + RemoveAServiceHookData, + RemoveAServiceHookErrors, + RemoveAServiceHookResponse, + RemoveAServiceHookResponses, + ReplayCounts, + Repositories, + Repository, + RepositoryNode, + RepositoryTokenNode, + RepositoryTokenRegenerate, + RepositoryTokens, + ResolveAnEventIdData, + ResolveAnEventIdErrors, + ResolveAnEventIdResponse, + ResolveAnEventIdResponses, + ResolveAShortIdData, + ResolveAShortIdErrors, + ResolveAShortIdResponse, + ResolveAShortIdResponses, + RetrieveAClientKeyData, + RetrieveAClientKeyErrors, + RetrieveAClientKeyResponse, + RetrieveAClientKeyResponses, + RetrieveACountOfReplaysForAGivenIssueOrTransactionData, + RetrieveACountOfReplaysForAGivenIssueOrTransactionErrors, + RetrieveACountOfReplaysForAGivenIssueOrTransactionResponse, + RetrieveACountOfReplaysForAGivenIssueOrTransactionResponses, + RetrieveACustomIntegrationByIdOrSlugData, + RetrieveACustomIntegrationByIdOrSlugResponse, + RetrieveACustomIntegrationByIdOrSlugResponses, + RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationData, + RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationErrors, + RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponse, + RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses, + RetrieveAMonitorData, + RetrieveAMonitorErrors, + RetrieveAMonitorForAProjectData, + RetrieveAMonitorForAProjectErrors, + RetrieveAMonitorForAProjectResponse, + RetrieveAMonitorForAProjectResponses, + RetrieveAMonitorResponse, + RetrieveAMonitorResponses, + RetrieveAnEventForAProjectData, + RetrieveAnEventForAProjectErrors, + RetrieveAnEventForAProjectResponse, + RetrieveAnEventForAProjectResponses, + RetrieveAnIntegrationForAnOrganizationData, + RetrieveAnIntegrationForAnOrganizationResponse, + RetrieveAnIntegrationForAnOrganizationResponses, + RetrieveAnIssueData, + RetrieveAnIssueErrors, + RetrieveAnIssueEventData, + RetrieveAnIssueEventErrors, + RetrieveAnIssueEventResponse, + RetrieveAnIssueEventResponses, + RetrieveAnIssueResponse, + RetrieveAnIssueResponses, + RetrieveAnOrganizationData, + RetrieveAnOrganizationErrors, + RetrieveAnOrganizationMemberData, + RetrieveAnOrganizationMemberErrors, + RetrieveAnOrganizationMemberResponse, + RetrieveAnOrganizationMemberResponses, + RetrieveAnOrganizationReleaseSFileData, + RetrieveAnOrganizationReleaseSFileErrors, + RetrieveAnOrganizationReleaseSFileResponse, + RetrieveAnOrganizationReleaseSFileResponses, + RetrieveAnOrganizationResponse, + RetrieveAnOrganizationResponses, + RetrieveAnOrganizationSCustomDashboardData, + RetrieveAnOrganizationSCustomDashboardErrors, + RetrieveAnOrganizationSCustomDashboardResponse, + RetrieveAnOrganizationSCustomDashboardResponses, + RetrieveAnOrganizationSDiscoverSavedQueryData, + RetrieveAnOrganizationSDiscoverSavedQueryErrors, + RetrieveAnOrganizationSDiscoverSavedQueryResponse, + RetrieveAnOrganizationSDiscoverSavedQueryResponses, + RetrieveAnOrganizationSEventsCountByProjectData, + RetrieveAnOrganizationSEventsCountByProjectErrors, + RetrieveAnOrganizationSEventsCountByProjectResponse, + RetrieveAnOrganizationSEventsCountByProjectResponses, + RetrieveAnOrganizationSReleaseData, + RetrieveAnOrganizationSReleaseErrors, + RetrieveAnOrganizationSReleaseResponse, + RetrieveAnOrganizationSReleaseResponses, + RetrieveAProjectData, + RetrieveAProjectEnvironmentData, + RetrieveAProjectEnvironmentErrors, + RetrieveAProjectEnvironmentResponse, + RetrieveAProjectEnvironmentResponses, + RetrieveAProjectErrors, + RetrieveAProjectReleaseSFileData, + RetrieveAProjectReleaseSFileErrors, + RetrieveAProjectReleaseSFileResponse, + RetrieveAProjectReleaseSFileResponses, + RetrieveAProjectResponse, + RetrieveAProjectResponses, + RetrieveAProjectSSymbolSourcesData, + RetrieveAProjectSSymbolSourcesErrors, + RetrieveAProjectSSymbolSourcesResponse, + RetrieveAProjectSSymbolSourcesResponses, + RetrieveARecordingSegmentData, + RetrieveARecordingSegmentErrors, + RetrieveARecordingSegmentResponse, + RetrieveARecordingSegmentResponses, + RetrieveAReplayInstanceData, + RetrieveAReplayInstanceErrors, + RetrieveAReplayInstanceResponse, + RetrieveAReplayInstanceResponses, + RetrieveAServiceHookData, + RetrieveAServiceHookErrors, + RetrieveAServiceHookResponse, + RetrieveAServiceHookResponses, + RetrieveASpikeProtectionNotificationActionData, + RetrieveASpikeProtectionNotificationActionResponse, + RetrieveASpikeProtectionNotificationActionResponses, + RetrieveATeamData, + RetrieveATeamErrors, + RetrieveATeamResponse, + RetrieveATeamResponses, + RetrieveCheckInsForAMonitorByProjectData, + RetrieveCheckInsForAMonitorByProjectErrors, + RetrieveCheckInsForAMonitorByProjectResponse, + RetrieveCheckInsForAMonitorByProjectResponses, + RetrieveCheckInsForAMonitorData, + RetrieveCheckInsForAMonitorErrors, + RetrieveCheckInsForAMonitorResponse, + RetrieveCheckInsForAMonitorResponses, + RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueData, + RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueResponse, + RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueResponses, + RetrieveDataForwardersForAnOrganizationData, + RetrieveDataForwardersForAnOrganizationResponse, + RetrieveDataForwardersForAnOrganizationResponses, + RetrieveEventCountsForAnOrganizationV2Data, + RetrieveEventCountsForAnOrganizationV2Errors, + RetrieveEventCountsForAnOrganizationV2Response, + RetrieveEventCountsForAnOrganizationV2Responses, + RetrieveEventCountsForAProjectData, + RetrieveEventCountsForAProjectErrors, + RetrieveEventCountsForAProjectResponse, + RetrieveEventCountsForAProjectResponses, + RetrieveFilesChangedInAReleaseSCommitsData, + RetrieveFilesChangedInAReleaseSCommitsErrors, + RetrieveFilesChangedInAReleaseSCommitsResponses, + RetrieveMonitorsForAnOrganizationData, + RetrieveMonitorsForAnOrganizationErrors, + RetrieveMonitorsForAnOrganizationResponse, + RetrieveMonitorsForAnOrganizationResponses, + RetrieveOwnershipConfigurationForAProjectData, + RetrieveOwnershipConfigurationForAProjectResponse, + RetrieveOwnershipConfigurationForAProjectResponses, + RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationData, + RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationErrors, + RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationResponse, + RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationResponses, + RetrieveReleaseHealthSessionStatisticsData, + RetrieveReleaseHealthSessionStatisticsErrors, + RetrieveReleaseHealthSessionStatisticsResponse, + RetrieveReleaseHealthSessionStatisticsResponses, + RetrieveSeerIssueFixStateData, + RetrieveSeerIssueFixStateErrors, + RetrieveSeerIssueFixStateResponse, + RetrieveSeerIssueFixStateResponses, + RetrieveStatusesOfReleaseThresholdsAlphaData, + RetrieveStatusesOfReleaseThresholdsAlphaErrors, + RetrieveStatusesOfReleaseThresholdsAlphaResponse, + RetrieveStatusesOfReleaseThresholdsAlphaResponses, + RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerData, + RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerErrors, + RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerResponse, + RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerResponses, + RetrievesASingleRepositoryForAGivenOwnerData, + RetrievesASingleRepositoryForAGivenOwnerErrors, + RetrievesASingleRepositoryForAGivenOwnerResponse, + RetrievesASingleRepositoryForAGivenOwnerResponses, + RetrievesListOfBranchesForAGivenOwnerAndRepositoryData, + RetrievesListOfBranchesForAGivenOwnerAndRepositoryErrors, + RetrievesListOfBranchesForAGivenOwnerAndRepositoryResponse, + RetrievesListOfBranchesForAGivenOwnerAndRepositoryResponses, + RetrievesListOfRepositoriesForAGivenOwnerData, + RetrievesListOfRepositoriesForAGivenOwnerErrors, + RetrievesListOfRepositoriesForAGivenOwnerResponse, + RetrievesListOfRepositoriesForAGivenOwnerResponses, + RetrieveTagDetailsData, + RetrieveTagDetailsErrors, + RetrieveTagDetailsResponse, + RetrieveTagDetailsResponses, + RetrieveTestSuitesBelongingToARepositorySTestResultsData, + RetrieveTestSuitesBelongingToARepositorySTestResultsErrors, + RetrieveTestSuitesBelongingToARepositorySTestResultsResponse, + RetrieveTestSuitesBelongingToARepositorySTestResultsResponses, + RetrieveTheCustomIntegrationsCreatedByAnOrganizationData, + RetrieveTheCustomIntegrationsCreatedByAnOrganizationResponse, + RetrieveTheCustomIntegrationsCreatedByAnOrganizationResponses, + Rule, + ScimListResponseEnvelopeScimMemberIndexResponse, + ScimListResponseEnvelopeScimTeamIndexResponse, + ScimMemberProvision, + ScimPatchOperation, + ScimPatchRequest, + ScimTeamPatchOperation, + ScimTeamPatchRequest, + ScimTeamRequestBody, + SeerModelsResponse, + SentryAppDetailsResponse, + SentryAppParser, + SessionsQueryResult, + ShortIdLookupResponse, + Source, + SourceMapDebug, + StartSeerIssueFixData, + StartSeerIssueFixErrors, + StartSeerIssueFixResponse, + StartSeerIssueFixResponses, + StatusDetailsValidator, + SubmitUserFeedbackData, + SubmitUserFeedbackErrors, + SubmitUserFeedbackResponse, + SubmitUserFeedbackResponses, + SyncRepos, + SyncsRepositoriesFromAnIntegratedOrgWithGitHubData, + SyncsRepositoriesFromAnIntegratedOrgWithGitHubErrors, + SyncsRepositoriesFromAnIntegratedOrgWithGitHubResponse, + SyncsRepositoriesFromAnIntegratedOrgWithGitHubResponses, + TagKeyDetailsDict, + TagKeyValuesDict, + Team, + TeamDetails, + TeamPost, + TeamScim, + TestResult, + TestResultAggregates, + TestResultNode, + TestSuite, + UpdateAClientKeyData, + UpdateAClientKeyErrors, + UpdateAClientKeyResponse, + UpdateAClientKeyResponses, + UpdateADataForwarderForAnOrganizationData, + UpdateADataForwarderForAnOrganizationErrors, + UpdateADataForwarderForAnOrganizationResponse, + UpdateADataForwarderForAnOrganizationResponses, + UpdateAMonitorByIdData, + UpdateAMonitorByIdErrors, + UpdateAMonitorByIdResponse, + UpdateAMonitorByIdResponses, + UpdateAMonitorData, + UpdateAMonitorErrors, + UpdateAMonitorForAProjectData, + UpdateAMonitorForAProjectErrors, + UpdateAMonitorForAProjectResponse, + UpdateAMonitorForAProjectResponses, + UpdateAMonitorResponse, + UpdateAMonitorResponses, + UpdateAnAlertByIdData, + UpdateAnAlertByIdErrors, + UpdateAnAlertByIdResponse, + UpdateAnAlertByIdResponses, + UpdateAnExistingCustomIntegrationData, + UpdateAnExistingCustomIntegrationErrors, + UpdateAnExistingCustomIntegrationResponse, + UpdateAnExistingCustomIntegrationResponses, + UpdateAnExternalTeamData, + UpdateAnExternalTeamErrors, + UpdateAnExternalTeamResponse, + UpdateAnExternalTeamResponses, + UpdateAnExternalUserData, + UpdateAnExternalUserErrors, + UpdateAnExternalUserResponse, + UpdateAnExternalUserResponses, + UpdateAnInboundDataFilterData, + UpdateAnInboundDataFilterErrors, + UpdateAnInboundDataFilterResponse, + UpdateAnInboundDataFilterResponses, + UpdateAnIssueData, + UpdateAnIssueErrors, + UpdateAnIssueResponse, + UpdateAnIssueResponses, + UpdateAnOrganizationData, + UpdateAnOrganizationErrors, + UpdateAnOrganizationMemberSAttributesData, + UpdateAnOrganizationMemberSAttributesErrors, + UpdateAnOrganizationMemberSAttributesResponse, + UpdateAnOrganizationMemberSAttributesResponses, + UpdateAnOrganizationMemberSRolesData, + UpdateAnOrganizationMemberSRolesErrors, + UpdateAnOrganizationMemberSRolesResponse, + UpdateAnOrganizationMemberSRolesResponses, + UpdateAnOrganizationMemberSTeamRoleData, + UpdateAnOrganizationMemberSTeamRoleErrors, + UpdateAnOrganizationMemberSTeamRoleResponse, + UpdateAnOrganizationMemberSTeamRoleResponses, + UpdateAnOrganizationReleaseFileData, + UpdateAnOrganizationReleaseFileErrors, + UpdateAnOrganizationReleaseFileResponse, + UpdateAnOrganizationReleaseFileResponses, + UpdateAnOrganizationResponse, + UpdateAnOrganizationResponses, + UpdateAnOrganizationSReleaseData, + UpdateAnOrganizationSReleaseErrors, + UpdateAnOrganizationSReleaseResponse, + UpdateAnOrganizationSReleaseResponses, + UpdateAProjectData, + UpdateAProjectEnvironmentData, + UpdateAProjectEnvironmentErrors, + UpdateAProjectEnvironmentResponse, + UpdateAProjectEnvironmentResponses, + UpdateAProjectErrors, + UpdateAProjectReleaseFileData, + UpdateAProjectReleaseFileErrors, + UpdateAProjectReleaseFileResponse, + UpdateAProjectReleaseFileResponses, + UpdateAProjectResponse, + UpdateAProjectResponses, + UpdateAProjectSSymbolSourceData, + UpdateAProjectSSymbolSourceErrors, + UpdateAProjectSSymbolSourceResponse, + UpdateAProjectSSymbolSourceResponses, + UpdateAServiceHookData, + UpdateAServiceHookErrors, + UpdateAServiceHookResponse, + UpdateAServiceHookResponses, + UpdateASpikeProtectionNotificationActionData, + UpdateASpikeProtectionNotificationActionErrors, + UpdateASpikeProtectionNotificationActionResponse, + UpdateASpikeProtectionNotificationActionResponses, + UpdateATeamData, + UpdateATeamErrors, + UpdateATeamResponse, + UpdateATeamResponses, + UpdateATeamSAttributesData, + UpdateATeamSAttributesErrors, + UpdateATeamSAttributesResponse, + UpdateATeamSAttributesResponses, + UpdateClientKey, + UpdateOrgMemberRoles, + UpdateOwnershipConfigurationForAProjectData, + UpdateOwnershipConfigurationForAProjectErrors, + UpdateOwnershipConfigurationForAProjectResponse, + UpdateOwnershipConfigurationForAProjectResponses, + UploadANewFileData, + UploadANewFileErrors, + UploadANewFileResponses, + UploadANewOrganizationReleaseFileData, + UploadANewOrganizationReleaseFileErrors, + UploadANewOrganizationReleaseFileResponses, + UploadANewProjectReleaseFileData, + UploadANewProjectReleaseFileErrors, + UploadANewProjectReleaseFileResponse, + UploadANewProjectReleaseFileResponses, + Workflow, + WorkflowValidator, +} from "./types.gen"; diff --git a/src/client/sdk.gen.ts b/src/client/sdk.gen.ts new file mode 100644 index 00000000..2906fffe --- /dev/null +++ b/src/client/sdk.gen.ts @@ -0,0 +1,2784 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client'; +import { client } from './client.gen'; +import type { AddAMemberToAnOrganizationData, AddAMemberToAnOrganizationErrors, AddAMemberToAnOrganizationResponses, AddAnOrganizationMemberToATeamData, AddAnOrganizationMemberToATeamErrors, AddAnOrganizationMemberToATeamResponses, AddASymbolSourceToAProjectData, AddASymbolSourceToAProjectErrors, AddASymbolSourceToAProjectResponses, AddATeamToAProjectData, AddATeamToAProjectErrors, AddATeamToAProjectResponses, BulkDeleteAlertsData, BulkDeleteAlertsErrors, BulkDeleteAlertsResponses, BulkDeleteMonitorsData, BulkDeleteMonitorsErrors, BulkDeleteMonitorsResponses, BulkMutateAListOfIssuesData, BulkMutateAListOfIssuesErrors, BulkMutateAListOfIssuesResponses, BulkMutateAnOrganizationSissuesData, BulkMutateAnOrganizationSissuesErrors, BulkMutateAnOrganizationSissuesResponses, BulkRemoveAListOfIssuesData, BulkRemoveAListOfIssuesErrors, BulkRemoveAListOfIssuesResponses, BulkRemoveAnOrganizationSissuesData, BulkRemoveAnOrganizationSissuesErrors, BulkRemoveAnOrganizationSissuesResponses, CreateADataForwarderForAnOrganizationData, CreateADataForwarderForAnOrganizationErrors, CreateADataForwarderForAnOrganizationResponses, CreateADeployData, CreateADeployErrors, CreateADeployResponses, CreateAMonitorData, CreateAMonitorErrors, CreateAMonitorForAProjectData, CreateAMonitorForAProjectErrors, CreateAMonitorForAProjectResponses, CreateAMonitorResponses, CreateAnAlertForAnOrganizationData, CreateAnAlertForAnOrganizationErrors, CreateAnAlertForAnOrganizationResponses, CreateANewClientKeyData, CreateANewClientKeyErrors, CreateANewClientKeyResponses, CreateANewDashboardForAnOrganizationData, CreateANewDashboardForAnOrganizationErrors, CreateANewDashboardForAnOrganizationResponses, CreateANewProjectData, CreateANewProjectErrors, CreateANewProjectResponses, CreateANewReleaseForAnOrganizationData, CreateANewReleaseForAnOrganizationErrors, CreateANewReleaseForAnOrganizationResponses, CreateANewSavedQueryData, CreateANewSavedQueryErrors, CreateANewSavedQueryResponses, CreateANewTeamData, CreateANewTeamErrors, CreateANewTeamResponses, CreateAnExternalTeamData, CreateAnExternalTeamErrors, CreateAnExternalTeamResponses, CreateAnExternalUserData, CreateAnExternalUserErrors, CreateAnExternalUserResponses, CreateASpikeProtectionNotificationActionData, CreateASpikeProtectionNotificationActionErrors, CreateASpikeProtectionNotificationActionResponses, CreateOrUpdateAnExternalIssueData, CreateOrUpdateAnExternalIssueErrors, CreateOrUpdateAnExternalIssueResponses, DebugIssuesRelatedToSourceMapsForAGivenEventData, DebugIssuesRelatedToSourceMapsForAGivenEventErrors, DebugIssuesRelatedToSourceMapsForAGivenEventResponses, DeleteAClientKeyData, DeleteAClientKeyErrors, DeleteAClientKeyResponses, DeleteACustomIntegrationData, DeleteACustomIntegrationErrors, DeleteACustomIntegrationResponses, DeleteADataForwarderForAnOrganizationData, DeleteADataForwarderForAnOrganizationErrors, DeleteADataForwarderForAnOrganizationResponses, DeleteAMonitorData, DeleteAMonitorErrors, DeleteAMonitorOrMonitorEnvironmentsData, DeleteAMonitorOrMonitorEnvironmentsErrors, DeleteAMonitorOrMonitorEnvironmentsForAProjectData, DeleteAMonitorOrMonitorEnvironmentsForAProjectErrors, DeleteAMonitorOrMonitorEnvironmentsForAProjectResponses, DeleteAMonitorOrMonitorEnvironmentsResponses, DeleteAMonitorResponses, DeleteAnAlertData, DeleteAnAlertErrors, DeleteAnAlertResponses, DeleteAnExternalIssueData, DeleteAnExternalIssueErrors, DeleteAnExternalIssueResponses, DeleteAnExternalTeamData, DeleteAnExternalTeamErrors, DeleteAnExternalTeamResponses, DeleteAnExternalUserData, DeleteAnExternalUserErrors, DeleteAnExternalUserResponses, DeleteAnIndividualTeamData, DeleteAnIndividualTeamErrors, DeleteAnIndividualTeamResponses, DeleteAnIntegrationForAnOrganizationData, DeleteAnIntegrationForAnOrganizationErrors, DeleteAnIntegrationForAnOrganizationResponses, DeleteAnOrganizationMemberData, DeleteAnOrganizationMemberErrors, DeleteAnOrganizationMemberFromATeamData, DeleteAnOrganizationMemberFromATeamErrors, DeleteAnOrganizationMemberFromATeamResponses, DeleteAnOrganizationMemberResponses, DeleteAnOrganizationMemberViaScimData, DeleteAnOrganizationMemberViaScimErrors, DeleteAnOrganizationMemberViaScimResponses, DeleteAnOrganizationReleaseSFileData, DeleteAnOrganizationReleaseSFileErrors, DeleteAnOrganizationReleaseSFileResponses, DeleteAnOrganizationSCustomDashboardData, DeleteAnOrganizationSCustomDashboardErrors, DeleteAnOrganizationSCustomDashboardResponses, DeleteAnOrganizationSDiscoverSavedQueryData, DeleteAnOrganizationSDiscoverSavedQueryErrors, DeleteAnOrganizationSDiscoverSavedQueryResponses, DeleteAnOrganizationSReleaseData, DeleteAnOrganizationSReleaseErrors, DeleteAnOrganizationSReleaseResponses, DeleteAProjectData, DeleteAProjectErrors, DeleteAProjectReleaseSFileData, DeleteAProjectReleaseSFileErrors, DeleteAProjectReleaseSFileResponses, DeleteAProjectResponses, DeleteAReplayInstanceData, DeleteAReplayInstanceErrors, DeleteAReplayInstanceResponses, DeleteASpecificProjectSDebugInformationFileData, DeleteASpecificProjectSDebugInformationFileErrors, DeleteASpecificProjectSDebugInformationFileResponses, DeleteASpikeProtectionNotificationActionData, DeleteASpikeProtectionNotificationActionResponses, DeleteASymbolSourceFromAProjectData, DeleteASymbolSourceFromAProjectErrors, DeleteASymbolSourceFromAProjectResponses, DeleteATeamData, DeleteATeamErrors, DeleteATeamFromAProjectData, DeleteATeamFromAProjectErrors, DeleteATeamFromAProjectResponses, DeleteATeamResponses, DeprecatedCreateAMetricAlertRuleForAnOrganizationData, DeprecatedCreateAMetricAlertRuleForAnOrganizationErrors, DeprecatedCreateAMetricAlertRuleForAnOrganizationResponses, DeprecatedCreateAnIssueAlertRuleForAProjectData, DeprecatedCreateAnIssueAlertRuleForAProjectErrors, DeprecatedCreateAnIssueAlertRuleForAProjectResponses, DeprecatedDeleteAMetricAlertRuleData, DeprecatedDeleteAMetricAlertRuleErrors, DeprecatedDeleteAMetricAlertRuleResponses, DeprecatedDeleteAnIssueAlertRuleData, DeprecatedDeleteAnIssueAlertRuleErrors, DeprecatedDeleteAnIssueAlertRuleResponses, DeprecatedListAnOrganizationSMetricAlertRulesData, DeprecatedListAnOrganizationSMetricAlertRulesErrors, DeprecatedListAnOrganizationSMetricAlertRulesResponses, DeprecatedListAProjectSissueAlertRulesData, DeprecatedListAProjectSissueAlertRulesErrors, DeprecatedListAProjectSissueAlertRulesResponses, DeprecatedRetrieveAMetricAlertRuleForAnOrganizationData, DeprecatedRetrieveAMetricAlertRuleForAnOrganizationErrors, DeprecatedRetrieveAMetricAlertRuleForAnOrganizationResponses, DeprecatedRetrieveAnIssueAlertRuleForAProjectData, DeprecatedRetrieveAnIssueAlertRuleForAProjectErrors, DeprecatedRetrieveAnIssueAlertRuleForAProjectResponses, DeprecatedUpdateAMetricAlertRuleData, DeprecatedUpdateAMetricAlertRuleErrors, DeprecatedUpdateAMetricAlertRuleResponses, DeprecatedUpdateAnIssueAlertRuleData, DeprecatedUpdateAnIssueAlertRuleErrors, DeprecatedUpdateAnIssueAlertRuleResponses, DisableSpikeProtectionData, DisableSpikeProtectionErrors, DisableSpikeProtectionResponses, EditAnOrganizationSCustomDashboardData, EditAnOrganizationSCustomDashboardErrors, EditAnOrganizationSCustomDashboardResponses, EditAnOrganizationSDiscoverSavedQueryData, EditAnOrganizationSDiscoverSavedQueryErrors, EditAnOrganizationSDiscoverSavedQueryResponses, EnableSpikeProtectionData, EnableSpikeProtectionErrors, EnableSpikeProtectionResponses, FetchAlertsData, FetchAlertsErrors, FetchAlertsResponses, FetchAMonitorData, FetchAMonitorErrors, FetchAMonitorResponses, FetchAnAlertData, FetchAnAlertErrors, FetchAnAlertResponses, FetchAnOrganizationSMonitorsData, FetchAnOrganizationSMonitorsErrors, FetchAnOrganizationSMonitorsResponses, GetIntegrationProviderInformationData, GetIntegrationProviderInformationErrors, GetIntegrationProviderInformationResponses, GetsSyncingStatusForRepositoriesForAnIntegratedOrgData, GetsSyncingStatusForRepositoriesForAnIntegratedOrgErrors, GetsSyncingStatusForRepositoriesForAnIntegratedOrgResponses, ListAnIssueSEventsData, ListAnIssueSEventsErrors, ListAnIssueSEventsResponses, ListAnIssueSHashesData, ListAnIssueSHashesErrors, ListAnIssueSHashesResponses, ListAnOrganizationReleaseSCommitsData, ListAnOrganizationReleaseSCommitsErrors, ListAnOrganizationReleaseSCommitsResponses, ListAnOrganizationSAvailableIntegrationsData, ListAnOrganizationSAvailableIntegrationsResponses, ListAnOrganizationSClientKeysData, ListAnOrganizationSClientKeysErrors, ListAnOrganizationSClientKeysResponses, ListAnOrganizationSCustomDashboardsData, ListAnOrganizationSCustomDashboardsErrors, ListAnOrganizationSCustomDashboardsResponses, ListAnOrganizationSDiscoverSavedQueriesData, ListAnOrganizationSDiscoverSavedQueriesErrors, ListAnOrganizationSDiscoverSavedQueriesResponses, ListAnOrganizationSEnvironmentsData, ListAnOrganizationSEnvironmentsErrors, ListAnOrganizationSEnvironmentsResponses, ListAnOrganizationSIntegrationPlatformInstallationsData, ListAnOrganizationSIntegrationPlatformInstallationsErrors, ListAnOrganizationSIntegrationPlatformInstallationsResponses, ListAnOrganizationSissuesData, ListAnOrganizationSissuesErrors, ListAnOrganizationSissuesResponses, ListAnOrganizationSMembersData, ListAnOrganizationSMembersErrors, ListAnOrganizationSMembersResponses, ListAnOrganizationSPaginatedTeamsData, ListAnOrganizationSPaginatedTeamsErrors, ListAnOrganizationSPaginatedTeamsResponses, ListAnOrganizationSProjectsData, ListAnOrganizationSProjectsErrors, ListAnOrganizationSProjectsResponses, ListAnOrganizationSReleaseFilesData, ListAnOrganizationSReleaseFilesErrors, ListAnOrganizationSReleaseFilesResponses, ListAnOrganizationSReleasesData, ListAnOrganizationSReleasesErrors, ListAnOrganizationSReleasesResponses, ListAnOrganizationSReplaysData, ListAnOrganizationSReplaysErrors, ListAnOrganizationSReplaysResponses, ListAnOrganizationSRepositoriesData, ListAnOrganizationSRepositoriesErrors, ListAnOrganizationSRepositoriesResponses, ListAnOrganizationSScimMembersData, ListAnOrganizationSScimMembersErrors, ListAnOrganizationSScimMembersResponses, ListAnOrganizationSSelectorsData, ListAnOrganizationSSelectorsErrors, ListAnOrganizationSSelectorsResponses, ListAnOrganizationSTeamsData, ListAnOrganizationSTeamsErrors, ListAnOrganizationSTeamsResponses, ListAnOrganizationSTrustedRelaysData, ListAnOrganizationSTrustedRelaysErrors, ListAnOrganizationSTrustedRelaysResponses, ListAProjectReleaseSCommitsData, ListAProjectReleaseSCommitsErrors, ListAProjectReleaseSCommitsResponses, ListAProjectSClientKeysData, ListAProjectSClientKeysErrors, ListAProjectSClientKeysResponses, ListAProjectSDataFiltersData, ListAProjectSDataFiltersErrors, ListAProjectSDataFiltersResponses, ListAProjectSDebugInformationFilesData, ListAProjectSDebugInformationFilesErrors, ListAProjectSDebugInformationFilesResponses, ListAProjectSEnvironmentsData, ListAProjectSEnvironmentsErrors, ListAProjectSEnvironmentsResponses, ListAProjectSErrorEventsData, ListAProjectSErrorEventsErrors, ListAProjectSErrorEventsResponses, ListAProjectSissuesData, ListAProjectSissuesErrors, ListAProjectSissuesResponses, ListAProjectSOrganizationMembersData, ListAProjectSOrganizationMembersErrors, ListAProjectSOrganizationMembersResponses, ListAProjectSReleaseFilesData, ListAProjectSReleaseFilesErrors, ListAProjectSReleaseFilesResponses, ListAProjectSServiceHooksData, ListAProjectSServiceHooksErrors, ListAProjectSServiceHooksResponses, ListAProjectSTeamsData, ListAProjectSTeamsErrors, ListAProjectSTeamsResponses, ListAProjectSuserFeedbackData, ListAProjectSuserFeedbackErrors, ListAProjectSuserFeedbackResponses, ListAProjectSusersData, ListAProjectSusersErrors, ListAProjectSusersResponses, ListAReleaseSDeploysData, ListAReleaseSDeploysResponses, ListARepositorySCommitsData, ListARepositorySCommitsErrors, ListARepositorySCommitsResponses, ListATagSValuesData, ListATagSValuesErrors, ListATagSValuesForAnIssueData, ListATagSValuesForAnIssueErrors, ListATagSValuesForAnIssueResponses, ListATagSValuesResponses, ListATeamSMembersData, ListATeamSMembersErrors, ListATeamSMembersResponses, ListATeamSProjectsData, ListATeamSProjectsErrors, ListATeamSProjectsResponses, ListAuserSTeamsForAnOrganizationData, ListAuserSTeamsForAnOrganizationErrors, ListAuserSTeamsForAnOrganizationResponses, ListClickedNodesData, ListClickedNodesErrors, ListClickedNodesResponses, ListRecordingSegmentsData, ListRecordingSegmentsErrors, ListRecordingSegmentsResponses, ListSeerAiModelsData, ListSeerAiModelsResponses, ListSpikeProtectionNotificationsData, ListSpikeProtectionNotificationsErrors, ListSpikeProtectionNotificationsResponses, ListUsersWhoHaveViewedAReplayData, ListUsersWhoHaveViewedAReplayErrors, ListUsersWhoHaveViewedAReplayResponses, ListYourOrganizationsData, ListYourOrganizationsErrors, ListYourOrganizationsResponses, MutateAnOrganizationSAlertsData, MutateAnOrganizationSAlertsErrors, MutateAnOrganizationSAlertsResponses, MutateAnOrganizationSMonitorsData, MutateAnOrganizationSMonitorsErrors, MutateAnOrganizationSMonitorsResponses, ProvisionANewOrganizationMemberData, ProvisionANewOrganizationMemberErrors, ProvisionANewOrganizationMemberResponses, ProvisionANewTeamData, ProvisionANewTeamErrors, ProvisionANewTeamResponses, QueryAnIndividualOrganizationMemberData, QueryAnIndividualOrganizationMemberErrors, QueryAnIndividualOrganizationMemberResponses, QueryAnIndividualTeamData, QueryAnIndividualTeamErrors, QueryAnIndividualTeamResponses, QueryExploreEventsInTableFormatData, QueryExploreEventsInTableFormatErrors, QueryExploreEventsInTableFormatResponses, QueryExploreEventsInTimeseriesFormatData, QueryExploreEventsInTimeseriesFormatErrors, QueryExploreEventsInTimeseriesFormatResponses, RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenData, RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenErrors, RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses, RegisterANewServiceHookData, RegisterANewServiceHookErrors, RegisterANewServiceHookResponses, RemoveAnIssueData, RemoveAnIssueErrors, RemoveAnIssueResponses, RemoveAServiceHookData, RemoveAServiceHookErrors, RemoveAServiceHookResponses, ResolveAnEventIdData, ResolveAnEventIdErrors, ResolveAnEventIdResponses, ResolveAShortIdData, ResolveAShortIdErrors, ResolveAShortIdResponses, RetrieveAClientKeyData, RetrieveAClientKeyErrors, RetrieveAClientKeyResponses, RetrieveACountOfReplaysForAGivenIssueOrTransactionData, RetrieveACountOfReplaysForAGivenIssueOrTransactionErrors, RetrieveACountOfReplaysForAGivenIssueOrTransactionResponses, RetrieveACustomIntegrationByIdOrSlugData, RetrieveACustomIntegrationByIdOrSlugResponses, RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationData, RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationErrors, RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses, RetrieveAMonitorData, RetrieveAMonitorErrors, RetrieveAMonitorForAProjectData, RetrieveAMonitorForAProjectErrors, RetrieveAMonitorForAProjectResponses, RetrieveAMonitorResponses, RetrieveAnEventForAProjectData, RetrieveAnEventForAProjectErrors, RetrieveAnEventForAProjectResponses, RetrieveAnIntegrationForAnOrganizationData, RetrieveAnIntegrationForAnOrganizationResponses, RetrieveAnIssueData, RetrieveAnIssueErrors, RetrieveAnIssueEventData, RetrieveAnIssueEventErrors, RetrieveAnIssueEventResponses, RetrieveAnIssueResponses, RetrieveAnOrganizationData, RetrieveAnOrganizationErrors, RetrieveAnOrganizationMemberData, RetrieveAnOrganizationMemberErrors, RetrieveAnOrganizationMemberResponses, RetrieveAnOrganizationReleaseSFileData, RetrieveAnOrganizationReleaseSFileErrors, RetrieveAnOrganizationReleaseSFileResponses, RetrieveAnOrganizationResponses, RetrieveAnOrganizationSCustomDashboardData, RetrieveAnOrganizationSCustomDashboardErrors, RetrieveAnOrganizationSCustomDashboardResponses, RetrieveAnOrganizationSDiscoverSavedQueryData, RetrieveAnOrganizationSDiscoverSavedQueryErrors, RetrieveAnOrganizationSDiscoverSavedQueryResponses, RetrieveAnOrganizationSEventsCountByProjectData, RetrieveAnOrganizationSEventsCountByProjectErrors, RetrieveAnOrganizationSEventsCountByProjectResponses, RetrieveAnOrganizationSReleaseData, RetrieveAnOrganizationSReleaseErrors, RetrieveAnOrganizationSReleaseResponses, RetrieveAProjectData, RetrieveAProjectEnvironmentData, RetrieveAProjectEnvironmentErrors, RetrieveAProjectEnvironmentResponses, RetrieveAProjectErrors, RetrieveAProjectReleaseSFileData, RetrieveAProjectReleaseSFileErrors, RetrieveAProjectReleaseSFileResponses, RetrieveAProjectResponses, RetrieveAProjectSSymbolSourcesData, RetrieveAProjectSSymbolSourcesErrors, RetrieveAProjectSSymbolSourcesResponses, RetrieveARecordingSegmentData, RetrieveARecordingSegmentErrors, RetrieveARecordingSegmentResponses, RetrieveAReplayInstanceData, RetrieveAReplayInstanceErrors, RetrieveAReplayInstanceResponses, RetrieveAServiceHookData, RetrieveAServiceHookErrors, RetrieveAServiceHookResponses, RetrieveASpikeProtectionNotificationActionData, RetrieveASpikeProtectionNotificationActionResponses, RetrieveATeamData, RetrieveATeamErrors, RetrieveATeamResponses, RetrieveCheckInsForAMonitorByProjectData, RetrieveCheckInsForAMonitorByProjectErrors, RetrieveCheckInsForAMonitorByProjectResponses, RetrieveCheckInsForAMonitorData, RetrieveCheckInsForAMonitorErrors, RetrieveCheckInsForAMonitorResponses, RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueData, RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueResponses, RetrieveDataForwardersForAnOrganizationData, RetrieveDataForwardersForAnOrganizationResponses, RetrieveEventCountsForAnOrganizationV2Data, RetrieveEventCountsForAnOrganizationV2Errors, RetrieveEventCountsForAnOrganizationV2Responses, RetrieveEventCountsForAProjectData, RetrieveEventCountsForAProjectErrors, RetrieveEventCountsForAProjectResponses, RetrieveFilesChangedInAReleaseSCommitsData, RetrieveFilesChangedInAReleaseSCommitsErrors, RetrieveFilesChangedInAReleaseSCommitsResponses, RetrieveMonitorsForAnOrganizationData, RetrieveMonitorsForAnOrganizationErrors, RetrieveMonitorsForAnOrganizationResponses, RetrieveOwnershipConfigurationForAProjectData, RetrieveOwnershipConfigurationForAProjectResponses, RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationData, RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationErrors, RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationResponses, RetrieveReleaseHealthSessionStatisticsData, RetrieveReleaseHealthSessionStatisticsErrors, RetrieveReleaseHealthSessionStatisticsResponses, RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerData, RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerErrors, RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerResponses, RetrievesASingleRepositoryForAGivenOwnerData, RetrievesASingleRepositoryForAGivenOwnerErrors, RetrievesASingleRepositoryForAGivenOwnerResponses, RetrieveSeerIssueFixStateData, RetrieveSeerIssueFixStateErrors, RetrieveSeerIssueFixStateResponses, RetrievesListOfBranchesForAGivenOwnerAndRepositoryData, RetrievesListOfBranchesForAGivenOwnerAndRepositoryErrors, RetrievesListOfBranchesForAGivenOwnerAndRepositoryResponses, RetrievesListOfRepositoriesForAGivenOwnerData, RetrievesListOfRepositoriesForAGivenOwnerErrors, RetrievesListOfRepositoriesForAGivenOwnerResponses, RetrieveStatusesOfReleaseThresholdsAlphaData, RetrieveStatusesOfReleaseThresholdsAlphaErrors, RetrieveStatusesOfReleaseThresholdsAlphaResponses, RetrieveTagDetailsData, RetrieveTagDetailsErrors, RetrieveTagDetailsResponses, RetrieveTestSuitesBelongingToARepositorySTestResultsData, RetrieveTestSuitesBelongingToARepositorySTestResultsErrors, RetrieveTestSuitesBelongingToARepositorySTestResultsResponses, RetrieveTheCustomIntegrationsCreatedByAnOrganizationData, RetrieveTheCustomIntegrationsCreatedByAnOrganizationResponses, StartSeerIssueFixData, StartSeerIssueFixErrors, StartSeerIssueFixResponses, SubmitUserFeedbackData, SubmitUserFeedbackErrors, SubmitUserFeedbackResponses, SyncsRepositoriesFromAnIntegratedOrgWithGitHubData, SyncsRepositoriesFromAnIntegratedOrgWithGitHubErrors, SyncsRepositoriesFromAnIntegratedOrgWithGitHubResponses, UpdateAClientKeyData, UpdateAClientKeyErrors, UpdateAClientKeyResponses, UpdateADataForwarderForAnOrganizationData, UpdateADataForwarderForAnOrganizationErrors, UpdateADataForwarderForAnOrganizationResponses, UpdateAMonitorByIdData, UpdateAMonitorByIdErrors, UpdateAMonitorByIdResponses, UpdateAMonitorData, UpdateAMonitorErrors, UpdateAMonitorForAProjectData, UpdateAMonitorForAProjectErrors, UpdateAMonitorForAProjectResponses, UpdateAMonitorResponses, UpdateAnAlertByIdData, UpdateAnAlertByIdErrors, UpdateAnAlertByIdResponses, UpdateAnExistingCustomIntegrationData, UpdateAnExistingCustomIntegrationErrors, UpdateAnExistingCustomIntegrationResponses, UpdateAnExternalTeamData, UpdateAnExternalTeamErrors, UpdateAnExternalTeamResponses, UpdateAnExternalUserData, UpdateAnExternalUserErrors, UpdateAnExternalUserResponses, UpdateAnInboundDataFilterData, UpdateAnInboundDataFilterErrors, UpdateAnInboundDataFilterResponses, UpdateAnIssueData, UpdateAnIssueErrors, UpdateAnIssueResponses, UpdateAnOrganizationData, UpdateAnOrganizationErrors, UpdateAnOrganizationMemberSAttributesData, UpdateAnOrganizationMemberSAttributesErrors, UpdateAnOrganizationMemberSAttributesResponses, UpdateAnOrganizationMemberSRolesData, UpdateAnOrganizationMemberSRolesErrors, UpdateAnOrganizationMemberSRolesResponses, UpdateAnOrganizationMemberSTeamRoleData, UpdateAnOrganizationMemberSTeamRoleErrors, UpdateAnOrganizationMemberSTeamRoleResponses, UpdateAnOrganizationReleaseFileData, UpdateAnOrganizationReleaseFileErrors, UpdateAnOrganizationReleaseFileResponses, UpdateAnOrganizationResponses, UpdateAnOrganizationSReleaseData, UpdateAnOrganizationSReleaseErrors, UpdateAnOrganizationSReleaseResponses, UpdateAProjectData, UpdateAProjectEnvironmentData, UpdateAProjectEnvironmentErrors, UpdateAProjectEnvironmentResponses, UpdateAProjectErrors, UpdateAProjectReleaseFileData, UpdateAProjectReleaseFileErrors, UpdateAProjectReleaseFileResponses, UpdateAProjectResponses, UpdateAProjectSSymbolSourceData, UpdateAProjectSSymbolSourceErrors, UpdateAProjectSSymbolSourceResponses, UpdateAServiceHookData, UpdateAServiceHookErrors, UpdateAServiceHookResponses, UpdateASpikeProtectionNotificationActionData, UpdateASpikeProtectionNotificationActionErrors, UpdateASpikeProtectionNotificationActionResponses, UpdateATeamData, UpdateATeamErrors, UpdateATeamResponses, UpdateATeamSAttributesData, UpdateATeamSAttributesErrors, UpdateATeamSAttributesResponses, UpdateOwnershipConfigurationForAProjectData, UpdateOwnershipConfigurationForAProjectErrors, UpdateOwnershipConfigurationForAProjectResponses, UploadANewFileData, UploadANewFileErrors, UploadANewFileResponses, UploadANewOrganizationReleaseFileData, UploadANewOrganizationReleaseFileErrors, UploadANewOrganizationReleaseFileResponses, UploadANewProjectReleaseFileData, UploadANewProjectReleaseFileErrors, UploadANewProjectReleaseFileResponses } from './types.gen'; + +export type Options = Options2 & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +/** + * Return a list of organizations available to the authenticated session in a region. + * This is particularly useful for requests with a user bound context. For API key-based requests this will only return the organization that belongs to the key. + */ +export const listYourOrganizations = (options?: Options) => (options?.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/', + ...options +}); + +/** + * Return details on an individual organization, including various details + * such as membership access and teams. + */ +export const retrieveAnOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/', + ...options +}); + +/** + * Update various attributes and configurable settings for the given organization. + */ +export const updateAnOrganization = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * ## Deprecated + * 🚧 Use [Fetch an Organization's Monitors](/api/monitors/fetch-an-organizations-monitors) and [Fetch Alerts](/api/monitors/fetch-alerts) instead. + * + * + * Return a list of active metric alert rules bound to an organization. + * + * A metric alert rule is a configuration that defines the conditions for triggering an alert. + * It specifies the metric type, function, time interval, and threshold + * values that determine when an alert should be triggered. Metric alert rules are used to monitor + * and notify you when certain metrics, like error count, latency, or failure rate, cross a + * predefined threshold. These rules help you proactively identify and address issues in your + * project. + */ +export const deprecatedListAnOrganization_sMetricAlertRules = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/', + ...options +}); + +/** + * ## Deprecated + * 🚧 Use [Create a Monitor for a Project](/api/monitors/create-a-monitor-for-a-project) and [Create an Alert for an Organization](/api/monitors/create-an-alert-for-an-organization) instead. + * + * + * Create a new metric alert rule for the given organization. + * + * A metric alert rule is a configuration that defines the conditions for triggering an alert. + * It specifies the metric type, function, time interval, and threshold + * values that determine when an alert should be triggered. Metric alert rules are used to monitor + * and notify you when certain metrics, like error count, latency, or failure rate, cross a + * predefined threshold. These rules help you proactively identify and address issues in your + * project. + * + * ## Metric Alert Rule Types + * Below are the types of metric alert rules you can create and the parameter values required + * to set them up. All other parameters can be customized based on how you want the alert + * rule to work. Scroll down to Body Parameters for more information. Visit the + * [Alert Types](/product/alerts/alert-types/#metric-alerts) docs for more details on each + * metric alert rule type. + * + * ### [Number of Errors](/product/alerts/alert-types/#number-of-errors) + * - `eventTypes`: Any of `error` or `default`. + * ```json + * { + * "queryType": 0, + * "dataset": "events", + * "aggregate": "count()", + * "eventTypes": ["error", "default"] + * } + * ``` + * + * ### [Users Experiencing Errors](/product/alerts/alert-types/#users-experiencing-errors) + * - `eventTypes`: Any of `error` or `default`. + * ```json + * { + * "queryType": 0, + * "dataset": "events", + * "aggregate": "count_unique(user)" + * } + * ``` + * + * ### [Crash Free Session Rate](/product/alerts/alert-types/#crash-free-session-rate) + * ```json + * { + * "queryType": 2, + * "dataset": "metrics", + * "aggregate": "percentage(sessions_crashed, sessions) AS _crash_rate_alert_aggregate" + * } + * ``` + * + * ### [Crash Free User Rate](/product/alerts/alert-types/#crash-free-user-rate) + * ```json + * { + * "queryType": 2, + * "dataset": "metrics", + * "aggregate": "percentage(users_crashed, users) AS _crash_rate_alert_aggregate" + * } + * ``` + * + * ### [Throughput](/product/alerts/alert-types/#throughput) + * ```json + * { + * "queryType": 1, + * "dataset": "transactions", + * "aggregate": "count()" + * } + * ``` + * + * ### [Transaction Duration](/product/alerts/alert-types/#transaction-duration) + * - `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`. + * - `aggregate`: Valid values are `avg(transaction.duration)`, `p50(transaction.duration)`, `p75(transaction.duration)`, `p95(transaction.duration)`, `p99(transaction.duration)`, `p100(transaction.duration)`, and `percentile(transaction.duration,x)`, where `x` is your custom percentile. + * ```json + * { + * "queryType": 1, + * "dataset": "generic_metrics", + * "aggregate": "avg(transaction.duration)" + * } + * ``` + * + * ### [Apdex](/product/alerts/alert-types/#apdex) + * - `aggregate`: `apdex(x)` where `x` is the value of the Apdex score. + * ```json + * { + * "queryType": 1, + * "dataset": "transactions", + * "aggregate": "apdex(300)" + * } + * ``` + * + * ### [Failure Rate](/product/alerts/alert-types/#failure-rate) + * ```json + * { + * "queryType": 1, + * "dataset": "transactions", + * "aggregate": "failure_rate()" + * } + * ``` + * + * ### [Largest Contentful Paint](/product/alerts/alert-types/#largest-contentful-display) + * - `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`. + * - `aggregate`: Valid values are `avg(measurements.lcp)`, `p50(measurements.lcp)`, `p75(measurements.lcp)`, `p95(measurements.lcp)`, `p99(measurements.lcp)`, `p100(measurements.lcp)`, and `percentile(measurements.lcp,x)`, where `x` is your custom percentile. + * ```json + * { + * "queryType": 1, + * "dataset": "generic_metrics", + * "aggregate": "p50(measurements.lcp)" + * } + * ``` + * + * ### [First Input Delay](/product/alerts/alert-types/#first-input-delay) + * - `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`. + * - `aggregate`: Valid values are `avg(measurements.fid)`, `p50(measurements.fid)`, `p75(measurements.fid)`, `p95(measurements.fid)`, `p99(measurements.fid)`, `p100(measurements.fid)`, and `percentile(measurements.fid,x)`, where `x` is your custom percentile. + * ```json + * { + * "queryType": 1, + * "dataset": "generic_metrics", + * "aggregate": "p100(measurements.fid)" + * } + * ``` + * + * ### [Cumulative Layout Shift](/product/alerts/alert-types/#cumulative-layout-shift) + * - `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`. + * - `aggregate`: Valid values are `avg(measurements.cls)`, `p50(measurements.cls)`, `p75(measurements.cls)`, `p95(measurements.cls)`, `p99(measurements.cls)`, `p100(measurements.cls)`, and `percentile(measurements.cls,x)`, where `x` is your custom percentile. + * ```json + * { + * "queryType": 1, + * "dataset": "transactions", + * "aggregate": "percentile(measurements.cls,0.2)" + * } + * ``` + * + * ### [Custom Metric](/product/alerts/alert-types/#custom-metric) + * - `dataset`: If a custom percentile is used, `dataset` is `transactions`. Otherwise, `dataset` is `generic_metrics`. + * - `aggregate`: Valid values are: + * - `avg(x)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`. + * - `p50(x)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`. + * - `p75(x)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`. + * - `p95(x)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`. + * - `p99(x)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`. + * - `p100(x)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`. + * - `percentile(x,y)`, where `x` is `transaction.duration`, `measurements.cls`, `measurements.fcp`, `measurements.fid`, `measurements.fp`, `measurements.lcp`, `measurements.ttfb`, or `measurements.ttfb.requesttime`, and `y` is the custom percentile. + * - `failure_rate()` + * - `apdex(x)`, where `x` is the value of the Apdex score. + * - `count()` + * ```json + * { + * "queryType": 1, + * "dataset": "generic_metrics", + * "aggregate": "p75(measurements.ttfb)" + * } + * ``` + */ +export const deprecatedCreateAMetricAlertRuleForAnOrganization = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * ## Deprecated + * 🚧 Use [Delete a Monitor](/api/monitors/delete-a-monitor) and [Delete an Alert](/api/monitors/delete-an-alert) instead. + * + * Delete a specific metric alert rule. + * + * A metric alert rule is a configuration that defines the conditions for triggering an alert. + * It specifies the metric type, function, time interval, and threshold + * values that determine when an alert should be triggered. Metric alert rules are used to monitor + * and notify you when certain metrics, like error count, latency, or failure rate, cross a + * predefined threshold. These rules help you proactively identify and address issues in your + * project. + */ +export const deprecatedDeleteAMetricAlertRule = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/{alert_rule_id}/', + ...options +}); + +/** + * ## Deprecated + * 🚧 Use [Fetch a Monitor](/api/monitors/fetch-a-monitor) and [Fetch an Alert](/api/monitors/fetch-an-alert) instead. + * + * + * Return details on an individual metric alert rule. + * + * A metric alert rule is a configuration that defines the conditions for triggering an alert. + * It specifies the metric type, function, time interval, and threshold + * values that determine when an alert should be triggered. Metric alert rules are used to monitor + * and notify you when certain metrics, like error count, latency, or failure rate, cross a + * predefined threshold. These rules help you proactively identify and address issues in your + * project. + */ +export const deprecatedRetrieveAMetricAlertRuleForAnOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/{alert_rule_id}/', + ...options +}); + +/** + * ## Deprecated + * 🚧 Use [Update a Monitor by ID](/api/monitors/update-a-monitor-by-id) and [Update an Alert by ID](/api/monitors/update-an-alert-by-id) instead. + * + * + * Updates a metric alert rule. See **Metric Alert Rule Types** under + * [Create a Metric Alert Rule for an Organization](/api/alerts/create-a-metric-alert-rule-for-an-organization/#metric-alert-rule-types) + * to see valid request body configurations for different types of metric alert rule types. + * > Warning: Calling this endpoint fully overwrites the specified metric alert. + * + * A metric alert rule is a configuration that defines the conditions for triggering an alert. + * It specifies the metric type, function, time interval, and threshold + * values that determine when an alert should be triggered. Metric alert rules are used to monitor + * and notify you when certain metrics, like error count, latency, or failure rate, cross a + * predefined threshold. These rules help you proactively identify and address issues in your + * project. + */ +export const deprecatedUpdateAMetricAlertRule = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/{alert_rule_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Get integration provider information about all available integrations for an organization. + */ +export const getIntegrationProviderInformation = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/config/integrations/', + ...options +}); + +/** + * Retrieve a list of custom dashboards that are associated with the given organization. + */ +export const listAnOrganization_sCustomDashboards = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/', + ...options +}); + +/** + * Create a new dashboard for the given Organization + */ +export const createANewDashboardForAnOrganization = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete an organization's custom dashboard, or tombstone + * a pre-built dashboard which effectively deletes it. + */ +export const deleteAnOrganization_sCustomDashboard = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/{dashboard_id}/', + ...options +}); + +/** + * Return details about an organization's custom dashboard. + */ +export const retrieveAnOrganization_sCustomDashboard = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/{dashboard_id}/', + ...options +}); + +/** + * Edit an organization's custom dashboard as well as any bulk + * edits on widgets that may have been made. (For example, widgets + * that have been rearranged, updated queries and fields, specific + * display types, and so on.) + */ +export const editAnOrganization_sCustomDashboard = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/{dashboard_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Bulk delete Monitors for a given organization + */ +export const bulkDeleteMonitors = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/detectors/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * List an Organization's Monitors + */ +export const fetchAnOrganization_sMonitors = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/detectors/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Create a Monitor for a project + */ +export const createAMonitorForAProject = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/detectors/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Bulk enable or disable an Organization's Monitors + */ +export const mutateAnOrganization_sMonitors = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/detectors/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Delete a monitor + */ +export const deleteAMonitor = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Return details on an individual monitor + */ +export const fetchAMonitor = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Update an existing monitor + */ +export const updateAMonitorById = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Retrieve a list of saved queries that are associated with the given organization. + */ +export const listAnOrganization_sDiscoverSavedQueries = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/', + ...options +}); + +/** + * Create a new saved query for the given organization. + */ +export const createANewSavedQuery = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a saved query. + */ +export const deleteAnOrganization_sDiscoverSavedQuery = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/', + ...options +}); + +/** + * Retrieve a saved query. + */ +export const retrieveAnOrganization_sDiscoverSavedQuery = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/', + ...options +}); + +/** + * Modify a saved query. + */ +export const editAnOrganization_sDiscoverSavedQuery = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Lists an organization's environments. + */ +export const listAnOrganization_sEnvironments = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/environments/', + ...options +}); + +/** + * This resolves an event ID to the project slug and internal issue ID and internal event ID. + */ +export const resolveAnEventId = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/eventids/{event_id}/', + ...options +}); + +/** + * Retrieves explore data for a given organization. + * + * **Note**: This endpoint is intended to get a table of results, and is not for doing a full export of data sent to + * Sentry. + * + * The `field` query parameter determines what fields will be selected in the `data` and `meta` keys of the endpoint response. + * - The `data` key contains a list of results row by row that match the `query` made + * - The `meta` key contains information about the response, including the unit or type of the fields requested + */ +export const queryExploreEventsInTableFormat = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/events/', + ...options +}); + +/** + * Retrieves explore data for a given organization as a timeseries. + * + * This endpoint can return timeseries for either 1 or many axis, and results grouped to the top events depending + * on the parameters passed + */ +export const queryExploreEventsInTimeseriesFormat = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/events-timeseries/', + ...options +}); + +/** + * Link a user from an external provider to a Sentry user. + */ +export const createAnExternalUser = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/external-users/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete the link between a user from an external provider and a Sentry user. + */ +export const deleteAnExternalUser = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/external-users/{external_user_id}/', + ...options +}); + +/** + * Update a user in an external provider that is currently linked to a Sentry user. + */ +export const updateAnExternalUser = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/external-users/{external_user_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Returns a list of data forwarders for an organization. + */ +export const retrieveDataForwardersForAnOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/forwarding/', + ...options +}); + +/** + * Creates a new data forwarder for an organization. + * Only one data forwarder can be created per provider for a given organization. + * + * Project-specific overrides can only be created after creating the data forwarder. + */ +export const createADataForwarderForAnOrganization = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/forwarding/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Deletes a data forwarder for an organization. All project-specific overrides will be deleted as well. + */ +export const deleteADataForwarderForAnOrganization = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/forwarding/{data_forwarder_id}/', + ...options +}); + +/** + * Updates a data forwarder for an organization or update a project-specific override. + * Updates to the data forwarder's configuration require `org:write` permissions, and the entire + * configuration to be provided, including the `project_ids` field. + * + * To configure project-specific overrides, specify only the following fields: + * + * - 'project_id': The ID of the project to create/modify the override for. + * - 'overrides': Follows the same format as `config` but all provider fields are optional, since only specified fields are overridden. + * - 'is_enabled': To enable/disable the forwarder for events on the specific project. + * + * Overrides can be performed with `project:write` permissions on the project being modified. + */ +export const updateADataForwarderForAnOrganization = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/forwarding/{data_forwarder_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Lists all the available Integrations for an Organization. + */ +export const listAnOrganization_sAvailableIntegrations = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/integrations/', + ...options +}); + +/** + * OrganizationIntegrationBaseEndpoints expect both Integration and + * OrganizationIntegration DB entries to exist for a given organization and + * integration_id. + */ +export const deleteAnIntegrationForAnOrganization = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/integrations/{integration_id}/', + ...options +}); + +/** + * OrganizationIntegrationBaseEndpoints expect both Integration and + * OrganizationIntegration DB entries to exist for a given organization and + * integration_id. + */ +export const retrieveAnIntegrationForAnOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/integrations/{integration_id}/', + ...options +}); + +/** + * Permanently remove the given issues. If IDs are provided, queries and filtering will be ignored. If any IDs are out of scope, the data won't be mutated but the endpoint will still produce a successful response. For example, if no issues were found matching the criteria, a HTTP 204 is returned. + */ +export const bulkRemoveAnOrganization_sIssues = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/', + ...options +}); + +/** + * Return a list of issues for an organization. All parameters are supplied as query string parameters. A default query of `is:unresolved` is applied. To return all results, use an empty query value (i.e. ``?query=`). + */ +export const listAnOrganization_sIssues = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/', + ...options +}); + +/** + * Bulk mutate various attributes on a maxmimum of 1000 issues. + * - For non-status updates, the `id` query parameter is required. + * - For status updates, the `id` query parameter may be omitted to update issues that match the filtering. + * If any IDs are out of scope, the data won't be mutated but the endpoint will still produce a successful response. For example, if no issues were found matching the criteria, a HTTP 204 is returned. + */ +export const bulkMutateAnOrganization_sIssues = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * List all organization members. + * + * Response includes pending invites that are approved by organization owners or managers but waiting to be accepted by the invitee. + */ +export const listAnOrganization_sMembers = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/members/', + ...options +}); + +/** + * Add or invite a member to an organization. + */ +export const addAMemberToAnOrganization = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/members/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Remove an organization member. + */ +export const deleteAnOrganizationMember = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/', + ...options +}); + +/** + * Retrieve an organization member's details. + * + * Response will be a pending invite if it has been approved by organization owners or managers but is waiting to be accepted by the invitee. + */ +export const retrieveAnOrganizationMember = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/', + ...options +}); + +/** + * Update a member's [organization-level](https://docs.sentry.io/organization/membership/#organization-level-roles) and [team-level](https://docs.sentry.io/organization/membership/#team-level-roles) roles. + * + * Note that for changing organization-roles, this endpoint is restricted to + * [user auth tokens](https://docs.sentry.io/account/auth-tokens/#user-auth-tokens). + * Additionally, both the original and desired organization role must have + * the same or lower permissions than the role of the organization user making the request + * + * For example, an organization Manager may change someone's role from + * Member to Manager, but not to Owner. + */ +export const updateAnOrganizationMember_sRoles = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete an organization member from a team. + * + * Note the permission scopes vary depending on the type of authorization token. The following + * table outlines the accepted scopes. + * + * + * + * + * + * + * + * + * + *
Org Auth Token + *
    + *
  • • org:write
  • + *
  • • org:admin
  • + *
  • • team:admin
  • + *
+ *
User Auth Token + *
    + *
  • • org:read*
  • + *
  • • org:write
  • + *
  • • org:admin
  • + *
  • • team:admin
  • + *
  • • org:read + team:admin**
  • + *
+ *
+ * + * + * \***`org:read`** can only be used to remove yourself from the teams you are a member of. + * + * + * \*\*Team Admins must have both **`org:read`** and **`team:admin`** scopes in their user + * authorization token to delete members from their teams. + */ +export const deleteAnOrganizationMemberFromATeam = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/teams/{team_id_or_slug}/', + ...options +}); + +/** + * This request can return various success codes depending on the context of the team: + * - **`201`**: The member has been successfully added. + * - **`202`**: The member needs permission to join the team and an access request + * has been generated. + * - **`204`**: The member is already on the team. + * + * If the team is provisioned through an identity provider, the member cannot join the + * team through Sentry. + * + * Note the permission scopes vary depending on the organization setting `"Open Membership"` + * and the type of authorization token. The following table outlines the accepted scopes. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Open Membership
OnOff
Internal Integration Token + *
    + *
  • • org:read
  • + *
+ *
+ *
    + *
  • • org:write
  • + *
  • • team:write
  • + *
+ *
User Auth Token + *
    + *
  • • org:read
  • + *
+ *
+ *
    + *
  • • org:read*
  • + *
  • • org:write
  • + *
  • • org:read +
  • + *
  •    team:write**
  • + *
+ *
+ * + * + * *Organization members are restricted to this scope. When sending a request, it will always + * return a 202 and request an invite to the team. + * + * + * \*\*Team Admins must have both **`org:read`** and **`team:write`** scopes in their user + * authorization token to add members to their teams. + */ +export const addAnOrganizationMemberToATeam = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/teams/{team_id_or_slug}/', + ...options +}); + +/** + * The relevant organization member must already be a part of the team. + * + * Note that for organization admins, managers, and owners, they are + * automatically granted a minimum team role of `admin` on all teams they + * are part of. Read more about [team roles](https://docs.sentry.io/product/teams/roles/). + */ +export const updateAnOrganizationMember_sTeamRole = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/teams/{team_id_or_slug}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Lists monitors, including nested monitor environments. May be filtered to a project or environment. + */ +export const retrieveMonitorsForAnOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/monitors/', + ...options +}); + +/** + * Create a new monitor. + */ +export const createAMonitor = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/monitors/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a monitor or monitor environments. + */ +export const deleteAMonitorOrMonitorEnvironments = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/', + ...options +}); + +/** + * Retrieves details for a monitor. + */ +export const retrieveAMonitor = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/', + ...options +}); + +/** + * Update a monitor. + */ +export const updateAMonitor = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Retrieve a list of check-ins for a monitor + */ +export const retrieveCheckInsForAMonitor = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/checkins/', + ...options +}); + +/** + * Returns all Spike Protection Notification Actions for an organization. + * + * Notification Actions notify a set of members when an action has been triggered through a notification service such as Slack or Sentry. + * For example, organization owners and managers can receive an email when a spike occurs. + * + * You can use either the `project` or `projectSlug` query parameter to filter for certain projects. Note that if both are present, `projectSlug` takes priority. + */ +export const listSpikeProtectionNotifications = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/', + ...options +}); + +/** + * Creates a new Notification Action for Spike Protection. + * + * Notification Actions notify a set of members when an action has been triggered through a notification service such as Slack or Sentry. + * For example, organization owners and managers can receive an email when a spike occurs. + */ +export const createASpikeProtectionNotificationAction = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Deletes a Spike Protection Notification Action. + * + * Notification Actions notify a set of members when an action has been triggered through a notification service such as Slack or Sentry. + * For example, organization owners and managers can receive an email when a spike occurs. + */ +export const deleteASpikeProtectionNotificationAction = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/{action_id}/', + ...options +}); + +/** + * Returns a serialized Spike Protection Notification Action object. + * + * Notification Actions notify a set of members when an action has been triggered through a notification service such as Slack or Sentry. + * For example, organization owners and managers can receive an email when a spike occurs. + */ +export const retrieveASpikeProtectionNotificationAction = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/{action_id}/', + ...options +}); + +/** + * Updates a Spike Protection Notification Action. + * + * Notification Actions notify a set of members when an action has been triggered through a notification service such as Slack or Sentry. + * For example, organization owners and managers can receive an email when a spike occurs. + */ +export const updateASpikeProtectionNotificationAction = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/{action_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Retrieves repository data for a given owner. + */ +export const retrievesListOfRepositoriesForAGivenOwner = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repositories/', + ...options +}); + +/** + * Gets syncing status for repositories for an integrated organization. + */ +export const getsSyncingStatusForRepositoriesForAnIntegratedOrg = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repositories/sync/', + ...options +}); + +/** + * Syncs repositories for an integrated organization with GitHub. + */ +export const syncsRepositoriesFromAnIntegratedOrgWithGitHub = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repositories/sync/', + ...options +}); + +/** + * Retrieves a paginated list of repository tokens for a given owner. + */ +export const retrievesAPaginatedListOfRepositoryTokensForAGivenOwner = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repositories/tokens/', + ...options +}); + +/** + * Retrieves repository data for a single repository. + */ +export const retrievesASingleRepositoryForAGivenOwner = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/', + ...options +}); + +/** + * Retrieves branch data for a given owner and repository. + */ +export const retrievesListOfBranchesForAGivenOwnerAndRepository = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/branches/', + ...options +}); + +/** + * Retrieves the list of test results for a given repository and owner. Also accepts a number of query parameters to filter the results. + */ +export const retrievePaginatedListOfTestResultsForRepository_Owner_AndOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/test-results/', + ...options +}); + +/** + * Retrieves aggregated test result metrics for a given repository and owner. + * Also accepts a query parameter to specify the time period for the metrics. + */ +export const retrieveAggregatedTestResultMetricsForRepository_Owner_AndOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/test-results-aggregates/', + ...options +}); + +/** + * Retrieves test suites belonging to a repository's test results. + * It accepts a list of test suites as a query parameter to specify individual test suites. + */ +export const retrieveTestSuitesBelongingToARepository_sTestResults = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/test-suites/', + ...options +}); + +/** + * Regenerates a repository upload token and returns the new token. + */ +export const regeneratesARepositoryUploadTokenAndReturnsTheNewToken = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/token/regenerate/', + ...options +}); + +/** + * Return a list of client keys (DSNs) for all projects in an organization. + * + * This paginated endpoint lists client keys across all projects in an organization. Each key includes the project ID + * to identify which project it belongs to. + * + * Query Parameters: + * - team: Filter by team slug or ID to get keys only for that team's projects + * - status: Filter by 'active' or 'inactive' to get keys with specific status + */ +export const listAnOrganization_sClientKeys = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/project-keys/', + ...options +}); + +/** + * Return a list of projects bound to a organization. + */ +export const listAnOrganization_sProjects = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/projects/', + ...options +}); + +/** + * Return a list of trusted relays bound to an organization. + */ +export const listAnOrganization_sTrustedRelays = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/relay_usage/', + ...options +}); + +/** + * **`[WARNING]`**: This API is an experimental Alpha feature and is subject to change! + * + * List all derived statuses of releases that fall within the provided start/end datetimes. + * + * Constructs a response key'd off \{`release_version`\}-\{`project_slug`\} that lists thresholds with their status for *specified* projects. + * Each returned enriched threshold will contain the full serialized `release_threshold` instance as well as it's derived health statuses. + */ +export const retrieveStatusesOfReleaseThresholdsAlpha = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/release-threshold-statuses/', + ...options +}); + +/** + * Permanently remove a release and all of its files. + */ +export const deleteAnOrganization_sRelease = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/', + ...options +}); + +/** + * Return details on an individual release. + */ +export const retrieveAnOrganization_sRelease = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/', + ...options +}); + +/** + * Update a release. This can change some metadata associated with + * the release (the ref, url, and dates). + */ +export const updateAnOrganization_sRelease = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Returns a list of deploys based on the organization, version, and project. + */ +export const listARelease_sDeploys = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/deploys/', + ...options +}); + +/** + * Create a deploy for a given release. + */ +export const createADeploy = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/deploys/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a count of replays for a list of issue or transaction IDs. + * + * The `query` parameter is required. It is a search query that includes exactly one of `issue.id`, `transaction`, or `replay_id` (string or list of strings). + */ +export const retrieveACountOfReplaysForAGivenIssueOrTransaction = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/replay-count/', + ...options +}); + +/** + * Return a list of selectors for a given organization. + */ +export const listAnOrganization_sSelectors = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/replay-selectors/', + ...options +}); + +/** + * Return a list of replays belonging to an organization. + */ +export const listAnOrganization_sReplays = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/replays/', + ...options +}); + +/** + * Return details on an individual replay. + */ +export const retrieveAReplayInstance = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/replays/{replay_id}/', + ...options +}); + +/** + * List a Repository's Commits + */ +export const listARepository_sCommits = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/repos/{repo_id}/commits/', + ...options +}); + +/** + * Returns a paginated list of teams bound to a organization with a SCIM Groups GET Request. + * + * Note that the members field will only contain up to 10,000 members. + */ +export const listAnOrganization_sPaginatedTeams = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups', + ...options +}); + +/** + * Create a new team bound to an organization via a SCIM Groups POST + * Request. The slug will have a normalization of uppercases/spaces to + * lowercases and dashes. + * + * Note that teams are always created with an empty member set. + */ +export const provisionANewTeam = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a team with a SCIM Group DELETE Request. + */ +export const deleteAnIndividualTeam = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups/{team_id_or_slug}', + ...options +}); + +/** + * Query an individual team with a SCIM Group GET Request. + * - Note that the members field will only contain up to 10000 members. + */ +export const queryAnIndividualTeam = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups/{team_id_or_slug}', + ...options +}); + +/** + * Update a team's attributes with a SCIM Group PATCH Request. + */ +export const updateATeam_sAttributes = (options: Options) => (options.client ?? client).patch({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups/{team_id_or_slug}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Returns a paginated list of members bound to a organization with a SCIM Users GET Request. + */ +export const listAnOrganization_sScimMembers = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users', + ...options +}); + +/** + * Create a new Organization Member via a SCIM Users POST Request. + * + * Note that this API does not support setting secondary emails. + */ +export const provisionANewOrganizationMember = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete an organization member with a SCIM User DELETE Request. + */ +export const deleteAnOrganizationMemberViaScim = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users/{member_id}', + ...options +}); + +/** + * Query an individual organization member with a SCIM User GET Request. + * - The `name` object will contain fields `firstName` and `lastName` with the values of `N/A`. + * Sentry's SCIM API does not currently support these fields but returns them for compatibility purposes. + */ +export const queryAnIndividualOrganizationMember = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users/{member_id}', + ...options +}); + +/** + * Update an organization member's attributes with a SCIM PATCH Request. + */ +export const updateAnOrganizationMember_sAttributes = (options: Options) => (options.client ?? client).patch({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users/{member_id}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Retrieve the custom integrations for an organization + */ +export const retrieveTheCustomIntegrationsCreatedByAnOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/sentry-apps/', + ...options +}); + +/** + * Returns a time series of release health session statistics for projects bound to an organization. + * + * The interval and date range are subject to certain restrictions and rounding rules. + * + * The date range is rounded to align with the interval, and is rounded to at least one + * hour. The interval can at most be one day and at least one hour currently. It has to cleanly + * divide one day, for rounding reasons. + * + * Because of technical limitations, this endpoint returns + * at most 10000 data points. For example, if you select a 90 day window grouped by releases, + * you will see at most `floor(10k / (90 + 1)) = 109` releases. To get more results, reduce the + * `statsPeriod`. + */ +export const retrieveReleaseHealthSessionStatistics = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/sessions/', + ...options +}); + +/** + * Resolve a short ID to the project slug and group details. + */ +export const resolveAShortId = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/shortids/{issue_id}/', + ...options +}); + +/** + * Query summarized event counts by project for your Organization. Also see https://docs.sentry.io/api/organizations/retrieve-event-counts-for-an-organization-v2/ for reference. + */ +export const retrieveAnOrganization_sEventsCountByProject = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/stats-summary/', + ...options +}); + +/** + * Query event counts for your Organization. + * Select a field, define a date range, and group or filter by columns. + */ +export const retrieveEventCountsForAnOrganizationV2 = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/stats_v2/', + ...options +}); + +/** + * Returns a list of teams bound to a organization. + */ +export const listAnOrganization_sTeams = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/teams/', + ...options +}); + +/** + * Create a new team bound to an organization. Requires at least one of the `name` + * or `slug` body params to be set. + */ +export const createANewTeam = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/teams/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Returns a list of teams the user has access to in the specified organization. + * Note that this endpoint is restricted to [user auth tokens](https://docs.sentry.io/account/auth-tokens/#user-auth-tokens). + */ +export const listAUser_sTeamsForAnOrganization = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/user-teams/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Bulk delete alerts for a given organization + */ +export const bulkDeleteAlerts = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/workflows/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Returns a list of alerts for a given organization + */ +export const fetchAlerts = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/workflows/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Creates an alert for an organization + */ +export const createAnAlertForAnOrganization = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/workflows/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Bulk enable or disable alerts for a given Organization + */ +export const mutateAnOrganization_sAlerts = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/workflows/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Deletes an alert. + */ +export const deleteAnAlert = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/workflows/{workflow_id}/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Returns an alert. + */ +export const fetchAnAlert = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/workflows/{workflow_id}/', + ...options +}); + +/** + * ⚠️ This endpoint is currently in **beta** and may be subject to change. It is supported by [New Monitors and Alerts](/product/new-monitors-and-alerts/) and may not be viewable in the UI today. + * + * Updates an alert. + */ +export const updateAnAlertById = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/workflows/{workflow_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Schedules a project for deletion. + * + * Deletion happens asynchronously and therefore is not immediate. However once deletion has + * begun the state of a project changes and will be hidden from most public views. + */ +export const deleteAProject = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/', + ...options +}); + +/** + * Return details on an individual project. + */ +export const retrieveAProject = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/', + ...options +}); + +/** + * Update various attributes and configurable settings for the given project. + * + * Note that solely having the **`project:read`** scope restricts updatable settings to + * `isBookmarked`, `autofixAutomationTuning`, `seerScannerAutomation`, + * `preprodSizeStatusChecksEnabled`, `preprodSizeStatusChecksRules`, + * `preprodSizeEnabledQuery`, and `preprodDistributionEnabledQuery`. + */ +export const updateAProject = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Lists a project's environments. + */ +export const listAProject_sEnvironments = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/', + ...options +}); + +/** + * Return details on a project environment. + */ +export const retrieveAProjectEnvironment = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/{environment}/', + ...options +}); + +/** + * Update the visibility for a project environment. + */ +export const updateAProjectEnvironment = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/{environment}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a list of events bound to a project. + */ +export const listAProject_sErrorEvents = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/', + ...options +}); + +/** + * Return a list of source map errors for a given event. + */ +export const debugIssuesRelatedToSourceMapsForAGivenEvent = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/{event_id}/source-map-debug/', + ...options +}); + +/** + * Retrieve a list of filters for a given project. + * `active` will be either a boolean or a list for the legacy browser filters. + */ +export const listAProject_sDataFilters = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/filters/', + ...options +}); + +/** + * Update various inbound data filters for a project. + */ +export const updateAnInboundDataFilter = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/filters/{filter_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a list of client keys bound to a project. + */ +export const listAProject_sClientKeys = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/', + ...options +}); + +/** + * Create a new client key bound to a project. The key's secret and public key + * are generated by the server. + */ +export const createANewClientKey = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a client key for a given project. + */ +export const deleteAClientKey = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/', + ...options +}); + +/** + * Return a client key bound to a project. + */ +export const retrieveAClientKey = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/', + ...options +}); + +/** + * Update various settings for a client key. + */ +export const updateAClientKey = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Returns a list of active organization members that belong to any team assigned to the project. + */ +export const listAProject_sOrganizationMembers = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/members/', + ...options +}); + +/** + * Delete a monitor or monitor environments. + */ +export const deleteAMonitorOrMonitorEnvironmentsForAProject = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/', + ...options +}); + +/** + * Retrieves details for a monitor. + */ +export const retrieveAMonitorForAProject = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/', + ...options +}); + +/** + * Update a monitor. + */ +export const updateAMonitorForAProject = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Retrieve a list of check-ins for a monitor + */ +export const retrieveCheckInsForAMonitorByProject = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/checkins/', + ...options +}); + +/** + * Returns details on a project's ownership configuration. + */ +export const retrieveOwnershipConfigurationForAProject = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/ownership/', + ...options +}); + +/** + * Updates ownership configurations for a project. Note that only the + * attributes submitted are modified. + */ +export const updateOwnershipConfigurationForAProject = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/ownership/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a replay. + */ +export const deleteAReplayInstance = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/', + ...options +}); + +/** + * Retrieve a collection of RRWeb DOM node-ids and the timestamp they were clicked. + */ +export const listClickedNodes = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/clicks/', + ...options +}); + +/** + * Return a collection of replay recording segments. + */ +export const listRecordingSegments = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/recording-segments/', + ...options +}); + +/** + * Return a replay recording segment. + */ +export const retrieveARecordingSegment = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/recording-segments/{segment_id}/', + ...options +}); + +/** + * Return a list of users who have viewed a replay. + */ +export const listUsersWhoHaveViewedAReplay = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/viewed-by/', + ...options +}); + +/** + * ## Deprecated + * 🚧 Use [Fetch an Organization's Monitors](/api/monitors/fetch-an-organizations-monitors) and [Fetch Alerts](/api/monitors/fetch-alerts) instead. + * + * + * Return a list of active issue alert rules bound to a project. + * + * An issue alert rule triggers whenever a new event is received for any issue in a project that matches the specified alert conditions. These conditions can include a resolved issue re-appearing or an issue affecting many users. Alert conditions have three parts: + * - Triggers: specify what type of activity you'd like monitored or when an alert should be triggered. + * - Filters: help control noise by triggering an alert only if the issue matches the specified criteria. + * - Actions: specify what should happen when the trigger conditions are met and the filters match. + */ +export const deprecatedListAProject_sIssueAlertRules = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/', + ...options +}); + +/** + * ## Deprecated + * 🚧 Use [Create a Monitor for a Project](/api/monitors/create-a-monitor-for-a-project) and [Create an Alert for an Organization](/api/monitors/create-an-alert-for-an-organization) instead. + * + * + * Create a new issue alert rule for the given project. + * + * An issue alert rule triggers whenever a new event is received for any issue in a project that matches the specified alert conditions. These conditions can include a resolved issue re-appearing or an issue affecting many users. Alert conditions have three parts: + * - Triggers: specify what type of activity you'd like monitored or when an alert should be triggered. + * - Filters: help control noise by triggering an alert only if the issue matches the specified criteria. + * - Actions: specify what should happen when the trigger conditions are met and the filters match. + */ +export const deprecatedCreateAnIssueAlertRuleForAProject = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * ## Deprecated + * 🚧 Use [Delete an Alert](/api/monitors/delete-an-alert) instead. + * + * + * Delete a specific issue alert rule. + * + * An issue alert rule triggers whenever a new event is received for any issue in a project that matches the specified alert conditions. These conditions can include a resolved issue re-appearing or an issue affecting many users. Alert conditions have three parts: + * - Triggers: specify what type of activity you'd like monitored or when an alert should be triggered. + * - Filters: help control noise by triggering an alert only if the issue matches the specified criteria. + * - Actions: specify what should happen when the trigger conditions are met and the filters match. + */ +export const deprecatedDeleteAnIssueAlertRule = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/{rule_id}/', + ...options +}); + +/** + * ## Deprecated + * 🚧 Use [Fetch an Alert](/api/monitors/fetch-an-alert) instead. + * + * + * Return details on an individual issue alert rule. + * + * An issue alert rule triggers whenever a new event is received for any issue in a project that matches the specified alert conditions. These conditions can include a resolved issue re-appearing or an issue affecting many users. Alert conditions have three parts: + * - Triggers - specify what type of activity you'd like monitored or when an alert should be triggered. + * - Filters - help control noise by triggering an alert only if the issue matches the specified criteria. + * - Actions - specify what should happen when the trigger conditions are met and the filters match. + */ +export const deprecatedRetrieveAnIssueAlertRuleForAProject = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/{rule_id}/', + ...options +}); + +/** + * ## Deprecated + * 🚧 Use [Update an Alert by ID](/api/monitors/update-an-alert-by-id) instead. + * + * + * Updates an issue alert rule. + * > Warning: Calling this endpoint fully overwrites the specified issue alert. + * + * An issue alert rule triggers whenever a new event is received for any issue in a project that matches the specified alert conditions. These conditions can include a resolved issue re-appearing or an issue affecting many users. Alert conditions have three parts: + * - Triggers - specify what type of activity you'd like monitored or when an alert should be triggered. + * - Filters - help control noise by triggering an alert only if the issue matches the specified criteria. + * - Actions - specify what should happen when the trigger conditions are met and the filters match. + */ +export const deprecatedUpdateAnIssueAlertRule = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/{rule_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a custom symbol source from a project. + */ +export const deleteASymbolSourceFromAProject = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/', + ...options +}); + +/** + * List custom symbol sources configured for a project. + */ +export const retrieveAProject_sSymbolSources = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/', + ...options +}); + +/** + * Add a custom symbol source to a project. + */ +export const addASymbolSourceToAProject = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Update a custom symbol source in a project. + */ +export const updateAProject_sSymbolSource = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a list of teams that have access to this project. + */ +export const listAProject_sTeams = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/teams/', + ...options +}); + +/** + * Revoke a team's access to a project. + * + * Note that Team Admins can only revoke access to teams they are admins of. + */ +export const deleteATeamFromAProject = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/teams/{team_id_or_slug}/', + ...options +}); + +/** + * Give a team access to a project. + */ +export const addATeamToAProject = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/teams/{team_id_or_slug}/', + ...options +}); + +/** + * Get list of actively used LLM model names from Seer. + * + * Returns the list of AI models that are currently used in production in Seer. + * This endpoint does not require authentication and can be used to discover which models Seer uses. + * + * Requests to this endpoint should use the region-specific domain + * eg. `us.sentry.io` or `de.sentry.io` + */ +export const listSeerAiModels = (options?: Options) => (options?.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/seer/models/', + ...options +}); + +/** + * Delete a custom integration. + */ +export const deleteACustomIntegration = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/sentry-apps/{sentry_app_id_or_slug}/', + ...options +}); + +/** + * Retrieve a custom integration. + */ +export const retrieveACustomIntegrationByIdOrSlug = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/sentry-apps/{sentry_app_id_or_slug}/', + ...options +}); + +/** + * Update an existing custom integration. + */ +export const updateAnExistingCustomIntegration = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/sentry-apps/{sentry_app_id_or_slug}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Schedules a team for deletion. + * + * **Note:** Deletion happens asynchronously and therefore is not + * immediate. Teams will have their slug released while waiting for deletion. + */ +export const deleteATeam = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/', + ...options +}); + +/** + * Return details on an individual team. + */ +export const retrieveATeam = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/', + ...options +}); + +/** + * Update various attributes and configurable settings for the given + * team. + */ +export const updateATeam = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Link a team from an external provider to a Sentry team. + */ +export const createAnExternalTeam = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/external-teams/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete the link between a team from an external provider and a Sentry team. + */ +export const deleteAnExternalTeam = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/external-teams/{external_team_id}/', + ...options +}); + +/** + * Update a team in an external provider that is currently linked to a Sentry team. + */ +export const updateAnExternalTeam = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/external-teams/{external_team_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * List all members on a team. + * + * The response will not include members with pending invites. + */ +export const listATeam_sMembers = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/members/', + ...options +}); + +/** + * Return a list of projects bound to a team. + */ +export const listATeam_sProjects = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/projects/', + ...options +}); + +/** + * Create a new project bound to a team. + * + * Note: If your organization has disabled member project creation, the `org:write` or `team:admin` scope is required. + * + */ +export const createANewProject = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/projects/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a list of version control repositories for a given organization. + */ +export const listAnOrganization_sRepositories = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/repos/', + ...options +}); + +/** + * Delete a debug information file for a given project. + */ +export const deleteASpecificProject_sDebugInformationFile = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/dsyms/', + ...options +}); + +/** + * Retrieve a list of debug information files for a given project. + */ +export const listAProject_sDebugInformationFiles = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/dsyms/', + ...options +}); + +/** + * Upload a new debug information file for the given release. + * + * Unlike other API requests, files must be uploaded using the + * traditional multipart/form-data content-type. + * + * Requests to this endpoint should use the region-specific domain eg. `us.sentry.io` or `de.sentry.io`. + * + * The file uploaded is a zip archive of an Apple .dSYM folder which + * contains the individual debug images. Uploading through this endpoint + * will create different files for the contained images. + */ +export const uploadANewFile = (options: Options) => (options.client ?? client).post({ + ...formDataBodySerializer, + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/dsyms/', + ...options, + headers: { + 'Content-Type': null, + ...options.headers + } +}); + +/** + * Return a list of users seen within this project. + */ +export const listAProject_sUsers = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/users/', + ...options +}); + +/** + * Return a list of values associated with this key. The `query` + * parameter can be used to to perform a "contains" match on + * values. + * + * When [paginated](/api/pagination) can return at most 1000 values. + */ +export const listATag_sValues = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/tags/{key}/values/', + ...options +}); + +/** + * Caution + * This endpoint may change in the future without notice. + * + * Return a set of points representing a normalized timestamp and the + * number of events seen in the period. + * + * Query ranges are limited to Sentry's configured time-series resolutions. + */ +export const retrieveEventCountsForAProject = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/stats/', + ...options +}); + +/** + * Return a list of user feedback items within this project. + * + * *This list does not include submissions from the [User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget). This is because it is based on an older format called User Reports - read more [here](https://develop.sentry.dev/application/feedback-architecture/#user-reports). To return a list of user feedback items from the widget, please use the [issue API](https://docs.sentry.io/api/events/list-a-projects-issues/) with the filter `issue.category:feedback`.* + */ +export const listAProject_sUserFeedback = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/', + ...options +}); + +/** + * *This endpoint is DEPRECATED. We document it here for older SDKs and users who are still migrating to the [User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget) or [API](https://docs.sentry.io/platforms/javascript/user-feedback/#user-feedback-api)(multi-platform). If you are a new user, do not use this endpoint - unless you don't have a JS frontend, and your platform's SDK does not offer a feedback API.* + * + * Feedback must be received by the server no more than 30 minutes after the event was saved. + * + * Additionally, within 5 minutes of submitting feedback it may also be overwritten. This is useful in situations where you may need to retry sending a request due to network failures. + * + * If feedback is rejected due to a mutability threshold, a 409 status code will be returned. + * + * Note: Feedback may be submitted with DSN authentication (see auth documentation). + */ +export const submitUserFeedback = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a list of service hooks bound to a project. + */ +export const listAProject_sServiceHooks = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/', + ...options +}); + +/** + * Register a new service hook on a project. + * + * Events include: + * + * - event.alert: An alert is generated for an event (via rules). + * - event.created: A new event has been processed. + * + * This endpoint requires the 'servicehooks' feature to be enabled for your project. + */ +export const registerANewServiceHook = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Remove a service hook. + */ +export const removeAServiceHook = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/{hook_id}/', + ...options +}); + +/** + * Return a service hook bound to a project. + */ +export const retrieveAServiceHook = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/{hook_id}/', + ...options +}); + +/** + * Update a service hook. + */ +export const updateAServiceHook = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/{hook_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return details on an individual event. + */ +export const retrieveAnEventForAProject = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/{event_id}/', + ...options +}); + +/** + * Permanently remove the given issues. The list of issues to modify is given through the `id` query parameter. It is repeated for each issue that should be removed. + * + * Only queries by 'id' are accepted. + * + * If any IDs are out of scope this operation will succeed without any data mutation. + */ +export const bulkRemoveAListOfIssues = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/', + ...options +}); + +/** + * **Deprecated**: This endpoint has been replaced with the [Organization Issues endpoint](/api/events/list-an-organizations-issues/) which + * supports filtering on project and additional functionality. + * + * Return a list of issues (groups) bound to a project. All parameters are supplied as query string parameters. + * + * A default query of ``is:unresolved`` is applied. To return results with other statuses send an new query value (i.e. ``?query=`` for all results). + * + * The ``statsPeriod`` parameter can be used to select the timeline stats which should be present. Possible values are: ``""`` (disable),``"24h"`` (default), ``"14d"`` + * + * User feedback items from the [User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget) are built off the issue platform, so to return a list of user feedback items for a specific project, filter for `issue.category:feedback`. + */ +export const listAProject_sIssues = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/', + ...options +}); + +/** + * Bulk mutate various attributes on issues. The list of issues to modify is given through the `id` query parameter. It is repeated for each issue that should be modified. + * + * - For non-status updates, the `id` query parameter is required. + * - For status updates, the `id` query parameter may be omitted + * for a batch "update all" query. + * - An optional `status` query parameter may be used to restrict + * mutations to only events with the given status. + * + * The following attributes can be modified and are supplied as JSON object in the body: + * + * If any IDs are out of scope this operation will succeed without any data mutation. + */ +export const bulkMutateAListOfIssues = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Returns a list of values associated with this key for an issue. + * Returns at most 1000 values when paginated. + */ +export const listATag_sValuesForAnIssue = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/values/', + ...options +}); + +/** + * This endpoint lists an issue's hashes, which are the generated checksums used to aggregate individual events. + */ +export const listAnIssue_sHashes = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/hashes/', + ...options +}); + +/** + * Removes an individual issue. + */ +export const removeAnIssue = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/', + ...options +}); + +/** + * Return details on an individual issue. This returns the basic stats for the issue (title, last seen, first seen), some overall numbers (number of comments, user reports) as well as the summarized event data. + */ +export const retrieveAnIssue = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/', + ...options +}); + +/** + * Updates an individual issue's attributes. Only the attributes submitted are modified. + */ +export const updateAnIssue = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a list of releases for a given organization. + */ +export const listAnOrganization_sReleases = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/', + ...options +}); + +/** + * Create a new release for the given organization. Releases are used by + * Sentry to improve its error reporting abilities by correlating + * first seen events with the release that might have introduced the + * problem. + * Releases are also necessary for source maps and other debug features + * that require manual upload for functioning well. + */ +export const createANewReleaseForAnOrganization = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a list of files for a given release. + */ +export const listAnOrganization_sReleaseFiles = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/', + ...options +}); + +/** + * Upload a new file for the given release. + * + * Unlike other API requests, files must be uploaded using the traditional multipart/form-data content-type. + * + * Requests to this endpoint should use the region-specific domain eg. `us.sentry.io` or `de.sentry.io`. + * + * The optional 'name' attribute should reflect the absolute path that this file will be referenced as. For example, in the case of JavaScript you might specify the full web URI. + */ +export const uploadANewOrganizationReleaseFile = (options: Options) => (options.client ?? client).post({ + ...formDataBodySerializer, + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/', + ...options, + headers: { + 'Content-Type': null, + ...options.headers + } +}); + +/** + * Return a list of files for a given release. + */ +export const listAProject_sReleaseFiles = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/', + ...options +}); + +/** + * Upload a new file for the given release. + * + * Unlike other API requests, files must be uploaded using the traditional multipart/form-data content-type. + * + * Requests to this endpoint should use the region-specific domain eg. `us.sentry.io` or `de.sentry.io` + * + * The optional 'name' attribute should reflect the absolute path that this file will be referenced as. For example, in the case of JavaScript you might specify the full web URI. + */ +export const uploadANewProjectReleaseFile = (options: Options) => (options.client ?? client).post({ + ...formDataBodySerializer, + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/', + ...options, + headers: { + 'Content-Type': null, + ...options.headers + } +}); + +/** + * Delete a file for a given release. + */ +export const deleteAnOrganizationRelease_sFile = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/{file_id}/', + ...options +}); + +/** + * Retrieve a file for a given release. + */ +export const retrieveAnOrganizationRelease_sFile = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/{file_id}/', + ...options +}); + +/** + * Update an organization release file. + */ +export const updateAnOrganizationReleaseFile = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/{file_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete a file for a given release. + */ +export const deleteAProjectRelease_sFile = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/{file_id}/', + ...options +}); + +/** + * Retrieve a file for a given release. + */ +export const retrieveAProjectRelease_sFile = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/{file_id}/', + ...options +}); + +/** + * Update a project release file. + */ +export const updateAProjectReleaseFile = (options: Options) => (options.client ?? client).put({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/{file_id}/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * List an organization release's commits. + */ +export const listAnOrganizationRelease_sCommits = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/commits/', + ...options +}); + +/** + * List a project release's commits. + */ +export const listAProjectRelease_sCommits = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/commits/', + ...options +}); + +/** + * Retrieve files changed in a release's commits + */ +export const retrieveFilesChangedInARelease_sCommits = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/commitfiles/', + ...options +}); + +/** + * Return a list of integration platform installations for a given organization. + */ +export const listAnOrganization_sIntegrationPlatformInstallations = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/sentry-app-installations/', + ...options +}); + +/** + * Create or update an external issue from an integration platform integration. + */ +export const createOrUpdateAnExternalIssue = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/sentry-app-installations/{uuid}/external-issues/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Delete an external issue. + */ +export const deleteAnExternalIssue = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/sentry-app-installations/{uuid}/external-issues/{external_issue_id}/', + ...options +}); + +/** + * Disables Spike Protection feature for some of the projects within the organization. + */ +export const disableSpikeProtection = (options: Options) => (options.client ?? client).delete({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/spike-protections/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Enables Spike Protection feature for some of the projects within the organization. + */ +export const enableSpikeProtection = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/spike-protections/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Retrieve the current detailed state of an issue fix process for a specific issue including: + * + * - Current status + * - Steps performed and their outcomes + * - Repository information and permissions + * - Root Cause Analysis + * - Proposed Solution + * - Generated code changes + * + * This endpoint although documented is still experimental and the payload may change in the future. + */ +export const retrieveSeerIssueFixState = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/autofix/', + ...options +}); + +/** + * Trigger a Seer Issue Fix run for a specific issue. + * + * The issue fix process can: + * - Identify the root cause of the issue + * - Propose a solution + * - Generate code changes + * - Create a pull request with the fix + * + * The process runs asynchronously, and you can get the state using the GET endpoint. + */ +export const startSeerIssueFix = (options: Options) => (options.client ?? client).post({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/autofix/', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options.headers + } +}); + +/** + * Return a list of error events bound to an issue + */ +export const listAnIssue_sEvents = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/', + ...options +}); + +/** + * Retrieves the details of an issue event. + */ +export const retrieveAnIssueEvent = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/{event_id}/', + ...options +}); + +/** + * Retrieve custom integration issue links for the given Sentry issue + */ +export const retrieveCustomIntegrationIssueLinksForTheGivenSentryIssue = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/external-issues/', + ...options +}); + +/** + * Return a list of values associated with this key for an issue. When paginated can return at most 1000 values. + */ +export const retrieveTagDetails = (options: Options) => (options.client ?? client).get({ + security: [{ scheme: 'bearer', type: 'http' }], + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/', + ...options +}); diff --git a/src/client/types.gen.ts b/src/client/types.gen.ts new file mode 100644 index 00000000..f99be139 --- /dev/null +++ b/src/client/types.gen.ts @@ -0,0 +1,32137 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type ClientOptions = { + baseUrl: 'https://{region}.sentry.io' | 'https://{region}.sentry.io' | 'https://{region}.sentry.io' | 'https://{region}.sentry.io' | 'https://{region}.sentry.io' | (string & {}); +}; + +/** + * This represents a Sentry Metric Alert Rule. + */ +export type AlertRule = { + environment?: string | null; + projects?: Array | null; + queryType?: number | null; + resolveThreshold?: number | null; + dataset?: string | null; + thresholdType?: number | null; + eventTypes?: Array | null; + owner?: string | null; + originalAlertRuleId?: string | null; + comparisonDelta?: number | null; + snooze?: boolean | null; + errors?: Array | null; + extrapolationMode?: string | null; + id: string; + name: string; + organizationId: string; + query: string; + aggregate: string; + timeWindow: number; + triggers: Array<{ + [key: string]: unknown; + }>; + dateModified: string; + dateCreated: string; + createdBy: { + [key: string]: unknown; + }; +}; + +/** + * Response type for the POST endpoint + */ +export type AutofixPostResponse = { + run_id: number; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type AutofixRequest = { + /** + * Run issue fix on a specific event. If not provided, the recommended event for the issue will be used. + */ + event_id?: string; + /** + * Optional custom instruction to guide the issue fix process. + */ + instruction?: string; + /** + * URL of a pull request where the issue fix should add comments. + */ + pr_to_comment_on_url?: string; + /** + * Where the issue fix process should stop. If not provided, will run to root cause. + * + * * `root_cause` + * * `solution` + * * `code_changes` + * * `open_pr` + */ + stopping_point?: 'root_cause' | 'solution' | 'code_changes' | 'open_pr'; +}; + +/** + * Response type for the GET endpoint + */ +export type AutofixStateResponse = { + autofix: { + [key: string]: unknown; + } | null; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type BaseDataConditionGroupValidator = { + id?: string; + /** + * * `any` + * * `any-short` + * * `all` + * * `none` + */ + logic_type: 'any' | 'any-short' | 'all' | 'none'; + conditions?: Array; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type BaseDetectorTypeValidator = { + /** + * Name of the monitor. + */ + name: string; + /** + * The type of monitor - `metric_issue`. + */ + type: string; + /** + * + * The data sources for the monitor to use based on what you want to measure. + * + * **Number of Errors Metric Monitor** + * ```json + * [ + * { + * "aggregate": "count()", + * "dataset" : "events", + * "environment": "prod", + * "eventTypes": ["default", "error"], + * "query": "is:unresolved", + * "queryType": 0, + * "timeWindow": 3600, + * }, + * ], + * ``` + * + * **Users Experiencing Errors Metric Monitor** + * ```json + * [ + * { + * "aggregate": "count_unique(tags[sentry:user])", + * "dataset" : "events", + * "environment": "prod", + * "eventTypes": ["default", "error"], + * "query": "is:unresolved", + * "queryType": 0, + * "timeWindow": 3600, + * }, + * ], + * ``` + * + * + * **Throughput Metric Monitor** + * ```json + * [ + * { + * "aggregate":"count(span.duration)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Duration Metric Monitor** + * ```json + * [ + * { + * "aggregate":"p95(span.duration)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Failure Rate Metric Monitor** + * ```json + * [ + * { + * "aggregate":"failure_rate()", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Largest Contentful Paint Metric Monitor** + * ```json + * [ + * { + * "aggregate":"p95(measurements.lcp)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + */ + data_sources?: Array; + /** + * + * The issue detection type configuration. + * + * + * - `detectionType` + * - `static`: Threshold based monitor + * - `percent`: Change based monitor + * - `dynamic`: Dynamic monitor + * - `comparisonDelta`: If selecting a **change** detection type, the comparison delta is the time period at which to compare against in minutes. + * For example, a value of 3600 compares the metric tracked against data 1 hour ago. + * - `300`: 5 minutes + * - `900`: 15 minutes + * - `3600`: 1 hour + * - `86400`: 1 day + * - `604800`: 1 week + * - `2592000`: 1 month + * + * **Threshold** + * ```json + * { + * "detectionType": "static", + * } + * ``` + * **Change** + * ```json + * { + * "detectionType": "percent", + * "comparisonDelta": 3600, + * } + * ``` + * **Dynamic** + * ```json + * { + * "detectionType": "dynamic", + * } + * ``` + * + */ + config?: { + [key: string]: unknown; + }; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + condition_group?: { + id?: string; + /** + * * `any` + * * `any-short` + * * `all` + * * `none` + */ + logic_type: 'any' | 'any-short' | 'all' | 'none'; + conditions?: Array; + }; + /** + * + * The user or team who owns the monitor. + * + * **User** + * ```json + * "type": "user", + * "id": "12345", + * "name": "Jane Doe", + * "email": "jane.doe@sentry.io" + * ``` + * + * **Team** + * ```json + * "type": "team", + * "id": "123456789", + * "name": "example-team" + * ``` + * + */ + owner?: string | null; + /** + * A description of the monitor. Will be used in the resulting issue. + */ + description?: string | null; + /** + * Set to False if you want to disable the monitor. + */ + enabled?: boolean; +}; + +export type BaseTeam = { + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; +}; + +/** + * Serializer for individual branch nodes from GraphQL response + */ +export type BranchNode = { + name: string; +}; + +/** + * Serializer for repository branches response + */ +export type Branches = { + defaultBranch: string; + results: Array<{ + name: string; + }>; + /** + * Serializer for pagination information + */ + pageInfo: { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; + }; + totalCount: number; +}; + +export type BulkUpdateAlerts = { + /** + * Whether to enable or disable the alerts + */ + enabled: boolean; +}; + +export type BulkUpdateMonitors = { + /** + * Whether to enable or disable the monitors + */ + enabled: boolean; +}; + +export type CheckInList = Array<{ + groups?: Array; + id: string; + environment: string; + status: string; + duration: number | null; + dateCreated: string; + dateAdded: string; + dateUpdated: string; + dateInProgress: string | null; + dateClock: string; + expectedTime: string; + monitorConfig: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; +}>; + +export type Commit = { + id: string; + repository?: string | null; + message?: string | null; + author_name?: string | null; + author_email?: string | null; + timestamp?: string | null; + patch_set?: Array<{ + path: string; + type: string; + }> | null; +}; + +export type CommitPatchSet = { + path: string; + type: string; +}; + +export type CommitSerializerResponse = Array<{ + id: string; + message: string | null; + dateCreated: string; + pullRequest: { + id: string; + title: string | null; + message: string | null; + dateCreated: string; + repository: { + id?: string; + name?: string; + url?: string | null; + provider?: { + [key: string]: string; + }; + status?: string; + dateCreated?: string; + integrationId?: string | null; + externalSlug?: string | null; + externalId?: string | null; + settings?: { + enabledCodeReview: boolean; + codeReviewTriggers: Array; + } | null; + }; + author: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + } | { + name: string | null; + email: string; + }; + externalUrl: string; + } | null; + suspectCommitType: string; + repository?: { + id?: string; + name?: string; + url?: string | null; + provider?: { + [key: string]: string; + }; + status?: string; + dateCreated?: string; + integrationId?: string | null; + externalSlug?: string | null; + externalId?: string | null; + settings?: { + enabledCodeReview: boolean; + codeReviewTriggers: Array; + } | null; + }; + author?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + } | { + name: string | null; + email: string; + }; +}>; + +export type ConfigValidator = { + /** + * Currently supports "crontab" or "interval" + * + * * `crontab` + * * `interval` + */ + schedule_type?: 'crontab' | 'interval'; + /** + * Varies depending on the schedule_type. Is either a crontab string, or a 2 element tuple for intervals (e.g. [1, 'day']) + */ + schedule: unknown; + /** + * How long (in minutes) after the expected checkin time will we wait until we consider the checkin to have been missed. + */ + checkin_margin?: number | null; + /** + * How long (in minutes) is the checkin allowed to run for in CheckInStatus.IN_PROGRESS before it is considered failed. + */ + max_runtime?: number | null; + /** + * tz database style timezone string + * + * * `Africa/Abidjan` + * * `Africa/Accra` + * * `Africa/Addis_Ababa` + * * `Africa/Algiers` + * * `Africa/Asmara` + * * `Africa/Asmera` + * * `Africa/Bamako` + * * `Africa/Bangui` + * * `Africa/Banjul` + * * `Africa/Bissau` + * * `Africa/Blantyre` + * * `Africa/Brazzaville` + * * `Africa/Bujumbura` + * * `Africa/Cairo` + * * `Africa/Casablanca` + * * `Africa/Ceuta` + * * `Africa/Conakry` + * * `Africa/Dakar` + * * `Africa/Dar_es_Salaam` + * * `Africa/Djibouti` + * * `Africa/Douala` + * * `Africa/El_Aaiun` + * * `Africa/Freetown` + * * `Africa/Gaborone` + * * `Africa/Harare` + * * `Africa/Johannesburg` + * * `Africa/Juba` + * * `Africa/Kampala` + * * `Africa/Khartoum` + * * `Africa/Kigali` + * * `Africa/Kinshasa` + * * `Africa/Lagos` + * * `Africa/Libreville` + * * `Africa/Lome` + * * `Africa/Luanda` + * * `Africa/Lubumbashi` + * * `Africa/Lusaka` + * * `Africa/Malabo` + * * `Africa/Maputo` + * * `Africa/Maseru` + * * `Africa/Mbabane` + * * `Africa/Mogadishu` + * * `Africa/Monrovia` + * * `Africa/Nairobi` + * * `Africa/Ndjamena` + * * `Africa/Niamey` + * * `Africa/Nouakchott` + * * `Africa/Ouagadougou` + * * `Africa/Porto-Novo` + * * `Africa/Sao_Tome` + * * `Africa/Timbuktu` + * * `Africa/Tripoli` + * * `Africa/Tunis` + * * `Africa/Windhoek` + * * `America/Adak` + * * `America/Anchorage` + * * `America/Anguilla` + * * `America/Antigua` + * * `America/Araguaina` + * * `America/Argentina/Buenos_Aires` + * * `America/Argentina/Catamarca` + * * `America/Argentina/ComodRivadavia` + * * `America/Argentina/Cordoba` + * * `America/Argentina/Jujuy` + * * `America/Argentina/La_Rioja` + * * `America/Argentina/Mendoza` + * * `America/Argentina/Rio_Gallegos` + * * `America/Argentina/Salta` + * * `America/Argentina/San_Juan` + * * `America/Argentina/San_Luis` + * * `America/Argentina/Tucuman` + * * `America/Argentina/Ushuaia` + * * `America/Aruba` + * * `America/Asuncion` + * * `America/Atikokan` + * * `America/Atka` + * * `America/Bahia` + * * `America/Bahia_Banderas` + * * `America/Barbados` + * * `America/Belem` + * * `America/Belize` + * * `America/Blanc-Sablon` + * * `America/Boa_Vista` + * * `America/Bogota` + * * `America/Boise` + * * `America/Buenos_Aires` + * * `America/Cambridge_Bay` + * * `America/Campo_Grande` + * * `America/Cancun` + * * `America/Caracas` + * * `America/Catamarca` + * * `America/Cayenne` + * * `America/Cayman` + * * `America/Chicago` + * * `America/Chihuahua` + * * `America/Ciudad_Juarez` + * * `America/Coral_Harbour` + * * `America/Cordoba` + * * `America/Costa_Rica` + * * `America/Coyhaique` + * * `America/Creston` + * * `America/Cuiaba` + * * `America/Curacao` + * * `America/Danmarkshavn` + * * `America/Dawson` + * * `America/Dawson_Creek` + * * `America/Denver` + * * `America/Detroit` + * * `America/Dominica` + * * `America/Edmonton` + * * `America/Eirunepe` + * * `America/El_Salvador` + * * `America/Ensenada` + * * `America/Fort_Nelson` + * * `America/Fort_Wayne` + * * `America/Fortaleza` + * * `America/Glace_Bay` + * * `America/Godthab` + * * `America/Goose_Bay` + * * `America/Grand_Turk` + * * `America/Grenada` + * * `America/Guadeloupe` + * * `America/Guatemala` + * * `America/Guayaquil` + * * `America/Guyana` + * * `America/Halifax` + * * `America/Havana` + * * `America/Hermosillo` + * * `America/Indiana/Indianapolis` + * * `America/Indiana/Knox` + * * `America/Indiana/Marengo` + * * `America/Indiana/Petersburg` + * * `America/Indiana/Tell_City` + * * `America/Indiana/Vevay` + * * `America/Indiana/Vincennes` + * * `America/Indiana/Winamac` + * * `America/Indianapolis` + * * `America/Inuvik` + * * `America/Iqaluit` + * * `America/Jamaica` + * * `America/Jujuy` + * * `America/Juneau` + * * `America/Kentucky/Louisville` + * * `America/Kentucky/Monticello` + * * `America/Knox_IN` + * * `America/Kralendijk` + * * `America/La_Paz` + * * `America/Lima` + * * `America/Los_Angeles` + * * `America/Louisville` + * * `America/Lower_Princes` + * * `America/Maceio` + * * `America/Managua` + * * `America/Manaus` + * * `America/Marigot` + * * `America/Martinique` + * * `America/Matamoros` + * * `America/Mazatlan` + * * `America/Mendoza` + * * `America/Menominee` + * * `America/Merida` + * * `America/Metlakatla` + * * `America/Mexico_City` + * * `America/Miquelon` + * * `America/Moncton` + * * `America/Monterrey` + * * `America/Montevideo` + * * `America/Montreal` + * * `America/Montserrat` + * * `America/Nassau` + * * `America/New_York` + * * `America/Nipigon` + * * `America/Nome` + * * `America/Noronha` + * * `America/North_Dakota/Beulah` + * * `America/North_Dakota/Center` + * * `America/North_Dakota/New_Salem` + * * `America/Nuuk` + * * `America/Ojinaga` + * * `America/Panama` + * * `America/Pangnirtung` + * * `America/Paramaribo` + * * `America/Phoenix` + * * `America/Port-au-Prince` + * * `America/Port_of_Spain` + * * `America/Porto_Acre` + * * `America/Porto_Velho` + * * `America/Puerto_Rico` + * * `America/Punta_Arenas` + * * `America/Rainy_River` + * * `America/Rankin_Inlet` + * * `America/Recife` + * * `America/Regina` + * * `America/Resolute` + * * `America/Rio_Branco` + * * `America/Rosario` + * * `America/Santa_Isabel` + * * `America/Santarem` + * * `America/Santiago` + * * `America/Santo_Domingo` + * * `America/Sao_Paulo` + * * `America/Scoresbysund` + * * `America/Shiprock` + * * `America/Sitka` + * * `America/St_Barthelemy` + * * `America/St_Johns` + * * `America/St_Kitts` + * * `America/St_Lucia` + * * `America/St_Thomas` + * * `America/St_Vincent` + * * `America/Swift_Current` + * * `America/Tegucigalpa` + * * `America/Thule` + * * `America/Thunder_Bay` + * * `America/Tijuana` + * * `America/Toronto` + * * `America/Tortola` + * * `America/Vancouver` + * * `America/Virgin` + * * `America/Whitehorse` + * * `America/Winnipeg` + * * `America/Yakutat` + * * `America/Yellowknife` + * * `Antarctica/Casey` + * * `Antarctica/Davis` + * * `Antarctica/DumontDUrville` + * * `Antarctica/Macquarie` + * * `Antarctica/Mawson` + * * `Antarctica/McMurdo` + * * `Antarctica/Palmer` + * * `Antarctica/Rothera` + * * `Antarctica/South_Pole` + * * `Antarctica/Syowa` + * * `Antarctica/Troll` + * * `Antarctica/Vostok` + * * `Arctic/Longyearbyen` + * * `Asia/Aden` + * * `Asia/Almaty` + * * `Asia/Amman` + * * `Asia/Anadyr` + * * `Asia/Aqtau` + * * `Asia/Aqtobe` + * * `Asia/Ashgabat` + * * `Asia/Ashkhabad` + * * `Asia/Atyrau` + * * `Asia/Baghdad` + * * `Asia/Bahrain` + * * `Asia/Baku` + * * `Asia/Bangkok` + * * `Asia/Barnaul` + * * `Asia/Beirut` + * * `Asia/Bishkek` + * * `Asia/Brunei` + * * `Asia/Calcutta` + * * `Asia/Chita` + * * `Asia/Choibalsan` + * * `Asia/Chongqing` + * * `Asia/Chungking` + * * `Asia/Colombo` + * * `Asia/Dacca` + * * `Asia/Damascus` + * * `Asia/Dhaka` + * * `Asia/Dili` + * * `Asia/Dubai` + * * `Asia/Dushanbe` + * * `Asia/Famagusta` + * * `Asia/Gaza` + * * `Asia/Harbin` + * * `Asia/Hebron` + * * `Asia/Ho_Chi_Minh` + * * `Asia/Hong_Kong` + * * `Asia/Hovd` + * * `Asia/Irkutsk` + * * `Asia/Istanbul` + * * `Asia/Jakarta` + * * `Asia/Jayapura` + * * `Asia/Jerusalem` + * * `Asia/Kabul` + * * `Asia/Kamchatka` + * * `Asia/Karachi` + * * `Asia/Kashgar` + * * `Asia/Kathmandu` + * * `Asia/Katmandu` + * * `Asia/Khandyga` + * * `Asia/Kolkata` + * * `Asia/Krasnoyarsk` + * * `Asia/Kuala_Lumpur` + * * `Asia/Kuching` + * * `Asia/Kuwait` + * * `Asia/Macao` + * * `Asia/Macau` + * * `Asia/Magadan` + * * `Asia/Makassar` + * * `Asia/Manila` + * * `Asia/Muscat` + * * `Asia/Nicosia` + * * `Asia/Novokuznetsk` + * * `Asia/Novosibirsk` + * * `Asia/Omsk` + * * `Asia/Oral` + * * `Asia/Phnom_Penh` + * * `Asia/Pontianak` + * * `Asia/Pyongyang` + * * `Asia/Qatar` + * * `Asia/Qostanay` + * * `Asia/Qyzylorda` + * * `Asia/Rangoon` + * * `Asia/Riyadh` + * * `Asia/Saigon` + * * `Asia/Sakhalin` + * * `Asia/Samarkand` + * * `Asia/Seoul` + * * `Asia/Shanghai` + * * `Asia/Singapore` + * * `Asia/Srednekolymsk` + * * `Asia/Taipei` + * * `Asia/Tashkent` + * * `Asia/Tbilisi` + * * `Asia/Tehran` + * * `Asia/Tel_Aviv` + * * `Asia/Thimbu` + * * `Asia/Thimphu` + * * `Asia/Tokyo` + * * `Asia/Tomsk` + * * `Asia/Ujung_Pandang` + * * `Asia/Ulaanbaatar` + * * `Asia/Ulan_Bator` + * * `Asia/Urumqi` + * * `Asia/Ust-Nera` + * * `Asia/Vientiane` + * * `Asia/Vladivostok` + * * `Asia/Yakutsk` + * * `Asia/Yangon` + * * `Asia/Yekaterinburg` + * * `Asia/Yerevan` + * * `Atlantic/Azores` + * * `Atlantic/Bermuda` + * * `Atlantic/Canary` + * * `Atlantic/Cape_Verde` + * * `Atlantic/Faeroe` + * * `Atlantic/Faroe` + * * `Atlantic/Jan_Mayen` + * * `Atlantic/Madeira` + * * `Atlantic/Reykjavik` + * * `Atlantic/South_Georgia` + * * `Atlantic/St_Helena` + * * `Atlantic/Stanley` + * * `Australia/ACT` + * * `Australia/Adelaide` + * * `Australia/Brisbane` + * * `Australia/Broken_Hill` + * * `Australia/Canberra` + * * `Australia/Currie` + * * `Australia/Darwin` + * * `Australia/Eucla` + * * `Australia/Hobart` + * * `Australia/LHI` + * * `Australia/Lindeman` + * * `Australia/Lord_Howe` + * * `Australia/Melbourne` + * * `Australia/NSW` + * * `Australia/North` + * * `Australia/Perth` + * * `Australia/Queensland` + * * `Australia/South` + * * `Australia/Sydney` + * * `Australia/Tasmania` + * * `Australia/Victoria` + * * `Australia/West` + * * `Australia/Yancowinna` + * * `Brazil/Acre` + * * `Brazil/DeNoronha` + * * `Brazil/East` + * * `Brazil/West` + * * `CET` + * * `CST6CDT` + * * `Canada/Atlantic` + * * `Canada/Central` + * * `Canada/Eastern` + * * `Canada/Mountain` + * * `Canada/Newfoundland` + * * `Canada/Pacific` + * * `Canada/Saskatchewan` + * * `Canada/Yukon` + * * `Chile/Continental` + * * `Chile/EasterIsland` + * * `Cuba` + * * `EET` + * * `EST` + * * `EST5EDT` + * * `Egypt` + * * `Eire` + * * `Etc/GMT` + * * `Etc/GMT+0` + * * `Etc/GMT+1` + * * `Etc/GMT+10` + * * `Etc/GMT+11` + * * `Etc/GMT+12` + * * `Etc/GMT+2` + * * `Etc/GMT+3` + * * `Etc/GMT+4` + * * `Etc/GMT+5` + * * `Etc/GMT+6` + * * `Etc/GMT+7` + * * `Etc/GMT+8` + * * `Etc/GMT+9` + * * `Etc/GMT-0` + * * `Etc/GMT-1` + * * `Etc/GMT-10` + * * `Etc/GMT-11` + * * `Etc/GMT-12` + * * `Etc/GMT-13` + * * `Etc/GMT-14` + * * `Etc/GMT-2` + * * `Etc/GMT-3` + * * `Etc/GMT-4` + * * `Etc/GMT-5` + * * `Etc/GMT-6` + * * `Etc/GMT-7` + * * `Etc/GMT-8` + * * `Etc/GMT-9` + * * `Etc/GMT0` + * * `Etc/Greenwich` + * * `Etc/UCT` + * * `Etc/UTC` + * * `Etc/Universal` + * * `Etc/Zulu` + * * `Europe/Amsterdam` + * * `Europe/Andorra` + * * `Europe/Astrakhan` + * * `Europe/Athens` + * * `Europe/Belfast` + * * `Europe/Belgrade` + * * `Europe/Berlin` + * * `Europe/Bratislava` + * * `Europe/Brussels` + * * `Europe/Bucharest` + * * `Europe/Budapest` + * * `Europe/Busingen` + * * `Europe/Chisinau` + * * `Europe/Copenhagen` + * * `Europe/Dublin` + * * `Europe/Gibraltar` + * * `Europe/Guernsey` + * * `Europe/Helsinki` + * * `Europe/Isle_of_Man` + * * `Europe/Istanbul` + * * `Europe/Jersey` + * * `Europe/Kaliningrad` + * * `Europe/Kiev` + * * `Europe/Kirov` + * * `Europe/Kyiv` + * * `Europe/Lisbon` + * * `Europe/Ljubljana` + * * `Europe/London` + * * `Europe/Luxembourg` + * * `Europe/Madrid` + * * `Europe/Malta` + * * `Europe/Mariehamn` + * * `Europe/Minsk` + * * `Europe/Monaco` + * * `Europe/Moscow` + * * `Europe/Nicosia` + * * `Europe/Oslo` + * * `Europe/Paris` + * * `Europe/Podgorica` + * * `Europe/Prague` + * * `Europe/Riga` + * * `Europe/Rome` + * * `Europe/Samara` + * * `Europe/San_Marino` + * * `Europe/Sarajevo` + * * `Europe/Saratov` + * * `Europe/Simferopol` + * * `Europe/Skopje` + * * `Europe/Sofia` + * * `Europe/Stockholm` + * * `Europe/Tallinn` + * * `Europe/Tirane` + * * `Europe/Tiraspol` + * * `Europe/Ulyanovsk` + * * `Europe/Uzhgorod` + * * `Europe/Vaduz` + * * `Europe/Vatican` + * * `Europe/Vienna` + * * `Europe/Vilnius` + * * `Europe/Volgograd` + * * `Europe/Warsaw` + * * `Europe/Zagreb` + * * `Europe/Zaporozhye` + * * `Europe/Zurich` + * * `GB` + * * `GB-Eire` + * * `GMT` + * * `GMT+0` + * * `GMT-0` + * * `GMT0` + * * `Greenwich` + * * `HST` + * * `Hongkong` + * * `Iceland` + * * `Indian/Antananarivo` + * * `Indian/Chagos` + * * `Indian/Christmas` + * * `Indian/Cocos` + * * `Indian/Comoro` + * * `Indian/Kerguelen` + * * `Indian/Mahe` + * * `Indian/Maldives` + * * `Indian/Mauritius` + * * `Indian/Mayotte` + * * `Indian/Reunion` + * * `Iran` + * * `Israel` + * * `Jamaica` + * * `Japan` + * * `Kwajalein` + * * `Libya` + * * `MET` + * * `MST` + * * `MST7MDT` + * * `Mexico/BajaNorte` + * * `Mexico/BajaSur` + * * `Mexico/General` + * * `NZ` + * * `NZ-CHAT` + * * `Navajo` + * * `PRC` + * * `PST8PDT` + * * `Pacific/Apia` + * * `Pacific/Auckland` + * * `Pacific/Bougainville` + * * `Pacific/Chatham` + * * `Pacific/Chuuk` + * * `Pacific/Easter` + * * `Pacific/Efate` + * * `Pacific/Enderbury` + * * `Pacific/Fakaofo` + * * `Pacific/Fiji` + * * `Pacific/Funafuti` + * * `Pacific/Galapagos` + * * `Pacific/Gambier` + * * `Pacific/Guadalcanal` + * * `Pacific/Guam` + * * `Pacific/Honolulu` + * * `Pacific/Johnston` + * * `Pacific/Kanton` + * * `Pacific/Kiritimati` + * * `Pacific/Kosrae` + * * `Pacific/Kwajalein` + * * `Pacific/Majuro` + * * `Pacific/Marquesas` + * * `Pacific/Midway` + * * `Pacific/Nauru` + * * `Pacific/Niue` + * * `Pacific/Norfolk` + * * `Pacific/Noumea` + * * `Pacific/Pago_Pago` + * * `Pacific/Palau` + * * `Pacific/Pitcairn` + * * `Pacific/Pohnpei` + * * `Pacific/Ponape` + * * `Pacific/Port_Moresby` + * * `Pacific/Rarotonga` + * * `Pacific/Saipan` + * * `Pacific/Samoa` + * * `Pacific/Tahiti` + * * `Pacific/Tarawa` + * * `Pacific/Tongatapu` + * * `Pacific/Truk` + * * `Pacific/Wake` + * * `Pacific/Wallis` + * * `Pacific/Yap` + * * `Poland` + * * `Portugal` + * * `ROC` + * * `ROK` + * * `Singapore` + * * `Turkey` + * * `UCT` + * * `US/Alaska` + * * `US/Aleutian` + * * `US/Arizona` + * * `US/Central` + * * `US/East-Indiana` + * * `US/Eastern` + * * `US/Hawaii` + * * `US/Indiana-Starke` + * * `US/Michigan` + * * `US/Mountain` + * * `US/Pacific` + * * `US/Samoa` + * * `UTC` + * * `Universal` + * * `W-SU` + * * `WET` + * * `Zulu` + * * `localtime` + */ + timezone?: 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Addis_Ababa' | 'Africa/Algiers' | 'Africa/Asmara' | 'Africa/Asmera' | 'Africa/Bamako' | 'Africa/Bangui' | 'Africa/Banjul' | 'Africa/Bissau' | 'Africa/Blantyre' | 'Africa/Brazzaville' | 'Africa/Bujumbura' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/Conakry' | 'Africa/Dakar' | 'Africa/Dar_es_Salaam' | 'Africa/Djibouti' | 'Africa/Douala' | 'Africa/El_Aaiun' | 'Africa/Freetown' | 'Africa/Gaborone' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' | 'Africa/Kinshasa' | 'Africa/Lagos' | 'Africa/Libreville' | 'Africa/Lome' | 'Africa/Luanda' | 'Africa/Lubumbashi' | 'Africa/Lusaka' | 'Africa/Malabo' | 'Africa/Maputo' | 'Africa/Maseru' | 'Africa/Mbabane' | 'Africa/Mogadishu' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'Africa/Ndjamena' | 'Africa/Niamey' | 'Africa/Nouakchott' | 'Africa/Ouagadougou' | 'Africa/Porto-Novo' | 'Africa/Sao_Tome' | 'Africa/Timbuktu' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Anguilla' | 'America/Antigua' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/ComodRivadavia' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Aruba' | 'America/Asuncion' | 'America/Atikokan' | 'America/Atka' | 'America/Bahia' | 'America/Bahia_Banderas' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Buenos_Aires' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Catamarca' | 'America/Cayenne' | 'America/Cayman' | 'America/Chicago' | 'America/Chihuahua' | 'America/Ciudad_Juarez' | 'America/Coral_Harbour' | 'America/Cordoba' | 'America/Costa_Rica' | 'America/Coyhaique' | 'America/Creston' | 'America/Cuiaba' | 'America/Curacao' | 'America/Danmarkshavn' | 'America/Dawson' | 'America/Dawson_Creek' | 'America/Denver' | 'America/Detroit' | 'America/Dominica' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Ensenada' | 'America/Fort_Nelson' | 'America/Fort_Wayne' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Grenada' | 'America/Guadeloupe' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Indianapolis' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Indianapolis' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Jujuy' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/Knox_IN' | 'America/Kralendijk' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Louisville' | 'America/Lower_Princes' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Marigot' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Mendoza' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Montreal' | 'America/Montserrat' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Nuuk' | 'America/Ojinaga' | 'America/Panama' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Port_of_Spain' | 'America/Porto_Acre' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Rio_Branco' | 'America/Rosario' | 'America/Santa_Isabel' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Shiprock' | 'America/Sitka' | 'America/St_Barthelemy' | 'America/St_Johns' | 'America/St_Kitts' | 'America/St_Lucia' | 'America/St_Thomas' | 'America/St_Vincent' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Tijuana' | 'America/Toronto' | 'America/Tortola' | 'America/Vancouver' | 'America/Virgin' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Antarctica/McMurdo' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/South_Pole' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Arctic/Longyearbyen' | 'Asia/Aden' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Ashkhabad' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Bahrain' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Calcutta' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Chongqing' | 'Asia/Chungking' | 'Asia/Colombo' | 'Asia/Dacca' | 'Asia/Damascus' | 'Asia/Dhaka' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Harbin' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Asia/Istanbul' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kashgar' | 'Asia/Kathmandu' | 'Asia/Katmandu' | 'Asia/Khandyga' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Kuwait' | 'Asia/Macao' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Muscat' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Phnom_Penh' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qatar' | 'Asia/Qostanay' | 'Asia/Qyzylorda' | 'Asia/Rangoon' | 'Asia/Riyadh' | 'Asia/Saigon' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tel_Aviv' | 'Asia/Thimbu' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ujung_Pandang' | 'Asia/Ulaanbaatar' | 'Asia/Ulan_Bator' | 'Asia/Urumqi' | 'Asia/Ust-Nera' | 'Asia/Vientiane' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faeroe' | 'Atlantic/Faroe' | 'Atlantic/Jan_Mayen' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/St_Helena' | 'Atlantic/Stanley' | 'Australia/ACT' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Canberra' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/LHI' | 'Australia/Lindeman' | 'Australia/Lord_Howe' | 'Australia/Melbourne' | 'Australia/NSW' | 'Australia/North' | 'Australia/Perth' | 'Australia/Queensland' | 'Australia/South' | 'Australia/Sydney' | 'Australia/Tasmania' | 'Australia/Victoria' | 'Australia/West' | 'Australia/Yancowinna' | 'Brazil/Acre' | 'Brazil/DeNoronha' | 'Brazil/East' | 'Brazil/West' | 'CET' | 'CST6CDT' | 'Canada/Atlantic' | 'Canada/Central' | 'Canada/Eastern' | 'Canada/Mountain' | 'Canada/Newfoundland' | 'Canada/Pacific' | 'Canada/Saskatchewan' | 'Canada/Yukon' | 'Chile/Continental' | 'Chile/EasterIsland' | 'Cuba' | 'EET' | 'EST' | 'EST5EDT' | 'Egypt' | 'Eire' | 'Etc/GMT' | 'Etc/GMT+0' | 'Etc/GMT+1' | 'Etc/GMT+10' | 'Etc/GMT+11' | 'Etc/GMT+12' | 'Etc/GMT+2' | 'Etc/GMT+3' | 'Etc/GMT+4' | 'Etc/GMT+5' | 'Etc/GMT+6' | 'Etc/GMT+7' | 'Etc/GMT+8' | 'Etc/GMT+9' | 'Etc/GMT-0' | 'Etc/GMT-1' | 'Etc/GMT-10' | 'Etc/GMT-11' | 'Etc/GMT-12' | 'Etc/GMT-13' | 'Etc/GMT-14' | 'Etc/GMT-2' | 'Etc/GMT-3' | 'Etc/GMT-4' | 'Etc/GMT-5' | 'Etc/GMT-6' | 'Etc/GMT-7' | 'Etc/GMT-8' | 'Etc/GMT-9' | 'Etc/GMT0' | 'Etc/Greenwich' | 'Etc/UCT' | 'Etc/UTC' | 'Etc/Universal' | 'Etc/Zulu' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/Belfast' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Busingen' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Gibraltar' | 'Europe/Guernsey' | 'Europe/Helsinki' | 'Europe/Isle_of_Man' | 'Europe/Istanbul' | 'Europe/Jersey' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Kyiv' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Mariehamn' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Nicosia' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Podgorica' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/San_Marino' | 'Europe/Sarajevo' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Tiraspol' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vaduz' | 'Europe/Vatican' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zaporozhye' | 'Europe/Zurich' | 'GB' | 'GB-Eire' | 'GMT' | 'GMT+0' | 'GMT-0' | 'GMT0' | 'Greenwich' | 'HST' | 'Hongkong' | 'Iceland' | 'Indian/Antananarivo' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Comoro' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Mayotte' | 'Indian/Reunion' | 'Iran' | 'Israel' | 'Jamaica' | 'Japan' | 'Kwajalein' | 'Libya' | 'MET' | 'MST' | 'MST7MDT' | 'Mexico/BajaNorte' | 'Mexico/BajaSur' | 'Mexico/General' | 'NZ' | 'NZ-CHAT' | 'Navajo' | 'PRC' | 'PST8PDT' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Bougainville' | 'Pacific/Chatham' | 'Pacific/Chuuk' | 'Pacific/Easter' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Johnston' | 'Pacific/Kanton' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Kwajalein' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Midway' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Ponape' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Saipan' | 'Pacific/Samoa' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Truk' | 'Pacific/Wake' | 'Pacific/Wallis' | 'Pacific/Yap' | 'Poland' | 'Portugal' | 'ROC' | 'ROK' | 'Singapore' | 'Turkey' | 'UCT' | 'US/Alaska' | 'US/Aleutian' | 'US/Arizona' | 'US/Central' | 'US/East-Indiana' | 'US/Eastern' | 'US/Hawaii' | 'US/Indiana-Starke' | 'US/Michigan' | 'US/Mountain' | 'US/Pacific' | 'US/Samoa' | 'UTC' | 'Universal' | 'W-SU' | 'WET' | 'Zulu' | 'localtime' | ''; + /** + * How many consecutive missed or failed check-ins in a row before creating a new issue. + */ + failure_issue_threshold?: number | null; + /** + * How many successful check-ins in a row before resolving an issue. + */ + recovery_threshold?: number | null; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type Dashboard = { + /** + * The user defined title for this dashboard. + */ + title: string; + /** + * A dashboard's unique id. + */ + id?: string; + /** + * A json list of widgets saved in this dashboard. + */ + widgets?: Array<{ + id?: string; + title?: string; + description?: string | null; + thresholds?: { + [key: string]: unknown; + } | null; + /** + * * `line` + * * `area` + * * `stacked_area` + * * `bar` + * * `table` + * * `big_number` + * * `top_n` + * * `details` + * * `categorical_bar` + */ + display_type?: 'line' | 'area' | 'stacked_area' | 'bar' | 'table' | 'big_number' | 'top_n' | 'details' | 'categorical_bar'; + interval?: string; + queries?: Array<{ + id?: string; + fields?: Array; + aggregates?: Array | null; + columns?: Array | null; + field_aliases?: Array | null; + name?: string; + conditions?: string; + orderby?: string; + is_hidden?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + on_demand_extraction?: { + extraction_state?: string; + enabled?: boolean; + }; + on_demand_extraction_disabled?: boolean; + selected_aggregate?: number | null; + linked_dashboards?: Array<{ + field: string; + dashboard_id: string; + }> | null; + }>; + /** + * * `discover` + * * `issue` + * * `metrics` + * * `error-events` + * * `transaction-like` + * * `spans` + * * `logs` + * * `tracemetrics` + * * `preprod-app-size` + */ + widget_type?: 'discover' | 'issue' | 'metrics' | 'error-events' | 'transaction-like' | 'spans' | 'logs' | 'tracemetrics' | 'preprod-app-size'; + limit?: number | null; + layout?: { + [key: string]: unknown; + } | null; + }>; + /** + * The saved projects filter for this dashboard. + */ + projects?: Array; + /** + * The saved environment filter for this dashboard. + */ + environment?: Array | null; + /** + * The saved time range period for this dashboard. + */ + period?: string | null; + /** + * The saved start time for this dashboard. + */ + start?: string | null; + /** + * The saved end time for this dashboard. + */ + end?: string | null; + /** + * The saved filters for this dashboard. + */ + filters?: { + [key: string]: unknown; + }; + /** + * Setting that lets you display saved time range for this dashboard in UTC. + */ + utc?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + permissions?: { + /** + * Whether the dashboard is editable by everyone. + */ + is_editable_by_everyone: boolean; + /** + * List of team IDs that have edit access to a dashboard. + */ + teams_with_edit_access?: Array; + } | null; + /** + * Favorite the dashboard automatically for the request user + */ + is_favorited?: boolean; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type DashboardDetails = { + /** + * A dashboard's unique id. + */ + id?: string; + /** + * The user-defined dashboard title. + */ + title?: string; + /** + * A json list of widgets saved in this dashboard. + */ + widgets?: Array<{ + id?: string; + title?: string; + description?: string | null; + thresholds?: { + [key: string]: unknown; + } | null; + /** + * * `line` + * * `area` + * * `stacked_area` + * * `bar` + * * `table` + * * `big_number` + * * `top_n` + * * `details` + * * `categorical_bar` + */ + display_type?: 'line' | 'area' | 'stacked_area' | 'bar' | 'table' | 'big_number' | 'top_n' | 'details' | 'categorical_bar'; + interval?: string; + queries?: Array<{ + id?: string; + fields?: Array; + aggregates?: Array | null; + columns?: Array | null; + field_aliases?: Array | null; + name?: string; + conditions?: string; + orderby?: string; + is_hidden?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + on_demand_extraction?: { + extraction_state?: string; + enabled?: boolean; + }; + on_demand_extraction_disabled?: boolean; + selected_aggregate?: number | null; + linked_dashboards?: Array<{ + field: string; + dashboard_id: string; + }> | null; + }>; + /** + * * `discover` + * * `issue` + * * `metrics` + * * `error-events` + * * `transaction-like` + * * `spans` + * * `logs` + * * `tracemetrics` + * * `preprod-app-size` + */ + widget_type?: 'discover' | 'issue' | 'metrics' | 'error-events' | 'transaction-like' | 'spans' | 'logs' | 'tracemetrics' | 'preprod-app-size'; + limit?: number | null; + layout?: { + [key: string]: unknown; + } | null; + }>; + /** + * The saved projects filter for this dashboard. + */ + projects?: Array; + /** + * The saved environment filter for this dashboard. + */ + environment?: Array | null; + /** + * The saved time range period for this dashboard. + */ + period?: string | null; + /** + * The saved start time for this dashboard. + */ + start?: string | null; + /** + * The saved end time for this dashboard. + */ + end?: string | null; + /** + * The saved filters for this dashboard. + */ + filters?: { + [key: string]: unknown; + }; + /** + * Setting that lets you display saved time range for this dashboard in UTC. + */ + utc?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + permissions?: { + /** + * Whether the dashboard is editable by everyone. + */ + is_editable_by_everyone: boolean; + /** + * List of team IDs that have edit access to a dashboard. + */ + teams_with_edit_access?: Array; + } | null; +}; + +export type DashboardDetailsModel = { + environment?: Array; + period?: string; + utc?: string; + expired?: boolean; + start?: string; + end?: string; + id: string; + title: string; + dateCreated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + } | null; + widgets: Array<{ + id: string; + title: string; + description: string | null; + displayType: string; + thresholds: { + preferredPolarity?: string; + max_values: { + [key: string]: number; + }; + unit: string; + } | null; + interval: string; + dateCreated: string; + dashboardId: string; + queries: Array<{ + id: string; + name: string; + fields: Array; + aggregates: Array; + columns: Array; + fieldAliases: Array; + conditions: string; + orderby: string; + widgetId: string; + onDemand: Array<{ + enabled: boolean; + extractionState: string; + dashboardWidgetQueryId: number; + }>; + isHidden: boolean; + selectedAggregate: number | null; + linkedDashboards: Array<{ + field: string; + dashboardId: number; + }>; + }>; + limit: number | null; + widgetType: string; + layout: { + [key: string]: number; + } | null; + datasetSource: string | null; + exploreUrls: Array | null; + changedReason: Array<{ + orderby: Array<{ + [key: string]: string; + }> | null; + equations: Array<{ + [key: string]: string | Array; + }> | null; + selected_columns: Array; + }> | null; + }>; + projects: Array; + filters: { + release?: Array; + releaseId?: Array; + globalFilter?: Array<{ + [key: string]: unknown; + }>; + }; + permissions: { + isEditableByEveryone: boolean; + teamsWithEditAccess: Array; + } | null; + isFavorited: boolean; + prebuiltId: number | null; +}; + +export type DashboardListResponse = Array<{ + id: string; + title: string; + dateCreated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + environment: Array; + filters: { + release?: Array; + releaseId?: Array; + globalFilter?: Array<{ + [key: string]: unknown; + }>; + }; + lastVisited: string | null; + widgetDisplay: Array; + widgetPreview: Array<{ + [key: string]: string; + }>; + permissions: { + isEditableByEveryone: boolean; + teamsWithEditAccess: Array; + } | null; + isFavorited: boolean; + projects: Array; + prebuiltId: number | null; +}>; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type DashboardPermissions = { + /** + * Whether the dashboard is editable by everyone. + */ + is_editable_by_everyone: boolean; + /** + * List of team IDs that have edit access to a dashboard. + */ + teams_with_edit_access?: Array; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type DashboardWidget = { + id?: string; + title?: string; + description?: string | null; + thresholds?: { + [key: string]: unknown; + } | null; + /** + * * `line` + * * `area` + * * `stacked_area` + * * `bar` + * * `table` + * * `big_number` + * * `top_n` + * * `details` + * * `categorical_bar` + */ + display_type?: 'line' | 'area' | 'stacked_area' | 'bar' | 'table' | 'big_number' | 'top_n' | 'details' | 'categorical_bar'; + interval?: string; + queries?: Array<{ + id?: string; + fields?: Array; + aggregates?: Array | null; + columns?: Array | null; + field_aliases?: Array | null; + name?: string; + conditions?: string; + orderby?: string; + is_hidden?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + on_demand_extraction?: { + extraction_state?: string; + enabled?: boolean; + }; + on_demand_extraction_disabled?: boolean; + selected_aggregate?: number | null; + linked_dashboards?: Array<{ + field: string; + dashboard_id: string; + }> | null; + }>; + /** + * * `discover` + * * `issue` + * * `metrics` + * * `error-events` + * * `transaction-like` + * * `spans` + * * `logs` + * * `tracemetrics` + * * `preprod-app-size` + */ + widget_type?: 'discover' | 'issue' | 'metrics' | 'error-events' | 'transaction-like' | 'spans' | 'logs' | 'tracemetrics' | 'preprod-app-size'; + limit?: number | null; + layout?: { + [key: string]: unknown; + } | null; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type DashboardWidgetQuery = { + id?: string; + fields?: Array; + aggregates?: Array | null; + columns?: Array | null; + field_aliases?: Array | null; + name?: string; + conditions?: string; + orderby?: string; + is_hidden?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + on_demand_extraction?: { + extraction_state?: string; + enabled?: boolean; + }; + on_demand_extraction_disabled?: boolean; + selected_aggregate?: number | null; + linked_dashboards?: Array<{ + field: string; + dashboard_id: string; + }> | null; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type DashboardWidgetQueryOnDemand = { + extraction_state?: string; + enabled?: boolean; +}; + +export type DataForwarder = { + /** + * The ID of the organization related to the data forwarder. + */ + organization_id: number; + /** + * The provider of the data forwarder. One of "segment", "sqs", or "splunk". + * + * * `segment` - Segment + * * `sqs` - Amazon SQS + * * `splunk` - Splunk + */ + provider: 'segment' | 'sqs' | 'splunk'; + /** + * Whether the data forwarder is enabled. + */ + is_enabled?: boolean; + /** + * Whether to enroll new projects automatically, after they're created. + */ + enroll_new_projects?: boolean; + /** + * The configuration for the data forwarder, specific to the provider type. + * For a 'sqs' provider, the required keys are queue_url, region, access_key, secret_key. If using a FIFO queue, you must also provide a message_group_id, though s3_bucket is optional. + * For a 'segment' provider, the required keys are write_key. + * For a 'splunk' provider, the required keys are instance_url, index, source, token. + */ + config?: { + [key: string]: string; + }; + /** + * The IDs of the projects connected to the data forwarder. Missing project IDs will be unenrolled if previously enrolled. + */ + project_ids?: Array; +}; + +export type DataForwarderResponse = { + id: string; + organizationId: string; + isEnabled: boolean; + enrollNewProjects: boolean; + enrolledProjects: Array<{ + id: string; + slug: string; + platform: string | null; + }>; + provider: string; + config: { + [key: string]: string; + }; + projectConfigs: Array<{ + id: string; + isEnabled: boolean; + dataForwarderId: string; + project: { + id: string; + slug: string; + platform: string | null; + }; + overrides: { + [key: string]: string; + }; + effectiveConfig: { + [key: string]: string; + }; + dateAdded: string; + dateUpdated: string; + }>; + dateAdded: string; + dateUpdated: string; +}; + +export type Deploy = { + /** + * The environment you're deploying to + */ + environment: string; + /** + * The optional name of the deploy + */ + name?: string | null; + /** + * The optional URL that points to the deploy + */ + url?: string | null; + /** + * An optional date that indicates when the deploy started + */ + dateStarted?: string | null; + /** + * An optional date that indicates when the deploy ended. If not provided, the current time is used. + */ + dateFinished?: string | null; + /** + * The optional list of project slugs to create a deploy within. If not provided, deploys are created for all of the release's projects. + */ + projects?: Array; +}; + +/** + * Serializer for Deploy response objects + */ +export type DeployResponse = { + /** + * The ID of the deploy + */ + id: string; + /** + * The environment name + */ + environment: string; + /** + * An optional date that indicates when the deploy started + */ + dateStarted: string | null; + /** + * An optional date that indicates when the deploy ended + */ + dateFinished: string; + /** + * The optional name of the deploy + */ + name: string | null; + /** + * The optional URL that points to the deploy + */ + url: string | null; +}; + +export type DetailedOrganizationSerializerWithProjectsAndTeams = { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + role?: unknown; + orgRole?: string; + targetSampleRate?: number; + samplingMode?: string; + planSampleRate?: number; + desiredSampleRate?: number; + experiments: unknown; + isDefault: boolean; + defaultRole: string; + orgRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + is_global: boolean; + isGlobal: boolean; + minimumTeamRole: string; + }>; + teamRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + isMinimumRoleFor: string | null; + }>; + openMembership: boolean; + allowSharedIssues: boolean; + enhancedPrivacy: boolean; + dataScrubber: boolean; + dataScrubberDefaults: boolean; + sensitiveFields: Array; + safeFields: Array; + storeCrashReports: number; + attachmentsRole: string; + debugFilesRole: string; + eventsMemberAdmin: boolean; + alertsMemberWrite: boolean; + scrubIPAddresses: boolean; + scrapeJavaScript: boolean; + allowJoinRequests: boolean; + relayPiiConfig: string | null; + trustedRelays: Array<{ + name?: string; + description?: string; + publicKey?: string; + created?: string; + lastModified?: string; + }>; + pendingAccessRequests: number; + codecovAccess: boolean; + hideAiFeatures: boolean; + githubPRBot: boolean; + githubNudgeInvite: boolean; + gitlabPRBot: boolean; + aggregatedDataConsent: boolean; + isDynamicallySampled: boolean; + issueAlertsThreadFlag: boolean; + metricAlertsThreadFlag: boolean; + requiresSso: boolean; + defaultAutofixAutomationTuning: string; + defaultSeerScannerAutomation: boolean; + enablePrReviewTestGeneration: boolean; + enableSeerEnhancedAlerts: boolean; + enableSeerCoding: boolean; + allowBackgroundAgentDelegation: boolean; + autoEnableCodeReview: boolean; + autoOpenPrs: boolean; + defaultCodeReviewTriggers: Array; + teams: Array<{ + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; + }>; + projects: Array<{ + latestDeploys?: { + [key: string]: { + [key: string]: string; + }; + } | null; + options?: { + [key: string]: unknown; + }; + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + team: { + id: string; + name: string; + slug: string; + } | null; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + platforms: Array; + hasUserReports: boolean; + environments: Array; + latestRelease: { + version: string; + } | null; + }>; +}; + +export type DetailedProject = { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + team?: { + id: string; + name: string; + slug: string; + }; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + latestRelease: { + version: string; + } | null; + options: { + [key: string]: unknown; + }; + digestsMinDelay: number; + digestsMaxDelay: number; + subjectPrefix: string; + allowedDomains: Array; + resolveAge: number; + dataScrubber: boolean; + dataScrubberDefaults: boolean; + safeFields: Array; + storeCrashReports: number | null; + sensitiveFields: Array; + subjectTemplate: string; + securityToken: string; + securityTokenHeader: string | null; + verifySSL: boolean; + scrubIPAddresses: boolean; + scrapeJavaScript: boolean; + highlightTags: Array; + highlightContext: { + [key: string]: unknown; + }; + highlightPreset: { + tags: Array; + context: { + [key: string]: Array; + }; + }; + groupingConfig: string; + derivedGroupingEnhancements: string; + groupingEnhancements: string; + secondaryGroupingExpiry: number; + secondaryGroupingConfig: string | null; + fingerprintingRules: string; + organization: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + plugins: Array<{ + id: string; + name: string; + slug: string; + shortName: string; + type: string; + canDisable: boolean; + isTestable: boolean; + hasConfiguration: boolean; + metadata: { + [key: string]: unknown; + }; + contexts: Array; + status: string; + assets: Array; + doc: string; + firstPartyAlternative: unknown; + deprecationDate: unknown; + altIsSentryApp: unknown; + enabled: boolean; + version: string; + author: { + [key: string]: string; + }; + isDeprecated: boolean; + isHidden: boolean; + description: string; + features: Array; + featureDescriptions: Array<{ + [key: string]: string; + }>; + resourceLinks: Array<{ + [key: string]: string; + }>; + }>; + platforms: Array; + processingIssues: number; + defaultEnvironment: string | null; + relayPiiConfig: string | null; + builtinSymbolSources: Array; + dynamicSamplingBiases: Array<{ + [key: string]: string | boolean; + }>; + symbolSources: string; + isDynamicallySampled: boolean; + tempestFetchScreenshots: boolean; + autofixAutomationTuning: string; + seerScannerAutomation: boolean; + debugFilesRole: string | null; +}; + +export type Detector = { + owner?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + } | null; + createdBy?: string | null; + latestGroup?: { + [key: string]: unknown; + } | null; + description?: string | null; + id: string; + projectId: string; + name: string; + type: string; + workflowIds: Array | null; + dateCreated: string; + dateUpdated: string; + dataSources: Array<{ + [key: string]: unknown; + }> | null; + conditionGroup: { + [key: string]: unknown; + } | null; + config: { + [key: string]: unknown; + }; + enabled: boolean; + openIssues: number; +}; + +export type DiscoverSavedQuery = { + /** + * The user-defined saved query name. + */ + name: string; + /** + * The saved projects filter for this query. + */ + projects?: Array; + /** + * The dataset you would like to query. Note: `discover` is a **deprecated** value. The allowed values are: `error-events`, `transaction-like` + * + * * `discover` + * * `error-events` + * * `transaction-like` + */ + queryDataset?: 'discover' | 'error-events' | 'transaction-like'; + /** + * The saved start time for this saved query. + */ + start?: string | null; + /** + * The saved end time for this saved query. + */ + end?: string | null; + /** + * The saved time range period for this saved query. + */ + range?: string | null; + /** + * The fields, functions, or equations that can be requested for the query. At most 20 fields can be selected per request. Each field can be one of the following types: + * - A built-in key field. See possible fields in the [properties table](/product/sentry-basics/search/searchable-properties/#properties-table), under any field that is an event property. + * - example: `field=transaction` + * - A tag. Tags should use the `tag[]` formatting to avoid ambiguity with any fields + * - example: `field=tag[isEnterprise]` + * - A function which will be in the format of `function_name(parameters,...)`. See possible functions in the [query builder documentation](/product/discover-queries/query-builder/#stacking-functions). + * - when a function is included, Discover will group by any tags or fields + * - example: `field=count_if(transaction.duration,greater,300)` + * - An equation when prefixed with `equation|`. Read more about [equations here](/product/discover-queries/query-builder/query-equations/). + * - example: `field=equation|count_if(transaction.duration,greater,300) / count() * 100` + * + */ + fields?: Array | null; + /** + * How to order the query results. Must be something in the `field` list, excluding equations. + */ + orderby?: string | null; + /** + * The name of environments to filter by. + */ + environment?: Array | null; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + */ + query?: string | null; + /** + * Aggregate functions to be plotted on the chart. + */ + yAxis?: Array | null; + /** + * Visualization type for saved query chart. Allowed values are: + * - default + * - previous + * - top5 + * - daily + * - dailytop5 + * - bar + * + */ + display?: string | null; + /** + * Number of top events' timeseries to be visualized. + */ + topEvents?: number | null; + /** + * Resolution of the time series. + */ + interval?: string | null; +}; + +export type DiscoverSavedQueryListResponse = Array<{ + environment?: Array; + query?: string; + fields?: Array; + widths?: Array; + conditions?: Array; + aggregations?: Array; + range?: string; + start?: string; + end?: string; + orderby?: string; + limit?: string; + yAxis?: Array; + display?: string; + topEvents?: number; + interval?: string; + exploreQuery?: { + [key: string]: unknown; + }; + id: string; + name: string; + projects: Array; + version: number; + queryDataset: string; + datasetSource: string; + expired: boolean; + dateCreated: string; + dateUpdated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; +}>; + +export type DiscoverSavedQueryModel = { + environment?: Array; + query?: string; + fields?: Array; + widths?: Array; + conditions?: Array; + aggregations?: Array; + range?: string; + start?: string; + end?: string; + orderby?: string; + limit?: string; + yAxis?: Array; + display?: string; + topEvents?: number; + interval?: string; + exploreQuery?: { + [key: string]: unknown; + }; + id: string; + name: string; + projects: Array; + version: number; + queryDataset: string; + datasetSource: string; + expired: boolean; + dateCreated: string; + dateUpdated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; +}; + +/** + * Configures multiple options for the Javascript Loader Script. + * - `Performance Monitoring` + * - `Debug Bundles & Logging` + * - `Session Replay` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. + * - `User Feedback` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. + * - `Logs and Metrics` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. Requires SDK >= 10.0.0. + * ```json + * { + * "dynamicSdkLoaderOptions": { + * "hasReplay": true, + * "hasPerformance": true, + * "hasDebug": true, + * "hasFeedback": true, + * "hasLogsAndMetrics": true + * } + * } + * ``` + */ +export type DynamicSdkLoaderOption = { + hasReplay?: boolean; + hasPerformance?: boolean; + hasDebug?: boolean; + hasFeedback?: boolean; + hasLogsAndMetrics?: boolean; +}; + +export type Environment = { + /** + * Specify `true` to make the environment visible or `false` to make the environment hidden. + */ + isHidden: boolean; +}; + +export type EnvironmentProject = { + id: string; + name: string; + isHidden: boolean; +}; + +export type EventIdLookupResponse = { + organizationSlug: string; + projectSlug: string; + groupId: string; + eventId: string; + event: { + id: string; + groupID: string | null; + eventID: string; + projectID: string; + message: string | null; + title: string; + location: string | null; + user: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: { + [key: string]: string; + } | null; + data?: { + [key: string]: unknown; + } | null; + } | null; + tags: Array<{ + query?: string; + key: string; + value: string; + }>; + platform: string; + dateReceived: string | null; + contexts: { + [key: string]: unknown; + } | null; + size: number | null; + entries: Array; + dist: string | null; + sdk: { + [key: string]: string; + }; + context: { + [key: string]: unknown; + } | null; + packages: { + [key: string]: unknown; + }; + type: string; + metadata: unknown; + errors: Array; + occurrence: unknown; + _meta: { + [key: string]: unknown; + }; + crashFile?: string | null; + culprit?: string | null; + dateCreated?: string; + fingerprints?: Array; + groupingConfig?: unknown; + startTimestamp?: string; + endTimestamp?: string; + measurements?: unknown; + breakdowns?: unknown; + }; +}; + +export type ExternalActor = { + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type ExternalTeam = { + /** + * The associated name for the provider. + */ + external_name: string; + /** + * The provider of the external actor. + * + * * `github` + * * `github_enterprise` + * * `jira_server` + * * `slack` + * * `perforce` + * * `gitlab` + * * `msteams` + * * `custom_scm` + */ + provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm'; + /** + * The Integration ID. + */ + integration_id: number; + /** + * The associated user ID for provider. + */ + external_id?: string | null; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type ExternalUser = { + /** + * The user ID in Sentry. + */ + user_id: number; + /** + * The associated name for the provider. + */ + external_name: string; + /** + * The provider of the external actor. + * + * * `github` + * * `github_enterprise` + * * `jira_server` + * * `slack` + * * `perforce` + * * `gitlab` + * * `msteams` + * * `custom_scm` + */ + provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm'; + /** + * The Integration ID. + */ + integration_id: number; + /** + * The external actor ID. + */ + readonly id: number; + /** + * The associated user ID for provider. + */ + external_id?: string | null; +}; + +/** + * Filter settings for the source. This is optional for all sources. + * + * **`filetypes`** ***(list)*** - A list of file types that can be found on this source. If this is left empty, all file types will be enabled. The options are: + * - `pe` - Windows executable files + * - `pdb` - Windows debug files + * - `portablepdb` - .NET portable debug files + * - `mach_code` - MacOS executable files + * - `mach_debug` - MacOS debug files + * - `elf_code` - ELF executable files + * - `elf_debug` - ELF debug files + * - `wasm_code` - WASM executable files + * - `wasm_debug` - WASM debug files + * - `breakpad` - Breakpad symbol files + * - `sourcebundle` - Source code bundles + * - `uuidmap` - Apple UUID mapping files + * - `bcsymbolmap` - Apple bitcode symbol maps + * - `il2cpp` - Unity IL2CPP mapping files + * - `proguard` - ProGuard mapping files + * + * **`path_patterns`** ***(list)*** - A list of glob patterns to check against the debug and code file paths of debug files. Only files that match one of these patterns will be requested from the source. If this is left empty, no path-based filtering takes place. + * + * **`requires_checksum`** ***(boolean)*** - Whether this source requires a debug checksum to be sent with each request. Defaults to `false`. + * + * ```json + * { + * "filters": { + * "filetypes": ["pe", "pdb", "portablepdb"], + * "path_patterns": ["*ffmpeg*"] + * } + * } + * ``` + */ +export type Filters = { + /** + * The file types enabled for the source. + */ + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + /** + * The debug and code file paths enabled for the source. + */ + path_patterns?: Array; + /** + * Whether the source requires debug checksums. + */ + requires_checksum?: boolean; +}; + +export type GetReplay = { + id?: string; + project_id?: string; + trace_ids?: Array; + error_ids?: Array; + environment?: string | null; + tags?: { + [key: string]: Array; + } | Array; + user?: { + id?: string | null; + username?: string | null; + email?: string | null; + ip?: string | null; + display_name?: string | null; + geo?: { + city?: string | null; + country_code?: string | null; + region?: string | null; + subdivision?: string | null; + }; + }; + sdk?: { + name?: string | null; + version?: string | null; + }; + os?: { + name?: string | null; + version?: string | null; + }; + browser?: { + name?: string | null; + version?: string | null; + }; + device?: { + name?: string | null; + brand?: string | null; + model?: string | null; + family?: string | null; + }; + ota_updates?: { + channel?: string | null; + runtime_version?: string | null; + update_id?: string | null; + }; + is_archived?: boolean | null; + urls?: Array | null; + clicks?: Array<{ + [key: string]: unknown; + }>; + count_dead_clicks?: number | null; + count_rage_clicks?: number | null; + count_errors?: number | null; + duration?: number | null; + finished_at?: string | null; + started_at?: string | null; + activity?: number | null; + count_urls?: number | null; + replay_type?: string; + count_segments?: number | null; + platform?: string | null; + releases?: Array; + dist?: string | null; + count_warnings?: number | null; + count_infos?: number | null; + has_viewed?: boolean; +}; + +export type GetReplayRecordingSegment = Array<{ + [key: string]: unknown; +}>; + +export type GetReplayViewedBy = { + data: { + viewed_by: Array<{ + [key: string]: unknown; + }>; + }; +}; + +export type GroupEventsResponseDict = Array<{ + id: string; + 'event.type': string; + groupID: string | null; + eventID: string; + projectID: string; + message: string; + title: string; + location: string | null; + culprit: string | null; + user: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: { + [key: string]: string; + } | null; + data?: { + [key: string]: unknown; + } | null; + } | null; + tags: Array<{ + query?: string; + key: string; + value: string; + }>; + platform: string | null; + dateCreated: string; + crashFile: string | null; + metadata: { + [key: string]: unknown; + } | null; +}>; + +export type GroupExternalIssueResponse = Array<{ + id: string; + issueId: string; + serviceType: string; + displayName: string; + webUrl: string; +}>; + +export type GroupValidator = { + /** + * If true, marks the issue as reviewed by the requestor. + */ + inbox: boolean; + /** + * Limit mutations to only issues with the given status. + * + * * `resolved` + * * `unresolved` + * * `ignored` + * * `resolvedInNextRelease` + * * `muted` + */ + status: 'resolved' | 'unresolved' | 'ignored' | 'resolvedInNextRelease' | 'muted'; + /** + * Additional details about the resolution. Status detail updates that include release data are only allowed for issues within a single project. + */ + statusDetails: { + /** + * If true, marks the issue as resolved in the next release. + */ + inNextRelease: boolean; + /** + * The version of the release that the issue should be resolved in.If set to `latest`, the latest release will be used. + */ + inRelease: string; + /** + * The commit data that the issue should use for resolution. + */ + inCommit?: { + /** + * The SHA of the resolving commit. + */ + commit: string; + /** + * The name of the repository (as it appears in Sentry). + */ + repository: string; + }; + /** + * Ignore the issue until for this many minutes. + */ + ignoreDuration: number; + /** + * Ignore the issue until it has occurred this many times in `ignoreWindow` minutes. + */ + ignoreCount: number; + /** + * Ignore the issue until it has occurred `ignoreCount` times in this many minutes. (Max: 1 week) + */ + ignoreWindow: number; + /** + * Ignore the issue until it has affected this many users in `ignoreUserWindow` minutes. + */ + ignoreUserCount: number; + /** + * Ignore the issue until it has affected `ignoreUserCount` users in this many minutes. (Max: 1 week) + */ + ignoreUserWindow: number; + }; + /** + * The new substatus of the issue. + * + * * `archived_until_escalating` + * * `archived_until_condition_met` + * * `archived_forever` + * * `escalating` + * * `ongoing` + * * `regressed` + * * `new` + */ + substatus: 'archived_until_escalating' | 'archived_until_condition_met' | 'archived_forever' | 'escalating' | 'ongoing' | 'regressed' | 'new' | null; + /** + * If true, marks the issue as seen by the requestor. + */ + hasSeen: boolean; + /** + * If true, bookmarks the issue for the requestor. + */ + isBookmarked: boolean; + /** + * If true, publishes the issue. + */ + isPublic: boolean; + /** + * If true, subscribes the requestor to the issue. + */ + isSubscribed: boolean; + /** + * If true, merges the issues together. + */ + merge: boolean; + /** + * If true, discards the issues instead of updating them. + */ + discard: boolean; + /** + * The user or team that should be assigned to the issues. Values take the form of ``, `user:`, ``, ``, or `team:`. + */ + assignedTo: string; + /** + * The priority that should be set for the issues + * + * * `low` + * * `medium` + * * `high` + */ + priority: 'low' | 'medium' | 'high'; +}; + +export type InCommitValidator = { + /** + * The SHA of the resolving commit. + */ + commit: string; + /** + * The name of the repository (as it appears in Sentry). + */ + repository: string; +}; + +export type IssueEventDetailsResponse = { + id: string; + groupID: string | null; + eventID: string; + projectID: string; + message: string | null; + title: string; + location: string | null; + user: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: { + [key: string]: string; + } | null; + data?: { + [key: string]: unknown; + } | null; + } | null; + tags: Array<{ + query?: string; + key: string; + value: string; + }>; + platform: string; + dateReceived: string | null; + contexts: { + [key: string]: unknown; + } | null; + size: number | null; + entries: Array; + dist: string | null; + sdk: { + [key: string]: string; + }; + context: { + [key: string]: unknown; + } | null; + packages: { + [key: string]: unknown; + }; + type: string; + metadata: unknown; + errors: Array; + occurrence: unknown; + _meta: { + [key: string]: unknown; + }; + crashFile?: string | null; + culprit?: string | null; + dateCreated?: string; + fingerprints?: Array; + groupingConfig?: unknown; + startTimestamp?: string; + endTimestamp?: string; + measurements?: unknown; + breakdowns?: unknown; + release: { + id?: number; + commitCount?: number; + data?: { + [key: string]: unknown; + }; + dateCreated?: string; + dateReleased?: string | null; + deployCount?: number; + ref?: string | null; + lastCommit?: { + [key: string]: unknown; + } | null; + lastDeploy?: { + dateStarted?: string | null; + url?: string | null; + id: string; + environment: string; + dateFinished: string; + name: string; + } | null; + status?: string; + url?: string | null; + userAgent?: string | null; + version?: string | null; + versionInfo?: { + description?: string; + package: string | null; + version: { + [key: string]: unknown; + }; + buildHash: string | null; + } | null; + } | null; + userReport: { + id: string; + eventID: string; + name: string | null; + email: string | null; + comments: string; + dateCreated: string; + user: { + id: string; + username: string | null; + email: string | null; + name: string | null; + ipAddress: string | null; + avatarUrl: string | null; + } | null; + event: { + id: string; + eventID: string; + }; + } | null; + sdkUpdates: Array<{ + [key: string]: unknown; + }>; + resolvedWith: Array; + nextEventID: string | null; + previousEventID: string | null; +}; + +/** + * Layout settings for the source. This is required for HTTP, GCS, and S3 sources. + * + * **`type`** ***(string)*** - The layout of the folder structure. The options are: + * - `native` - Platform-Specific (SymStore / GDB / LLVM) + * - `symstore` - Microsoft SymStore + * - `symstore_index2` - Microsoft SymStore (with index2.txt) + * - `ssqp` - Microsoft SSQP + * - `unified` - Unified Symbol Server Layout + * - `debuginfod` - debuginfod + * + * **`casing`** ***(string)*** - The layout of the folder structure. The options are: + * - `default` - Default (mixed case) + * - `uppercase` - Uppercase + * - `lowercase` - Lowercase + * + * ```json + * { + * "layout": { + * "type": "native" + * "casing": "default" + * } + * } + * ``` + */ +export type Layout = { + /** + * The source's layout type. + * + * * `native` + * * `symstore` + * * `symstore_index2` + * * `ssqp` + * * `unified` + * * `debuginfod` + * * `slashsymbols` + */ + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + /** + * The source's casing rules. + * + * * `lowercase` + * * `uppercase` + * * `default` + */ + casing: 'lowercase' | 'uppercase' | 'default'; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type LinkedDashboard = { + field: string; + dashboard_id: string; +}; + +export type ListClientKeysResponse = Array<{ + id: string; + name: string; + label: string; + public: string | null; + secret: string | null; + projectId: number; + isActive: boolean; + rateLimit: { + window: number; + count: number; + } | null; + dsn: { + secret: string; + public: string; + csp: string; + security: string; + minidump: string; + nel: string; + unreal: string; + crons: string; + cdn: string; + playstation: string; + integration: string; + otlp_traces: string; + otlp_logs: string; + }; + browserSdkVersion: string; + browserSdk: { + choices: Array>; + }; + dateCreated: string | null; + dynamicSdkLoaderOptions: { + hasReplay: boolean; + hasPerformance: boolean; + hasDebug: boolean; + hasFeedback: boolean; + hasLogsAndMetrics: boolean; + }; + useCase?: string; +}>; + +export type ListDataForwarderResponse = Array<{ + id: string; + organizationId: string; + isEnabled: boolean; + enrollNewProjects: boolean; + enrolledProjects: Array<{ + id: string; + slug: string; + platform: string | null; + }>; + provider: string; + config: { + [key: string]: string; + }; + projectConfigs: Array<{ + id: string; + isEnabled: boolean; + dataForwarderId: string; + project: { + id: string; + slug: string; + platform: string | null; + }; + overrides: { + [key: string]: string; + }; + effectiveConfig: { + [key: string]: string; + }; + dateAdded: string; + dateUpdated: string; + }>; + dateAdded: string; + dateUpdated: string; +}>; + +export type ListDetectorSerializerResponse = Array<{ + owner?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + } | null; + createdBy?: string | null; + latestGroup?: { + [key: string]: unknown; + } | null; + description?: string | null; + id: string; + projectId: string; + name: string; + type: string; + workflowIds: Array | null; + dateCreated: string; + dateUpdated: string; + dataSources: Array<{ + [key: string]: unknown; + }> | null; + conditionGroup: { + [key: string]: unknown; + } | null; + config: { + [key: string]: unknown; + }; + enabled: boolean; + openIssues: number; +}>; + +export type ListMemberOnTeamResponse = Array<{ + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + role?: string; + roleName?: string; + id: string; + email: string; + name: string; + user: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; + teamRole: string | null; + teamSlug: string; +}>; + +export type ListMetricAlertRules = Array<{ + environment?: string | null; + projects?: Array | null; + queryType?: number | null; + resolveThreshold?: number | null; + dataset?: string | null; + thresholdType?: number | null; + eventTypes?: Array | null; + owner?: string | null; + originalAlertRuleId?: string | null; + comparisonDelta?: number | null; + snooze?: boolean | null; + errors?: Array | null; + extrapolationMode?: string | null; + id: string; + name: string; + organizationId: string; + query: string; + aggregate: string; + timeWindow: number; + triggers: Array<{ + [key: string]: unknown; + }>; + dateModified: string; + dateCreated: string; + createdBy: { + [key: string]: unknown; + }; +}>; + +export type ListOrgMembersResponse = Array<{ + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; +}>; + +export type ListOrgTeamResponse = Array<{ + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; +}>; + +export type ListOrganizationClientKeysResponse = Array<{ + id: string; + name: string; + label: string; + public: string | null; + secret: string | null; + projectId: number; + isActive: boolean; + rateLimit: { + window: number; + count: number; + } | null; + dsn: { + secret: string; + public: string; + csp: string; + security: string; + minidump: string; + nel: string; + unreal: string; + crons: string; + cdn: string; + playstation: string; + integration: string; + otlp_traces: string; + otlp_logs: string; + }; + browserSdkVersion: string; + browserSdk: { + choices: Array>; + }; + dateCreated: string | null; + dynamicSdkLoaderOptions: { + hasReplay: boolean; + hasPerformance: boolean; + hasDebug: boolean; + hasFeedback: boolean; + hasLogsAndMetrics: boolean; + }; + useCase?: string; +}>; + +export type ListOrganizationIntegrationResponse = Array<{ + id: string; + name: string; + icon: string | null; + domainName: string | null; + accountType: string | null; + scopes: Array | null; + status: string; + provider: unknown; + configOrganization: unknown; + configData: unknown; + externalId: string; + organizationId: number; + organizationIntegrationStatus: string; + gracePeriodEnd: string | null; +}>; + +export type ListOrganizationMemberResponse = Array<{ + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; +}>; + +export type ListOrganizations = Array<{ + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; +}>; + +export type ListProjectEnvironments = Array<{ + id: string; + name: string; + isHidden: boolean; +}>; + +export type ListReplayClicks = { + data: Array<{ + node_id: number; + timestamp: string; + }>; +}; + +export type ListReplayRecordingSegments = Array>; + +export type ListReplays = Array<{ + id?: string; + project_id?: string; + trace_ids?: Array; + error_ids?: Array; + environment?: string | null; + tags?: { + [key: string]: Array; + } | Array; + user?: { + id?: string | null; + username?: string | null; + email?: string | null; + ip?: string | null; + display_name?: string | null; + geo?: { + city?: string | null; + country_code?: string | null; + region?: string | null; + subdivision?: string | null; + }; + }; + sdk?: { + name?: string | null; + version?: string | null; + }; + os?: { + name?: string | null; + version?: string | null; + }; + browser?: { + name?: string | null; + version?: string | null; + }; + device?: { + name?: string | null; + brand?: string | null; + model?: string | null; + family?: string | null; + }; + ota_updates?: { + channel?: string | null; + runtime_version?: string | null; + update_id?: string | null; + }; + is_archived?: boolean | null; + urls?: Array | null; + clicks?: Array<{ + [key: string]: unknown; + }>; + count_dead_clicks?: number | null; + count_rage_clicks?: number | null; + count_errors?: number | null; + duration?: number | null; + finished_at?: string | null; + started_at?: string | null; + activity?: number | null; + count_urls?: number | null; + replay_type?: string; + count_segments?: number | null; + platform?: string | null; + releases?: Array; + dist?: string | null; + count_warnings?: number | null; + count_infos?: number | null; + has_viewed?: boolean; +}>; + +export type ListRules = Array<{ + owner?: string | null; + createdBy?: { + id: number; + name: string; + email: string; + } | null; + environment?: string | null; + lastTriggered?: string | null; + snoozeCreatedBy?: string | null; + snoozeForEveryone?: boolean | null; + disableReason?: string; + disableDate?: string; + errors?: Array<{ + detail: string; + }>; + id: string | null; + conditions: Array<{ + [key: string]: unknown; + }>; + filters: Array<{ + [key: string]: unknown; + }>; + actions: Array<{ + [key: string]: unknown; + }>; + actionMatch: string; + filterMatch: string; + frequency: number; + name: string; + dateCreated: string; + projects: Array; + status: string; + snooze: boolean; +}>; + +export type ListSelectors = { + data: Array<{ + count_dead_clicks?: number; + count_rage_clicks?: number; + dom_element?: string; + element?: { + alt: string; + aria_label: string; + class: Array; + component_name: string; + id: string; + role: string; + tag: string; + testid: string; + title: string; + }; + project_id?: string; + }>; +}; + +export type ListTeamProjectResponse = Array<{ + latestDeploys?: { + [key: string]: { + [key: string]: string; + }; + } | null; + options?: { + [key: string]: unknown; + }; + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + team: { + id: string; + name: string; + slug: string; + } | null; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + platforms: Array; + hasUserReports: boolean; + environments: Array; + latestRelease: { + version: string; + } | null; +}>; + +export type ListWorkflow = Array<{ + id: string; + name: string; + organizationId: string; + createdBy: string | null; + dateCreated: string; + dateUpdated: string; + triggers: { + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + } | null; + actionFilters: Array<{ + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + }> | null; + environment: string | null; + config: { + [key: string]: unknown; + }; + detectorIds: Array | null; + enabled: boolean; + lastTriggered: string | null; +}>; + +export type Monitor = { + alertRule?: { + targets: Array<{ + targetIdentifier: number; + targetType: string; + }>; + environment: string; + }; + id: string; + name: string; + slug: string; + status: string; + isMuted: boolean; + isUpserting: boolean; + config: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + dateCreated: string; + project: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }; + environments: { + name: string; + status: string; + isMuted: boolean; + dateCreated: string; + lastCheckIn: string; + nextCheckIn: string; + nextCheckInLatest: string; + activeIncident: { + startingTimestamp: string; + resolvingTimestamp: string; + brokenNotice: { + userNotifiedTimestamp: string; + environmentMutedTimestamp: string; + } | null; + } | null; + }; + owner: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; +}; + +export type MonitorList = Array<{ + alertRule?: { + targets: Array<{ + targetIdentifier: number; + targetType: string; + }>; + environment: string; + }; + id: string; + name: string; + slug: string; + status: string; + isMuted: boolean; + isUpserting: boolean; + config: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + dateCreated: string; + project: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }; + environments: { + name: string; + status: string; + isMuted: boolean; + dateCreated: string; + lastCheckIn: string; + nextCheckIn: string; + nextCheckInLatest: string; + activeIncident: { + startingTimestamp: string; + resolvingTimestamp: string; + brokenNotice: { + userNotifiedTimestamp: string; + environmentMutedTimestamp: string; + } | null; + } | null; + }; + owner: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; +}>; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type MonitorValidator = { + /** + * The project slug to associate the monitor to. + */ + project: string; + /** + * Name of the monitor. Used for notifications. If not set the slug will be derived from your monitor name. + */ + name: string; + /** + * The configuration for the monitor. + */ + config: { + /** + * Currently supports "crontab" or "interval" + * + * * `crontab` + * * `interval` + */ + schedule_type?: 'crontab' | 'interval'; + /** + * Varies depending on the schedule_type. Is either a crontab string, or a 2 element tuple for intervals (e.g. [1, 'day']) + */ + schedule: unknown; + /** + * How long (in minutes) after the expected checkin time will we wait until we consider the checkin to have been missed. + */ + checkin_margin?: number | null; + /** + * How long (in minutes) is the checkin allowed to run for in CheckInStatus.IN_PROGRESS before it is considered failed. + */ + max_runtime?: number | null; + /** + * tz database style timezone string + * + * * `Africa/Abidjan` + * * `Africa/Accra` + * * `Africa/Addis_Ababa` + * * `Africa/Algiers` + * * `Africa/Asmara` + * * `Africa/Asmera` + * * `Africa/Bamako` + * * `Africa/Bangui` + * * `Africa/Banjul` + * * `Africa/Bissau` + * * `Africa/Blantyre` + * * `Africa/Brazzaville` + * * `Africa/Bujumbura` + * * `Africa/Cairo` + * * `Africa/Casablanca` + * * `Africa/Ceuta` + * * `Africa/Conakry` + * * `Africa/Dakar` + * * `Africa/Dar_es_Salaam` + * * `Africa/Djibouti` + * * `Africa/Douala` + * * `Africa/El_Aaiun` + * * `Africa/Freetown` + * * `Africa/Gaborone` + * * `Africa/Harare` + * * `Africa/Johannesburg` + * * `Africa/Juba` + * * `Africa/Kampala` + * * `Africa/Khartoum` + * * `Africa/Kigali` + * * `Africa/Kinshasa` + * * `Africa/Lagos` + * * `Africa/Libreville` + * * `Africa/Lome` + * * `Africa/Luanda` + * * `Africa/Lubumbashi` + * * `Africa/Lusaka` + * * `Africa/Malabo` + * * `Africa/Maputo` + * * `Africa/Maseru` + * * `Africa/Mbabane` + * * `Africa/Mogadishu` + * * `Africa/Monrovia` + * * `Africa/Nairobi` + * * `Africa/Ndjamena` + * * `Africa/Niamey` + * * `Africa/Nouakchott` + * * `Africa/Ouagadougou` + * * `Africa/Porto-Novo` + * * `Africa/Sao_Tome` + * * `Africa/Timbuktu` + * * `Africa/Tripoli` + * * `Africa/Tunis` + * * `Africa/Windhoek` + * * `America/Adak` + * * `America/Anchorage` + * * `America/Anguilla` + * * `America/Antigua` + * * `America/Araguaina` + * * `America/Argentina/Buenos_Aires` + * * `America/Argentina/Catamarca` + * * `America/Argentina/ComodRivadavia` + * * `America/Argentina/Cordoba` + * * `America/Argentina/Jujuy` + * * `America/Argentina/La_Rioja` + * * `America/Argentina/Mendoza` + * * `America/Argentina/Rio_Gallegos` + * * `America/Argentina/Salta` + * * `America/Argentina/San_Juan` + * * `America/Argentina/San_Luis` + * * `America/Argentina/Tucuman` + * * `America/Argentina/Ushuaia` + * * `America/Aruba` + * * `America/Asuncion` + * * `America/Atikokan` + * * `America/Atka` + * * `America/Bahia` + * * `America/Bahia_Banderas` + * * `America/Barbados` + * * `America/Belem` + * * `America/Belize` + * * `America/Blanc-Sablon` + * * `America/Boa_Vista` + * * `America/Bogota` + * * `America/Boise` + * * `America/Buenos_Aires` + * * `America/Cambridge_Bay` + * * `America/Campo_Grande` + * * `America/Cancun` + * * `America/Caracas` + * * `America/Catamarca` + * * `America/Cayenne` + * * `America/Cayman` + * * `America/Chicago` + * * `America/Chihuahua` + * * `America/Ciudad_Juarez` + * * `America/Coral_Harbour` + * * `America/Cordoba` + * * `America/Costa_Rica` + * * `America/Coyhaique` + * * `America/Creston` + * * `America/Cuiaba` + * * `America/Curacao` + * * `America/Danmarkshavn` + * * `America/Dawson` + * * `America/Dawson_Creek` + * * `America/Denver` + * * `America/Detroit` + * * `America/Dominica` + * * `America/Edmonton` + * * `America/Eirunepe` + * * `America/El_Salvador` + * * `America/Ensenada` + * * `America/Fort_Nelson` + * * `America/Fort_Wayne` + * * `America/Fortaleza` + * * `America/Glace_Bay` + * * `America/Godthab` + * * `America/Goose_Bay` + * * `America/Grand_Turk` + * * `America/Grenada` + * * `America/Guadeloupe` + * * `America/Guatemala` + * * `America/Guayaquil` + * * `America/Guyana` + * * `America/Halifax` + * * `America/Havana` + * * `America/Hermosillo` + * * `America/Indiana/Indianapolis` + * * `America/Indiana/Knox` + * * `America/Indiana/Marengo` + * * `America/Indiana/Petersburg` + * * `America/Indiana/Tell_City` + * * `America/Indiana/Vevay` + * * `America/Indiana/Vincennes` + * * `America/Indiana/Winamac` + * * `America/Indianapolis` + * * `America/Inuvik` + * * `America/Iqaluit` + * * `America/Jamaica` + * * `America/Jujuy` + * * `America/Juneau` + * * `America/Kentucky/Louisville` + * * `America/Kentucky/Monticello` + * * `America/Knox_IN` + * * `America/Kralendijk` + * * `America/La_Paz` + * * `America/Lima` + * * `America/Los_Angeles` + * * `America/Louisville` + * * `America/Lower_Princes` + * * `America/Maceio` + * * `America/Managua` + * * `America/Manaus` + * * `America/Marigot` + * * `America/Martinique` + * * `America/Matamoros` + * * `America/Mazatlan` + * * `America/Mendoza` + * * `America/Menominee` + * * `America/Merida` + * * `America/Metlakatla` + * * `America/Mexico_City` + * * `America/Miquelon` + * * `America/Moncton` + * * `America/Monterrey` + * * `America/Montevideo` + * * `America/Montreal` + * * `America/Montserrat` + * * `America/Nassau` + * * `America/New_York` + * * `America/Nipigon` + * * `America/Nome` + * * `America/Noronha` + * * `America/North_Dakota/Beulah` + * * `America/North_Dakota/Center` + * * `America/North_Dakota/New_Salem` + * * `America/Nuuk` + * * `America/Ojinaga` + * * `America/Panama` + * * `America/Pangnirtung` + * * `America/Paramaribo` + * * `America/Phoenix` + * * `America/Port-au-Prince` + * * `America/Port_of_Spain` + * * `America/Porto_Acre` + * * `America/Porto_Velho` + * * `America/Puerto_Rico` + * * `America/Punta_Arenas` + * * `America/Rainy_River` + * * `America/Rankin_Inlet` + * * `America/Recife` + * * `America/Regina` + * * `America/Resolute` + * * `America/Rio_Branco` + * * `America/Rosario` + * * `America/Santa_Isabel` + * * `America/Santarem` + * * `America/Santiago` + * * `America/Santo_Domingo` + * * `America/Sao_Paulo` + * * `America/Scoresbysund` + * * `America/Shiprock` + * * `America/Sitka` + * * `America/St_Barthelemy` + * * `America/St_Johns` + * * `America/St_Kitts` + * * `America/St_Lucia` + * * `America/St_Thomas` + * * `America/St_Vincent` + * * `America/Swift_Current` + * * `America/Tegucigalpa` + * * `America/Thule` + * * `America/Thunder_Bay` + * * `America/Tijuana` + * * `America/Toronto` + * * `America/Tortola` + * * `America/Vancouver` + * * `America/Virgin` + * * `America/Whitehorse` + * * `America/Winnipeg` + * * `America/Yakutat` + * * `America/Yellowknife` + * * `Antarctica/Casey` + * * `Antarctica/Davis` + * * `Antarctica/DumontDUrville` + * * `Antarctica/Macquarie` + * * `Antarctica/Mawson` + * * `Antarctica/McMurdo` + * * `Antarctica/Palmer` + * * `Antarctica/Rothera` + * * `Antarctica/South_Pole` + * * `Antarctica/Syowa` + * * `Antarctica/Troll` + * * `Antarctica/Vostok` + * * `Arctic/Longyearbyen` + * * `Asia/Aden` + * * `Asia/Almaty` + * * `Asia/Amman` + * * `Asia/Anadyr` + * * `Asia/Aqtau` + * * `Asia/Aqtobe` + * * `Asia/Ashgabat` + * * `Asia/Ashkhabad` + * * `Asia/Atyrau` + * * `Asia/Baghdad` + * * `Asia/Bahrain` + * * `Asia/Baku` + * * `Asia/Bangkok` + * * `Asia/Barnaul` + * * `Asia/Beirut` + * * `Asia/Bishkek` + * * `Asia/Brunei` + * * `Asia/Calcutta` + * * `Asia/Chita` + * * `Asia/Choibalsan` + * * `Asia/Chongqing` + * * `Asia/Chungking` + * * `Asia/Colombo` + * * `Asia/Dacca` + * * `Asia/Damascus` + * * `Asia/Dhaka` + * * `Asia/Dili` + * * `Asia/Dubai` + * * `Asia/Dushanbe` + * * `Asia/Famagusta` + * * `Asia/Gaza` + * * `Asia/Harbin` + * * `Asia/Hebron` + * * `Asia/Ho_Chi_Minh` + * * `Asia/Hong_Kong` + * * `Asia/Hovd` + * * `Asia/Irkutsk` + * * `Asia/Istanbul` + * * `Asia/Jakarta` + * * `Asia/Jayapura` + * * `Asia/Jerusalem` + * * `Asia/Kabul` + * * `Asia/Kamchatka` + * * `Asia/Karachi` + * * `Asia/Kashgar` + * * `Asia/Kathmandu` + * * `Asia/Katmandu` + * * `Asia/Khandyga` + * * `Asia/Kolkata` + * * `Asia/Krasnoyarsk` + * * `Asia/Kuala_Lumpur` + * * `Asia/Kuching` + * * `Asia/Kuwait` + * * `Asia/Macao` + * * `Asia/Macau` + * * `Asia/Magadan` + * * `Asia/Makassar` + * * `Asia/Manila` + * * `Asia/Muscat` + * * `Asia/Nicosia` + * * `Asia/Novokuznetsk` + * * `Asia/Novosibirsk` + * * `Asia/Omsk` + * * `Asia/Oral` + * * `Asia/Phnom_Penh` + * * `Asia/Pontianak` + * * `Asia/Pyongyang` + * * `Asia/Qatar` + * * `Asia/Qostanay` + * * `Asia/Qyzylorda` + * * `Asia/Rangoon` + * * `Asia/Riyadh` + * * `Asia/Saigon` + * * `Asia/Sakhalin` + * * `Asia/Samarkand` + * * `Asia/Seoul` + * * `Asia/Shanghai` + * * `Asia/Singapore` + * * `Asia/Srednekolymsk` + * * `Asia/Taipei` + * * `Asia/Tashkent` + * * `Asia/Tbilisi` + * * `Asia/Tehran` + * * `Asia/Tel_Aviv` + * * `Asia/Thimbu` + * * `Asia/Thimphu` + * * `Asia/Tokyo` + * * `Asia/Tomsk` + * * `Asia/Ujung_Pandang` + * * `Asia/Ulaanbaatar` + * * `Asia/Ulan_Bator` + * * `Asia/Urumqi` + * * `Asia/Ust-Nera` + * * `Asia/Vientiane` + * * `Asia/Vladivostok` + * * `Asia/Yakutsk` + * * `Asia/Yangon` + * * `Asia/Yekaterinburg` + * * `Asia/Yerevan` + * * `Atlantic/Azores` + * * `Atlantic/Bermuda` + * * `Atlantic/Canary` + * * `Atlantic/Cape_Verde` + * * `Atlantic/Faeroe` + * * `Atlantic/Faroe` + * * `Atlantic/Jan_Mayen` + * * `Atlantic/Madeira` + * * `Atlantic/Reykjavik` + * * `Atlantic/South_Georgia` + * * `Atlantic/St_Helena` + * * `Atlantic/Stanley` + * * `Australia/ACT` + * * `Australia/Adelaide` + * * `Australia/Brisbane` + * * `Australia/Broken_Hill` + * * `Australia/Canberra` + * * `Australia/Currie` + * * `Australia/Darwin` + * * `Australia/Eucla` + * * `Australia/Hobart` + * * `Australia/LHI` + * * `Australia/Lindeman` + * * `Australia/Lord_Howe` + * * `Australia/Melbourne` + * * `Australia/NSW` + * * `Australia/North` + * * `Australia/Perth` + * * `Australia/Queensland` + * * `Australia/South` + * * `Australia/Sydney` + * * `Australia/Tasmania` + * * `Australia/Victoria` + * * `Australia/West` + * * `Australia/Yancowinna` + * * `Brazil/Acre` + * * `Brazil/DeNoronha` + * * `Brazil/East` + * * `Brazil/West` + * * `CET` + * * `CST6CDT` + * * `Canada/Atlantic` + * * `Canada/Central` + * * `Canada/Eastern` + * * `Canada/Mountain` + * * `Canada/Newfoundland` + * * `Canada/Pacific` + * * `Canada/Saskatchewan` + * * `Canada/Yukon` + * * `Chile/Continental` + * * `Chile/EasterIsland` + * * `Cuba` + * * `EET` + * * `EST` + * * `EST5EDT` + * * `Egypt` + * * `Eire` + * * `Etc/GMT` + * * `Etc/GMT+0` + * * `Etc/GMT+1` + * * `Etc/GMT+10` + * * `Etc/GMT+11` + * * `Etc/GMT+12` + * * `Etc/GMT+2` + * * `Etc/GMT+3` + * * `Etc/GMT+4` + * * `Etc/GMT+5` + * * `Etc/GMT+6` + * * `Etc/GMT+7` + * * `Etc/GMT+8` + * * `Etc/GMT+9` + * * `Etc/GMT-0` + * * `Etc/GMT-1` + * * `Etc/GMT-10` + * * `Etc/GMT-11` + * * `Etc/GMT-12` + * * `Etc/GMT-13` + * * `Etc/GMT-14` + * * `Etc/GMT-2` + * * `Etc/GMT-3` + * * `Etc/GMT-4` + * * `Etc/GMT-5` + * * `Etc/GMT-6` + * * `Etc/GMT-7` + * * `Etc/GMT-8` + * * `Etc/GMT-9` + * * `Etc/GMT0` + * * `Etc/Greenwich` + * * `Etc/UCT` + * * `Etc/UTC` + * * `Etc/Universal` + * * `Etc/Zulu` + * * `Europe/Amsterdam` + * * `Europe/Andorra` + * * `Europe/Astrakhan` + * * `Europe/Athens` + * * `Europe/Belfast` + * * `Europe/Belgrade` + * * `Europe/Berlin` + * * `Europe/Bratislava` + * * `Europe/Brussels` + * * `Europe/Bucharest` + * * `Europe/Budapest` + * * `Europe/Busingen` + * * `Europe/Chisinau` + * * `Europe/Copenhagen` + * * `Europe/Dublin` + * * `Europe/Gibraltar` + * * `Europe/Guernsey` + * * `Europe/Helsinki` + * * `Europe/Isle_of_Man` + * * `Europe/Istanbul` + * * `Europe/Jersey` + * * `Europe/Kaliningrad` + * * `Europe/Kiev` + * * `Europe/Kirov` + * * `Europe/Kyiv` + * * `Europe/Lisbon` + * * `Europe/Ljubljana` + * * `Europe/London` + * * `Europe/Luxembourg` + * * `Europe/Madrid` + * * `Europe/Malta` + * * `Europe/Mariehamn` + * * `Europe/Minsk` + * * `Europe/Monaco` + * * `Europe/Moscow` + * * `Europe/Nicosia` + * * `Europe/Oslo` + * * `Europe/Paris` + * * `Europe/Podgorica` + * * `Europe/Prague` + * * `Europe/Riga` + * * `Europe/Rome` + * * `Europe/Samara` + * * `Europe/San_Marino` + * * `Europe/Sarajevo` + * * `Europe/Saratov` + * * `Europe/Simferopol` + * * `Europe/Skopje` + * * `Europe/Sofia` + * * `Europe/Stockholm` + * * `Europe/Tallinn` + * * `Europe/Tirane` + * * `Europe/Tiraspol` + * * `Europe/Ulyanovsk` + * * `Europe/Uzhgorod` + * * `Europe/Vaduz` + * * `Europe/Vatican` + * * `Europe/Vienna` + * * `Europe/Vilnius` + * * `Europe/Volgograd` + * * `Europe/Warsaw` + * * `Europe/Zagreb` + * * `Europe/Zaporozhye` + * * `Europe/Zurich` + * * `GB` + * * `GB-Eire` + * * `GMT` + * * `GMT+0` + * * `GMT-0` + * * `GMT0` + * * `Greenwich` + * * `HST` + * * `Hongkong` + * * `Iceland` + * * `Indian/Antananarivo` + * * `Indian/Chagos` + * * `Indian/Christmas` + * * `Indian/Cocos` + * * `Indian/Comoro` + * * `Indian/Kerguelen` + * * `Indian/Mahe` + * * `Indian/Maldives` + * * `Indian/Mauritius` + * * `Indian/Mayotte` + * * `Indian/Reunion` + * * `Iran` + * * `Israel` + * * `Jamaica` + * * `Japan` + * * `Kwajalein` + * * `Libya` + * * `MET` + * * `MST` + * * `MST7MDT` + * * `Mexico/BajaNorte` + * * `Mexico/BajaSur` + * * `Mexico/General` + * * `NZ` + * * `NZ-CHAT` + * * `Navajo` + * * `PRC` + * * `PST8PDT` + * * `Pacific/Apia` + * * `Pacific/Auckland` + * * `Pacific/Bougainville` + * * `Pacific/Chatham` + * * `Pacific/Chuuk` + * * `Pacific/Easter` + * * `Pacific/Efate` + * * `Pacific/Enderbury` + * * `Pacific/Fakaofo` + * * `Pacific/Fiji` + * * `Pacific/Funafuti` + * * `Pacific/Galapagos` + * * `Pacific/Gambier` + * * `Pacific/Guadalcanal` + * * `Pacific/Guam` + * * `Pacific/Honolulu` + * * `Pacific/Johnston` + * * `Pacific/Kanton` + * * `Pacific/Kiritimati` + * * `Pacific/Kosrae` + * * `Pacific/Kwajalein` + * * `Pacific/Majuro` + * * `Pacific/Marquesas` + * * `Pacific/Midway` + * * `Pacific/Nauru` + * * `Pacific/Niue` + * * `Pacific/Norfolk` + * * `Pacific/Noumea` + * * `Pacific/Pago_Pago` + * * `Pacific/Palau` + * * `Pacific/Pitcairn` + * * `Pacific/Pohnpei` + * * `Pacific/Ponape` + * * `Pacific/Port_Moresby` + * * `Pacific/Rarotonga` + * * `Pacific/Saipan` + * * `Pacific/Samoa` + * * `Pacific/Tahiti` + * * `Pacific/Tarawa` + * * `Pacific/Tongatapu` + * * `Pacific/Truk` + * * `Pacific/Wake` + * * `Pacific/Wallis` + * * `Pacific/Yap` + * * `Poland` + * * `Portugal` + * * `ROC` + * * `ROK` + * * `Singapore` + * * `Turkey` + * * `UCT` + * * `US/Alaska` + * * `US/Aleutian` + * * `US/Arizona` + * * `US/Central` + * * `US/East-Indiana` + * * `US/Eastern` + * * `US/Hawaii` + * * `US/Indiana-Starke` + * * `US/Michigan` + * * `US/Mountain` + * * `US/Pacific` + * * `US/Samoa` + * * `UTC` + * * `Universal` + * * `W-SU` + * * `WET` + * * `Zulu` + * * `localtime` + */ + timezone?: 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Addis_Ababa' | 'Africa/Algiers' | 'Africa/Asmara' | 'Africa/Asmera' | 'Africa/Bamako' | 'Africa/Bangui' | 'Africa/Banjul' | 'Africa/Bissau' | 'Africa/Blantyre' | 'Africa/Brazzaville' | 'Africa/Bujumbura' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/Conakry' | 'Africa/Dakar' | 'Africa/Dar_es_Salaam' | 'Africa/Djibouti' | 'Africa/Douala' | 'Africa/El_Aaiun' | 'Africa/Freetown' | 'Africa/Gaborone' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' | 'Africa/Kinshasa' | 'Africa/Lagos' | 'Africa/Libreville' | 'Africa/Lome' | 'Africa/Luanda' | 'Africa/Lubumbashi' | 'Africa/Lusaka' | 'Africa/Malabo' | 'Africa/Maputo' | 'Africa/Maseru' | 'Africa/Mbabane' | 'Africa/Mogadishu' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'Africa/Ndjamena' | 'Africa/Niamey' | 'Africa/Nouakchott' | 'Africa/Ouagadougou' | 'Africa/Porto-Novo' | 'Africa/Sao_Tome' | 'Africa/Timbuktu' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Anguilla' | 'America/Antigua' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/ComodRivadavia' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Aruba' | 'America/Asuncion' | 'America/Atikokan' | 'America/Atka' | 'America/Bahia' | 'America/Bahia_Banderas' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Buenos_Aires' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Catamarca' | 'America/Cayenne' | 'America/Cayman' | 'America/Chicago' | 'America/Chihuahua' | 'America/Ciudad_Juarez' | 'America/Coral_Harbour' | 'America/Cordoba' | 'America/Costa_Rica' | 'America/Coyhaique' | 'America/Creston' | 'America/Cuiaba' | 'America/Curacao' | 'America/Danmarkshavn' | 'America/Dawson' | 'America/Dawson_Creek' | 'America/Denver' | 'America/Detroit' | 'America/Dominica' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Ensenada' | 'America/Fort_Nelson' | 'America/Fort_Wayne' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Grenada' | 'America/Guadeloupe' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Indianapolis' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Indianapolis' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Jujuy' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/Knox_IN' | 'America/Kralendijk' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Louisville' | 'America/Lower_Princes' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Marigot' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Mendoza' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Montreal' | 'America/Montserrat' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Nuuk' | 'America/Ojinaga' | 'America/Panama' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Port_of_Spain' | 'America/Porto_Acre' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Rio_Branco' | 'America/Rosario' | 'America/Santa_Isabel' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Shiprock' | 'America/Sitka' | 'America/St_Barthelemy' | 'America/St_Johns' | 'America/St_Kitts' | 'America/St_Lucia' | 'America/St_Thomas' | 'America/St_Vincent' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Tijuana' | 'America/Toronto' | 'America/Tortola' | 'America/Vancouver' | 'America/Virgin' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Antarctica/McMurdo' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/South_Pole' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Arctic/Longyearbyen' | 'Asia/Aden' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Ashkhabad' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Bahrain' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Calcutta' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Chongqing' | 'Asia/Chungking' | 'Asia/Colombo' | 'Asia/Dacca' | 'Asia/Damascus' | 'Asia/Dhaka' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Harbin' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Asia/Istanbul' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kashgar' | 'Asia/Kathmandu' | 'Asia/Katmandu' | 'Asia/Khandyga' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Kuwait' | 'Asia/Macao' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Muscat' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Phnom_Penh' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qatar' | 'Asia/Qostanay' | 'Asia/Qyzylorda' | 'Asia/Rangoon' | 'Asia/Riyadh' | 'Asia/Saigon' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tel_Aviv' | 'Asia/Thimbu' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ujung_Pandang' | 'Asia/Ulaanbaatar' | 'Asia/Ulan_Bator' | 'Asia/Urumqi' | 'Asia/Ust-Nera' | 'Asia/Vientiane' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faeroe' | 'Atlantic/Faroe' | 'Atlantic/Jan_Mayen' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/St_Helena' | 'Atlantic/Stanley' | 'Australia/ACT' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Canberra' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/LHI' | 'Australia/Lindeman' | 'Australia/Lord_Howe' | 'Australia/Melbourne' | 'Australia/NSW' | 'Australia/North' | 'Australia/Perth' | 'Australia/Queensland' | 'Australia/South' | 'Australia/Sydney' | 'Australia/Tasmania' | 'Australia/Victoria' | 'Australia/West' | 'Australia/Yancowinna' | 'Brazil/Acre' | 'Brazil/DeNoronha' | 'Brazil/East' | 'Brazil/West' | 'CET' | 'CST6CDT' | 'Canada/Atlantic' | 'Canada/Central' | 'Canada/Eastern' | 'Canada/Mountain' | 'Canada/Newfoundland' | 'Canada/Pacific' | 'Canada/Saskatchewan' | 'Canada/Yukon' | 'Chile/Continental' | 'Chile/EasterIsland' | 'Cuba' | 'EET' | 'EST' | 'EST5EDT' | 'Egypt' | 'Eire' | 'Etc/GMT' | 'Etc/GMT+0' | 'Etc/GMT+1' | 'Etc/GMT+10' | 'Etc/GMT+11' | 'Etc/GMT+12' | 'Etc/GMT+2' | 'Etc/GMT+3' | 'Etc/GMT+4' | 'Etc/GMT+5' | 'Etc/GMT+6' | 'Etc/GMT+7' | 'Etc/GMT+8' | 'Etc/GMT+9' | 'Etc/GMT-0' | 'Etc/GMT-1' | 'Etc/GMT-10' | 'Etc/GMT-11' | 'Etc/GMT-12' | 'Etc/GMT-13' | 'Etc/GMT-14' | 'Etc/GMT-2' | 'Etc/GMT-3' | 'Etc/GMT-4' | 'Etc/GMT-5' | 'Etc/GMT-6' | 'Etc/GMT-7' | 'Etc/GMT-8' | 'Etc/GMT-9' | 'Etc/GMT0' | 'Etc/Greenwich' | 'Etc/UCT' | 'Etc/UTC' | 'Etc/Universal' | 'Etc/Zulu' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/Belfast' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Busingen' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Gibraltar' | 'Europe/Guernsey' | 'Europe/Helsinki' | 'Europe/Isle_of_Man' | 'Europe/Istanbul' | 'Europe/Jersey' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Kyiv' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Mariehamn' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Nicosia' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Podgorica' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/San_Marino' | 'Europe/Sarajevo' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Tiraspol' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vaduz' | 'Europe/Vatican' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zaporozhye' | 'Europe/Zurich' | 'GB' | 'GB-Eire' | 'GMT' | 'GMT+0' | 'GMT-0' | 'GMT0' | 'Greenwich' | 'HST' | 'Hongkong' | 'Iceland' | 'Indian/Antananarivo' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Comoro' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Mayotte' | 'Indian/Reunion' | 'Iran' | 'Israel' | 'Jamaica' | 'Japan' | 'Kwajalein' | 'Libya' | 'MET' | 'MST' | 'MST7MDT' | 'Mexico/BajaNorte' | 'Mexico/BajaSur' | 'Mexico/General' | 'NZ' | 'NZ-CHAT' | 'Navajo' | 'PRC' | 'PST8PDT' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Bougainville' | 'Pacific/Chatham' | 'Pacific/Chuuk' | 'Pacific/Easter' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Johnston' | 'Pacific/Kanton' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Kwajalein' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Midway' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Ponape' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Saipan' | 'Pacific/Samoa' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Truk' | 'Pacific/Wake' | 'Pacific/Wallis' | 'Pacific/Yap' | 'Poland' | 'Portugal' | 'ROC' | 'ROK' | 'Singapore' | 'Turkey' | 'UCT' | 'US/Alaska' | 'US/Aleutian' | 'US/Arizona' | 'US/Central' | 'US/East-Indiana' | 'US/Eastern' | 'US/Hawaii' | 'US/Indiana-Starke' | 'US/Michigan' | 'US/Mountain' | 'US/Pacific' | 'US/Samoa' | 'UTC' | 'Universal' | 'W-SU' | 'WET' | 'Zulu' | 'localtime' | ''; + /** + * How many consecutive missed or failed check-ins in a row before creating a new issue. + */ + failure_issue_threshold?: number | null; + /** + * How many successful check-ins in a row before resolving an issue. + */ + recovery_threshold?: number | null; + }; + /** + * Uniquely identifies your monitor within your organization. Changing this slug will require updates to any instrumented check-in calls. + */ + slug?: string; + /** + * Status of the monitor. Disabled monitors will not accept events and will not count towards the monitor quota. + * + * * `active` + * * `disabled` + */ + status?: 'active' | 'disabled'; + /** + * The ID of the team or user that owns the monitor. (eg. user:51 or team:6) + */ + owner?: string | null; + /** + * Disable creation of monitor incidents + */ + is_muted?: boolean; +}; + +/** + * Django Rest Framework serializer for incoming NotificationAction API payloads + */ +export type NotificationAction = { + /** + * Type of the trigger that causes the notification. The only supported trigger right now is: `spike-protection`. + */ + trigger_type: string; + /** + * Service that is used for sending the notification. + * - `email` + * - `slack` + * - `sentry_notification` + * - `pagerduty` + * - `opsgenie` + * + */ + service_type: string; + /** + * ID of the integration used as the notification service. See + * [List Integrations](https://docs.sentry.io/api/integrations/list-an-organizations-available-integrations/) + * to retrieve a full list of integrations. + * + * Required if **service_type** is `slack`, `pagerduty` or `opsgenie`. + * + */ + integration_id?: number; + /** + * ID of the notification target, like a Slack channel ID. + * + * Required if **service_type** is `slack` or `opsgenie`. + * + */ + target_identifier?: string; + /** + * Name of the notification target, like a Slack channel name. + * + * Required if **service_type** is `slack` or `opsgenie`. + * + */ + target_display?: string; + /** + * List of projects slugs that the Notification Action is created for. + */ + projects?: Array; +}; + +export type OrgReleaseResponse = { + ref?: string | null; + url?: string | null; + dateReleased?: string | null; + dateCreated?: string | null; + dateStarted?: string | null; + owner?: { + [key: string]: unknown; + } | null; + lastCommit?: { + [key: string]: unknown; + } | null; + lastDeploy?: { + dateStarted?: string | null; + url?: string | null; + id: string; + environment: string; + dateFinished: string; + name: string; + } | null; + firstEvent?: string | null; + lastEvent?: string | null; + currentProjectMeta?: { + [key: string]: unknown; + } | null; + userAgent?: string | null; + adoptionStages?: { + [key: string]: unknown; + } | null; + id: number; + version: string; + newGroups: number; + status: string; + shortVersion: string; + versionInfo: { + description?: string; + package: string | null; + version: { + [key: string]: unknown; + }; + buildHash: string | null; + } | null; + data: { + [key: string]: unknown; + }; + commitCount: number; + deployCount: number; + authors: Array<{ + lastLogin?: string; + has2fa?: boolean; + lastActive?: string; + isSuperuser?: boolean; + isStaff?: boolean; + experiments?: { + [key: string]: string | number | number | boolean | { + [key: string]: unknown; + } | null; + }; + emails?: Array<{ + [key: string]: number | string | boolean; + }>; + avatar?: { + [key: string]: string | null; + }; + id: number; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + }>; + projects: Array<{ + healthData?: { + durationP50?: number | null; + durationP90?: number | null; + crashFreeUsers?: number | null; + crashFreeSessions?: number | null; + totalUsers?: number | null; + totalUsers24h?: number | null; + totalProjectUsers24h?: number | null; + totalSessions?: number | null; + totalSessions24h?: number | null; + totalProjectSessions24h?: number | null; + adoption?: number | null; + sessionsAdoption?: number | null; + sessionsCrashed: number; + sessionsErrored: number; + hasHealthData: boolean; + stats: { + [key: string]: unknown; + }; + } | null; + dateReleased?: string | null; + dateCreated?: string | null; + dateStarted?: string | null; + id: number; + slug: string; + name: string; + platform: string | null; + platforms: Array | null; + hasHealthData: boolean; + newGroups: number; + }>; +}; + +export type Organization = { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; +}; + +export type OrganizationAlertRuleDetailsPut = { + /** + * The name for the rule. + */ + name: string; + /** + * A string representing the aggregate function used in this alert rule. Valid aggregate functions are `count`, `count_unique`, `percentage`, `avg`, `apdex`, `failure_rate`, `p50`, `p75`, `p95`, `p99`, `p100`, and `percentile`. See **Metric Alert Rule Types** under [Create a Metric Alert Rule](/api/alerts/create-a-metric-alert-rule-for-an-organization/#metric-alert-rule-types) for valid configurations. + */ + aggregate: string; + /** + * The time period to aggregate over. + * + * * `1` - 1 minute + * * `5` - 5 minutes + * * `10` - 10 minutes + * * `15` - 15 minutes + * * `30` - 30 minutes + * * `60` - 1 hour + * * `120` - 2 hours + * * `240` - 4 hours + * * `1440` - 24 hours + */ + timeWindow: 1 | 5 | 10 | 15 | 30 | 60 | 120 | 240 | 1440; + /** + * The names of the projects to filter by. + */ + projects: Array; + /** + * An event search query to subscribe to and monitor for alerts. For example, to filter transactions so that only those with status code 400 are included, you could use `"query": "http.status_code:400"`. Use an empty string for no filter. + */ + query: string; + /** + * The comparison operator for the critical and warning thresholds. The comparison operator for the resolved threshold is automatically set to the opposite operator. When a percentage change threshold is used, `0` is equivalent to "Higher than" and `1` is equivalent to "Lower than". + * + * * `0` - Above + * * `1` - Below + */ + thresholdType: 0 | 1; + /** + * + * A list of triggers, where each trigger is an object with the following fields: + * - `label`: One of `critical` or `warning`. A `critical` trigger is always required. + * - `alertThreshold`: The value that the subscription needs to reach to trigger the + * alert rule. + * - `actions`: A list of actions that take place when the threshold is met. + * ```json + * triggers: [ + * { + * "label": "critical", + * "alertThreshold": 100, + * "actions": [ + * { + * "type": "email", + * "targetType": "user", + * "targetIdentifier": "23489853", + * "inputChannelId": None + * "integrationId": None, + * "sentryAppId": None + * } + * ] + * }, + * { + * "label": "warning", + * "alertThreshold": 75, + * "actions": [] + * } + * ] + * ``` + * Metric alert rule trigger actions follow the following structure: + * - `type`: The type of trigger action. Valid values are `email`, `slack`, `msteams`, `pagerduty`, `sentry_app`, `sentry_notification`, and `opsgenie`. + * - `targetType`: The type of target the notification will be sent to. Valid values are `specific`, `user`, `team`, and `sentry_app`. + * - `targetIdentifier`: The ID of the target. This must be an integer for PagerDuty and Sentry apps, and a string for all others. Examples of appropriate values include a Slack channel name (`#my-channel`), a user ID, a team ID, a Sentry app ID, etc. + * - `inputChannelId`: The ID of the Slack channel. This is only used for the Slack action, and can be used as an alternative to providing the `targetIdentifier`. + * - `integrationId`: The integration ID. This is required for every action type except `email` and `sentry_app.` + * - `sentryAppId`: The ID of the Sentry app. This is required when `type` is `sentry_app`. + * - `priority`: The severity of the Pagerduty alert or the priority of the Opsgenie alert (optional). Defaults for Pagerduty are `critical` for critical and `warning` for warning. Defaults for Opsgenie are `P1` for critical and `P2` for warning. + * + */ + triggers: Array; + /** + * The name of the environment to filter by. Defaults to all environments. + */ + environment?: string | null; + /** + * The name of the dataset that this query will be executed on. Valid values are `events`, `transactions`, `metrics`, `sessions`, and `generic-metrics`. Defaults to `events`. See **Metric Alert Rule Types** under [Create a Metric Alert Rule](/api/alerts/create-a-metric-alert-rule-for-an-organization/#metric-alert-rule-types) for valid configurations. + */ + dataset?: string; + /** + * The type of query. If no value is provided, `queryType` is set to the default for the specified `dataset.` See **Metric Alert Rule Types** under [Create a Metric Alert Rule](/api/alerts/create-a-metric-alert-rule-for-an-organization/#metric-alert-rule-types) for valid configurations. + * + * * `0` - event.type:error + * * `1` - event.type:transaction + * * `2` - None + */ + queryType?: 0 | 1 | 2; + /** + * List of event types that this alert will be related to. Valid values are `default` (events captured using [Capture Message](/product/sentry-basics/integrate-backend/capturing-errors/#capture-message)), `error` and `transaction`. + */ + eventTypes?: Array; + /** + * An optional int representing the time delta to use as the comparison period, in minutes. Required when using a percentage change threshold ("x%" higher or lower compared to `comparisonDelta` minutes ago). A percentage change threshold cannot be used for [Crash Free Session Rate](/api/alerts/create-a-metric-alert-rule-for-an-organization/#crash-free-session-rate) or [Crash Free User Rate](/api/alerts/create-a-metric-alert-rule-for-an-organization/#crash-free-user-rate). + */ + comparisonDelta?: number; + /** + * Optional value that the metric needs to reach to resolve the alert. If no value is provided, this is set automatically based on the lowest severity trigger's `alertThreshold`. For example, if the alert is set to trigger at the warning level when the number of errors is above 50, then the alert would be set to resolve when there are less than 50 errors. If `thresholdType` is `0`, `resolveThreshold` must be greater than the critical threshold. Otherwise, it must be less than the critical threshold. + */ + resolveThreshold?: number; + /** + * The ID of the team or user that owns the rule. + */ + owner?: string | null; +}; + +export type OrganizationAlertRuleIndexPost = { + /** + * The name for the rule, which has a maximimum length of 256 characters. + */ + name: string; + /** + * A string representing the aggregate function used in this alert rule. Valid aggregate functions are `count`, `count_unique`, `percentage`, `avg`, `apdex`, `failure_rate`, `p50`, `p75`, `p95`, `p99`, `p100`, and `percentile`. See [Metric Alert Rule Types](#metric-alert-rule-types) for valid configurations. + */ + aggregate: string; + /** + * The time period to aggregate over. + * + * * `1` - 1 minute + * * `5` - 5 minutes + * * `10` - 10 minutes + * * `15` - 15 minutes + * * `30` - 30 minutes + * * `60` - 1 hour + * * `120` - 2 hours + * * `240` - 4 hours + * * `1440` - 24 hours + */ + timeWindow: 1 | 5 | 10 | 15 | 30 | 60 | 120 | 240 | 1440; + /** + * Metric alerts are currently limited to one project. The array should contain a single slug, representing the project to filter by. + */ + projects: Array; + /** + * An event search query to subscribe to and monitor for alerts. For example, to filter transactions so that only those with status code 400 are included, you could use `"query": "http.status_code:400"`. Use an empty string for no filter. + */ + query: string; + /** + * The comparison operator for the critical and warning thresholds. The comparison operator for the resolved threshold is automatically set to the opposite operator. When a percentage change threshold is used, `0` is equivalent to "Higher than" and `1` is equivalent to "Lower than". + * + * * `0` - Above + * * `1` - Below + */ + thresholdType: 0 | 1; + /** + * + * A list of triggers, where each trigger is an object with the following fields: + * - `label`: One of `critical` or `warning`. A `critical` trigger is always required. + * - `alertThreshold`: The value that the subscription needs to reach to trigger the + * alert rule. + * - `actions`: A list of actions that take place when the threshold is met. + * ```json + * triggers: [ + * { + * "label": "critical", + * "alertThreshold": 50, + * "actions": [ + * { + * "type": "slack", + * "targetType": "specific", + * "targetIdentifier": "#get-crit", + * "inputChannelId": 2454362 + * "integrationId": 653532, + * } + * ] + * }, + * { + * "label": "warning", + * "alertThreshold": 25, + * "actions": [] + * } + * ] + * ``` + * Metric alert rule trigger actions follow the following structure: + * - `type`: The type of trigger action. Valid values are `email`, `slack`, `msteams`, `pagerduty`, `sentry_app`, `sentry_notification`, and `opsgenie`. + * - `targetType`: The type of target the notification will be sent to. Valid values are `specific` (`targetIdentifier` is a direct reference used by the service, like an email address or a Slack channel ID), `user` (`targetIdentifier` is a Sentry user ID), `team` (`targetIdentifier` is a Sentry team ID), and `sentry_app` (`targetIdentifier` is a SentryApp ID). + * - `targetIdentifier`: The ID of the target. This must be an integer for PagerDuty and Sentry apps, and a string for all others. Examples of appropriate values include a Slack channel name (`#my-channel`), a user ID, a team ID, a Sentry app ID, etc. + * - `inputChannelId`: The ID of the Slack channel. This is only used for the Slack action, and can be used as an alternative to providing the `targetIdentifier`. + * - `integrationId`: The integration ID. This is required for every action type excluding `email` and `sentry_app.` + * - `sentryAppId`: The ID of the Sentry app. This is required when `type` is `sentry_app`. + * - `priority`: The severity of the Pagerduty alert or the priority of the Opsgenie alert (optional). Defaults for Pagerduty are `critical` for critical and `warning` for warning. Defaults for Opsgenie are `P1` for critical and `P2` for warning. + * + */ + triggers: Array; + /** + * The name of the environment to filter by. Defaults to all environments. + */ + environment?: string | null; + /** + * The name of the dataset that this query will be executed on. Valid values are `events`, `transactions`, `metrics`, `sessions`, and `generic-metrics`. Defaults to `events`. See [Metric Alert Rule Types](#metric-alert-rule-types) for valid configurations. + */ + dataset?: string; + /** + * The type of query. If no value is provided, `queryType` is set to the default for the specified `dataset.` See [Metric Alert Rule Types](#metric-alert-rule-types) for valid configurations. + * + * * `0` - event.type:error + * * `1` - event.type:transaction + * * `2` - None + */ + queryType?: 0 | 1 | 2; + /** + * List of event types that this alert will be related to. Valid values are `default` (events captured using [Capture Message](/product/sentry-basics/integrate-backend/capturing-errors/#capture-message)), `error` and `transaction`. + */ + eventTypes?: Array; + /** + * An optional int representing the time delta to use as the comparison period, in minutes. Required when using a percentage change threshold ("x%" higher or lower compared to `comparisonDelta` minutes ago). A percentage change threshold cannot be used for [Crash Free Session Rate](#crash-free-session-rate) or [Crash Free User Rate](#crash-free-user-rate). + */ + comparisonDelta?: number; + /** + * Optional value that the metric needs to reach to resolve the alert. If no value is provided, this is set automatically based on the lowest severity trigger's `alertThreshold`. For example, if the alert is set to trigger at the warning level when the number of errors is above 50, then the alert would be set to resolve when there are less than 50 errors. If `thresholdType` is `0`, `resolveThreshold` must be greater than the critical threshold, otherwise, it must be less than the critical threshold. + */ + resolveThreshold?: number; + /** + * The ID of the team or user that owns the rule. + */ + owner?: string | null; +}; + +export type OrganizationConfigIntegrationsEndpointResponse = { + providers: Array<{ + key: string; + slug: string; + name: string; + metadata: unknown; + canAdd: boolean; + canDisable: boolean; + features: Array; + setupDialog: { + [key: string]: unknown; + }; + }>; +}; + +export type OrganizationDetailsPut = { + /** + * The new slug for the organization, which needs to be unique. + */ + slug?: string; + /** + * The new name for the organization. + */ + name?: string; + /** + * Specify `true` to opt-in to new features before they're released to the public. + */ + isEarlyAdopter?: boolean; + /** + * Specify `true` to hide AI features from the organization. + */ + hideAiFeatures?: boolean; + /** + * Specify `true` to enable Code Coverage Insights. This feature is only available for organizations on the Team plan and above. Learn more about Codecov [here](/product/codecov/). + */ + codecovAccess?: boolean; + /** + * The default role new members will receive. + * + * * `member` - Member + * * `admin` - Admin + * * `manager` - Manager + * * `owner` - Owner + */ + defaultRole?: 'member' | 'admin' | 'manager' | 'owner'; + /** + * Specify `true` to allow organization members to freely join any team. + */ + openMembership?: boolean; + /** + * Specify `true` to allow members to delete events (including the delete & discard action) by granting them the `event:admin` scope. + */ + eventsMemberAdmin?: boolean; + /** + * Specify `true` to allow members to create, edit, and delete alert rules by granting them the `alerts:write` scope. + */ + alertsMemberWrite?: boolean; + /** + * The role required to download event attachments, such as native crash reports or log files. + * + * * `member` - Member + * * `admin` - Admin + * * `manager` - Manager + * * `owner` - Owner + */ + attachmentsRole?: 'member' | 'admin' | 'manager' | 'owner'; + /** + * The role required to download debug information files, ProGuard mappings and source maps. + * + * * `member` - Member + * * `admin` - Admin + * * `manager` - Manager + * * `owner` - Owner + */ + debugFilesRole?: 'member' | 'admin' | 'manager' | 'owner'; + /** + * Specify `true` to enable granular replay permissions, allowing per-member access control for replay data. + */ + hasGranularReplayPermissions?: boolean; + /** + * A list of user IDs who have permission to access replay data. Requires the hasGranularReplayPermissions flag to be true to be enforced. + */ + replayAccessMembers?: Array | null; + /** + * The type of display picture for the organization. + * + * * `letter_avatar` - Use initials + * * `upload` - Upload an image + */ + avatarType?: 'letter_avatar' | 'upload'; + /** + * The image to upload as the organization avatar, in base64. Required if `avatarType` is `upload`. + */ + avatar?: string; + /** + * Specify `true` to require and enforce two-factor authentication for all members. + */ + require2FA?: boolean; + /** + * Specify `true` to allow sharing of limited details on issues to anonymous users. + */ + allowSharedIssues?: boolean; + /** + * Specify `true` to enable enhanced privacy controls to limit personally identifiable information (PII) as well as source code in things like notifications. + */ + enhancedPrivacy?: boolean; + /** + * Specify `true` to allow Sentry to scrape missing JavaScript source context when possible. + */ + scrapeJavaScript?: boolean; + /** + * How many native crash reports (such as Minidumps for improved processing and download in issue details) to store per issue. + * + * * `0` - Disabled + * * `1` - 1 per issue + * * `5` - 5 per issue + * * `10` - 10 per issue + * * `20` - 20 per issue + * * `50` - 50 per issue + * * `100` - 100 per issue + * * `-1` - Unlimited + */ + storeCrashReports?: 0 | 1 | 5 | 10 | 20 | 50 | 100 | -1; + /** + * Specify `true` to allow users to request to join your organization. + */ + allowJoinRequests?: boolean; + /** + * Specify `true` to require server-side data scrubbing for all projects. + */ + dataScrubber?: boolean; + /** + * Specify `true` to apply the default scrubbers to prevent things like passwords and credit cards from being stored for all projects. + */ + dataScrubberDefaults?: boolean; + /** + * A list of additional global field names to match against when scrubbing data for all projects. + */ + sensitiveFields?: Array; + /** + * A list of global field names which data scrubbers should ignore. + */ + safeFields?: Array; + /** + * Specify `true` to prevent IP addresses from being stored for new events on all projects. + */ + scrubIPAddresses?: boolean; + /** + * Advanced data scrubbing rules that can be configured for each project as a JSON string. The new rules will only apply to new incoming events. For more details on advanced data scrubbing, see our [full documentation](/security-legal-pii/scrubbing/advanced-datascrubbing/). + * + * > Warning: Calling this endpoint with this field fully overwrites the advanced data scrubbing rules. + * + * Below is an example of a payload for a set of advanced data scrubbing rules for masking credit card numbers from the log message (equivalent to `[Mask] [Credit card numbers] from [$message]` in the Sentry app) and removing a specific key called `foo` (equivalent to `[Remove] [Anything] from [extra.foo]` in the Sentry app): + * ```json + * { + * relayPiiConfig: "{\"rules":{\"0\":{\"type\":\"creditcard\",\"redaction\":{\"method\":\"mask\"}},\"1\":{\"type\":\"anything\",\"redaction\":{\"method\":\"remove\"}}},\"applications\":{\"$message\":[\"0\"],\"extra.foo\":[\"1\"]}}" + * } + * ``` + * + */ + relayPiiConfig?: string; + /** + * A list of local Relays (the name, public key, and description as a JSON) registered for the organization. This feature is only available for organizations on the Business and Enterprise plans. Read more about Relay [here](/product/relay/). + * + * Below is an example of a list containing a single local Relay registered for the organization: + * ```json + * { + * trustedRelays: [ + * { + * name: "my-relay", + * publicKey: "eiwr9fdruw4erfh892qy4493reyf89ur34wefd90h", + * description: "Configuration for my-relay." + * } + * ] + * } + * ``` + * + */ + trustedRelays?: Array<{ + [key: string]: unknown; + }>; + /** + * Specify `true` to allow Sentry to comment on recent pull requests suspected of causing issues. Requires a GitHub integration. + */ + githubPRBot?: boolean; + /** + * Specify `true` to allow Sentry to detect users committing to your GitHub repositories that are not part of your Sentry organization. Requires a GitHub integration. + */ + githubNudgeInvite?: boolean; + /** + * Specify `true` to allow Sentry to comment on recent pull requests suspected of causing issues. Requires a GitLab integration. + */ + gitlabPRBot?: boolean; + /** + * Specify `true` to allow the Sentry Slack integration to post replies in threads for an Issue Alert notification. Requires a Slack integration. + */ + issueAlertsThreadFlag?: boolean; + /** + * Specify `true` to allow the Sentry Slack integration to post replies in threads for a Metric Alert notification. Requires a Slack integration. + */ + metricAlertsThreadFlag?: boolean; + /** + * Specify `true` to restore an organization that is pending deletion. + */ + cancelDeletion?: boolean; +}; + +export type OrganizationEnvironmentResponse = Array<{ + id: string; + name: string; +}>; + +export type OrganizationEventsResponseDict = { + data: Array<{ + [key: string]: unknown; + }>; + meta: { + fields: { + [key: string]: string; + }; + datasetReason?: string; + isMetricsData?: boolean; + isMetricsExtractedData?: boolean; + }; +}; + +export type OrganizationEventsTimeseriesResponse = { + meta?: { + dataset: string; + start: number; + end: number; + }; + timeSeries: Array<{ + values: Array<{ + timestamp: number; + value: number; + incomplete: boolean; + comparisonValue?: number; + sampleCount?: number; + sampleRate?: number | null; + confidence?: 'low' | 'high'; + incompleteReason?: string; + }>; + yAxis: string; + groupBy?: Array<{ + key: string; + value: string | null; + }>; + meta: { + order?: number; + isOther?: boolean; + valueUnit: string | null; + dataScanned?: 'partial' | 'full'; + valueType: string; + interval: number; + }; + }>; +}; + +export type OrganizationGroupIndexGetResponse = Array<{ + id: string; + shareId: string; + shortId: string; + title: string; + culprit: string | null; + permalink: string; + logger: string | null; + level: string; + status: string; + statusDetails: { + autoResolved?: boolean; + ignoreCount?: number; + ignoreUntil?: string; + ignoreUserCount?: number; + ignoreUserWindow?: number; + ignoreWindow?: number; + actor?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + inNextRelease?: boolean; + inRelease?: string; + inCommit?: string; + pendingEvents?: number; + info?: unknown; + }; + substatus: string | null; + isPublic: boolean; + platform: string | null; + priority: string | null; + priorityLockedAt: string | null; + seerFixabilityScore: number | null; + seerAutofixLastTriggered: string | null; + project: { + id: string; + name: string; + slug: string; + platform: string | null; + }; + type: string; + issueType: string; + issueCategory: string; + metadata: { + [key: string]: unknown; + }; + numComments: number; + assignedTo: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + isBookmarked: boolean; + isSubscribed: boolean; + subscriptionDetails: { + disabled?: boolean; + reason?: string; + } | null; + hasSeen: boolean; + annotations: Array<{ + displayName: string; + url: string; + }>; + isUnhandled: boolean; + count: string; + userCount: number; + firstSeen: string | null; + lastSeen: string | null; + stats: { + [key: string]: unknown; + }; + lifetime: { + [key: string]: unknown; + }; + filtered: { + count: string; + userCount: number; + firstSeen: string | null; + lastSeen: string | null; + stats: { + [key: string]: unknown; + }; + } | null; + sessionCount: number; + inbox: { + reason: number; + reason_details: { + until: string | null; + count: number | null; + window: number | null; + user_count: number | null; + user_window: number | null; + } | null; + date_added: string; + }; + owners: { + type: string; + owner: string; + date_added: string; + }; + pluginActions: Array>; + pluginIssues: Array<{ + [key: string]: unknown; + }>; + integrationIssues: Array<{ + [key: string]: unknown; + }>; + sentryAppIssues: Array<{ + [key: string]: unknown; + }>; + latestEventHasAttachments: boolean; +}>; + +export type OrganizationGroupIndexPutResponse = { + assignedTo?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + discard?: boolean; + hasSeen?: boolean; + inbox?: boolean; + isBookmarked?: boolean; + isPublic?: boolean; + isSubscribed?: boolean; + merge?: { + parent: string; + children: Array; + }; + priority?: string; + shareId?: string; + status?: string; + statusDetails?: { + inNextRelease?: boolean; + inRelease?: string; + inCommit?: { + commit: string; + repository: string; + }; + ignoreDuration?: number; + ignoreCount?: number; + ignoreWindow?: number; + ignoreUserCount?: number; + ignoreUserWindow?: number; + }; + subscriptionDetails?: { + disabled?: boolean; + reason?: string; + }; + substatus?: string; +}; + +export type OrganizationIntegrationResponse = { + id: string; + name: string; + icon: string | null; + domainName: string | null; + accountType: string | null; + scopes: Array | null; + status: string; + provider: unknown; + configOrganization: unknown; + configData: unknown; + externalId: string; + organizationId: number; + organizationIntegrationStatus: string; + gracePeriodEnd: string | null; +}; + +export type OrganizationMember = { + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; +}; + +export type OrganizationMemberRequest = { + /** + * The email address to send the invitation to. + */ + email: string; + /** + * The organization-level role of the new member. Roles include: + * + * * `billing` - Can manage payment and compliance details. + * * `member` - Can view and act on events, as well as view most other data within the organization. + * * `manager` - Has full management access to all teams and projects. Can also manage + * the organization's membership. + * * `owner` - Has unrestricted access to the organization, its data, and its + * settings. Can add, modify, and delete projects and members, as well as + * make billing and plan changes. + * * `admin` - Can edit global integrations, manage projects, and add/remove teams. + * They automatically assume the Team Admin role for teams they join. + * Note: This role can no longer be assigned in Business and Enterprise plans. Use `TeamRoles` instead. + * + */ + orgRole?: 'billing' | 'member' | 'manager' | 'owner' | 'admin'; + /** + * The team and team-roles assigned to the member. Team roles can be either: + * - `contributor` - Can view and act on issues. Depending on organization settings, they can also add team members. + * - `admin` - Has full management access to their team's membership and projects. + */ + teamRoles?: Array<{ + [key: string]: unknown; + }> | null; + /** + * Whether or not to re-invite a user who has already been invited to the organization. Defaults to True. + */ + reinvite?: boolean; +}; + +/** + * Conforming to the SCIM RFC, this represents a Sentry Org Member + * as a SCIM user object. + */ +export type OrganizationMemberScim = { + active?: boolean; + schemas: Array; + id: string; + userName: string; + name: { + givenName: string; + familyName: string; + }; + emails: Array<{ + primary: boolean; + value: string; + type: string; + }>; + meta: { + resourceType: string; + }; + sentryOrgRole: string; +}; + +export type OrganizationMemberTeam = { + /** + * The team-level role to switch to. Valid roles include: + * + * * `contributor` - Contributors can view and act on events, as well as view most other data within the team's projects. + * * `admin` - Admin privileges on the team. They can create and remove projects, and can manage the team's memberships. + */ + teamRole?: 'contributor' | 'admin'; +}; + +export type OrganizationMemberTeamDetails = { + isActive: boolean; + teamRole: 'contributor' | 'admin'; +}; + +export type OrganizationMemberWithRoles = { + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + role?: string; + roleName?: string; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; + teams: Array; + teamRoles: Array<{ + teamSlug: string; + role: string | null; + }>; + invite_link: string | null; + isOnlyOwner: boolean; + orgRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + is_global: boolean; + isGlobal: boolean; + minimumTeamRole: string; + }>; + teamRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + isMinimumRoleFor: string | null; + }>; +}; + +export type OrganizationProjectResponseDict = Array<{ + latestDeploys?: { + [key: string]: { + [key: string]: string; + }; + } | null; + options?: { + [key: string]: unknown; + }; + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + team: { + id: string; + name: string; + slug: string; + } | null; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + platforms: Array; + hasUserReports: boolean; + environments: Array; + latestRelease: { + version: string; + } | null; +}>; + +export type OrganizationRelayResponse = Array<{ + relayId: string; + version: string; + publicKey: string; + firstSeen: string; + lastSeen: string; +}>; + +export type OrganizationRelease = { + /** + * An optional commit reference. This is useful if a tagged version has been provided. + */ + ref?: string | null; + /** + * A URL that points to the release. For instance, this can be the path to an online interface to the source code, such as a GitHub URL. + */ + url?: string | null; + /** + * An optional date that indicates when the release went live. If not provided the current time is used. + */ + dateReleased?: string | null; + /** + * An optional list of commit data to be associated. + */ + commits?: Array<{ + id: string; + repository?: string | null; + message?: string | null; + author_name?: string | null; + author_email?: string | null; + timestamp?: string | null; + patch_set?: Array<{ + path: string; + type: string; + }> | null; + }>; + /** + * An optional way to indicate the start and end commits for each repository included in a release. Head commits must include parameters ``repository`` and ``commit`` (the HEAD SHA). For GitLab repositories, please use the Group name instead of the slug. They can optionally include ``previousCommit`` (the SHA of the HEAD of the previous release), which should be specified if this is the first time you've sent commit data. + */ + refs?: Array<{ + commit: string; + repository: string; + previousCommit?: string | null; + }>; +}; + +export type OrganizationSentryAppDetailsResponse = Array<{ + allowedOrigins: Array; + avatars: Array<{ + avatarType: string; + avatarUuid: string; + avatarUrl: string; + color: boolean; + photoType: string; + }>; + events: Array; + featureData: Array; + isAlertable: boolean; + metadata: string; + name: string; + schema: string; + scopes: Array; + slug: string; + status: string; + uuid: string; + verifyInstall: boolean; + author?: string | null; + overview?: string | null; + popularity?: number | null; + redirectUrl?: string | null; + webhookUrl?: string | null; + clientSecret?: string | null; + datePublished?: string; + clientId?: string; + owner?: { + id: number; + slug: string; + }; +}>; + +export type OrganizationStatsSummaryResponse = { + start: string; + end: string; + projects: Array<{ + id: string; + slug: string; + stats: Array<{ + [key: string]: unknown; + }>; + }>; +}; + +export type OutcomesResponse = { + start: string; + end: string; + intervals: Array; + groups: Array<{ + by: { + [key: string]: unknown; + }; + totals: { + [key: string]: unknown; + }; + series: { + [key: string]: unknown; + }; + }>; +}; + +export type OutgoingNotificationAction = { + [key: string]: unknown; +}; + +/** + * Serializer for pagination information + */ +export type PageInfo = { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; +}; + +export type ProjectAdmin = { + /** + * Enables starring the project within the projects tab. Can be updated with **`project:read`** permission. + */ + isBookmarked?: boolean; + /** + * The name for the project + */ + name?: string; + /** + * Uniquely identifies a project and is used for the interface. + */ + slug?: string; + /** + * The platform for the project + */ + platform?: string | null; + /** + * Custom prefix for emails from this project. + */ + subjectPrefix?: string; + /** + * The email subject to use (excluding the prefix) for individual alerts. Here are the list of variables you can use: + * - `$title` + * - `$shortID` + * - `$projectID` + * - `$orgID` + * - `${tag:key}` - such as `${tag:environment}` or `${tag:release}`. + */ + subjectTemplate?: string; + /** + * Automatically resolve an issue if it hasn't been seen for this many hours. Set to `0` to disable auto-resolve. + */ + resolveAge?: number | null; + /** + * A JSON mapping of context types to lists of strings for their keys. + * E.g. `{'user': ['id', 'email']}` + */ + highlightContext?: { + [key: string]: unknown; + }; + /** + * A list of strings with tag keys to highlight on this project's issues. + * E.g. `['release', 'environment']` + */ + highlightTags?: Array; +}; + +export type ProjectEventsResponseDict = Array<{ + id: string; + 'event.type': string; + groupID: string | null; + eventID: string; + projectID: string; + message: string; + title: string; + location: string | null; + culprit: string | null; + user: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: { + [key: string]: string; + } | null; + data?: { + [key: string]: unknown; + } | null; + } | null; + tags: Array<{ + query?: string; + key: string; + value: string; + }>; + platform: string | null; + dateCreated: string; + crashFile: string | null; + metadata: { + [key: string]: unknown; + } | null; +}>; + +export type ProjectFilterResponse = Array<{ + id: string; + active: boolean | Array; +}>; + +/** + * This represents a Sentry Project Client Key. + */ +export type ProjectKey = { + id: string; + name: string; + label: string; + public: string | null; + secret: string | null; + projectId: number; + isActive: boolean; + rateLimit: { + window: number; + count: number; + } | null; + dsn: { + secret: string; + public: string; + csp: string; + security: string; + minidump: string; + nel: string; + unreal: string; + crons: string; + cdn: string; + playstation: string; + integration: string; + otlp_traces: string; + otlp_logs: string; + }; + browserSdkVersion: string; + browserSdk: { + choices: Array>; + }; + dateCreated: string | null; + dynamicSdkLoaderOptions: { + hasReplay: boolean; + hasPerformance: boolean; + hasDebug: boolean; + hasFeedback: boolean; + hasLogsAndMetrics: boolean; + }; + useCase?: string; +}; + +export type ProjectKeyPost = { + /** + * The optional name of the key. If not provided it will be automatically generated. + */ + name?: string | null; + /** + * Applies a rate limit to cap the number of errors accepted during a given time window. To + * disable entirely set `rateLimit` to null. + * ```json + * { + * "rateLimit": { + * "window": 7200, // time in seconds + * "count": 1000 // error cap + * } + * } + * ``` + */ + rateLimit?: { + count?: number | null; + window?: number | null; + }; + /** + * * `user` + * * `profiling` + * * `escalating_issues` + * * `tempest` + * * `demo` + */ + useCase?: 'user' | 'profiling' | 'escalating_issues' | 'tempest' | 'demo'; +}; + +export type ProjectOwnership = { + schema?: { + [key: string]: unknown; + }; + raw: string; + fallthrough: boolean; + dateCreated: string; + lastUpdated: string; + isActive: boolean; + autoAssignment: string; + codeownersAutoSync: boolean; +}; + +export type ProjectOwnershipRequest = { + /** + * Raw input for ownership configuration. See the [Ownership Rules Documentation](/product/issues/ownership-rules/) to learn more. + */ + raw?: string; + /** + * A boolean determining who to assign ownership to when an ownership rule has no match. If set to `True`, all project members are made owners. Otherwise, no owners are set. + */ + fallthrough?: boolean; + /** + * Auto-assignment settings. The available options are: + * - Auto Assign to Issue Owner + * - Auto Assign to Suspect Commits + * - Turn off Auto-Assignment + */ + autoAssignment?: string; + /** + * Set to `True` to sync issue owners with CODEOWNERS updates in a release. + */ + codeownersAutoSync?: boolean; +}; + +export type ProjectPost = { + /** + * The name for the project. + */ + name: string; + /** + * Uniquely identifies a project and is used for the interface. + * If not provided, it is automatically generated from the name. + */ + slug?: string | null; + /** + * The platform for the project. + */ + platform?: string | null; + /** + * + * Defaults to true where the behavior is to alert the user on every new + * issue. Setting this to false will turn this off and the user must create + * their own alerts to be notified of new issues. + * + */ + default_rules?: boolean; +}; + +export type ProjectRuleDetailsPut = { + /** + * The name for the rule. + */ + name: string; + /** + * A string determining which of the conditions need to be true before any filters are evaluated. + * + * * `all` - All conditions must evaluate to true. + * * `any` - At least one of the conditions must evaluate to true. + * * `none` - All conditions must evaluate to false. + */ + actionMatch: 'all' | 'any' | 'none'; + /** + * A list of triggers that determine when the rule fires. See [Create an Issue Alert Rule](/api/alerts/create-an-issue-alert-rule-for-a-project) for valid conditions. + */ + conditions: Array<{ + [key: string]: unknown; + }>; + /** + * A list of actions that take place when all required conditions and filters for the rule are met. See [Create an Issue Alert Rule](/api/alerts/create-an-issue-alert-rule-for-a-project) for valid actions. + */ + actions: Array<{ + [key: string]: unknown; + }>; + /** + * How often to perform the actions once for an issue, in minutes. The valid range is `5` to `43200`. + */ + frequency: number; + /** + * The name of the environment to filter by. + */ + environment?: string | null; + /** + * A string determining which filters need to be true before any actions take place. + * + * * `all` - All filters must evaluate to true. + * * `any` - At least one of the filters must evaluate to true. + * * `none` - All filters must evaluate to false. + */ + filterMatch?: 'all' | 'any' | 'none'; + /** + * A list of filters that determine if a rule fires after the necessary conditions have been met. See [Create an Issue Alert Rule](/api/alerts/create-an-issue-alert-rule-for-a-project) for valid filters. + */ + filters?: Array<{ + [key: string]: unknown; + }>; + /** + * The ID of the team or user that owns the rule. + */ + owner?: string | null; +}; + +export type ProjectRulesPost = { + /** + * The name for the rule. + */ + name: string; + /** + * How often to perform the actions once for an issue, in minutes. The valid range is `5` to `43200`. + */ + frequency: number; + /** + * A string determining which of the conditions need to be true before any filters are evaluated. + * + * * `all` - All conditions must evaluate to true. + * * `any` - At least one of the conditions must evaluate to true. + * * `none` - All conditions must evaluate to false. + */ + actionMatch: 'all' | 'any' | 'none'; + /** + * + * A list of triggers that determine when the rule fires. See below for a list of possible conditions. + * + * **A new issue is created** + * ```json + * { + * "id": "sentry.rules.conditions.first_seen_event.FirstSeenEventCondition" + * } + * ``` + * + * **The issue changes state from resolved to unresolved** + * ```json + * { + * "id": "sentry.rules.conditions.regression_event.RegressionEventCondition" + * } + * ``` + * + * **The issue is seen more than `value` times in `interval`** + * - `value` - An integer + * - `interval` - Valid values are `1m`, `5m`, `15m`, `1h`, `1d`, `1w` and `30d` (`m` for minutes, `h` for hours, `d` for days, and `w` for weeks). + * ```json + * { + * "id": "sentry.rules.conditions.event_frequency.EventFrequencyCondition", + * "value": 500, + * "interval": "1h" + * } + * ``` + * + * **The issue is seen by more than `value` users in `interval`** + * - `value` - An integer + * - `interval` - Valid values are `1m`, `5m`, `15m`, `1h`, `1d`, `1w` and `30d` (`m` for minutes, `h` for hours, `d` for days, and `w` for weeks). + * ```json + * { + * "id": "sentry.rules.conditions.event_frequency.EventUniqueUserFrequencyCondition", + * "value": 1000, + * "interval": "15m" + * } + * ``` + * + * **The issue affects more than `value` percent of sessions in `interval`** + * - `value` - A float + * - `interval` - Valid values are `5m`, `10m`, `30m`, and `1h` (`m` for minutes, `h` for hours). + * ```json + * { + * "id": "sentry.rules.conditions.event_frequency.EventFrequencyPercentCondition", + * "value": 50.0, + * "interval": "10m" + * } + * ``` + * + */ + conditions: Array<{ + [key: string]: unknown; + }>; + /** + * + * A list of actions that take place when all required conditions and filters for the rule are met. See below for a list of possible actions. + * + * **Send a notification to Suggested Assignees** + * - `fallthroughType` - Who the notification should be sent to if there are no suggested assignees. Valid values are `ActiveMembers`, `AllMembers`, and `NoOne`. + * ```json + * { + * "id" - "sentry.mail.actions.NotifyEmailAction", + * "targetType" - "IssueOwners", + * "fallthroughType" - "ActiveMembers" + * } + * ``` + * + * **Send a notification to a Member or a Team** + * - `targetType` - One of `Member` or `Team`. + * - `fallthroughType` - Who the notification should be sent to if it cannot be sent to the original target. Valid values are `ActiveMembers`, `AllMembers`, and `NoOne`. + * - `targetIdentifier` - The ID of the Member or Team the notification should be sent to. + * ```json + * { + * "id": "sentry.mail.actions.NotifyEmailAction", + * "targetType": "Team" + * "fallthroughType": "AllMembers" + * "targetIdentifier": 4524986223 + * } + * ``` + * + * **Send a Slack notification** + * - `workspace` - The integration ID associated with the Slack workspace. + * - `channel` - The name of the channel to send the notification to (e.g., #critical, Jane Schmidt). + * - `channel_id` (optional) - The ID of the channel to send the notification to. + * - `tags` (optional) - A string of tags to show in the notification, separated by commas (e.g., "environment, user, my_tag"). + * - `notes` (optional) - Text to show alongside the notification. To @ a user, include their user id like `@`. To include a clickable link, format the link and title like ``. + * ```json + * { + * "id": "sentry.integrations.slack.notify_action.SlackNotifyServiceAction", + * "workspace": 293854098, + * "channel": "#warning", + * "tags": "environment,level" + * "notes": "Please for triage information" + * } + * ``` + * + * **Send a Microsoft Teams notification** + * - `team` - The integration ID associated with the Microsoft Teams team. + * - `channel` - The name of the channel to send the notification to. + * ```json + * { + * "id": "sentry.integrations.msteams.notify_action.MsTeamsNotifyServiceAction", + * "team": 23465424, + * "channel": "General" + * } + * ``` + * + * **Send a Discord notification** + * - `server` - The integration ID associated with the Discord server. + * - `channel_id` - The ID of the channel to send the notification to. + * - `tags` (optional) - A string of tags to show in the notification, separated by commas (e.g., "environment, user, my_tag"). + * ```json + * { + * "id": "sentry.integrations.discord.notify_action.DiscordNotifyServiceAction", + * "server": 63408298, + * "channel_id": 94732897, + * "tags": "browser,user" + * } + * ``` + * + * **Create a Jira Ticket** + * - `integration` - The integration ID associated with Jira. + * - `project` - The ID of the Jira project. + * - `issuetype` - The ID of the type of issue that the ticket should be created as. + * - `dynamic_form_fields` - A list of any custom fields you want to include in the ticket as objects. + * ```json + * { + * "id": "sentry.integrations.jira.notify_action.JiraCreateTicketAction", + * "integration": 321424, + * "project": "349719" + * "issueType": "1" + * } + * ``` + * + * **Create a Jira Server Ticket** + * - `integration` - The integration ID associated with Jira Server. + * - `project` - The ID of the Jira Server project. + * - `issuetype` - The ID of the type of issue that the ticket should be created as. + * - `dynamic_form_fields` - A list of any custom fields you want to include in the ticket as objects. + * ```json + * { + * "id": "sentry.integrations.jira_server.notify_action.JiraServerCreateTicketAction", + * "integration": 321424, + * "project": "349719" + * "issueType": "1" + * } + * ``` + * + * **Create a GitHub Issue** + * - `integration` - The integration ID associated with GitHub. + * - `repo` - The name of the repository to create the issue in. + * - `title` - The title of the issue. + * - `body` (optional) - The contents of the issue. + * - `assignee` (optional) - The GitHub user to assign the issue to. + * - `labels` (optional) - A list of labels to assign to the issue. + * ```json + * { + * "id": "sentry.integrations.github.notify_action.GitHubCreateTicketAction", + * "integration": 93749, + * "repo": default, + * "title": "My Test Issue", + * "assignee": "Baxter the Hacker", + * "labels": ["bug", "p1"] + * "" + * } + * ``` + * + * **Create a GitHub Enterprise Issue** + * - `integration` - The integration ID associated with GitHub Enterprise. + * - `repo` - The name of the repository to create the issue in. + * - `title` - The title of the issue. + * - `body` (optional) - The contents of the issue. + * - `assignee` (optional) - The GitHub user to assign the issue to. + * - `labels` (optional) - A list of labels to assign to the issue. + * ```json + * { + * "id": "sentry.integrations.github_enterprise.notify_action.GitHubEnterpriseCreateTicketAction", + * "integration": 93749, + * "repo": default, + * "title": "My Test Issue", + * "assignee": "Baxter the Hacker", + * "labels": ["bug", "p1"] + * "" + * } + * ``` + * + * **Create an Azure DevOps work item** + * - `integration` - The integration ID. + * - `project` - The ID of the Azure DevOps project. + * - `work_item_type` - The type of work item to create. + * - `dynamic_form_fields` - A list of any custom fields you want to include in the work item as objects. + * ```json + * { + * "id": "sentry.integrations.vsts.notify_action.AzureDevopsCreateTicketAction", + * "integration": 294838, + * "project": "0389485", + * "work_item_type": "Microsoft.VSTS.WorkItemTypes.Task", + * } + * ``` + * + * **Send a PagerDuty notification** + * - `account` - The integration ID associated with the PagerDuty account. + * - `service` - The ID of the service to send the notification to. + * - `severity` - The severity of the Pagerduty alert. This is optional, the default is `critical` for fatal issues, `error` for error issues, `warning` for warning issues, and `info` for info and debug issues. + * ```json + * { + * "id": "sentry.integrations.pagerduty.notify_action.PagerDutyNotifyServiceAction", + * "account": 92385907, + * "service": 9823924, + * "severity": "critical" + * } + * ``` + * + * **Send an Opsgenie notification** + * - `account` - The integration ID associated with the Opsgenie account. + * - `team` - The ID of the Opsgenie team to send the notification to. + * - `priority` - The priority of the Opsgenie alert. This is optional, the default is `P3`. + * ```json + * { + * "id": "sentry.integrations.opsgenie.notify_action.OpsgenieNotifyTeamAction", + * "account": 8723897589, + * "team": "9438930258-fairy", + * "priority": "P1" + * } + * ``` + * + * **Send a notification to a service** + * - `service` - The plugin slug. + * ```json + * { + * "id": "sentry.rules.actions.notify_event_service.NotifyEventServiceAction", + * "service": "mail" + * } + * ``` + * + * **Send a notification to a Sentry app with a custom webhook payload** + * - `settings` - A list of objects denoting the settings each action will be created with. All required fields must be included. + * - `sentryAppInstallationUuid` - The ID for the Sentry app + * ```json + * { + * "id": "sentry.rules.actions.notify_event_sentry_app.NotifyEventSentryAppAction", + * "settings": [ + * {"name": "title", "value": "Team Rocket"}, + * {"name": "summary", "value": "We're blasting off again."}, + * ], + * "sentryAppInstallationUuid": 643522 + * "hasSchemaFormConfig": true + * } + * ``` + * + * **Send a notification (for all legacy integrations)** + * ```json + * { + * "id": "sentry.rules.actions.notify_event.NotifyEventAction" + * } + * ``` + * + */ + actions: Array<{ + [key: string]: unknown; + }>; + /** + * The name of the environment to filter by. + */ + environment?: string | null; + /** + * The ID of the team or user that owns the rule. + */ + owner?: string | null; + /** + * A string determining which filters need to be true before any actions take place. Required when a value is provided for `filters`. + * + * * `all` - All filters must evaluate to true. + * * `any` - At least one of the filters must evaluate to true. + * * `none` - All filters must evaluate to false. + */ + filterMatch?: 'all' | 'any' | 'none'; + /** + * + * A list of filters that determine if a rule fires after the necessary conditions have been met. See below for a list of possible filters. + * + * **The issue is `comparison_type` than `value` `time`** + * - `comparison_type` - One of `older` or `newer` + * - `value` - An integer + * - `time` - The unit of time. Valid values are `minute`, `hour`, `day`, and `week`. + * ```json + * { + * "id": "sentry.rules.filters.age_comparison.AgeComparisonFilter", + * "comparison_type": "older", + * "value": 3, + * "time": "week" + * } + * ``` + * + * **The issue has happened at least `value` times** + * - `value` - An integer + * ```json + * { + * "id": "sentry.rules.filters.issue_occurrences.IssueOccurrencesFilter", + * "value": 120 + * } + * ``` + * + * **The issue is assigned to No One** + * ```json + * { + * "id": "sentry.rules.filters.assigned_to.AssignedToFilter", + * "targetType": "Unassigned" + * } + * ``` + * + * **The issue is assigned to `targetType`** + * - `targetType` - One of `Team` or `Member` + * - `targetIdentifier` - The target's ID + * ```json + * { + * "id": "sentry.rules.filters.assigned_to.AssignedToFilter", + * "targetType": "Member", + * "targetIdentifier": 895329789 + * } + * ``` + * + * **The event is from the latest release** + * ```json + * { + * "id": "sentry.rules.filters.latest_release.LatestReleaseFilter" + * } + * ``` + * + * **The issue's category is equal to `value`** + * - `value` - An integer correlated with a category. Valid values are `1` (Error), `2` (Performance), `3` (Profile), `4` (Cron), and `5` (Replay). + * ```json + * { + * "id": "sentry.rules.filters.issue_category.IssueCategoryFilter", + * "value": 2 + * } + * ``` + * + * **The event's `attribute` value `match` `value`** + * - `attribute` - Valid values are `message`, `platform`, `environment`, `type`, `error.handled`, `error.unhandled`, `error.main_thread`, `exception.type`, `exception.value`, `user.id`, `user.email`, `user.username`, `user.ip_address`, `http.method`, `http.url`, `http.status_code`, `sdk.name`, `stacktrace.code`, `stacktrace.module`, `stacktrace.filename`, `stacktrace.abs_path`, `stacktrace.package`, `unreal.crash_type`, `app.in_foreground`. + * - `match` - The comparison operator. Valid values are `eq` (equals), `ne` (does not equal), `sw` (starts with), `ew` (ends with), `co` (contains), `nc` (does not contain), `is` (is set), and `ns` (is not set). + * - `value` - A string. Not required when `match` is `is` or `ns`. + * ```json + * { + * "id": "sentry.rules.conditions.event_attribute.EventAttributeCondition", + * "attribute": "http.url", + * "match": "nc", + * "value": "localhost" + * } + * ``` + * + * **The event's tags match `key` `match` `value`** + * - `key` - The tag + * - `match` - The comparison operator. Valid values are `eq` (equals), `ne` (does not equal), `sw` (starts with), `ew` (ends with), `co` (contains), `nc` (does not contain), `is` (is set), and `ns` (is not set). + * - `value` - A string. Not required when `match` is `is` or `ns`. + * ```json + * { + * "id": "sentry.rules.filters.tagged_event.TaggedEventFilter", + * "key": "level", + * "match": "eq" + * "value": "error" + * } + * ``` + * + * **The event's level is `match` `level`** + * - `match` - Valid values are `eq`, `gte`, and `lte`. + * - `level` - Valid values are `50` (fatal), `40` (error), `30` (warning), `20` (info), `10` (debug), `0` (sample). + * ```json + * { + * "id": "sentry.rules.filters.level.LevelFilter", + * "match": "gte" + * "level": "50" + * } + * ``` + * + */ + filters?: Array<{ + [key: string]: unknown; + }>; +}; + +export type ProjectSummary = { + latestDeploys?: { + [key: string]: { + [key: string]: string; + }; + } | null; + options?: { + [key: string]: unknown; + }; + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + team: { + id: string; + name: string; + slug: string; + } | null; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + platforms: Array; + hasUserReports: boolean; + environments: Array; + latestRelease: { + version: string; + } | null; +}; + +export type ProjectTeamsResponse = Array<{ + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; +}>; + +export type ProjectWithTeam = { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + team?: { + id: string; + name: string; + slug: string; + }; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; +}; + +/** + * Applies a rate limit to cap the number of errors accepted during a given time window. To + * disable entirely set `rateLimit` to null. + * ```json + * { + * "rateLimit": { + * "window": 7200, // time in seconds + * "count": 1000 // error cap + * } + * } + * ``` + */ +export type RateLimit = { + count?: number | null; + window?: number | null; +}; + +export type ReleaseHeadCommit = { + commit: string; + repository: string; + previousCommit?: string | null; +}; + +export type ReleaseThresholdStatusResponse = { + [key: string]: Array<{ + id?: string; + date?: string; + environment?: { + [key: string]: unknown; + } | null; + project?: { + [key: string]: unknown; + }; + release?: string; + threshold_type?: number; + trigger_type?: string; + value?: number; + window_in_seconds?: number; + end: string; + is_healthy: boolean; + key: string; + project_slug: string; + project_id: number; + start: string; + metric_value: number | number | { + [key: string]: unknown; + } | null; + }>; +}; + +export type ReplayCounts = { + [key: string]: number; +}; + +/** + * Serializer for repositories response + */ +export type Repositories = { + results: Array<{ + name: string; + updatedAt: string; + latestCommitAt: string; + defaultBranch: string; + }>; + /** + * Serializer for pagination information + */ + pageInfo: { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; + }; + totalCount: number; +}; + +/** + * Serializer for single repository response + */ +export type Repository = { + uploadToken: string | null; + testAnalyticsEnabled: boolean; +}; + +/** + * Serializer for individual repository nodes from GraphQL response + */ +export type RepositoryNode = { + name: string; + updatedAt: string; + latestCommitAt: string; + defaultBranch: string; +}; + +/** + * Serializer for individual repository nodes from GraphQL response + */ +export type RepositoryTokenNode = { + name: string; + token: string; +}; + +/** + * Serializer for repositories response + */ +export type RepositoryTokenRegenerate = { + token: string; +}; + +/** + * Serializer for repository tokens response + */ +export type RepositoryTokens = { + results: Array<{ + name: string; + token: string; + }>; + /** + * Serializer for pagination information + */ + pageInfo: { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; + }; + totalCount: number; +}; + +/** + * This represents a Sentry Rule. + */ +export type Rule = { + owner?: string | null; + createdBy?: { + id: number; + name: string; + email: string; + } | null; + environment?: string | null; + lastTriggered?: string | null; + snoozeCreatedBy?: string | null; + snoozeForEveryone?: boolean | null; + disableReason?: string; + disableDate?: string; + errors?: Array<{ + detail: string; + }>; + id: string | null; + conditions: Array<{ + [key: string]: unknown; + }>; + filters: Array<{ + [key: string]: unknown; + }>; + actions: Array<{ + [key: string]: unknown; + }>; + actionMatch: string; + filterMatch: string; + frequency: number; + name: string; + dateCreated: string; + projects: Array; + status: string; + snooze: boolean; +}; + +export type ScimListResponseEnvelopeScimMemberIndexResponse = { + schemas: Array; + totalResults: number; + startIndex: number; + itemsPerPage: number; + Resources: Array<{ + active?: boolean; + schemas: Array; + id: string; + userName: string; + name: { + givenName: string; + familyName: string; + }; + emails: Array<{ + primary: boolean; + value: string; + type: string; + }>; + meta: { + resourceType: string; + }; + sentryOrgRole: string; + }>; +}; + +export type ScimListResponseEnvelopeScimTeamIndexResponse = { + schemas: Array; + totalResults: number; + startIndex: number; + itemsPerPage: number; + Resources: Array<{ + schemas: Array; + id: string; + displayName: string; + meta: { + resourceType: string; + }; + members?: Array<{ + value: string; + display: string; + }>; + }>; +}; + +export type ScimMemberProvision = { + /** + * The SAML field used for email. + */ + userName: string; + /** + * The organization role of the member. If unspecified, this will be + * set to the organization's default role. The options are: + * + * * `billing` - Can manage payment and compliance details. + * * `member` - Can view and act on events, as well as view most other data within the organization. + * * `manager` - Has full management access to all teams and projects. Can also manage + * the organization's membership. + * * `admin` - Can edit global integrations, manage projects, and add/remove teams. + * They automatically assume the Team Admin role for teams they join. + * Note: This role can no longer be assigned in Business and Enterprise plans. Use `TeamRoles` instead. + * + */ + sentryOrgRole?: 'billing' | 'member' | 'manager' | 'admin'; +}; + +export type ScimPatchOperation = { + op: string; + value: unknown; + path?: string; +}; + +export type ScimPatchRequest = { + /** + * A list of operations to perform. Currently, the only valid operation is setting + * a member's `active` attribute to false, after which the member will be permanently deleted. + * ```json + * { + * "Operations": [{ + * "op": "replace", + * "path": "active", + * "value": False + * }] + * } + * ``` + * + */ + Operations: Array<{ + op: string; + value: unknown; + path?: string; + }>; +}; + +export type ScimTeamPatchOperation = { + op: string; + value?: { + [key: string]: unknown; + }; + path?: string; +}; + +export type ScimTeamPatchRequest = { + /** + * The list of operations to perform. Valid operations are: + * * Renaming a team: + * ```json + * { + * "Operations": [{ + * "op": "replace", + * "value": { + * "id": 23, + * "displayName": "newName" + * } + * }] + * } + * ``` + * * Adding a member to a team: + * ```json + * { + * "Operations": [{ + * "op": "add", + * "path": "members", + * "value": [ + * { + * "value": 23, + * "display": "testexample@example.com" + * } + * ] + * }] + * } + * ``` + * * Removing a member from a team: + * ```json + * { + * "Operations": [{ + * "op": "remove", + * "path": "members[value eq "23"]" + * }] + * } + * ``` + * * Replacing an entire member set of a team: + * ```json + * { + * "Operations": [{ + * "op": "replace", + * "path": "members", + * "value": [ + * { + * "value": 23, + * "display": "testexample2@sentry.io" + * }, + * { + * "value": 24, + * "display": "testexample3@sentry.io" + * } + * ] + * }] + * } + * ``` + * + */ + Operations: Array<{ + op: string; + value?: { + [key: string]: unknown; + }; + path?: string; + }>; +}; + +export type ScimTeamRequestBody = { + /** + * The slug of the team that is shown in the UI. + */ + displayName: string; +}; + +/** + * Response containing list of actively used LLM model names from Seer. + */ +export type SeerModelsResponse = { + models: Array; +}; + +export type SentryAppDetailsResponse = { + allowedOrigins: Array; + avatars: Array<{ + avatarType: string; + avatarUuid: string; + avatarUrl: string; + color: boolean; + photoType: string; + }>; + events: Array; + featureData: Array; + isAlertable: boolean; + metadata: string; + name: string; + schema: string; + scopes: Array; + slug: string; + status: string; + uuid: string; + verifyInstall: boolean; + author?: string | null; + overview?: string | null; + popularity?: number | null; + redirectUrl?: string | null; + webhookUrl?: string | null; + clientSecret?: string | null; + datePublished?: string; + clientId?: string; + owner?: { + id: number; + slug: string; + }; +}; + +export type SentryAppParser = { + /** + * The name of the custom integration. + */ + name: string; + /** + * The custom integration's permission scopes for API access. + */ + scopes: Array | null; + /** + * The custom integration's author. + */ + author?: string | null; + /** + * Webhook events the custom integration is subscribed to. + */ + events?: Array | null; + /** + * The UI components schema, used to render the custom integration's configuration UI elements. See our [schema docs](https://docs.sentry.io/organization/integrations/integration-platform/ui-components/) for more information. + */ + schema?: { + [key: string]: unknown; + } | null; + /** + * The webhook destination URL. + */ + webhookUrl?: string | null; + /** + * The post-installation redirect URL. + */ + redirectUrl?: string | null; + /** + * Whether or not the integration is internal only. False means the integration is public. + */ + isInternal?: boolean; + /** + * Marks whether or not the custom integration can be used in an alert rule. + */ + isAlertable?: boolean; + /** + * The custom integration's description. + */ + overview?: string | null; + /** + * Whether or not an installation of the custom integration should be verified. + */ + verifyInstall?: boolean; + /** + * The list of allowed origins for CORS. + */ + allowedOrigins?: Array; +}; + +export type SessionsQueryResult = { + start: string; + end: string; + intervals: Array; + groups: Array<{ + by: { + project?: number; + release?: string; + environment?: string; + 'session.status'?: string; + }; + series: { + [key: string]: Array; + }; + totals: { + [key: string]: number | null; + }; + }>; + query: string; +}; + +export type ShortIdLookupResponse = { + organizationSlug: string; + projectSlug: string; + groupId: string; + group: { + isUnhandled?: boolean; + count?: string; + userCount?: number; + firstSeen?: string | null; + lastSeen?: string | null; + id: string; + shareId: string; + shortId: string; + title: string; + culprit: string | null; + permalink: string; + logger: string | null; + level: string; + status: string; + statusDetails: { + autoResolved?: boolean; + ignoreCount?: number; + ignoreUntil?: string; + ignoreUserCount?: number; + ignoreUserWindow?: number; + ignoreWindow?: number; + actor?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + inNextRelease?: boolean; + inRelease?: string; + inCommit?: string; + pendingEvents?: number; + info?: unknown; + }; + substatus: string | null; + isPublic: boolean; + platform: string | null; + priority: string | null; + priorityLockedAt: string | null; + seerFixabilityScore: number | null; + seerAutofixLastTriggered: string | null; + project: { + id: string; + name: string; + slug: string; + platform: string | null; + }; + type: string; + issueType: string; + issueCategory: string; + metadata: { + [key: string]: unknown; + }; + numComments: number; + assignedTo: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + isBookmarked: boolean; + isSubscribed: boolean; + subscriptionDetails: { + disabled?: boolean; + reason?: string; + } | null; + hasSeen: boolean; + annotations: Array<{ + displayName: string; + url: string; + }>; + }; + shortId: string; +}; + +export type Source = { + /** + * The type of the source. + * + * * `http` - SymbolServer (HTTP) + * * `gcs` - Google Cloud Storage + * * `s3` - Amazon S3 + */ + type: 'http' | 'gcs' | 's3'; + /** + * The human-readable name of the source. + */ + name: string; + /** + * The internal ID of the source. Must be distinct from all other source IDs and cannot start with '`sentry:`'. If this is not provided, a new UUID will be generated. + */ + id?: string; + /** + * Layout settings for the source. This is required for HTTP, GCS, and S3 sources. + * + * **`type`** ***(string)*** - The layout of the folder structure. The options are: + * - `native` - Platform-Specific (SymStore / GDB / LLVM) + * - `symstore` - Microsoft SymStore + * - `symstore_index2` - Microsoft SymStore (with index2.txt) + * - `ssqp` - Microsoft SSQP + * - `unified` - Unified Symbol Server Layout + * - `debuginfod` - debuginfod + * + * **`casing`** ***(string)*** - The layout of the folder structure. The options are: + * - `default` - Default (mixed case) + * - `uppercase` - Uppercase + * - `lowercase` - Lowercase + * + * ```json + * { + * "layout": { + * "type": "native" + * "casing": "default" + * } + * } + * ``` + */ + layout?: { + /** + * The source's layout type. + * + * * `native` + * * `symstore` + * * `symstore_index2` + * * `ssqp` + * * `unified` + * * `debuginfod` + * * `slashsymbols` + */ + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + /** + * The source's casing rules. + * + * * `lowercase` + * * `uppercase` + * * `default` + */ + casing: 'lowercase' | 'uppercase' | 'default'; + }; + /** + * Filter settings for the source. This is optional for all sources. + * + * **`filetypes`** ***(list)*** - A list of file types that can be found on this source. If this is left empty, all file types will be enabled. The options are: + * - `pe` - Windows executable files + * - `pdb` - Windows debug files + * - `portablepdb` - .NET portable debug files + * - `mach_code` - MacOS executable files + * - `mach_debug` - MacOS debug files + * - `elf_code` - ELF executable files + * - `elf_debug` - ELF debug files + * - `wasm_code` - WASM executable files + * - `wasm_debug` - WASM debug files + * - `breakpad` - Breakpad symbol files + * - `sourcebundle` - Source code bundles + * - `uuidmap` - Apple UUID mapping files + * - `bcsymbolmap` - Apple bitcode symbol maps + * - `il2cpp` - Unity IL2CPP mapping files + * - `proguard` - ProGuard mapping files + * + * **`path_patterns`** ***(list)*** - A list of glob patterns to check against the debug and code file paths of debug files. Only files that match one of these patterns will be requested from the source. If this is left empty, no path-based filtering takes place. + * + * **`requires_checksum`** ***(boolean)*** - Whether this source requires a debug checksum to be sent with each request. Defaults to `false`. + * + * ```json + * { + * "filters": { + * "filetypes": ["pe", "pdb", "portablepdb"], + * "path_patterns": ["*ffmpeg*"] + * } + * } + * ``` + */ + filters?: { + /** + * The file types enabled for the source. + */ + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + /** + * The debug and code file paths enabled for the source. + */ + path_patterns?: Array; + /** + * Whether the source requires debug checksums. + */ + requires_checksum?: boolean; + }; + /** + * The source's URL. Optional for HTTP sources, invalid for all others. + */ + url?: string; + /** + * The user name for accessing the source. Optional for HTTP sources, invalid for all others. + */ + username?: string; + /** + * The password for accessing the source. Optional for HTTP sources, invalid for all others. + */ + password?: string; + /** + * The GCS or S3 bucket where the source resides. Required for GCS and S3 source, invalid for HTTP sources. + */ + bucket?: string; + /** + * The source's [S3 region](https://docs.aws.amazon.com/general/latest/gr/s3.html). Required for S3 sources, invalid for all others. + * + * * `us-east-2` - US East (Ohio) + * * `us-east-1` - US East (N. Virginia) + * * `us-west-1` - US West (N. California) + * * `us-west-2` - US West (Oregon) + * * `ap-east-1` - Asia Pacific (Hong Kong) + * * `ap-south-1` - Asia Pacific (Mumbai) + * * `ap-northeast-2` - Asia Pacific (Seoul) + * * `ap-southeast-1` - Asia Pacific (Singapore) + * * `ap-southeast-2` - Asia Pacific (Sydney) + * * `ap-northeast-1` - Asia Pacific (Tokyo) + * * `ca-central-1` - Canada (Central) + * * `cn-north-1` - China (Beijing) + * * `cn-northwest-1` - China (Ningxia) + * * `eu-central-1` - EU (Frankfurt) + * * `eu-west-1` - EU (Ireland) + * * `eu-west-2` - EU (London) + * * `eu-west-3` - EU (Paris) + * * `eu-north-1` - EU (Stockholm) + * * `sa-east-1` - South America (São Paulo) + * * `us-gov-east-1` - AWS GovCloud (US-East) + * * `us-gov-west-1` - AWS GovCloud (US) + */ + region?: 'us-east-2' | 'us-east-1' | 'us-west-1' | 'us-west-2' | 'ap-east-1' | 'ap-south-1' | 'ap-northeast-2' | 'ap-southeast-1' | 'ap-southeast-2' | 'ap-northeast-1' | 'ca-central-1' | 'cn-north-1' | 'cn-northwest-1' | 'eu-central-1' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'eu-north-1' | 'sa-east-1' | 'us-gov-east-1' | 'us-gov-west-1'; + /** + * The [AWS Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#access-keys-and-secret-access-keys).Required for S3 sources, invalid for all others. + */ + access_key?: string; + /** + * The [AWS Secret Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#access-keys-and-secret-access-keys).Required for S3 sources, invalid for all others. + */ + secret_key?: string; + /** + * The GCS or [S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) prefix. Optional for GCS and S3 sourcse, invalid for HTTP. + */ + prefix?: string; + /** + * The GCS email address for authentication. Required for GCS sources, invalid for all others. + */ + client_email?: string; + /** + * The GCS private key. Required for GCS sources if not using impersonated tokens. Invalid for all others. + */ + private_key?: string; +}; + +export type SourceMapDebug = { + errors: Array<{ + type: string; + message: string; + data: { + [key: string]: unknown; + } | null; + }>; +}; + +export type StatusDetailsValidator = { + /** + * If true, marks the issue as resolved in the next release. + */ + inNextRelease: boolean; + /** + * The version of the release that the issue should be resolved in.If set to `latest`, the latest release will be used. + */ + inRelease: string; + /** + * The commit data that the issue should use for resolution. + */ + inCommit?: { + /** + * The SHA of the resolving commit. + */ + commit: string; + /** + * The name of the repository (as it appears in Sentry). + */ + repository: string; + }; + /** + * Ignore the issue until for this many minutes. + */ + ignoreDuration: number; + /** + * Ignore the issue until it has occurred this many times in `ignoreWindow` minutes. + */ + ignoreCount: number; + /** + * Ignore the issue until it has occurred `ignoreCount` times in this many minutes. (Max: 1 week) + */ + ignoreWindow: number; + /** + * Ignore the issue until it has affected this many users in `ignoreUserWindow` minutes. + */ + ignoreUserCount: number; + /** + * Ignore the issue until it has affected `ignoreUserCount` users in this many minutes. (Max: 1 week) + */ + ignoreUserWindow: number; +}; + +/** + * Serializer for a sync repository response + */ +export type SyncRepos = { + isSyncing: boolean; +}; + +export type TagKeyDetailsDict = { + uniqueValues?: number | null; + totalValues?: number | null; + topValues?: Array<{ + query?: string | null; + key: string; + name: string; + value: string; + count: number; + lastSeen: string | null; + firstSeen: string | null; + }> | null; + key: string; + name: string; +}; + +export type TagKeyValuesDict = Array<{ + query?: string | null; + key: string; + name: string; + value: string; + count: number; + lastSeen: string | null; + firstSeen: string | null; +}>; + +export type Team = { + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type TeamDetails = { + /** + * Uniquely identifies a team. This is must be available. + */ + slug: string; +}; + +export type TeamPost = { + /** + * Uniquely identifies a team and is used for the interface. If not + * provided, it is automatically generated from the name. + */ + slug?: string | null; + /** + * **`[DEPRECATED]`** The name for the team. If not provided, it is + * automatically generated from the slug + * + * @deprecated + */ + name?: string | null; +}; + +export type TeamScim = { + schemas: Array; + id: string; + displayName: string; + meta: { + resourceType: string; + }; + members?: Array<{ + value: string; + display: string; + }>; +}; + +/** + * Serializer for test results response including pagination metadata + */ +export type TestResult = { + defaultBranch: string; + results: Array<{ + updatedAt: string; + avgDuration: number; + totalDuration: number; + name: string; + failureRate: number; + flakeRate: number; + totalFailCount: number; + totalFlakyFailCount: number; + totalSkipCount: number; + totalPassCount: number; + lastDuration: number; + }>; + /** + * Serializer for pagination information + */ + pageInfo: { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; + }; + totalCount: number; +}; + +/** + * Serializer for test results aggregates response + */ +export type TestResultAggregates = { + totalDuration: number; + totalDurationPercentChange: number; + slowestTestsDuration: number; + slowestTestsDurationPercentChange: number; + totalSlowTests: number; + totalSlowTestsPercentChange: number; + totalFails: number; + totalFailsPercentChange: number; + totalSkips: number; + totalSkipsPercentChange: number; + flakeCount: number; + flakeCountPercentChange: number; + flakeRate: number; + flakeRatePercentChange: number; +}; + +/** + * Serializer for individual test result nodes from GraphQL response + */ +export type TestResultNode = { + updatedAt: string; + avgDuration: number; + totalDuration: number; + name: string; + failureRate: number; + flakeRate: number; + totalFailCount: number; + totalFlakyFailCount: number; + totalSkipCount: number; + totalPassCount: number; + lastDuration: number; +}; + +/** + * Serializer for test suites belonging to a repository's test results + */ +export type TestSuite = { + testSuites: Array; +}; + +export type UpdateClientKey = { + /** + * The name for the client key + */ + name?: string; + /** + * Activate or deactivate the client key. + */ + isActive?: boolean; + /** + * Applies a rate limit to cap the number of errors accepted during a given time window. To + * disable entirely set `rateLimit` to null. + * ```json + * { + * "rateLimit": { + * "window": 7200, // time in seconds + * "count": 1000 // error cap + * } + * } + * ``` + */ + rateLimit?: { + count?: number | null; + window?: number | null; + }; + /** + * The Sentry Javascript SDK version to use. The currently supported options are: + * + * * `latest` - Most recent version + * * `7.x` - Version 7 releases + */ + browserSdkVersion?: 'latest' | '7.x'; + /** + * Configures multiple options for the Javascript Loader Script. + * - `Performance Monitoring` + * - `Debug Bundles & Logging` + * - `Session Replay` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. + * - `User Feedback` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. + * - `Logs and Metrics` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. Requires SDK >= 10.0.0. + * ```json + * { + * "dynamicSdkLoaderOptions": { + * "hasReplay": true, + * "hasPerformance": true, + * "hasDebug": true, + * "hasFeedback": true, + * "hasLogsAndMetrics": true + * } + * } + * ``` + */ + dynamicSdkLoaderOptions?: { + hasReplay?: boolean; + hasPerformance?: boolean; + hasDebug?: boolean; + hasFeedback?: boolean; + hasLogsAndMetrics?: boolean; + }; +}; + +export type UpdateOrgMemberRoles = { + /** + * The organization role of the member. The options are: + * + * * `billing` - Can manage payment and compliance details. + * * `member` - Can view and act on events, as well as view most other data within the organization. + * * `manager` - Has full management access to all teams and projects. Can also manage + * the organization's membership. + * * `owner` - Has unrestricted access to the organization, its data, and its + * settings. Can add, modify, and delete projects and members, as well as + * make billing and plan changes. + * * `admin` - Can edit global integrations, manage projects, and add/remove teams. + * They automatically assume the Team Admin role for teams they join. + * Note: This role can no longer be assigned in Business and Enterprise plans. Use `TeamRoles` instead. + * + */ + orgRole?: 'billing' | 'member' | 'manager' | 'owner' | 'admin'; + /** + * + * Configures the team role of the member. The two roles are: + * - `contributor` - Can view and act on issues. Depending on organization settings, they can also add team members. + * - `admin` - Has full management access to their team's membership and projects. + * ```json + * { + * "teamRoles": [ + * { + * "teamSlug": "ancient-gabelers", + * "role": "admin" + * }, + * { + * "teamSlug": "powerful-abolitionist", + * "role": "contributor" + * } + * ] + * } + * ``` + * + */ + teamRoles?: Array<{ + [key: string]: unknown; + }> | null; +}; + +export type Workflow = { + id: string; + name: string; + organizationId: string; + createdBy: string | null; + dateCreated: string; + dateUpdated: string; + triggers: { + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + } | null; + actionFilters: Array<{ + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + }> | null; + environment: string | null; + config: { + [key: string]: unknown; + }; + detectorIds: Array | null; + enabled: boolean; + lastTriggered: string | null; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type WorkflowValidator = { + /** + * The name of the alert + */ + name: string; + /** + * The ID of the existing alert + */ + id?: string; + /** + * Whether the alert is enabled or disabled + */ + enabled?: boolean; + /** + * + * Typically the frequency at which the alert will fire, in minutes. + * + * - `0`: 0 minutes + * - `5`: 5 minutes + * - `10`: 10 minutes + * - `30`: 30 minutes + * - `60`: 1 hour + * - `180`: 3 hours + * - `720`: 12 hours + * - `1440`: 24 hours + * + * ```json + * { + * "frequency":3600 + * } + * ``` + * + */ + config?: { + [key: string]: unknown; + }; + /** + * The name of the environment for the alert to evaluate in + */ + environment?: string | null; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + triggers?: { + id?: string; + /** + * * `any` + * * `any-short` + * * `all` + * * `none` + */ + logic_type: 'any' | 'any-short' | 'all' | 'none'; + conditions?: Array; + }; + /** + * The filters to run before the action will fire and the action(s) to fire. + * + * `logicType` can be one of `any-short`, `all`, or `none`. + * + * Below is a basic example. See below for all other options. + * + * ```json + * "actionFilters": [ + * { + * "logicType": "any", + * "conditions": [ + * { + * "type": "level", + * "comparison": { + * "level": 50, + * "match": "eq" + * }, + * "conditionResult": true + * } + * ], + * "actions": [ + * { + * "id": "123", + * "type": "email", + * "integrationId": null, + * "data": {}, + * "config": { + * "targetType": "user", + * "targetDisplay": null, + * "targetIdentifier": "56789" + * }, + * "status": "active" + * } + * ] + * } + * ] + * ``` + * + * ## Conditions + * + * **Issue Age** + * - `time`: One of `minute`, `hour`, `day`, or `week`. + * - `value`: A positive integer. + * - `comparisonType`: One of `older` or `newer`. + * ```json + * { + * "type": "age_comparison", + * "comparison": { + * "time": "minute", + * "value": 10, + * "comparisonType": "older" + * }, + * "conditionResult": true + * } + * + * ``` + * + * **Issue Assignment** + * - `targetType`: Who the issue is assigned to + * - `NoOne`: Unassigned + * - `Member`: Assigned to a user + * - `Team`: Assigned to a team + * - `targetIdentifier`: The ID of the user or team from the `targetType`. Enter "" if `targetType` is `NoOne`. + * ```json + * { + * "type": "assigned_to", + * "comparison": { + * "targetType": "Member", + * "targetIdentifier": 123456 + * }, + * "conditionResult": true + * } + * ``` + * + * **Issue Category** + * - `value`: The issue category to filter to. + * - `1`: Error issues + * - `6`: Feedback issues + * - `10`: Outage issues + * - `11`: Metric issues + * - `12`: DB Query issues + * - `13`: HTTP Client issues + * - `14`: Front end issues + * - `15`: Mobile issues + * ```json + * { + * "type": "issue_category", + * "comparison": { + * "value": 1 + * }, + * "conditionResult": true + * } + * ``` + * + * **Issue Frequency** + * - `value`: A positive integer representing how many times the issue has to happen before the alert will fire. + * ```json + * { + * "type": "issue_occurrences", + * "comparison": { + * "value": 10 + * }, + * "conditionResult": true + * } + * ``` + * + * **De-escalation** + * ```json + * { + * "type": "issue_priority_deescalating", + * "comparison": true, + * "conditionResult": true + * } + * ``` + * + * **Issue Priority** + * - `comparison`: The priority the issue must be for the alert to fire. + * - `75`: High priority + * - `50`: Medium priority + * - `25`: Low priority + * ```json + * { + * "type": "issue_priority_greater_or_equal", + * "comparison": 75, + * "conditionResult": true + * } + * ``` + * + * **Number of Users Affected** + * - `value`: A positive integer representing the number of users that must be affected before the alert will fire. + * - `filters`: A list of additional sub-filters to evaluate before the alert will fire. + * - `interval`: The time period in which to evaluate the value. e.g. Number of users affected by an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "event_unique_user_frequency_count", + * "comparison": { + * "value": 100, + * "filters": [{"key": "foo", "match": "eq", "value": "bar"}], + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Number of Events** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Number of events in an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "event_frequency_count", + * "comparison": { + * "value": 100, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Percent of Events** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Number of events in an issue is `comparisonInterval` percent higher `value` compared to `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * - `comparisonInterval`: The time period to compare against. See `interval` for options. + * ```json + * { + * "type": "event_frequency_percent", + * "comparison": { + * "value": 100, + * "interval": "1h", + * "comparisonInterval": "1w" + * }, + * "conditionResult": true + * } + * + * ``` + * + * **Percentage of Sessions Affected Count** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Percentage of sessions affected by an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "percent_sessions_count", + * "comparison": { + * "value": 10, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Percentage of Sessions Affected Percent** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Percentage of sessions affected by an issue is `comparisonInterval` percent higher `value` compared to `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * - `comparisonInterval`: The time period to compare against. See `interval` for options. + * ```json + * { + * "type": "percent_sessions_percent", + * "comparison": { + * "value": 10, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Event Attribute** + * The event's `attribute` value `match` `value` + * + * - `attribute`: The event attribute to match on. Valid values are: `message`, `platform`, `environment`, `type`, `error.handled`, `error.unhandled`, `error.main_thread`, `exception.type`, `exception.value`, `user.id`, `user.email`, `user.username`, `user.ip_address`, `http.method`, `http.url`, `http.status_code`, `sdk.name`, `stacktrace.code`, `stacktrace.module`, `stacktrace.filename`, `stacktrace.abs_path`, `stacktrace.package`, `unreal.crash_type`, `app.in_foreground`. + * - `match`: The comparison operator + * - `co`: Contains + * - `nc`: Does not contain + * - `eq`: Equals + * - `ne`: Does not equal + * - `sw`: Starts with + * - `ew`: Ends with + * - `is`: Is set + * - `ns`: Is not set + * - `value`: A string. Not required when match is `is` or `ns`. + * + * ```json + * { + * "type": "event_attribute", + * "comparison": { + * "match": "co", + * "value": "bar", + * "attribute": "message" + * }, + * "conditionResult": true + * } + * ``` + * + * **Tagged Event** + * The event's tags `key` match `value` + * - `key`: The tag value + * - `match`: The comparison operator + * - `co`: Contains + * - `nc`: Does not contain + * - `eq`: Equals + * - `ne`: Does not equal + * - `sw`: Starts with + * - `ew`: Ends with + * - `is`: Is set + * - `ns`: Is not set + * - `value`: A string. Not required when match is `is` or `ns`. + * + * ```json + * { + * "type": "tagged_event", + * "comparison": { + * "key": "level", + * "match": "eq", + * "value": "error" + * }, + * "conditionResult": true + * } + * ``` + * + * **Latest Release** + * The event is from the latest release + * + * ```json + * { + * "type": "latest_release", + * "comparison": true, + * "conditionResult": true + * } + * ``` + * + * **Release Age** + * ```json + * { + * "type": "latest_adopted_release", + * "comparison": { + * "environment": "12345", + * "ageComparison": "older", + * "releaseAgeType": "oldest" + * }, + * "conditionResult": true + * } + * ``` + * + * **Event Level** + * The event's level is `match` `level` + * - `match`: The comparison operator + * - `eq`: Equal + * - `gte`: Greater than or equal + * - `lte`: Less than or equal + * - `level`: The event level + * - `50`: Fatal + * - `40`: Error + * - `30`: Warning + * - `20`: Info + * - `10`: Debug + * - `0`: Sample + * + * ```json + * { + * "type": "level", + * "comparison": { + * "level": 50, + * "match": "eq" + * }, + * "conditionResult": true + * } + * ``` + * + * ## Actions + * A list of actions that take place when all required conditions and filters for the alert are met. See below for a list of possible actions. + * + * + * **Notify on Preferred Channel** + * - `data`: A dictionary with the fallthrough type option when choosing to notify Suggested Assignees. Leave empty if notifying a user or team. + * - `fallthroughType` + * - `ActiveMembers` + * - `AllMembers` + * - `NoOne` + * - `config`: A dictionary with the configuration options for notification. + * - `targetType`: The type of recipient to notify + * - `user`: User + * - `team`: Team + * - `issue_owners`: Suggested Assignees + * - `targetDisplay`: null + * - `targetIdentifier`: The id of the user or team to notify. Leave null for Suggested Assignees. + * + * ```json + * { + * "type":"email", + * "integrationId":null, + * "data":{}, + * "config":{ + * "targetType":"user", + * "targetDisplay":null, + * "targetIdentifier":"232692" + * }, + * "status":"active" + * }, + * { + * "type":"email", + * "integrationId":null, + * "data":{ + * "fallthroughType":"ActiveMembers" + * }, + * "config":{ + * "targetType":"issue_owners", + * "targetDisplay":null, + * "targetIdentifier":""} + * , + * "status":"active" + * } + * ``` + * **Notify on Slack** + * - `targetDisplay`: The name of the channel to notify in. + * `integrationId`: The stringified ID of the integration. + * + * ```json + * { + * "type":"slack", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"", + * "targetDisplay":"notify-errors" + * }, + * "integrationId":"1", + * "data":{}, + * "status":"active" + * } + * ``` + * + * **Notify on PagerDuty** + * - `targetDisplay`: The name of the service to create the ticket in. + * - `integrationId`: The stringified ID of the integration. + * - `data["priority"]`: The severity level for the notification. + * + * ```json + * { + * "type":"pagerduty", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"123456", + * "targetDisplay":"Error Service" + * }, + * "integrationId":"2345", + * "data":{ + * "priority":"default" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on Discord** + * - `targetDisplay`: The name of the service to create the ticket in. + * - `integrationId`: The stringified ID of the integration. + * - `data["tags"]`: Comma separated list of tags to add to the notification. + * + * ```json + * { + * "type":"discord", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"12345", + * "targetDisplay":"", + * }, + * "integrationId":"1234", + * "data":{ + * "tags":"transaction,environment" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on MSTeams** + * - `targetIdentifier` - The integration ID associated with the Microsoft Teams team. + * - `targetDisplay` - The name of the channel to send the notification to. + * - `integrationId`: The stringified ID of the integration. + * ```json + * { + * "type":"msteams", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"19:a4b3kghaghgkjah357y6847@thread.skype", + * "targetDisplay":"notify-errors" + * }, + * "integrationId":"1", + * "data":{}, + * "status":"active" + * } + * ``` + * + * **Notify on OpsGenie** + * - `targetDisplay`: The name of the Opsgenie team. + * - `targetIdentifier`: The ID of the Opsgenie team to send the notification to. + * - `integrationId`: The stringified ID of the integration. + * - `data["priority"]`: The priority level for the notification. + * + * ```json + * { + * "type":"opsgenie", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"123456-Error-Service", + * "targetDisplay":"Error Service" + * }, + * "integrationId":"2345", + * "data":{ + * "priority":"P3" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on Azure DevOps** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"vsts", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a Jira ticket** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"jira", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a Jira Server ticket** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"jira_server", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a GitHub issue** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"github", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + */ + action_filters?: Array; +}; + +export type LegacyBrowserFilter = { + /** + * Toggle the browser-extensions, localhost, filtered-transaction, or web-crawlers filter on or off. + */ + active?: boolean; + /** + * + * Specifies which legacy browser filters should be active. Anything excluded from the list will be + * disabled. The options are: + * - `ie` - Internet Explorer Version 11 and lower + * - `edge` - Edge Version 110 and lower + * - `safari` - Safari Version 15 and lower + * - `firefox` - Firefox Version 110 and lower + * - `chrome` - Chrome Version 110 and lower + * - `opera` - Opera Version 99 and lower + * - `android` - Android Version 3 and lower + * - `opera_mini` - Opera Mini Version 34 and lower + * + * Deprecated options: + * - `ie_pre_9` - Internet Explorer Version 8 and lower + * - `ie9` - Internet Explorer Version 9 + * - `ie10` - Internet Explorer Version 10 + * - `ie11` - Internet Explorer Version 11 + * - `safari_pre_6` - Safari Version 5 and lower + * - `opera_pre_15` - Opera Version 14 and lower + * - `opera_mini_pre_8` - Opera Mini Version 8 and lower + * - `android_pre_4` - Android Version 3 and lower + * - `edge_pre_79` - Edge Version 18 and lower (non Chromium based) + * + */ + subfilters?: Array<'ie' | 'edge' | 'safari' | 'firefox' | 'chrome' | 'opera' | 'android' | 'opera_mini' | 'ie_pre_9' | 'ie9' | 'ie10' | 'ie11' | 'opera_pre_15' | 'android_pre_4' | 'safari_pre_6' | 'opera_mini_pre_8' | 'edge_pre_79'>; +}; + +/** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ +export type ExternalUserWritable = { + /** + * The user ID in Sentry. + */ + user_id: number; + /** + * The associated name for the provider. + */ + external_name: string; + /** + * The provider of the external actor. + * + * * `github` + * * `github_enterprise` + * * `jira_server` + * * `slack` + * * `perforce` + * * `gitlab` + * * `msteams` + * * `custom_scm` + */ + provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm'; + /** + * The Integration ID. + */ + integration_id: number; + /** + * The associated user ID for provider. + */ + external_id?: string | null; +}; + +export type OrganizationMemberRequestWritable = { + /** + * The email address to send the invitation to. + */ + email: string; + /** + * The organization-level role of the new member. Roles include: + * + * * `billing` - Can manage payment and compliance details. + * * `member` - Can view and act on events, as well as view most other data within the organization. + * * `manager` - Has full management access to all teams and projects. Can also manage + * the organization's membership. + * * `owner` - Has unrestricted access to the organization, its data, and its + * settings. Can add, modify, and delete projects and members, as well as + * make billing and plan changes. + * * `admin` - Can edit global integrations, manage projects, and add/remove teams. + * They automatically assume the Team Admin role for teams they join. + * Note: This role can no longer be assigned in Business and Enterprise plans. Use `TeamRoles` instead. + * + */ + orgRole?: 'billing' | 'member' | 'manager' | 'owner' | 'admin'; + /** + * The team and team-roles assigned to the member. Team roles can be either: + * - `contributor` - Can view and act on issues. Depending on organization settings, they can also add team members. + * - `admin` - Has full management access to their team's membership and projects. + */ + teamRoles?: Array<{ + [key: string]: unknown; + }> | null; + /** + * Whether or not to send an invite notification through email. Defaults to True. + */ + sendInvite?: boolean; + /** + * Whether or not to re-invite a user who has already been invited to the organization. Defaults to True. + */ + reinvite?: boolean; +}; + +export type ListYourOrganizationsData = { + body?: never; + path?: never; + query?: { + /** + * Specify `true` to restrict results to organizations in which you are an owner. + */ + owner?: boolean; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + * + * Valid query fields include: + * - `id`: The organization ID + * - `slug`: The organization slug + * - `status`: The organization's current status (one of `active`, `pending_deletion`, or `deletion_in_progress`) + * - `email` or `member_id`: Filter your organizations by the emails or [organization member IDs](/api/organizations/list-an-organizations-members/) of specific members included + * - `platform`: Filter your organizations to those with at least one project using this platform + * - `query`: Filter your organizations by name, slug, and members that contain this substring + * + * Example: `query=(slug:foo AND status:active) OR (email:[thing-one@example.com,thing-two@example.com] AND query:bar)` + * + */ + query?: string; + /** + * The field to sort results by, in descending order. If not specified the results are sorted by the date they were created. + * + * Valid fields include: + * - `members`: By number of members + * - `projects`: By number of projects + * - `events`: By number of events in the past 24 hours + * + */ + sortBy?: string; + }; + url: '/api/0/organizations/'; +}; + +export type ListYourOrganizationsErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListYourOrganizationsResponses = { + 200: Array<{ + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }>; +}; + +export type ListYourOrganizationsResponse = ListYourOrganizationsResponses[keyof ListYourOrganizationsResponses]; + +export type RetrieveAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * + * Specify `"0"` to return organization details that do not include projects or teams. + * + */ + detailed?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/'; +}; + +export type RetrieveAnOrganizationErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAnOrganizationResponses = { + 200: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; +}; + +export type RetrieveAnOrganizationResponse = RetrieveAnOrganizationResponses[keyof RetrieveAnOrganizationResponses]; + +export type UpdateAnOrganizationData = { + body?: { + /** + * The new slug for the organization, which needs to be unique. + */ + slug?: string; + /** + * The new name for the organization. + */ + name?: string; + /** + * Specify `true` to opt-in to new features before they're released to the public. + */ + isEarlyAdopter?: boolean; + /** + * Specify `true` to hide AI features from the organization. + */ + hideAiFeatures?: boolean; + /** + * Specify `true` to enable Code Coverage Insights. This feature is only available for organizations on the Team plan and above. Learn more about Codecov [here](/product/codecov/). + */ + codecovAccess?: boolean; + /** + * The default role new members will receive. + * + * * `member` - Member + * * `admin` - Admin + * * `manager` - Manager + * * `owner` - Owner + */ + defaultRole?: 'member' | 'admin' | 'manager' | 'owner'; + /** + * Specify `true` to allow organization members to freely join any team. + */ + openMembership?: boolean; + /** + * Specify `true` to allow members to delete events (including the delete & discard action) by granting them the `event:admin` scope. + */ + eventsMemberAdmin?: boolean; + /** + * Specify `true` to allow members to create, edit, and delete alert rules by granting them the `alerts:write` scope. + */ + alertsMemberWrite?: boolean; + /** + * The role required to download event attachments, such as native crash reports or log files. + * + * * `member` - Member + * * `admin` - Admin + * * `manager` - Manager + * * `owner` - Owner + */ + attachmentsRole?: 'member' | 'admin' | 'manager' | 'owner'; + /** + * The role required to download debug information files, ProGuard mappings and source maps. + * + * * `member` - Member + * * `admin` - Admin + * * `manager` - Manager + * * `owner` - Owner + */ + debugFilesRole?: 'member' | 'admin' | 'manager' | 'owner'; + /** + * Specify `true` to enable granular replay permissions, allowing per-member access control for replay data. + */ + hasGranularReplayPermissions?: boolean; + /** + * A list of user IDs who have permission to access replay data. Requires the hasGranularReplayPermissions flag to be true to be enforced. + */ + replayAccessMembers?: Array | null; + /** + * The type of display picture for the organization. + * + * * `letter_avatar` - Use initials + * * `upload` - Upload an image + */ + avatarType?: 'letter_avatar' | 'upload'; + /** + * The image to upload as the organization avatar, in base64. Required if `avatarType` is `upload`. + */ + avatar?: string; + /** + * Specify `true` to require and enforce two-factor authentication for all members. + */ + require2FA?: boolean; + /** + * Specify `true` to allow sharing of limited details on issues to anonymous users. + */ + allowSharedIssues?: boolean; + /** + * Specify `true` to enable enhanced privacy controls to limit personally identifiable information (PII) as well as source code in things like notifications. + */ + enhancedPrivacy?: boolean; + /** + * Specify `true` to allow Sentry to scrape missing JavaScript source context when possible. + */ + scrapeJavaScript?: boolean; + /** + * How many native crash reports (such as Minidumps for improved processing and download in issue details) to store per issue. + * + * * `0` - Disabled + * * `1` - 1 per issue + * * `5` - 5 per issue + * * `10` - 10 per issue + * * `20` - 20 per issue + * * `50` - 50 per issue + * * `100` - 100 per issue + * * `-1` - Unlimited + */ + storeCrashReports?: 0 | 1 | 5 | 10 | 20 | 50 | 100 | -1; + /** + * Specify `true` to allow users to request to join your organization. + */ + allowJoinRequests?: boolean; + /** + * Specify `true` to require server-side data scrubbing for all projects. + */ + dataScrubber?: boolean; + /** + * Specify `true` to apply the default scrubbers to prevent things like passwords and credit cards from being stored for all projects. + */ + dataScrubberDefaults?: boolean; + /** + * A list of additional global field names to match against when scrubbing data for all projects. + */ + sensitiveFields?: Array; + /** + * A list of global field names which data scrubbers should ignore. + */ + safeFields?: Array; + /** + * Specify `true` to prevent IP addresses from being stored for new events on all projects. + */ + scrubIPAddresses?: boolean; + /** + * Advanced data scrubbing rules that can be configured for each project as a JSON string. The new rules will only apply to new incoming events. For more details on advanced data scrubbing, see our [full documentation](/security-legal-pii/scrubbing/advanced-datascrubbing/). + * + * > Warning: Calling this endpoint with this field fully overwrites the advanced data scrubbing rules. + * + * Below is an example of a payload for a set of advanced data scrubbing rules for masking credit card numbers from the log message (equivalent to `[Mask] [Credit card numbers] from [$message]` in the Sentry app) and removing a specific key called `foo` (equivalent to `[Remove] [Anything] from [extra.foo]` in the Sentry app): + * ```json + * { + * relayPiiConfig: "{\"rules":{\"0\":{\"type\":\"creditcard\",\"redaction\":{\"method\":\"mask\"}},\"1\":{\"type\":\"anything\",\"redaction\":{\"method\":\"remove\"}}},\"applications\":{\"$message\":[\"0\"],\"extra.foo\":[\"1\"]}}" + * } + * ``` + * + */ + relayPiiConfig?: string; + /** + * A list of local Relays (the name, public key, and description as a JSON) registered for the organization. This feature is only available for organizations on the Business and Enterprise plans. Read more about Relay [here](/product/relay/). + * + * Below is an example of a list containing a single local Relay registered for the organization: + * ```json + * { + * trustedRelays: [ + * { + * name: "my-relay", + * publicKey: "eiwr9fdruw4erfh892qy4493reyf89ur34wefd90h", + * description: "Configuration for my-relay." + * } + * ] + * } + * ``` + * + */ + trustedRelays?: Array<{ + [key: string]: unknown; + }>; + /** + * Specify `true` to allow Sentry to comment on recent pull requests suspected of causing issues. Requires a GitHub integration. + */ + githubPRBot?: boolean; + /** + * Specify `true` to allow Sentry to detect users committing to your GitHub repositories that are not part of your Sentry organization. Requires a GitHub integration. + */ + githubNudgeInvite?: boolean; + /** + * Specify `true` to allow Sentry to comment on recent pull requests suspected of causing issues. Requires a GitLab integration. + */ + gitlabPRBot?: boolean; + /** + * Specify `true` to allow the Sentry Slack integration to post replies in threads for an Issue Alert notification. Requires a Slack integration. + */ + issueAlertsThreadFlag?: boolean; + /** + * Specify `true` to allow the Sentry Slack integration to post replies in threads for a Metric Alert notification. Requires a Slack integration. + */ + metricAlertsThreadFlag?: boolean; + /** + * Specify `true` to restore an organization that is pending deletion. + */ + cancelDeletion?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/'; +}; + +export type UpdateAnOrganizationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; + /** + * Conflict + */ + 409: unknown; + /** + * Image too large. + */ + 413: unknown; +}; + +export type UpdateAnOrganizationResponses = { + 200: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + role?: unknown; + orgRole?: string; + targetSampleRate?: number; + samplingMode?: string; + planSampleRate?: number; + desiredSampleRate?: number; + experiments: unknown; + isDefault: boolean; + defaultRole: string; + orgRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + is_global: boolean; + isGlobal: boolean; + minimumTeamRole: string; + }>; + teamRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + isMinimumRoleFor: string | null; + }>; + openMembership: boolean; + allowSharedIssues: boolean; + enhancedPrivacy: boolean; + dataScrubber: boolean; + dataScrubberDefaults: boolean; + sensitiveFields: Array; + safeFields: Array; + storeCrashReports: number; + attachmentsRole: string; + debugFilesRole: string; + eventsMemberAdmin: boolean; + alertsMemberWrite: boolean; + scrubIPAddresses: boolean; + scrapeJavaScript: boolean; + allowJoinRequests: boolean; + relayPiiConfig: string | null; + trustedRelays: Array<{ + name?: string; + description?: string; + publicKey?: string; + created?: string; + lastModified?: string; + }>; + pendingAccessRequests: number; + codecovAccess: boolean; + hideAiFeatures: boolean; + githubPRBot: boolean; + githubNudgeInvite: boolean; + gitlabPRBot: boolean; + aggregatedDataConsent: boolean; + isDynamicallySampled: boolean; + issueAlertsThreadFlag: boolean; + metricAlertsThreadFlag: boolean; + requiresSso: boolean; + defaultAutofixAutomationTuning: string; + defaultSeerScannerAutomation: boolean; + enablePrReviewTestGeneration: boolean; + enableSeerEnhancedAlerts: boolean; + enableSeerCoding: boolean; + allowBackgroundAgentDelegation: boolean; + autoEnableCodeReview: boolean; + autoOpenPrs: boolean; + defaultCodeReviewTriggers: Array; + teams: Array<{ + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; + }>; + projects: Array<{ + latestDeploys?: { + [key: string]: { + [key: string]: string; + }; + } | null; + options?: { + [key: string]: unknown; + }; + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + team: { + id: string; + name: string; + slug: string; + } | null; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + platforms: Array; + hasUserReports: boolean; + environments: Array; + latestRelease: { + version: string; + } | null; + }>; + }; +}; + +export type UpdateAnOrganizationResponse = UpdateAnOrganizationResponses[keyof UpdateAnOrganizationResponses]; + +export type DeprecatedListAnOrganizationSMetricAlertRulesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/'; +}; + +export type DeprecatedListAnOrganizationSMetricAlertRulesErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedListAnOrganizationSMetricAlertRulesResponses = { + 200: Array<{ + environment?: string | null; + projects?: Array | null; + queryType?: number | null; + resolveThreshold?: number | null; + dataset?: string | null; + thresholdType?: number | null; + eventTypes?: Array | null; + owner?: string | null; + originalAlertRuleId?: string | null; + comparisonDelta?: number | null; + snooze?: boolean | null; + errors?: Array | null; + extrapolationMode?: string | null; + id: string; + name: string; + organizationId: string; + query: string; + aggregate: string; + timeWindow: number; + triggers: Array<{ + [key: string]: unknown; + }>; + dateModified: string; + dateCreated: string; + createdBy: { + [key: string]: unknown; + }; + }>; +}; + +export type DeprecatedListAnOrganizationSMetricAlertRulesResponse = DeprecatedListAnOrganizationSMetricAlertRulesResponses[keyof DeprecatedListAnOrganizationSMetricAlertRulesResponses]; + +export type DeprecatedCreateAMetricAlertRuleForAnOrganizationData = { + body: { + /** + * The name for the rule, which has a maximimum length of 256 characters. + */ + name: string; + /** + * A string representing the aggregate function used in this alert rule. Valid aggregate functions are `count`, `count_unique`, `percentage`, `avg`, `apdex`, `failure_rate`, `p50`, `p75`, `p95`, `p99`, `p100`, and `percentile`. See [Metric Alert Rule Types](#metric-alert-rule-types) for valid configurations. + */ + aggregate: string; + /** + * The time period to aggregate over. + * + * * `1` - 1 minute + * * `5` - 5 minutes + * * `10` - 10 minutes + * * `15` - 15 minutes + * * `30` - 30 minutes + * * `60` - 1 hour + * * `120` - 2 hours + * * `240` - 4 hours + * * `1440` - 24 hours + */ + timeWindow: 1 | 5 | 10 | 15 | 30 | 60 | 120 | 240 | 1440; + /** + * Metric alerts are currently limited to one project. The array should contain a single slug, representing the project to filter by. + */ + projects: Array; + /** + * An event search query to subscribe to and monitor for alerts. For example, to filter transactions so that only those with status code 400 are included, you could use `"query": "http.status_code:400"`. Use an empty string for no filter. + */ + query: string; + /** + * The comparison operator for the critical and warning thresholds. The comparison operator for the resolved threshold is automatically set to the opposite operator. When a percentage change threshold is used, `0` is equivalent to "Higher than" and `1` is equivalent to "Lower than". + * + * * `0` - Above + * * `1` - Below + */ + thresholdType: 0 | 1; + /** + * + * A list of triggers, where each trigger is an object with the following fields: + * - `label`: One of `critical` or `warning`. A `critical` trigger is always required. + * - `alertThreshold`: The value that the subscription needs to reach to trigger the + * alert rule. + * - `actions`: A list of actions that take place when the threshold is met. + * ```json + * triggers: [ + * { + * "label": "critical", + * "alertThreshold": 50, + * "actions": [ + * { + * "type": "slack", + * "targetType": "specific", + * "targetIdentifier": "#get-crit", + * "inputChannelId": 2454362 + * "integrationId": 653532, + * } + * ] + * }, + * { + * "label": "warning", + * "alertThreshold": 25, + * "actions": [] + * } + * ] + * ``` + * Metric alert rule trigger actions follow the following structure: + * - `type`: The type of trigger action. Valid values are `email`, `slack`, `msteams`, `pagerduty`, `sentry_app`, `sentry_notification`, and `opsgenie`. + * - `targetType`: The type of target the notification will be sent to. Valid values are `specific` (`targetIdentifier` is a direct reference used by the service, like an email address or a Slack channel ID), `user` (`targetIdentifier` is a Sentry user ID), `team` (`targetIdentifier` is a Sentry team ID), and `sentry_app` (`targetIdentifier` is a SentryApp ID). + * - `targetIdentifier`: The ID of the target. This must be an integer for PagerDuty and Sentry apps, and a string for all others. Examples of appropriate values include a Slack channel name (`#my-channel`), a user ID, a team ID, a Sentry app ID, etc. + * - `inputChannelId`: The ID of the Slack channel. This is only used for the Slack action, and can be used as an alternative to providing the `targetIdentifier`. + * - `integrationId`: The integration ID. This is required for every action type excluding `email` and `sentry_app.` + * - `sentryAppId`: The ID of the Sentry app. This is required when `type` is `sentry_app`. + * - `priority`: The severity of the Pagerduty alert or the priority of the Opsgenie alert (optional). Defaults for Pagerduty are `critical` for critical and `warning` for warning. Defaults for Opsgenie are `P1` for critical and `P2` for warning. + * + */ + triggers: Array; + /** + * The name of the environment to filter by. Defaults to all environments. + */ + environment?: string | null; + /** + * The name of the dataset that this query will be executed on. Valid values are `events`, `transactions`, `metrics`, `sessions`, and `generic-metrics`. Defaults to `events`. See [Metric Alert Rule Types](#metric-alert-rule-types) for valid configurations. + */ + dataset?: string; + /** + * The type of query. If no value is provided, `queryType` is set to the default for the specified `dataset.` See [Metric Alert Rule Types](#metric-alert-rule-types) for valid configurations. + * + * * `0` - event.type:error + * * `1` - event.type:transaction + * * `2` - None + */ + queryType?: 0 | 1 | 2; + /** + * List of event types that this alert will be related to. Valid values are `default` (events captured using [Capture Message](/product/sentry-basics/integrate-backend/capturing-errors/#capture-message)), `error` and `transaction`. + */ + eventTypes?: Array; + /** + * An optional int representing the time delta to use as the comparison period, in minutes. Required when using a percentage change threshold ("x%" higher or lower compared to `comparisonDelta` minutes ago). A percentage change threshold cannot be used for [Crash Free Session Rate](#crash-free-session-rate) or [Crash Free User Rate](#crash-free-user-rate). + */ + comparisonDelta?: number; + /** + * Optional value that the metric needs to reach to resolve the alert. If no value is provided, this is set automatically based on the lowest severity trigger's `alertThreshold`. For example, if the alert is set to trigger at the warning level when the number of errors is above 50, then the alert would be set to resolve when there are less than 50 errors. If `thresholdType` is `0`, `resolveThreshold` must be greater than the critical threshold, otherwise, it must be less than the critical threshold. + */ + resolveThreshold?: number; + /** + * The ID of the team or user that owns the rule. + */ + owner?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/'; +}; + +export type DeprecatedCreateAMetricAlertRuleForAnOrganizationErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedCreateAMetricAlertRuleForAnOrganizationResponses = { + /** + * This represents a Sentry Metric Alert Rule. + */ + 201: { + environment?: string | null; + projects?: Array | null; + queryType?: number | null; + resolveThreshold?: number | null; + dataset?: string | null; + thresholdType?: number | null; + eventTypes?: Array | null; + owner?: string | null; + originalAlertRuleId?: string | null; + comparisonDelta?: number | null; + snooze?: boolean | null; + errors?: Array | null; + extrapolationMode?: string | null; + id: string; + name: string; + organizationId: string; + query: string; + aggregate: string; + timeWindow: number; + triggers: Array<{ + [key: string]: unknown; + }>; + dateModified: string; + dateCreated: string; + createdBy: { + [key: string]: unknown; + }; + }; +}; + +export type DeprecatedCreateAMetricAlertRuleForAnOrganizationResponse = DeprecatedCreateAMetricAlertRuleForAnOrganizationResponses[keyof DeprecatedCreateAMetricAlertRuleForAnOrganizationResponses]; + +export type DeprecatedDeleteAMetricAlertRuleData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the rule you'd like to query. + */ + alert_rule_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/{alert_rule_id}/'; +}; + +export type DeprecatedDeleteAMetricAlertRuleErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedDeleteAMetricAlertRuleResponses = { + /** + * Accepted + */ + 202: unknown; +}; + +export type DeprecatedRetrieveAMetricAlertRuleForAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the rule you'd like to query. + */ + alert_rule_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/{alert_rule_id}/'; +}; + +export type DeprecatedRetrieveAMetricAlertRuleForAnOrganizationErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedRetrieveAMetricAlertRuleForAnOrganizationResponses = { + /** + * This represents a Sentry Metric Alert Rule. + */ + 200: { + environment?: string | null; + projects?: Array | null; + queryType?: number | null; + resolveThreshold?: number | null; + dataset?: string | null; + thresholdType?: number | null; + eventTypes?: Array | null; + owner?: string | null; + originalAlertRuleId?: string | null; + comparisonDelta?: number | null; + snooze?: boolean | null; + errors?: Array | null; + extrapolationMode?: string | null; + id: string; + name: string; + organizationId: string; + query: string; + aggregate: string; + timeWindow: number; + triggers: Array<{ + [key: string]: unknown; + }>; + dateModified: string; + dateCreated: string; + createdBy: { + [key: string]: unknown; + }; + }; +}; + +export type DeprecatedRetrieveAMetricAlertRuleForAnOrganizationResponse = DeprecatedRetrieveAMetricAlertRuleForAnOrganizationResponses[keyof DeprecatedRetrieveAMetricAlertRuleForAnOrganizationResponses]; + +export type DeprecatedUpdateAMetricAlertRuleData = { + body: { + /** + * The name for the rule. + */ + name: string; + /** + * A string representing the aggregate function used in this alert rule. Valid aggregate functions are `count`, `count_unique`, `percentage`, `avg`, `apdex`, `failure_rate`, `p50`, `p75`, `p95`, `p99`, `p100`, and `percentile`. See **Metric Alert Rule Types** under [Create a Metric Alert Rule](/api/alerts/create-a-metric-alert-rule-for-an-organization/#metric-alert-rule-types) for valid configurations. + */ + aggregate: string; + /** + * The time period to aggregate over. + * + * * `1` - 1 minute + * * `5` - 5 minutes + * * `10` - 10 minutes + * * `15` - 15 minutes + * * `30` - 30 minutes + * * `60` - 1 hour + * * `120` - 2 hours + * * `240` - 4 hours + * * `1440` - 24 hours + */ + timeWindow: 1 | 5 | 10 | 15 | 30 | 60 | 120 | 240 | 1440; + /** + * The names of the projects to filter by. + */ + projects: Array; + /** + * An event search query to subscribe to and monitor for alerts. For example, to filter transactions so that only those with status code 400 are included, you could use `"query": "http.status_code:400"`. Use an empty string for no filter. + */ + query: string; + /** + * The comparison operator for the critical and warning thresholds. The comparison operator for the resolved threshold is automatically set to the opposite operator. When a percentage change threshold is used, `0` is equivalent to "Higher than" and `1` is equivalent to "Lower than". + * + * * `0` - Above + * * `1` - Below + */ + thresholdType: 0 | 1; + /** + * + * A list of triggers, where each trigger is an object with the following fields: + * - `label`: One of `critical` or `warning`. A `critical` trigger is always required. + * - `alertThreshold`: The value that the subscription needs to reach to trigger the + * alert rule. + * - `actions`: A list of actions that take place when the threshold is met. + * ```json + * triggers: [ + * { + * "label": "critical", + * "alertThreshold": 100, + * "actions": [ + * { + * "type": "email", + * "targetType": "user", + * "targetIdentifier": "23489853", + * "inputChannelId": None + * "integrationId": None, + * "sentryAppId": None + * } + * ] + * }, + * { + * "label": "warning", + * "alertThreshold": 75, + * "actions": [] + * } + * ] + * ``` + * Metric alert rule trigger actions follow the following structure: + * - `type`: The type of trigger action. Valid values are `email`, `slack`, `msteams`, `pagerduty`, `sentry_app`, `sentry_notification`, and `opsgenie`. + * - `targetType`: The type of target the notification will be sent to. Valid values are `specific`, `user`, `team`, and `sentry_app`. + * - `targetIdentifier`: The ID of the target. This must be an integer for PagerDuty and Sentry apps, and a string for all others. Examples of appropriate values include a Slack channel name (`#my-channel`), a user ID, a team ID, a Sentry app ID, etc. + * - `inputChannelId`: The ID of the Slack channel. This is only used for the Slack action, and can be used as an alternative to providing the `targetIdentifier`. + * - `integrationId`: The integration ID. This is required for every action type except `email` and `sentry_app.` + * - `sentryAppId`: The ID of the Sentry app. This is required when `type` is `sentry_app`. + * - `priority`: The severity of the Pagerduty alert or the priority of the Opsgenie alert (optional). Defaults for Pagerduty are `critical` for critical and `warning` for warning. Defaults for Opsgenie are `P1` for critical and `P2` for warning. + * + */ + triggers: Array; + /** + * The name of the environment to filter by. Defaults to all environments. + */ + environment?: string | null; + /** + * The name of the dataset that this query will be executed on. Valid values are `events`, `transactions`, `metrics`, `sessions`, and `generic-metrics`. Defaults to `events`. See **Metric Alert Rule Types** under [Create a Metric Alert Rule](/api/alerts/create-a-metric-alert-rule-for-an-organization/#metric-alert-rule-types) for valid configurations. + */ + dataset?: string; + /** + * The type of query. If no value is provided, `queryType` is set to the default for the specified `dataset.` See **Metric Alert Rule Types** under [Create a Metric Alert Rule](/api/alerts/create-a-metric-alert-rule-for-an-organization/#metric-alert-rule-types) for valid configurations. + * + * * `0` - event.type:error + * * `1` - event.type:transaction + * * `2` - None + */ + queryType?: 0 | 1 | 2; + /** + * List of event types that this alert will be related to. Valid values are `default` (events captured using [Capture Message](/product/sentry-basics/integrate-backend/capturing-errors/#capture-message)), `error` and `transaction`. + */ + eventTypes?: Array; + /** + * An optional int representing the time delta to use as the comparison period, in minutes. Required when using a percentage change threshold ("x%" higher or lower compared to `comparisonDelta` minutes ago). A percentage change threshold cannot be used for [Crash Free Session Rate](/api/alerts/create-a-metric-alert-rule-for-an-organization/#crash-free-session-rate) or [Crash Free User Rate](/api/alerts/create-a-metric-alert-rule-for-an-organization/#crash-free-user-rate). + */ + comparisonDelta?: number; + /** + * Optional value that the metric needs to reach to resolve the alert. If no value is provided, this is set automatically based on the lowest severity trigger's `alertThreshold`. For example, if the alert is set to trigger at the warning level when the number of errors is above 50, then the alert would be set to resolve when there are less than 50 errors. If `thresholdType` is `0`, `resolveThreshold` must be greater than the critical threshold. Otherwise, it must be less than the critical threshold. + */ + resolveThreshold?: number; + /** + * The ID of the team or user that owns the rule. + */ + owner?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the rule you'd like to query. + */ + alert_rule_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/alert-rules/{alert_rule_id}/'; +}; + +export type DeprecatedUpdateAMetricAlertRuleErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedUpdateAMetricAlertRuleResponses = { + /** + * This represents a Sentry Metric Alert Rule. + */ + 200: { + environment?: string | null; + projects?: Array | null; + queryType?: number | null; + resolveThreshold?: number | null; + dataset?: string | null; + thresholdType?: number | null; + eventTypes?: Array | null; + owner?: string | null; + originalAlertRuleId?: string | null; + comparisonDelta?: number | null; + snooze?: boolean | null; + errors?: Array | null; + extrapolationMode?: string | null; + id: string; + name: string; + organizationId: string; + query: string; + aggregate: string; + timeWindow: number; + triggers: Array<{ + [key: string]: unknown; + }>; + dateModified: string; + dateCreated: string; + createdBy: { + [key: string]: unknown; + }; + }; +}; + +export type DeprecatedUpdateAMetricAlertRuleResponse = DeprecatedUpdateAMetricAlertRuleResponses[keyof DeprecatedUpdateAMetricAlertRuleResponses]; + +export type GetIntegrationProviderInformationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * Specific integration provider to filter by such as `slack`. See our [Integrations Documentation](/product/integrations/) for an updated list of providers. + */ + providerKey?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/config/integrations/'; +}; + +export type GetIntegrationProviderInformationErrors = { + /** + * Bad Request + */ + 404: unknown; +}; + +export type GetIntegrationProviderInformationResponses = { + 200: { + providers: Array<{ + key: string; + slug: string; + name: string; + metadata: unknown; + canAdd: boolean; + canDisable: boolean; + features: Array; + setupDialog: { + [key: string]: unknown; + }; + }>; + }; +}; + +export type GetIntegrationProviderInformationResponse = GetIntegrationProviderInformationResponses[keyof GetIntegrationProviderInformationResponses]; + +export type ListAnOrganizationSCustomDashboardsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * Limit the number of rows to return in the result. Default and maximum allowed is 100. + */ + per_page?: number; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/'; +}; + +export type ListAnOrganizationSCustomDashboardsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSCustomDashboardsResponses = { + 200: Array<{ + id: string; + title: string; + dateCreated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + environment: Array; + filters: { + release?: Array; + releaseId?: Array; + globalFilter?: Array<{ + [key: string]: unknown; + }>; + }; + lastVisited: string | null; + widgetDisplay: Array; + widgetPreview: Array<{ + [key: string]: string; + }>; + permissions: { + isEditableByEveryone: boolean; + teamsWithEditAccess: Array; + } | null; + isFavorited: boolean; + projects: Array; + prebuiltId: number | null; + }>; +}; + +export type ListAnOrganizationSCustomDashboardsResponse = ListAnOrganizationSCustomDashboardsResponses[keyof ListAnOrganizationSCustomDashboardsResponses]; + +export type CreateANewDashboardForAnOrganizationData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The user defined title for this dashboard. + */ + title: string; + /** + * A dashboard's unique id. + */ + id?: string; + /** + * A json list of widgets saved in this dashboard. + */ + widgets?: Array<{ + id?: string; + title?: string; + description?: string | null; + thresholds?: { + [key: string]: unknown; + } | null; + /** + * * `line` + * * `area` + * * `stacked_area` + * * `bar` + * * `table` + * * `big_number` + * * `top_n` + * * `details` + * * `categorical_bar` + */ + display_type?: 'line' | 'area' | 'stacked_area' | 'bar' | 'table' | 'big_number' | 'top_n' | 'details' | 'categorical_bar'; + interval?: string; + queries?: Array<{ + id?: string; + fields?: Array; + aggregates?: Array | null; + columns?: Array | null; + field_aliases?: Array | null; + name?: string; + conditions?: string; + orderby?: string; + is_hidden?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + on_demand_extraction?: { + extraction_state?: string; + enabled?: boolean; + }; + on_demand_extraction_disabled?: boolean; + selected_aggregate?: number | null; + linked_dashboards?: Array<{ + field: string; + dashboard_id: string; + }> | null; + }>; + /** + * * `discover` + * * `issue` + * * `metrics` + * * `error-events` + * * `transaction-like` + * * `spans` + * * `logs` + * * `tracemetrics` + * * `preprod-app-size` + */ + widget_type?: 'discover' | 'issue' | 'metrics' | 'error-events' | 'transaction-like' | 'spans' | 'logs' | 'tracemetrics' | 'preprod-app-size'; + limit?: number | null; + layout?: { + [key: string]: unknown; + } | null; + }>; + /** + * The saved projects filter for this dashboard. + */ + projects?: Array; + /** + * The saved environment filter for this dashboard. + */ + environment?: Array | null; + /** + * The saved time range period for this dashboard. + */ + period?: string | null; + /** + * The saved start time for this dashboard. + */ + start?: string | null; + /** + * The saved end time for this dashboard. + */ + end?: string | null; + /** + * The saved filters for this dashboard. + */ + filters?: { + [key: string]: unknown; + }; + /** + * Setting that lets you display saved time range for this dashboard in UTC. + */ + utc?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + permissions?: { + /** + * Whether the dashboard is editable by everyone. + */ + is_editable_by_everyone: boolean; + /** + * List of team IDs that have edit access to a dashboard. + */ + teams_with_edit_access?: Array; + } | null; + /** + * Favorite the dashboard automatically for the request user + */ + is_favorited?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/'; +}; + +export type CreateANewDashboardForAnOrganizationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; + /** + * Conflict + */ + 409: unknown; +}; + +export type CreateANewDashboardForAnOrganizationResponses = { + 201: { + environment?: Array; + period?: string; + utc?: string; + expired?: boolean; + start?: string; + end?: string; + id: string; + title: string; + dateCreated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + } | null; + widgets: Array<{ + id: string; + title: string; + description: string | null; + displayType: string; + thresholds: { + preferredPolarity?: string; + max_values: { + [key: string]: number; + }; + unit: string; + } | null; + interval: string; + dateCreated: string; + dashboardId: string; + queries: Array<{ + id: string; + name: string; + fields: Array; + aggregates: Array; + columns: Array; + fieldAliases: Array; + conditions: string; + orderby: string; + widgetId: string; + onDemand: Array<{ + enabled: boolean; + extractionState: string; + dashboardWidgetQueryId: number; + }>; + isHidden: boolean; + selectedAggregate: number | null; + linkedDashboards: Array<{ + field: string; + dashboardId: number; + }>; + }>; + limit: number | null; + widgetType: string; + layout: { + [key: string]: number; + } | null; + datasetSource: string | null; + exploreUrls: Array | null; + changedReason: Array<{ + orderby: Array<{ + [key: string]: string; + }> | null; + equations: Array<{ + [key: string]: string | Array; + }> | null; + selected_columns: Array; + }> | null; + }>; + projects: Array; + filters: { + release?: Array; + releaseId?: Array; + globalFilter?: Array<{ + [key: string]: unknown; + }>; + }; + permissions: { + isEditableByEveryone: boolean; + teamsWithEditAccess: Array; + } | null; + isFavorited: boolean; + prebuiltId: number | null; + }; +}; + +export type CreateANewDashboardForAnOrganizationResponse = CreateANewDashboardForAnOrganizationResponses[keyof CreateANewDashboardForAnOrganizationResponses]; + +export type DeleteAnOrganizationSCustomDashboardData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the dashboard you'd like to retrieve. + */ + dashboard_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/{dashboard_id}/'; +}; + +export type DeleteAnOrganizationSCustomDashboardErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnOrganizationSCustomDashboardResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAnOrganizationSCustomDashboardResponse = DeleteAnOrganizationSCustomDashboardResponses[keyof DeleteAnOrganizationSCustomDashboardResponses]; + +export type RetrieveAnOrganizationSCustomDashboardData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the dashboard you'd like to retrieve. + */ + dashboard_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/{dashboard_id}/'; +}; + +export type RetrieveAnOrganizationSCustomDashboardErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAnOrganizationSCustomDashboardResponses = { + 200: { + environment?: Array; + period?: string; + utc?: string; + expired?: boolean; + start?: string; + end?: string; + id: string; + title: string; + dateCreated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + } | null; + widgets: Array<{ + id: string; + title: string; + description: string | null; + displayType: string; + thresholds: { + preferredPolarity?: string; + max_values: { + [key: string]: number; + }; + unit: string; + } | null; + interval: string; + dateCreated: string; + dashboardId: string; + queries: Array<{ + id: string; + name: string; + fields: Array; + aggregates: Array; + columns: Array; + fieldAliases: Array; + conditions: string; + orderby: string; + widgetId: string; + onDemand: Array<{ + enabled: boolean; + extractionState: string; + dashboardWidgetQueryId: number; + }>; + isHidden: boolean; + selectedAggregate: number | null; + linkedDashboards: Array<{ + field: string; + dashboardId: number; + }>; + }>; + limit: number | null; + widgetType: string; + layout: { + [key: string]: number; + } | null; + datasetSource: string | null; + exploreUrls: Array | null; + changedReason: Array<{ + orderby: Array<{ + [key: string]: string; + }> | null; + equations: Array<{ + [key: string]: string | Array; + }> | null; + selected_columns: Array; + }> | null; + }>; + projects: Array; + filters: { + release?: Array; + releaseId?: Array; + globalFilter?: Array<{ + [key: string]: unknown; + }>; + }; + permissions: { + isEditableByEveryone: boolean; + teamsWithEditAccess: Array; + } | null; + isFavorited: boolean; + prebuiltId: number | null; + }; +}; + +export type RetrieveAnOrganizationSCustomDashboardResponse = RetrieveAnOrganizationSCustomDashboardResponses[keyof RetrieveAnOrganizationSCustomDashboardResponses]; + +export type EditAnOrganizationSCustomDashboardData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body?: { + /** + * A dashboard's unique id. + */ + id?: string; + /** + * The user-defined dashboard title. + */ + title?: string; + /** + * A json list of widgets saved in this dashboard. + */ + widgets?: Array<{ + id?: string; + title?: string; + description?: string | null; + thresholds?: { + [key: string]: unknown; + } | null; + /** + * * `line` + * * `area` + * * `stacked_area` + * * `bar` + * * `table` + * * `big_number` + * * `top_n` + * * `details` + * * `categorical_bar` + */ + display_type?: 'line' | 'area' | 'stacked_area' | 'bar' | 'table' | 'big_number' | 'top_n' | 'details' | 'categorical_bar'; + interval?: string; + queries?: Array<{ + id?: string; + fields?: Array; + aggregates?: Array | null; + columns?: Array | null; + field_aliases?: Array | null; + name?: string; + conditions?: string; + orderby?: string; + is_hidden?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + on_demand_extraction?: { + extraction_state?: string; + enabled?: boolean; + }; + on_demand_extraction_disabled?: boolean; + selected_aggregate?: number | null; + linked_dashboards?: Array<{ + field: string; + dashboard_id: string; + }> | null; + }>; + /** + * * `discover` + * * `issue` + * * `metrics` + * * `error-events` + * * `transaction-like` + * * `spans` + * * `logs` + * * `tracemetrics` + * * `preprod-app-size` + */ + widget_type?: 'discover' | 'issue' | 'metrics' | 'error-events' | 'transaction-like' | 'spans' | 'logs' | 'tracemetrics' | 'preprod-app-size'; + limit?: number | null; + layout?: { + [key: string]: unknown; + } | null; + }>; + /** + * The saved projects filter for this dashboard. + */ + projects?: Array; + /** + * The saved environment filter for this dashboard. + */ + environment?: Array | null; + /** + * The saved time range period for this dashboard. + */ + period?: string | null; + /** + * The saved start time for this dashboard. + */ + start?: string | null; + /** + * The saved end time for this dashboard. + */ + end?: string | null; + /** + * The saved filters for this dashboard. + */ + filters?: { + [key: string]: unknown; + }; + /** + * Setting that lets you display saved time range for this dashboard in UTC. + */ + utc?: boolean; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + permissions?: { + /** + * Whether the dashboard is editable by everyone. + */ + is_editable_by_everyone: boolean; + /** + * List of team IDs that have edit access to a dashboard. + */ + teams_with_edit_access?: Array; + } | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the dashboard you'd like to retrieve. + */ + dashboard_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/dashboards/{dashboard_id}/'; +}; + +export type EditAnOrganizationSCustomDashboardErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type EditAnOrganizationSCustomDashboardResponses = { + 200: { + environment?: Array; + period?: string; + utc?: string; + expired?: boolean; + start?: string; + end?: string; + id: string; + title: string; + dateCreated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + } | null; + widgets: Array<{ + id: string; + title: string; + description: string | null; + displayType: string; + thresholds: { + preferredPolarity?: string; + max_values: { + [key: string]: number; + }; + unit: string; + } | null; + interval: string; + dateCreated: string; + dashboardId: string; + queries: Array<{ + id: string; + name: string; + fields: Array; + aggregates: Array; + columns: Array; + fieldAliases: Array; + conditions: string; + orderby: string; + widgetId: string; + onDemand: Array<{ + enabled: boolean; + extractionState: string; + dashboardWidgetQueryId: number; + }>; + isHidden: boolean; + selectedAggregate: number | null; + linkedDashboards: Array<{ + field: string; + dashboardId: number; + }>; + }>; + limit: number | null; + widgetType: string; + layout: { + [key: string]: number; + } | null; + datasetSource: string | null; + exploreUrls: Array | null; + changedReason: Array<{ + orderby: Array<{ + [key: string]: string; + }> | null; + equations: Array<{ + [key: string]: string | Array; + }> | null; + selected_columns: Array; + }> | null; + }>; + projects: Array; + filters: { + release?: Array; + releaseId?: Array; + globalFilter?: Array<{ + [key: string]: unknown; + }>; + }; + permissions: { + isEditableByEveryone: boolean; + teamsWithEditAccess: Array; + } | null; + isFavorited: boolean; + prebuiltId: number | null; + }; +}; + +export type EditAnOrganizationSCustomDashboardResponse = EditAnOrganizationSCustomDashboardResponses[keyof EditAnOrganizationSCustomDashboardResponses]; + +export type BulkDeleteMonitorsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * An optional search query for filtering monitors. + */ + query?: string; + /** + * The property to sort results by. If not specified, the results are sorted by id. + * + * Available fields are: + * - `name` + * - `id` + * - `type` + * - `connectedWorkflows` + * - `latestGroup` + * - `openIssues` + * + * Prefix with `-` to sort in descending order. + * + */ + sortBy?: string; + /** + * The ID of the monitor you'd like to query. + */ + id?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/detectors/'; +}; + +export type BulkDeleteMonitorsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type BulkDeleteMonitorsResponses = { + /** + * Success + */ + 200: unknown; + /** + * No Content + */ + 204: void; +}; + +export type BulkDeleteMonitorsResponse = BulkDeleteMonitorsResponses[keyof BulkDeleteMonitorsResponses]; + +export type FetchAnOrganizationSMonitorsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * An optional search query for filtering monitors. + */ + query?: string; + /** + * The property to sort results by. If not specified, the results are sorted by id. + * + * Available fields are: + * - `name` + * - `id` + * - `type` + * - `connectedWorkflows` + * - `latestGroup` + * - `openIssues` + * + * Prefix with `-` to sort in descending order. + * + */ + sortBy?: string; + /** + * The ID of the monitor you'd like to query. + */ + id?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/detectors/'; +}; + +export type FetchAnOrganizationSMonitorsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type FetchAnOrganizationSMonitorsResponses = { + 200: Array<{ + owner?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + } | null; + createdBy?: string | null; + latestGroup?: { + [key: string]: unknown; + } | null; + description?: string | null; + id: string; + projectId: string; + name: string; + type: string; + workflowIds: Array | null; + dateCreated: string; + dateUpdated: string; + dataSources: Array<{ + [key: string]: unknown; + }> | null; + conditionGroup: { + [key: string]: unknown; + } | null; + config: { + [key: string]: unknown; + }; + enabled: boolean; + openIssues: number; + }>; +}; + +export type FetchAnOrganizationSMonitorsResponse = FetchAnOrganizationSMonitorsResponses[keyof FetchAnOrganizationSMonitorsResponses]; + +export type CreateAMonitorForAProjectData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * Name of the monitor. + */ + name: string; + /** + * The type of monitor - `metric_issue`. + */ + type: string; + /** + * + * The data sources for the monitor to use based on what you want to measure. + * + * **Number of Errors Metric Monitor** + * ```json + * [ + * { + * "aggregate": "count()", + * "dataset" : "events", + * "environment": "prod", + * "eventTypes": ["default", "error"], + * "query": "is:unresolved", + * "queryType": 0, + * "timeWindow": 3600, + * }, + * ], + * ``` + * + * **Users Experiencing Errors Metric Monitor** + * ```json + * [ + * { + * "aggregate": "count_unique(tags[sentry:user])", + * "dataset" : "events", + * "environment": "prod", + * "eventTypes": ["default", "error"], + * "query": "is:unresolved", + * "queryType": 0, + * "timeWindow": 3600, + * }, + * ], + * ``` + * + * + * **Throughput Metric Monitor** + * ```json + * [ + * { + * "aggregate":"count(span.duration)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Duration Metric Monitor** + * ```json + * [ + * { + * "aggregate":"p95(span.duration)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Failure Rate Metric Monitor** + * ```json + * [ + * { + * "aggregate":"failure_rate()", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Largest Contentful Paint Metric Monitor** + * ```json + * [ + * { + * "aggregate":"p95(measurements.lcp)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + */ + data_sources?: Array; + /** + * + * The issue detection type configuration. + * + * + * - `detectionType` + * - `static`: Threshold based monitor + * - `percent`: Change based monitor + * - `dynamic`: Dynamic monitor + * - `comparisonDelta`: If selecting a **change** detection type, the comparison delta is the time period at which to compare against in minutes. + * For example, a value of 3600 compares the metric tracked against data 1 hour ago. + * - `300`: 5 minutes + * - `900`: 15 minutes + * - `3600`: 1 hour + * - `86400`: 1 day + * - `604800`: 1 week + * - `2592000`: 1 month + * + * **Threshold** + * ```json + * { + * "detectionType": "static", + * } + * ``` + * **Change** + * ```json + * { + * "detectionType": "percent", + * "comparisonDelta": 3600, + * } + * ``` + * **Dynamic** + * ```json + * { + * "detectionType": "dynamic", + * } + * ``` + * + */ + config?: { + [key: string]: unknown; + }; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + condition_group?: { + id?: string; + /** + * * `any` + * * `any-short` + * * `all` + * * `none` + */ + logic_type: 'any' | 'any-short' | 'all' | 'none'; + conditions?: Array; + }; + /** + * + * The user or team who owns the monitor. + * + * **User** + * ```json + * "type": "user", + * "id": "12345", + * "name": "Jane Doe", + * "email": "jane.doe@sentry.io" + * ``` + * + * **Team** + * ```json + * "type": "team", + * "id": "123456789", + * "name": "example-team" + * ``` + * + */ + owner?: string | null; + /** + * A description of the monitor. Will be used in the resulting issue. + */ + description?: string | null; + /** + * Set to False if you want to disable the monitor. + */ + enabled?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/detectors/'; +}; + +export type CreateAMonitorForAProjectErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type CreateAMonitorForAProjectResponses = { + 201: { + owner?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + } | null; + createdBy?: string | null; + latestGroup?: { + [key: string]: unknown; + } | null; + description?: string | null; + id: string; + projectId: string; + name: string; + type: string; + workflowIds: Array | null; + dateCreated: string; + dateUpdated: string; + dataSources: Array<{ + [key: string]: unknown; + }> | null; + conditionGroup: { + [key: string]: unknown; + } | null; + config: { + [key: string]: unknown; + }; + enabled: boolean; + openIssues: number; + }; +}; + +export type CreateAMonitorForAProjectResponse = CreateAMonitorForAProjectResponses[keyof CreateAMonitorForAProjectResponses]; + +export type MutateAnOrganizationSMonitorsData = { + body: { + /** + * Whether to enable or disable the monitors + */ + enabled: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * An optional search query for filtering monitors. + */ + query?: string; + /** + * The ID of the monitor you'd like to query. + */ + id?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/detectors/'; +}; + +export type MutateAnOrganizationSMonitorsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type MutateAnOrganizationSMonitorsResponses = { + 200: Array<{ + owner?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + } | null; + createdBy?: string | null; + latestGroup?: { + [key: string]: unknown; + } | null; + description?: string | null; + id: string; + projectId: string; + name: string; + type: string; + workflowIds: Array | null; + dateCreated: string; + dateUpdated: string; + dataSources: Array<{ + [key: string]: unknown; + }> | null; + conditionGroup: { + [key: string]: unknown; + } | null; + config: { + [key: string]: unknown; + }; + enabled: boolean; + openIssues: number; + }>; +}; + +export type MutateAnOrganizationSMonitorsResponse = MutateAnOrganizationSMonitorsResponses[keyof MutateAnOrganizationSMonitorsResponses]; + +export type DeleteAMonitorData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the monitor you'd like to query. + */ + detector_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/'; +}; + +export type DeleteAMonitorErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAMonitorResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAMonitorResponse = DeleteAMonitorResponses[keyof DeleteAMonitorResponses]; + +export type FetchAMonitorData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the monitor you'd like to query. + */ + detector_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/'; +}; + +export type FetchAMonitorErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type FetchAMonitorResponses = { + 200: { + owner?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + } | null; + createdBy?: string | null; + latestGroup?: { + [key: string]: unknown; + } | null; + description?: string | null; + id: string; + projectId: string; + name: string; + type: string; + workflowIds: Array | null; + dateCreated: string; + dateUpdated: string; + dataSources: Array<{ + [key: string]: unknown; + }> | null; + conditionGroup: { + [key: string]: unknown; + } | null; + config: { + [key: string]: unknown; + }; + enabled: boolean; + openIssues: number; + }; +}; + +export type FetchAMonitorResponse = FetchAMonitorResponses[keyof FetchAMonitorResponses]; + +export type UpdateAMonitorByIdData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * Name of the monitor. + */ + name: string; + /** + * The type of monitor - `metric_issue`. + */ + type: string; + /** + * + * The data sources for the monitor to use based on what you want to measure. + * + * **Number of Errors Metric Monitor** + * ```json + * [ + * { + * "aggregate": "count()", + * "dataset" : "events", + * "environment": "prod", + * "eventTypes": ["default", "error"], + * "query": "is:unresolved", + * "queryType": 0, + * "timeWindow": 3600, + * }, + * ], + * ``` + * + * **Users Experiencing Errors Metric Monitor** + * ```json + * [ + * { + * "aggregate": "count_unique(tags[sentry:user])", + * "dataset" : "events", + * "environment": "prod", + * "eventTypes": ["default", "error"], + * "query": "is:unresolved", + * "queryType": 0, + * "timeWindow": 3600, + * }, + * ], + * ``` + * + * + * **Throughput Metric Monitor** + * ```json + * [ + * { + * "aggregate":"count(span.duration)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Duration Metric Monitor** + * ```json + * [ + * { + * "aggregate":"p95(span.duration)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Failure Rate Metric Monitor** + * ```json + * [ + * { + * "aggregate":"failure_rate()", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + * **Largest Contentful Paint Metric Monitor** + * ```json + * [ + * { + * "aggregate":"p95(measurements.lcp)", + * "dataset":"events_analytics_platform", + * "environment":"prod", + * "eventTypes":["trace_item_span"] + * "query":"", + * "queryType":1, + * "timeWindow":3600, + * "extrapolationMode":"unknown", + * }, + * ], + * ``` + * + */ + data_sources?: Array; + /** + * + * The issue detection type configuration. + * + * + * - `detectionType` + * - `static`: Threshold based monitor + * - `percent`: Change based monitor + * - `dynamic`: Dynamic monitor + * - `comparisonDelta`: If selecting a **change** detection type, the comparison delta is the time period at which to compare against in minutes. + * For example, a value of 3600 compares the metric tracked against data 1 hour ago. + * - `300`: 5 minutes + * - `900`: 15 minutes + * - `3600`: 1 hour + * - `86400`: 1 day + * - `604800`: 1 week + * - `2592000`: 1 month + * + * **Threshold** + * ```json + * { + * "detectionType": "static", + * } + * ``` + * **Change** + * ```json + * { + * "detectionType": "percent", + * "comparisonDelta": 3600, + * } + * ``` + * **Dynamic** + * ```json + * { + * "detectionType": "dynamic", + * } + * ``` + * + */ + config?: { + [key: string]: unknown; + }; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + condition_group?: { + id?: string; + /** + * * `any` + * * `any-short` + * * `all` + * * `none` + */ + logic_type: 'any' | 'any-short' | 'all' | 'none'; + conditions?: Array; + }; + /** + * + * The user or team who owns the monitor. + * + * **User** + * ```json + * "type": "user", + * "id": "12345", + * "name": "Jane Doe", + * "email": "jane.doe@sentry.io" + * ``` + * + * **Team** + * ```json + * "type": "team", + * "id": "123456789", + * "name": "example-team" + * ``` + * + */ + owner?: string | null; + /** + * A description of the monitor. Will be used in the resulting issue. + */ + description?: string | null; + /** + * Set to False if you want to disable the monitor. + */ + enabled?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the monitor you'd like to query. + */ + detector_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/detectors/{detector_id}/'; +}; + +export type UpdateAMonitorByIdErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAMonitorByIdResponses = { + 200: { + owner?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + } | null; + createdBy?: string | null; + latestGroup?: { + [key: string]: unknown; + } | null; + description?: string | null; + id: string; + projectId: string; + name: string; + type: string; + workflowIds: Array | null; + dateCreated: string; + dateUpdated: string; + dataSources: Array<{ + [key: string]: unknown; + }> | null; + conditionGroup: { + [key: string]: unknown; + } | null; + config: { + [key: string]: unknown; + }; + enabled: boolean; + openIssues: number; + }; +}; + +export type UpdateAMonitorByIdResponse = UpdateAMonitorByIdResponses[keyof UpdateAMonitorByIdResponses]; + +export type ListAnOrganizationSDiscoverSavedQueriesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * Limit the number of rows to return in the result. Default and maximum allowed is 100. + */ + per_page?: number; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + /** + * The name of the Discover query you'd like to filter by. + */ + query?: string; + /** + * The property to sort results by. If not specified, the results are sorted by query name. + * + * Available fields are: + * - `name` + * - `dateCreated` + * - `dateUpdated` + * - `mostPopular` + * - `recentlyViewed` + * - `myqueries` + * + */ + sortBy?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/'; +}; + +export type ListAnOrganizationSDiscoverSavedQueriesErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSDiscoverSavedQueriesResponses = { + 200: Array<{ + environment?: Array; + query?: string; + fields?: Array; + widths?: Array; + conditions?: Array; + aggregations?: Array; + range?: string; + start?: string; + end?: string; + orderby?: string; + limit?: string; + yAxis?: Array; + display?: string; + topEvents?: number; + interval?: string; + exploreQuery?: { + [key: string]: unknown; + }; + id: string; + name: string; + projects: Array; + version: number; + queryDataset: string; + datasetSource: string; + expired: boolean; + dateCreated: string; + dateUpdated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + }>; +}; + +export type ListAnOrganizationSDiscoverSavedQueriesResponse = ListAnOrganizationSDiscoverSavedQueriesResponses[keyof ListAnOrganizationSDiscoverSavedQueriesResponses]; + +export type CreateANewSavedQueryData = { + body: { + /** + * The user-defined saved query name. + */ + name: string; + /** + * The saved projects filter for this query. + */ + projects?: Array; + /** + * The dataset you would like to query. Note: `discover` is a **deprecated** value. The allowed values are: `error-events`, `transaction-like` + * + * * `discover` + * * `error-events` + * * `transaction-like` + */ + queryDataset?: 'discover' | 'error-events' | 'transaction-like'; + /** + * The saved start time for this saved query. + */ + start?: string | null; + /** + * The saved end time for this saved query. + */ + end?: string | null; + /** + * The saved time range period for this saved query. + */ + range?: string | null; + /** + * The fields, functions, or equations that can be requested for the query. At most 20 fields can be selected per request. Each field can be one of the following types: + * - A built-in key field. See possible fields in the [properties table](/product/sentry-basics/search/searchable-properties/#properties-table), under any field that is an event property. + * - example: `field=transaction` + * - A tag. Tags should use the `tag[]` formatting to avoid ambiguity with any fields + * - example: `field=tag[isEnterprise]` + * - A function which will be in the format of `function_name(parameters,...)`. See possible functions in the [query builder documentation](/product/discover-queries/query-builder/#stacking-functions). + * - when a function is included, Discover will group by any tags or fields + * - example: `field=count_if(transaction.duration,greater,300)` + * - An equation when prefixed with `equation|`. Read more about [equations here](/product/discover-queries/query-builder/query-equations/). + * - example: `field=equation|count_if(transaction.duration,greater,300) / count() * 100` + * + */ + fields?: Array | null; + /** + * How to order the query results. Must be something in the `field` list, excluding equations. + */ + orderby?: string | null; + /** + * The name of environments to filter by. + */ + environment?: Array | null; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + */ + query?: string | null; + /** + * Aggregate functions to be plotted on the chart. + */ + yAxis?: Array | null; + /** + * Visualization type for saved query chart. Allowed values are: + * - default + * - previous + * - top5 + * - daily + * - dailytop5 + * - bar + * + */ + display?: string | null; + /** + * Number of top events' timeseries to be visualized. + */ + topEvents?: number | null; + /** + * Resolution of the time series. + */ + interval?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/'; +}; + +export type CreateANewSavedQueryErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type CreateANewSavedQueryResponses = { + 201: { + environment?: Array; + query?: string; + fields?: Array; + widths?: Array; + conditions?: Array; + aggregations?: Array; + range?: string; + start?: string; + end?: string; + orderby?: string; + limit?: string; + yAxis?: Array; + display?: string; + topEvents?: number; + interval?: string; + exploreQuery?: { + [key: string]: unknown; + }; + id: string; + name: string; + projects: Array; + version: number; + queryDataset: string; + datasetSource: string; + expired: boolean; + dateCreated: string; + dateUpdated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + }; +}; + +export type CreateANewSavedQueryResponse = CreateANewSavedQueryResponses[keyof CreateANewSavedQueryResponses]; + +export type DeleteAnOrganizationSDiscoverSavedQueryData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the Discover query you'd like to retrieve. + */ + query_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/'; +}; + +export type DeleteAnOrganizationSDiscoverSavedQueryErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnOrganizationSDiscoverSavedQueryResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAnOrganizationSDiscoverSavedQueryResponse = DeleteAnOrganizationSDiscoverSavedQueryResponses[keyof DeleteAnOrganizationSDiscoverSavedQueryResponses]; + +export type RetrieveAnOrganizationSDiscoverSavedQueryData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the Discover query you'd like to retrieve. + */ + query_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/'; +}; + +export type RetrieveAnOrganizationSDiscoverSavedQueryErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAnOrganizationSDiscoverSavedQueryResponses = { + 200: { + environment?: Array; + query?: string; + fields?: Array; + widths?: Array; + conditions?: Array; + aggregations?: Array; + range?: string; + start?: string; + end?: string; + orderby?: string; + limit?: string; + yAxis?: Array; + display?: string; + topEvents?: number; + interval?: string; + exploreQuery?: { + [key: string]: unknown; + }; + id: string; + name: string; + projects: Array; + version: number; + queryDataset: string; + datasetSource: string; + expired: boolean; + dateCreated: string; + dateUpdated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + }; +}; + +export type RetrieveAnOrganizationSDiscoverSavedQueryResponse = RetrieveAnOrganizationSDiscoverSavedQueryResponses[keyof RetrieveAnOrganizationSDiscoverSavedQueryResponses]; + +export type EditAnOrganizationSDiscoverSavedQueryData = { + body: { + /** + * The user-defined saved query name. + */ + name: string; + /** + * The saved projects filter for this query. + */ + projects?: Array; + /** + * The dataset you would like to query. Note: `discover` is a **deprecated** value. The allowed values are: `error-events`, `transaction-like` + * + * * `discover` + * * `error-events` + * * `transaction-like` + */ + queryDataset?: 'discover' | 'error-events' | 'transaction-like'; + /** + * The saved start time for this saved query. + */ + start?: string | null; + /** + * The saved end time for this saved query. + */ + end?: string | null; + /** + * The saved time range period for this saved query. + */ + range?: string | null; + /** + * The fields, functions, or equations that can be requested for the query. At most 20 fields can be selected per request. Each field can be one of the following types: + * - A built-in key field. See possible fields in the [properties table](/product/sentry-basics/search/searchable-properties/#properties-table), under any field that is an event property. + * - example: `field=transaction` + * - A tag. Tags should use the `tag[]` formatting to avoid ambiguity with any fields + * - example: `field=tag[isEnterprise]` + * - A function which will be in the format of `function_name(parameters,...)`. See possible functions in the [query builder documentation](/product/discover-queries/query-builder/#stacking-functions). + * - when a function is included, Discover will group by any tags or fields + * - example: `field=count_if(transaction.duration,greater,300)` + * - An equation when prefixed with `equation|`. Read more about [equations here](/product/discover-queries/query-builder/query-equations/). + * - example: `field=equation|count_if(transaction.duration,greater,300) / count() * 100` + * + */ + fields?: Array | null; + /** + * How to order the query results. Must be something in the `field` list, excluding equations. + */ + orderby?: string | null; + /** + * The name of environments to filter by. + */ + environment?: Array | null; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + */ + query?: string | null; + /** + * Aggregate functions to be plotted on the chart. + */ + yAxis?: Array | null; + /** + * Visualization type for saved query chart. Allowed values are: + * - default + * - previous + * - top5 + * - daily + * - dailytop5 + * - bar + * + */ + display?: string | null; + /** + * Number of top events' timeseries to be visualized. + */ + topEvents?: number | null; + /** + * Resolution of the time series. + */ + interval?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the Discover query you'd like to retrieve. + */ + query_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/'; +}; + +export type EditAnOrganizationSDiscoverSavedQueryErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type EditAnOrganizationSDiscoverSavedQueryResponses = { + 200: { + environment?: Array; + query?: string; + fields?: Array; + widths?: Array; + conditions?: Array; + aggregations?: Array; + range?: string; + start?: string; + end?: string; + orderby?: string; + limit?: string; + yAxis?: Array; + display?: string; + topEvents?: number; + interval?: string; + exploreQuery?: { + [key: string]: unknown; + }; + id: string; + name: string; + projects: Array; + version: number; + queryDataset: string; + datasetSource: string; + expired: boolean; + dateCreated: string; + dateUpdated: string; + createdBy: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + }; +}; + +export type EditAnOrganizationSDiscoverSavedQueryResponse = EditAnOrganizationSDiscoverSavedQueryResponses[keyof EditAnOrganizationSDiscoverSavedQueryResponses]; + +export type ListAnOrganizationSEnvironmentsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The visibility of the environments to filter by. Defaults to `visible`. + */ + visibility?: 'all' | 'hidden' | 'visible'; + }; + url: '/api/0/organizations/{organization_id_or_slug}/environments/'; +}; + +export type ListAnOrganizationSEnvironmentsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAnOrganizationSEnvironmentsResponses = { + 200: Array<{ + id: string; + name: string; + }>; +}; + +export type ListAnOrganizationSEnvironmentsResponse = ListAnOrganizationSEnvironmentsResponses[keyof ListAnOrganizationSEnvironmentsResponses]; + +export type ResolveAnEventIdData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The event ID to look up. + */ + event_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/eventids/{event_id}/'; +}; + +export type ResolveAnEventIdErrors = { + /** + * Not Found + */ + 404: unknown; +}; + +export type ResolveAnEventIdResponses = { + 200: { + organizationSlug: string; + projectSlug: string; + groupId: string; + eventId: string; + event: { + id: string; + groupID: string | null; + eventID: string; + projectID: string; + message: string | null; + title: string; + location: string | null; + user: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: { + [key: string]: string; + } | null; + data?: { + [key: string]: unknown; + } | null; + } | null; + tags: Array<{ + query?: string; + key: string; + value: string; + }>; + platform: string; + dateReceived: string | null; + contexts: { + [key: string]: unknown; + } | null; + size: number | null; + entries: Array; + dist: string | null; + sdk: { + [key: string]: string; + }; + context: { + [key: string]: unknown; + } | null; + packages: { + [key: string]: unknown; + }; + type: string; + metadata: unknown; + errors: Array; + occurrence: unknown; + _meta: { + [key: string]: unknown; + }; + crashFile?: string | null; + culprit?: string | null; + dateCreated?: string; + fingerprints?: Array; + groupingConfig?: unknown; + startTimestamp?: string; + endTimestamp?: string; + measurements?: unknown; + breakdowns?: unknown; + }; + }; +}; + +export type ResolveAnEventIdResponse = ResolveAnEventIdResponses[keyof ResolveAnEventIdResponses]; + +export type QueryExploreEventsInTableFormatData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query: { + /** + * The fields, functions, or equations to request for the query. At most 20 fields can be selected per request. Each field can be one of the following types: + * - A built-in key field. See possible fields in the [properties table](/concepts/search/searchable-properties/), under any field that matches the dataset passed to the dataset parameter + * - example: `field=transaction` + * - A tag. Tags should use the `tag[{name}, {type}]` formatting to avoid ambiguity with any fields, + * - example: `field=tag[isEnterprise, string]` + * - example: `field=tag[numberOfBytes, number]` + * - A function which will be in the format of `function_name(parameters,...)`. See possible functions in the [query builder documentation](/product/discover-queries/query-builder/#stacking-functions). + * - when a function is included, Discover will group by any tags or fields + * - example: `field=count_if(transaction.duration,greater,300)` + * - An equation when prefixed with `equation|`. Read more about [equations here](/product/discover-queries/query-builder/query-equations/). + * - example: `field=equation|count_if(transaction.duration,greater,300) / count() * 100` + * + */ + field: Array; + /** + * Which dataset to query, changing datasets changes the available fields that can be queried + */ + dataset: 'logs' | 'profile_functions' | 'spans' | 'uptime_results'; + /** + * The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + end?: string; + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + start?: string; + /** + * The period of time for the query, will override the start & end parameters, a number followed by one of: + * - `d` for days + * - `h` for hours + * - `m` for minutes + * - `s` for seconds + * - `w` for weeks + * + * For example, `24h`, to mean query data starting from 24 hours ago to now. + */ + statsPeriod?: string; + /** + * Limit the number of rows to return in the result. Default and maximum allowed is 100. + */ + per_page?: number; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + * + * Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)` + * + */ + query?: string; + /** + * What to order the results of the query by. Must be something in the `field` list, excluding equations. + */ + sort?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/events/'; +}; + +export type QueryExploreEventsInTableFormatErrors = { + /** + * Invalid Query + */ + 400: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type QueryExploreEventsInTableFormatResponses = { + 200: { + data: Array<{ + [key: string]: unknown; + }>; + meta: { + fields: { + [key: string]: string; + }; + datasetReason?: string; + isMetricsData?: boolean; + isMetricsExtractedData?: boolean; + }; + }; +}; + +export type QueryExploreEventsInTableFormatResponse = QueryExploreEventsInTableFormatResponses[keyof QueryExploreEventsInTableFormatResponses]; + +export type QueryExploreEventsInTimeseriesFormatData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query: { + /** + * Which dataset to query, changing datasets changes the available fields that can be queried + */ + dataset: 'logs' | 'profile_functions' | 'spans' | 'uptime_results'; + /** + * The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + end?: string; + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + start?: string; + /** + * The period of time for the query, will override the start & end parameters, a number followed by one of: + * - `d` for days + * - `h` for hours + * - `m` for minutes + * - `s` for seconds + * - `w` for weeks + * + * For example, `24h`, to mean query data starting from 24 hours ago to now. + */ + statsPeriod?: string; + /** + * The number of top event results to return, must be between 1 and 10. + * When TopEvents is passed, both sort and groupBy are required parameters + */ + topEvents?: number; + /** + * The delta in seconds to return additional offset timeseries by + */ + comparisonDelta?: number; + /** + * The size of the bucket for the timeseries to have, must be a value smaller than the window being + * queried. If the interval is invalid a default interval will be selected instead + */ + interval?: number; + /** + * What to order the results of the query by. Must be something in the `field` list, excluding equations. + */ + sort?: string; + /** + * List of fields to group by, *Required* for topEvents queries as this and sort determine what the + * top events are + */ + groupBy?: Array; + /** + * The aggregate field to create the timeseries for, defaults to `count()` when not included + */ + yAxis?: string; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + * + * Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)` + * + */ + query?: string; + /** + * Whether to disable the use of extrapolation and return the sampled values, due to sampling the + * number returned may be less than the actual values sent to Sentry + */ + disableAggregateExtrapolation?: '0' | '1'; + /** + * Whether to throw an error when aggregates are passed in the query or groupBy + */ + preventMetricAggregates?: '0' | '1'; + /** + * Only applicable with TopEvents, whether to include the 'other' timeseries which represents all the + * events that aren't in the top groups. + */ + excludeOther?: '0' | '1'; + }; + url: '/api/0/organizations/{organization_id_or_slug}/events-timeseries/'; +}; + +export type QueryExploreEventsInTimeseriesFormatErrors = { + /** + * Invalid Query + */ + 400: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type QueryExploreEventsInTimeseriesFormatResponses = { + 200: { + meta?: { + dataset: string; + start: number; + end: number; + }; + timeSeries: Array<{ + values: Array<{ + timestamp: number; + value: number; + incomplete: boolean; + comparisonValue?: number; + sampleCount?: number; + sampleRate?: number | null; + confidence?: 'low' | 'high'; + incompleteReason?: string; + }>; + yAxis: string; + groupBy?: Array<{ + key: string; + value: string | null; + }>; + meta: { + order?: number; + isOther?: boolean; + valueUnit: string | null; + dataScanned?: 'partial' | 'full'; + valueType: string; + interval: number; + }; + }>; + }; +}; + +export type QueryExploreEventsInTimeseriesFormatResponse = QueryExploreEventsInTimeseriesFormatResponses[keyof QueryExploreEventsInTimeseriesFormatResponses]; + +export type CreateAnExternalUserData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The user ID in Sentry. + */ + user_id: number; + /** + * The associated name for the provider. + */ + external_name: string; + /** + * The provider of the external actor. + * + * * `github` + * * `github_enterprise` + * * `jira_server` + * * `slack` + * * `perforce` + * * `gitlab` + * * `msteams` + * * `custom_scm` + */ + provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm'; + /** + * The Integration ID. + */ + integration_id: number; + /** + * The external actor ID. + */ + readonly id: number; + /** + * The associated user ID for provider. + */ + external_id?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/external-users/'; +}; + +export type CreateAnExternalUserErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type CreateAnExternalUserResponses = { + 200: { + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }; + 201: { + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }; +}; + +export type CreateAnExternalUserResponse = CreateAnExternalUserResponses[keyof CreateAnExternalUserResponses]; + +export type DeleteAnExternalUserData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the external user object. This is returned when creating an external user. + */ + external_user_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/external-users/{external_user_id}/'; +}; + +export type DeleteAnExternalUserErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type DeleteAnExternalUserResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAnExternalUserResponse = DeleteAnExternalUserResponses[keyof DeleteAnExternalUserResponses]; + +export type UpdateAnExternalUserData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The user ID in Sentry. + */ + user_id: number; + /** + * The associated name for the provider. + */ + external_name: string; + /** + * The provider of the external actor. + * + * * `github` + * * `github_enterprise` + * * `jira_server` + * * `slack` + * * `perforce` + * * `gitlab` + * * `msteams` + * * `custom_scm` + */ + provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm'; + /** + * The Integration ID. + */ + integration_id: number; + /** + * The external actor ID. + */ + readonly id: number; + /** + * The associated user ID for provider. + */ + external_id?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the external user object. This is returned when creating an external user. + */ + external_user_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/external-users/{external_user_id}/'; +}; + +export type UpdateAnExternalUserErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type UpdateAnExternalUserResponses = { + 200: { + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }; +}; + +export type UpdateAnExternalUserResponse = UpdateAnExternalUserResponses[keyof UpdateAnExternalUserResponses]; + +export type RetrieveDataForwardersForAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/forwarding/'; +}; + +export type RetrieveDataForwardersForAnOrganizationResponses = { + 200: Array<{ + id: string; + organizationId: string; + isEnabled: boolean; + enrollNewProjects: boolean; + enrolledProjects: Array<{ + id: string; + slug: string; + platform: string | null; + }>; + provider: string; + config: { + [key: string]: string; + }; + projectConfigs: Array<{ + id: string; + isEnabled: boolean; + dataForwarderId: string; + project: { + id: string; + slug: string; + platform: string | null; + }; + overrides: { + [key: string]: string; + }; + effectiveConfig: { + [key: string]: string; + }; + dateAdded: string; + dateUpdated: string; + }>; + dateAdded: string; + dateUpdated: string; + }>; +}; + +export type RetrieveDataForwardersForAnOrganizationResponse = RetrieveDataForwardersForAnOrganizationResponses[keyof RetrieveDataForwardersForAnOrganizationResponses]; + +export type CreateADataForwarderForAnOrganizationData = { + body: { + /** + * The ID of the organization related to the data forwarder. + */ + organization_id: number; + /** + * The provider of the data forwarder. One of "segment", "sqs", or "splunk". + * + * * `segment` - Segment + * * `sqs` - Amazon SQS + * * `splunk` - Splunk + */ + provider: 'segment' | 'sqs' | 'splunk'; + /** + * Whether the data forwarder is enabled. + */ + is_enabled?: boolean; + /** + * Whether to enroll new projects automatically, after they're created. + */ + enroll_new_projects?: boolean; + /** + * The configuration for the data forwarder, specific to the provider type. + * For a 'sqs' provider, the required keys are queue_url, region, access_key, secret_key. If using a FIFO queue, you must also provide a message_group_id, though s3_bucket is optional. + * For a 'segment' provider, the required keys are write_key. + * For a 'splunk' provider, the required keys are instance_url, index, source, token. + */ + config?: { + [key: string]: string; + }; + /** + * The IDs of the projects connected to the data forwarder. Missing project IDs will be unenrolled if previously enrolled. + */ + project_ids?: Array; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/forwarding/'; +}; + +export type CreateADataForwarderForAnOrganizationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type CreateADataForwarderForAnOrganizationResponses = { + 201: { + id: string; + organizationId: string; + isEnabled: boolean; + enrollNewProjects: boolean; + enrolledProjects: Array<{ + id: string; + slug: string; + platform: string | null; + }>; + provider: string; + config: { + [key: string]: string; + }; + projectConfigs: Array<{ + id: string; + isEnabled: boolean; + dataForwarderId: string; + project: { + id: string; + slug: string; + platform: string | null; + }; + overrides: { + [key: string]: string; + }; + effectiveConfig: { + [key: string]: string; + }; + dateAdded: string; + dateUpdated: string; + }>; + dateAdded: string; + dateUpdated: string; + }; +}; + +export type CreateADataForwarderForAnOrganizationResponse = CreateADataForwarderForAnOrganizationResponses[keyof CreateADataForwarderForAnOrganizationResponses]; + +export type DeleteADataForwarderForAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the data forwarder you'd like to query. + */ + data_forwarder_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/forwarding/{data_forwarder_id}/'; +}; + +export type DeleteADataForwarderForAnOrganizationErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type DeleteADataForwarderForAnOrganizationResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteADataForwarderForAnOrganizationResponse = DeleteADataForwarderForAnOrganizationResponses[keyof DeleteADataForwarderForAnOrganizationResponses]; + +export type UpdateADataForwarderForAnOrganizationData = { + body: { + /** + * The ID of the organization related to the data forwarder. + */ + organization_id: number; + /** + * The provider of the data forwarder. One of "segment", "sqs", or "splunk". + * + * * `segment` - Segment + * * `sqs` - Amazon SQS + * * `splunk` - Splunk + */ + provider: 'segment' | 'sqs' | 'splunk'; + /** + * Whether the data forwarder is enabled. + */ + is_enabled?: boolean; + /** + * Whether to enroll new projects automatically, after they're created. + */ + enroll_new_projects?: boolean; + /** + * The configuration for the data forwarder, specific to the provider type. + * For a 'sqs' provider, the required keys are queue_url, region, access_key, secret_key. If using a FIFO queue, you must also provide a message_group_id, though s3_bucket is optional. + * For a 'segment' provider, the required keys are write_key. + * For a 'splunk' provider, the required keys are instance_url, index, source, token. + */ + config?: { + [key: string]: string; + }; + /** + * The IDs of the projects connected to the data forwarder. Missing project IDs will be unenrolled if previously enrolled. + */ + project_ids?: Array; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the data forwarder you'd like to query. + */ + data_forwarder_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/forwarding/{data_forwarder_id}/'; +}; + +export type UpdateADataForwarderForAnOrganizationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type UpdateADataForwarderForAnOrganizationResponses = { + 200: { + id: string; + organizationId: string; + isEnabled: boolean; + enrollNewProjects: boolean; + enrolledProjects: Array<{ + id: string; + slug: string; + platform: string | null; + }>; + provider: string; + config: { + [key: string]: string; + }; + projectConfigs: Array<{ + id: string; + isEnabled: boolean; + dataForwarderId: string; + project: { + id: string; + slug: string; + platform: string | null; + }; + overrides: { + [key: string]: string; + }; + effectiveConfig: { + [key: string]: string; + }; + dateAdded: string; + dateUpdated: string; + }>; + dateAdded: string; + dateUpdated: string; + }; +}; + +export type UpdateADataForwarderForAnOrganizationResponse = UpdateADataForwarderForAnOrganizationResponses[keyof UpdateADataForwarderForAnOrganizationResponses]; + +export type ListAnOrganizationSAvailableIntegrationsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * Specific integration provider to filter by such as `slack`. See our [Integrations Documentation](/product/integrations/) for an updated list of providers. + */ + providerKey?: string; + /** + * Integration features to filter by. See our [Integrations Documentation](/product/integrations/) for an updated list of features. Current available ones are: + * - `alert-rule` + * - `chat-unfurl` + * - `codeowners` + * - `commits` + * - `data-forwarding` + * - `deployment` + * - `enterprise-alert-rule` + * - `enterprise-incident-management` + * - `incident-management` + * - `issue-basic` + * - `issue-sync` + * - `mobile` + * - `serverless` + * - `session-replay` + * - `stacktrace-link` + * - `ticket-rules` + * + */ + features?: Array; + /** + * Specify `True` to fetch third-party integration configurations. Note that this can add several seconds to the response time. + */ + includeConfig?: boolean; + }; + url: '/api/0/organizations/{organization_id_or_slug}/integrations/'; +}; + +export type ListAnOrganizationSAvailableIntegrationsResponses = { + 200: Array<{ + id: string; + name: string; + icon: string | null; + domainName: string | null; + accountType: string | null; + scopes: Array | null; + status: string; + provider: unknown; + configOrganization: unknown; + configData: unknown; + externalId: string; + organizationId: number; + organizationIntegrationStatus: string; + gracePeriodEnd: string | null; + }>; +}; + +export type ListAnOrganizationSAvailableIntegrationsResponse = ListAnOrganizationSAvailableIntegrationsResponses[keyof ListAnOrganizationSAvailableIntegrationsResponses]; + +export type DeleteAnIntegrationForAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the integration installed on the organization. + */ + integration_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/integrations/{integration_id}/'; +}; + +export type DeleteAnIntegrationForAnOrganizationErrors = { + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnIntegrationForAnOrganizationResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAnIntegrationForAnOrganizationResponse = DeleteAnIntegrationForAnOrganizationResponses[keyof DeleteAnIntegrationForAnOrganizationResponses]; + +export type RetrieveAnIntegrationForAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the integration installed on the organization. + */ + integration_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/integrations/{integration_id}/'; +}; + +export type RetrieveAnIntegrationForAnOrganizationResponses = { + 200: { + id: string; + name: string; + icon: string | null; + domainName: string | null; + accountType: string | null; + scopes: Array | null; + status: string; + provider: unknown; + configOrganization: unknown; + configData: unknown; + externalId: string; + organizationId: number; + organizationIntegrationStatus: string; + gracePeriodEnd: string | null; + }; +}; + +export type RetrieveAnIntegrationForAnOrganizationResponse = RetrieveAnIntegrationForAnOrganizationResponses[keyof RetrieveAnIntegrationForAnOrganizationResponses]; + +export type BulkRemoveAnOrganizationSissuesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * The list of issue IDs to be removed. If not provided, it will attempt to remove the first 1000 issues. + */ + id?: Array; + /** + * An optional search query for filtering issues. A default query will apply if no view/query is set. For all results use this parameter with an empty string. + */ + query?: string; + /** + * The ID of the view to use. If no query is present, the view's query and filters will be applied. + */ + viewId?: string; + /** + * The sort order of the view. Options include 'Last Seen' (`date`), 'First Seen' (`new`), 'Trends' (`trends`), 'Events' (`freq`), 'Users' (`user`), and 'Date Added' (`inbox`). + */ + sort?: 'date' | 'freq' | 'inbox' | 'new' | 'trends' | 'user'; + /** + * The maximum number of issues to affect. The maximum is 100. + */ + limit?: number; + }; + url: '/api/0/organizations/{organization_id_or_slug}/issues/'; +}; + +export type BulkRemoveAnOrganizationSissuesErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type BulkRemoveAnOrganizationSissuesResponses = { + /** + * No Content + */ + 204: void; +}; + +export type BulkRemoveAnOrganizationSissuesResponse = BulkRemoveAnOrganizationSissuesResponses[keyof BulkRemoveAnOrganizationSissuesResponses]; + +export type ListAnOrganizationSissuesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * The period of time for the query, will override the start & end parameters, a number followed by one of: + * - `d` for days + * - `h` for hours + * - `m` for minutes + * - `s` for seconds + * - `w` for weeks + * + * For example, `24h`, to mean query data starting from 24 hours ago to now. + */ + statsPeriod?: string; + /** + * The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + start?: string; + /** + * The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + end?: string; + /** + * The timeline on which stats for the groups should be presented. + */ + groupStatsPeriod?: '' | '14d' | '24h' | 'auto'; + /** + * If this is set to `1` then the query will be parsed for issue short IDs. These may ignore other filters (e.g. projects), which is why it is an opt-in. + */ + shortIdLookup?: '0' | '1'; + /** + * An optional search query for filtering issues. A default query will apply if no view/query is set. For all results use this parameter with an empty string. + */ + query?: string; + /** + * The ID of the view to use. If no query is present, the view's query and filters will be applied. + */ + viewId?: string; + /** + * The sort order of the view. Options include 'Last Seen' (`date`), 'First Seen' (`new`), 'Trends' (`trends`), 'Events' (`freq`), 'Users' (`user`), and 'Date Added' (`inbox`). + */ + sort?: 'date' | 'freq' | 'inbox' | 'new' | 'trends' | 'user'; + /** + * The maximum number of issues to affect. The maximum is 100. + */ + limit?: number; + /** + * Additional data to include in the response. + */ + expand?: Array<'inbox' | 'integrationIssues' | 'latestEventHasAttachments' | 'owners' | 'pluginActions' | 'pluginIssues' | 'sentryAppIssues' | 'sessions'>; + /** + * Fields to remove from the response to improve query performance. + */ + collapse?: Array<'base' | 'filtered' | 'lifetime' | 'stats' | 'unhandled'>; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/issues/'; +}; + +export type ListAnOrganizationSissuesErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSissuesResponses = { + 200: Array<{ + id: string; + shareId: string; + shortId: string; + title: string; + culprit: string | null; + permalink: string; + logger: string | null; + level: string; + status: string; + statusDetails: { + autoResolved?: boolean; + ignoreCount?: number; + ignoreUntil?: string; + ignoreUserCount?: number; + ignoreUserWindow?: number; + ignoreWindow?: number; + actor?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + inNextRelease?: boolean; + inRelease?: string; + inCommit?: string; + pendingEvents?: number; + info?: unknown; + }; + substatus: string | null; + isPublic: boolean; + platform: string | null; + priority: string | null; + priorityLockedAt: string | null; + seerFixabilityScore: number | null; + seerAutofixLastTriggered: string | null; + project: { + id: string; + name: string; + slug: string; + platform: string | null; + }; + type: string; + issueType: string; + issueCategory: string; + metadata: { + [key: string]: unknown; + }; + numComments: number; + assignedTo: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + isBookmarked: boolean; + isSubscribed: boolean; + subscriptionDetails: { + disabled?: boolean; + reason?: string; + } | null; + hasSeen: boolean; + annotations: Array<{ + displayName: string; + url: string; + }>; + isUnhandled: boolean; + count: string; + userCount: number; + firstSeen: string | null; + lastSeen: string | null; + stats: { + [key: string]: unknown; + }; + lifetime: { + [key: string]: unknown; + }; + filtered: { + count: string; + userCount: number; + firstSeen: string | null; + lastSeen: string | null; + stats: { + [key: string]: unknown; + }; + } | null; + sessionCount: number; + inbox: { + reason: number; + reason_details: { + until: string | null; + count: number | null; + window: number | null; + user_count: number | null; + user_window: number | null; + } | null; + date_added: string; + }; + owners: { + type: string; + owner: string; + date_added: string; + }; + pluginActions: Array>; + pluginIssues: Array<{ + [key: string]: unknown; + }>; + integrationIssues: Array<{ + [key: string]: unknown; + }>; + sentryAppIssues: Array<{ + [key: string]: unknown; + }>; + latestEventHasAttachments: boolean; + }>; +}; + +export type ListAnOrganizationSissuesResponse = ListAnOrganizationSissuesResponses[keyof ListAnOrganizationSissuesResponses]; + +export type BulkMutateAnOrganizationSissuesData = { + body: { + /** + * If true, marks the issue as reviewed by the requestor. + */ + inbox: boolean; + /** + * Limit mutations to only issues with the given status. + * + * * `resolved` + * * `unresolved` + * * `ignored` + * * `resolvedInNextRelease` + * * `muted` + */ + status: 'resolved' | 'unresolved' | 'ignored' | 'resolvedInNextRelease' | 'muted'; + /** + * Additional details about the resolution. Status detail updates that include release data are only allowed for issues within a single project. + */ + statusDetails: { + /** + * If true, marks the issue as resolved in the next release. + */ + inNextRelease: boolean; + /** + * The version of the release that the issue should be resolved in.If set to `latest`, the latest release will be used. + */ + inRelease: string; + /** + * The commit data that the issue should use for resolution. + */ + inCommit?: { + /** + * The SHA of the resolving commit. + */ + commit: string; + /** + * The name of the repository (as it appears in Sentry). + */ + repository: string; + }; + /** + * Ignore the issue until for this many minutes. + */ + ignoreDuration: number; + /** + * Ignore the issue until it has occurred this many times in `ignoreWindow` minutes. + */ + ignoreCount: number; + /** + * Ignore the issue until it has occurred `ignoreCount` times in this many minutes. (Max: 1 week) + */ + ignoreWindow: number; + /** + * Ignore the issue until it has affected this many users in `ignoreUserWindow` minutes. + */ + ignoreUserCount: number; + /** + * Ignore the issue until it has affected `ignoreUserCount` users in this many minutes. (Max: 1 week) + */ + ignoreUserWindow: number; + }; + /** + * The new substatus of the issue. + * + * * `archived_until_escalating` + * * `archived_until_condition_met` + * * `archived_forever` + * * `escalating` + * * `ongoing` + * * `regressed` + * * `new` + */ + substatus: 'archived_until_escalating' | 'archived_until_condition_met' | 'archived_forever' | 'escalating' | 'ongoing' | 'regressed' | 'new' | null; + /** + * If true, marks the issue as seen by the requestor. + */ + hasSeen: boolean; + /** + * If true, bookmarks the issue for the requestor. + */ + isBookmarked: boolean; + /** + * If true, publishes the issue. + */ + isPublic: boolean; + /** + * If true, subscribes the requestor to the issue. + */ + isSubscribed: boolean; + /** + * If true, merges the issues together. + */ + merge: boolean; + /** + * If true, discards the issues instead of updating them. + */ + discard: boolean; + /** + * The user or team that should be assigned to the issues. Values take the form of ``, `user:`, ``, ``, or `team:`. + */ + assignedTo: string; + /** + * The priority that should be set for the issues + * + * * `low` + * * `medium` + * * `high` + */ + priority: 'low' | 'medium' | 'high'; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * The list of issue IDs to mutate. It is optional for status updates, in which an implicit `update all` is assumed. + */ + id?: Array; + /** + * An optional search query for filtering issues. A default query will apply if no view/query is set. For all results use this parameter with an empty string. + */ + query?: string; + /** + * The ID of the view to use. If no query is present, the view's query and filters will be applied. + */ + viewId?: string; + /** + * The sort order of the view. Options include 'Last Seen' (`date`), 'First Seen' (`new`), 'Trends' (`trends`), 'Events' (`freq`), 'Users' (`user`), and 'Date Added' (`inbox`). + */ + sort?: 'date' | 'freq' | 'inbox' | 'new' | 'trends' | 'user'; + /** + * The maximum number of issues to affect. The maximum is 100. + */ + limit?: number; + }; + url: '/api/0/organizations/{organization_id_or_slug}/issues/'; +}; + +export type BulkMutateAnOrganizationSissuesErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type BulkMutateAnOrganizationSissuesResponses = { + 200: { + assignedTo?: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + discard?: boolean; + hasSeen?: boolean; + inbox?: boolean; + isBookmarked?: boolean; + isPublic?: boolean; + isSubscribed?: boolean; + merge?: { + parent: string; + children: Array; + }; + priority?: string; + shareId?: string; + status?: string; + statusDetails?: { + inNextRelease?: boolean; + inRelease?: string; + inCommit?: { + commit: string; + repository: string; + }; + ignoreDuration?: number; + ignoreCount?: number; + ignoreWindow?: number; + ignoreUserCount?: number; + ignoreUserWindow?: number; + }; + subscriptionDetails?: { + disabled?: boolean; + reason?: string; + }; + substatus?: string; + }; + /** + * No Content + */ + 204: void; +}; + +export type BulkMutateAnOrganizationSissuesResponse = BulkMutateAnOrganizationSissuesResponses[keyof BulkMutateAnOrganizationSissuesResponses]; + +export type ListAnOrganizationSMembersData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/members/'; +}; + +export type ListAnOrganizationSMembersErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSMembersResponses = { + 200: Array<{ + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; + }>; +}; + +export type ListAnOrganizationSMembersResponse = ListAnOrganizationSMembersResponses[keyof ListAnOrganizationSMembersResponses]; + +export type AddAMemberToAnOrganizationData = { + body: { + /** + * The email address to send the invitation to. + */ + email: string; + /** + * The organization-level role of the new member. Roles include: + * + * * `billing` - Can manage payment and compliance details. + * * `member` - Can view and act on events, as well as view most other data within the organization. + * * `manager` - Has full management access to all teams and projects. Can also manage + * the organization's membership. + * * `owner` - Has unrestricted access to the organization, its data, and its + * settings. Can add, modify, and delete projects and members, as well as + * make billing and plan changes. + * * `admin` - Can edit global integrations, manage projects, and add/remove teams. + * They automatically assume the Team Admin role for teams they join. + * Note: This role can no longer be assigned in Business and Enterprise plans. Use `TeamRoles` instead. + * + */ + orgRole?: 'billing' | 'member' | 'manager' | 'owner' | 'admin'; + /** + * The team and team-roles assigned to the member. Team roles can be either: + * - `contributor` - Can view and act on issues. Depending on organization settings, they can also add team members. + * - `admin` - Has full management access to their team's membership and projects. + */ + teamRoles?: Array<{ + [key: string]: unknown; + }> | null; + /** + * Whether or not to send an invite notification through email. Defaults to True. + */ + sendInvite?: boolean; + /** + * Whether or not to re-invite a user who has already been invited to the organization. Defaults to True. + */ + reinvite?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/members/'; +}; + +export type AddAMemberToAnOrganizationErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type AddAMemberToAnOrganizationResponses = { + 201: { + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; + }; +}; + +export type AddAMemberToAnOrganizationResponse = AddAMemberToAnOrganizationResponses[keyof AddAMemberToAnOrganizationResponses]; + +export type DeleteAnOrganizationMemberData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the member to delete. + */ + member_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/'; +}; + +export type DeleteAnOrganizationMemberErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnOrganizationMemberResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAnOrganizationMemberResponse = DeleteAnOrganizationMemberResponses[keyof DeleteAnOrganizationMemberResponses]; + +export type RetrieveAnOrganizationMemberData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the organization member. + */ + member_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/'; +}; + +export type RetrieveAnOrganizationMemberErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAnOrganizationMemberResponses = { + 200: { + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + role?: string; + roleName?: string; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; + teams: Array; + teamRoles: Array<{ + teamSlug: string; + role: string | null; + }>; + invite_link: string | null; + isOnlyOwner: boolean; + orgRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + is_global: boolean; + isGlobal: boolean; + minimumTeamRole: string; + }>; + teamRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + isMinimumRoleFor: string | null; + }>; + }; +}; + +export type RetrieveAnOrganizationMemberResponse = RetrieveAnOrganizationMemberResponses[keyof RetrieveAnOrganizationMemberResponses]; + +export type UpdateAnOrganizationMemberSRolesData = { + body?: { + /** + * The organization role of the member. The options are: + * + * * `billing` - Can manage payment and compliance details. + * * `member` - Can view and act on events, as well as view most other data within the organization. + * * `manager` - Has full management access to all teams and projects. Can also manage + * the organization's membership. + * * `owner` - Has unrestricted access to the organization, its data, and its + * settings. Can add, modify, and delete projects and members, as well as + * make billing and plan changes. + * * `admin` - Can edit global integrations, manage projects, and add/remove teams. + * They automatically assume the Team Admin role for teams they join. + * Note: This role can no longer be assigned in Business and Enterprise plans. Use `TeamRoles` instead. + * + */ + orgRole?: 'billing' | 'member' | 'manager' | 'owner' | 'admin'; + /** + * + * Configures the team role of the member. The two roles are: + * - `contributor` - Can view and act on issues. Depending on organization settings, they can also add team members. + * - `admin` - Has full management access to their team's membership and projects. + * ```json + * { + * "teamRoles": [ + * { + * "teamSlug": "ancient-gabelers", + * "role": "admin" + * }, + * { + * "teamSlug": "powerful-abolitionist", + * "role": "contributor" + * } + * ] + * } + * ``` + * + */ + teamRoles?: Array<{ + [key: string]: unknown; + }> | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the member to update. + */ + member_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/'; +}; + +export type UpdateAnOrganizationMemberSRolesErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type UpdateAnOrganizationMemberSRolesResponses = { + 200: { + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + role?: string; + roleName?: string; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; + teams: Array; + teamRoles: Array<{ + teamSlug: string; + role: string | null; + }>; + invite_link: string | null; + isOnlyOwner: boolean; + orgRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + is_global: boolean; + isGlobal: boolean; + minimumTeamRole: string; + }>; + teamRoleList: Array<{ + id: string; + name: string; + desc: string; + scopes: Array; + allowed: boolean; + isAllowed: boolean; + isRetired: boolean; + isTeamRolesAllowed: boolean; + isMinimumRoleFor: string | null; + }>; + }; +}; + +export type UpdateAnOrganizationMemberSRolesResponse = UpdateAnOrganizationMemberSRolesResponses[keyof UpdateAnOrganizationMemberSRolesResponses]; + +export type DeleteAnOrganizationMemberFromATeamData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the organization member to delete from the team + */ + member_id: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/teams/{team_id_or_slug}/'; +}; + +export type DeleteAnOrganizationMemberFromATeamErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * This team is managed through your organization's identity provider + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnOrganizationMemberFromATeamResponses = { + 200: { + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + }; +}; + +export type DeleteAnOrganizationMemberFromATeamResponse = DeleteAnOrganizationMemberFromATeamResponses[keyof DeleteAnOrganizationMemberFromATeamResponses]; + +export type AddAnOrganizationMemberToATeamData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the organization member to add to the team + */ + member_id: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/teams/{team_id_or_slug}/'; +}; + +export type AddAnOrganizationMemberToATeamErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * This team is managed through your organization's identity provider + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type AddAnOrganizationMemberToATeamResponses = { + 201: { + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + }; + /** + * Accepted + */ + 202: unknown; + /** + * No Content + */ + 204: void; +}; + +export type AddAnOrganizationMemberToATeamResponse = AddAnOrganizationMemberToATeamResponses[keyof AddAnOrganizationMemberToATeamResponses]; + +export type UpdateAnOrganizationMemberSTeamRoleData = { + body?: { + /** + * The team-level role to switch to. Valid roles include: + * + * * `contributor` - Contributors can view and act on events, as well as view most other data within the team's projects. + * * `admin` - Admin privileges on the team. They can create and remove projects, and can manage the team's memberships. + */ + teamRole?: 'contributor' | 'admin'; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the organization member to change + */ + member_id: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/members/{member_id}/teams/{team_id_or_slug}/'; +}; + +export type UpdateAnOrganizationMemberSTeamRoleErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAnOrganizationMemberSTeamRoleResponses = { + 200: { + isActive: boolean; + teamRole: 'contributor' | 'admin'; + }; +}; + +export type UpdateAnOrganizationMemberSTeamRoleResponse = UpdateAnOrganizationMemberSTeamRoleResponses[keyof UpdateAnOrganizationMemberSTeamRoleResponses]; + +export type RetrieveMonitorsForAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * The owner of the monitor, in the format `user:id` or `team:id`. May be specified multiple times. + */ + owner?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/monitors/'; +}; + +export type RetrieveMonitorsForAnOrganizationErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveMonitorsForAnOrganizationResponses = { + 200: Array<{ + alertRule?: { + targets: Array<{ + targetIdentifier: number; + targetType: string; + }>; + environment: string; + }; + id: string; + name: string; + slug: string; + status: string; + isMuted: boolean; + isUpserting: boolean; + config: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + dateCreated: string; + project: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }; + environments: { + name: string; + status: string; + isMuted: boolean; + dateCreated: string; + lastCheckIn: string; + nextCheckIn: string; + nextCheckInLatest: string; + activeIncident: { + startingTimestamp: string; + resolvingTimestamp: string; + brokenNotice: { + userNotifiedTimestamp: string; + environmentMutedTimestamp: string; + } | null; + } | null; + }; + owner: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + }>; +}; + +export type RetrieveMonitorsForAnOrganizationResponse = RetrieveMonitorsForAnOrganizationResponses[keyof RetrieveMonitorsForAnOrganizationResponses]; + +export type CreateAMonitorData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The project slug to associate the monitor to. + */ + project: string; + /** + * Name of the monitor. Used for notifications. If not set the slug will be derived from your monitor name. + */ + name: string; + /** + * The configuration for the monitor. + */ + config: { + /** + * Currently supports "crontab" or "interval" + * + * * `crontab` + * * `interval` + */ + schedule_type?: 'crontab' | 'interval'; + /** + * Varies depending on the schedule_type. Is either a crontab string, or a 2 element tuple for intervals (e.g. [1, 'day']) + */ + schedule: unknown; + /** + * How long (in minutes) after the expected checkin time will we wait until we consider the checkin to have been missed. + */ + checkin_margin?: number | null; + /** + * How long (in minutes) is the checkin allowed to run for in CheckInStatus.IN_PROGRESS before it is considered failed. + */ + max_runtime?: number | null; + /** + * tz database style timezone string + * + * * `Africa/Abidjan` + * * `Africa/Accra` + * * `Africa/Addis_Ababa` + * * `Africa/Algiers` + * * `Africa/Asmara` + * * `Africa/Asmera` + * * `Africa/Bamako` + * * `Africa/Bangui` + * * `Africa/Banjul` + * * `Africa/Bissau` + * * `Africa/Blantyre` + * * `Africa/Brazzaville` + * * `Africa/Bujumbura` + * * `Africa/Cairo` + * * `Africa/Casablanca` + * * `Africa/Ceuta` + * * `Africa/Conakry` + * * `Africa/Dakar` + * * `Africa/Dar_es_Salaam` + * * `Africa/Djibouti` + * * `Africa/Douala` + * * `Africa/El_Aaiun` + * * `Africa/Freetown` + * * `Africa/Gaborone` + * * `Africa/Harare` + * * `Africa/Johannesburg` + * * `Africa/Juba` + * * `Africa/Kampala` + * * `Africa/Khartoum` + * * `Africa/Kigali` + * * `Africa/Kinshasa` + * * `Africa/Lagos` + * * `Africa/Libreville` + * * `Africa/Lome` + * * `Africa/Luanda` + * * `Africa/Lubumbashi` + * * `Africa/Lusaka` + * * `Africa/Malabo` + * * `Africa/Maputo` + * * `Africa/Maseru` + * * `Africa/Mbabane` + * * `Africa/Mogadishu` + * * `Africa/Monrovia` + * * `Africa/Nairobi` + * * `Africa/Ndjamena` + * * `Africa/Niamey` + * * `Africa/Nouakchott` + * * `Africa/Ouagadougou` + * * `Africa/Porto-Novo` + * * `Africa/Sao_Tome` + * * `Africa/Timbuktu` + * * `Africa/Tripoli` + * * `Africa/Tunis` + * * `Africa/Windhoek` + * * `America/Adak` + * * `America/Anchorage` + * * `America/Anguilla` + * * `America/Antigua` + * * `America/Araguaina` + * * `America/Argentina/Buenos_Aires` + * * `America/Argentina/Catamarca` + * * `America/Argentina/ComodRivadavia` + * * `America/Argentina/Cordoba` + * * `America/Argentina/Jujuy` + * * `America/Argentina/La_Rioja` + * * `America/Argentina/Mendoza` + * * `America/Argentina/Rio_Gallegos` + * * `America/Argentina/Salta` + * * `America/Argentina/San_Juan` + * * `America/Argentina/San_Luis` + * * `America/Argentina/Tucuman` + * * `America/Argentina/Ushuaia` + * * `America/Aruba` + * * `America/Asuncion` + * * `America/Atikokan` + * * `America/Atka` + * * `America/Bahia` + * * `America/Bahia_Banderas` + * * `America/Barbados` + * * `America/Belem` + * * `America/Belize` + * * `America/Blanc-Sablon` + * * `America/Boa_Vista` + * * `America/Bogota` + * * `America/Boise` + * * `America/Buenos_Aires` + * * `America/Cambridge_Bay` + * * `America/Campo_Grande` + * * `America/Cancun` + * * `America/Caracas` + * * `America/Catamarca` + * * `America/Cayenne` + * * `America/Cayman` + * * `America/Chicago` + * * `America/Chihuahua` + * * `America/Ciudad_Juarez` + * * `America/Coral_Harbour` + * * `America/Cordoba` + * * `America/Costa_Rica` + * * `America/Coyhaique` + * * `America/Creston` + * * `America/Cuiaba` + * * `America/Curacao` + * * `America/Danmarkshavn` + * * `America/Dawson` + * * `America/Dawson_Creek` + * * `America/Denver` + * * `America/Detroit` + * * `America/Dominica` + * * `America/Edmonton` + * * `America/Eirunepe` + * * `America/El_Salvador` + * * `America/Ensenada` + * * `America/Fort_Nelson` + * * `America/Fort_Wayne` + * * `America/Fortaleza` + * * `America/Glace_Bay` + * * `America/Godthab` + * * `America/Goose_Bay` + * * `America/Grand_Turk` + * * `America/Grenada` + * * `America/Guadeloupe` + * * `America/Guatemala` + * * `America/Guayaquil` + * * `America/Guyana` + * * `America/Halifax` + * * `America/Havana` + * * `America/Hermosillo` + * * `America/Indiana/Indianapolis` + * * `America/Indiana/Knox` + * * `America/Indiana/Marengo` + * * `America/Indiana/Petersburg` + * * `America/Indiana/Tell_City` + * * `America/Indiana/Vevay` + * * `America/Indiana/Vincennes` + * * `America/Indiana/Winamac` + * * `America/Indianapolis` + * * `America/Inuvik` + * * `America/Iqaluit` + * * `America/Jamaica` + * * `America/Jujuy` + * * `America/Juneau` + * * `America/Kentucky/Louisville` + * * `America/Kentucky/Monticello` + * * `America/Knox_IN` + * * `America/Kralendijk` + * * `America/La_Paz` + * * `America/Lima` + * * `America/Los_Angeles` + * * `America/Louisville` + * * `America/Lower_Princes` + * * `America/Maceio` + * * `America/Managua` + * * `America/Manaus` + * * `America/Marigot` + * * `America/Martinique` + * * `America/Matamoros` + * * `America/Mazatlan` + * * `America/Mendoza` + * * `America/Menominee` + * * `America/Merida` + * * `America/Metlakatla` + * * `America/Mexico_City` + * * `America/Miquelon` + * * `America/Moncton` + * * `America/Monterrey` + * * `America/Montevideo` + * * `America/Montreal` + * * `America/Montserrat` + * * `America/Nassau` + * * `America/New_York` + * * `America/Nipigon` + * * `America/Nome` + * * `America/Noronha` + * * `America/North_Dakota/Beulah` + * * `America/North_Dakota/Center` + * * `America/North_Dakota/New_Salem` + * * `America/Nuuk` + * * `America/Ojinaga` + * * `America/Panama` + * * `America/Pangnirtung` + * * `America/Paramaribo` + * * `America/Phoenix` + * * `America/Port-au-Prince` + * * `America/Port_of_Spain` + * * `America/Porto_Acre` + * * `America/Porto_Velho` + * * `America/Puerto_Rico` + * * `America/Punta_Arenas` + * * `America/Rainy_River` + * * `America/Rankin_Inlet` + * * `America/Recife` + * * `America/Regina` + * * `America/Resolute` + * * `America/Rio_Branco` + * * `America/Rosario` + * * `America/Santa_Isabel` + * * `America/Santarem` + * * `America/Santiago` + * * `America/Santo_Domingo` + * * `America/Sao_Paulo` + * * `America/Scoresbysund` + * * `America/Shiprock` + * * `America/Sitka` + * * `America/St_Barthelemy` + * * `America/St_Johns` + * * `America/St_Kitts` + * * `America/St_Lucia` + * * `America/St_Thomas` + * * `America/St_Vincent` + * * `America/Swift_Current` + * * `America/Tegucigalpa` + * * `America/Thule` + * * `America/Thunder_Bay` + * * `America/Tijuana` + * * `America/Toronto` + * * `America/Tortola` + * * `America/Vancouver` + * * `America/Virgin` + * * `America/Whitehorse` + * * `America/Winnipeg` + * * `America/Yakutat` + * * `America/Yellowknife` + * * `Antarctica/Casey` + * * `Antarctica/Davis` + * * `Antarctica/DumontDUrville` + * * `Antarctica/Macquarie` + * * `Antarctica/Mawson` + * * `Antarctica/McMurdo` + * * `Antarctica/Palmer` + * * `Antarctica/Rothera` + * * `Antarctica/South_Pole` + * * `Antarctica/Syowa` + * * `Antarctica/Troll` + * * `Antarctica/Vostok` + * * `Arctic/Longyearbyen` + * * `Asia/Aden` + * * `Asia/Almaty` + * * `Asia/Amman` + * * `Asia/Anadyr` + * * `Asia/Aqtau` + * * `Asia/Aqtobe` + * * `Asia/Ashgabat` + * * `Asia/Ashkhabad` + * * `Asia/Atyrau` + * * `Asia/Baghdad` + * * `Asia/Bahrain` + * * `Asia/Baku` + * * `Asia/Bangkok` + * * `Asia/Barnaul` + * * `Asia/Beirut` + * * `Asia/Bishkek` + * * `Asia/Brunei` + * * `Asia/Calcutta` + * * `Asia/Chita` + * * `Asia/Choibalsan` + * * `Asia/Chongqing` + * * `Asia/Chungking` + * * `Asia/Colombo` + * * `Asia/Dacca` + * * `Asia/Damascus` + * * `Asia/Dhaka` + * * `Asia/Dili` + * * `Asia/Dubai` + * * `Asia/Dushanbe` + * * `Asia/Famagusta` + * * `Asia/Gaza` + * * `Asia/Harbin` + * * `Asia/Hebron` + * * `Asia/Ho_Chi_Minh` + * * `Asia/Hong_Kong` + * * `Asia/Hovd` + * * `Asia/Irkutsk` + * * `Asia/Istanbul` + * * `Asia/Jakarta` + * * `Asia/Jayapura` + * * `Asia/Jerusalem` + * * `Asia/Kabul` + * * `Asia/Kamchatka` + * * `Asia/Karachi` + * * `Asia/Kashgar` + * * `Asia/Kathmandu` + * * `Asia/Katmandu` + * * `Asia/Khandyga` + * * `Asia/Kolkata` + * * `Asia/Krasnoyarsk` + * * `Asia/Kuala_Lumpur` + * * `Asia/Kuching` + * * `Asia/Kuwait` + * * `Asia/Macao` + * * `Asia/Macau` + * * `Asia/Magadan` + * * `Asia/Makassar` + * * `Asia/Manila` + * * `Asia/Muscat` + * * `Asia/Nicosia` + * * `Asia/Novokuznetsk` + * * `Asia/Novosibirsk` + * * `Asia/Omsk` + * * `Asia/Oral` + * * `Asia/Phnom_Penh` + * * `Asia/Pontianak` + * * `Asia/Pyongyang` + * * `Asia/Qatar` + * * `Asia/Qostanay` + * * `Asia/Qyzylorda` + * * `Asia/Rangoon` + * * `Asia/Riyadh` + * * `Asia/Saigon` + * * `Asia/Sakhalin` + * * `Asia/Samarkand` + * * `Asia/Seoul` + * * `Asia/Shanghai` + * * `Asia/Singapore` + * * `Asia/Srednekolymsk` + * * `Asia/Taipei` + * * `Asia/Tashkent` + * * `Asia/Tbilisi` + * * `Asia/Tehran` + * * `Asia/Tel_Aviv` + * * `Asia/Thimbu` + * * `Asia/Thimphu` + * * `Asia/Tokyo` + * * `Asia/Tomsk` + * * `Asia/Ujung_Pandang` + * * `Asia/Ulaanbaatar` + * * `Asia/Ulan_Bator` + * * `Asia/Urumqi` + * * `Asia/Ust-Nera` + * * `Asia/Vientiane` + * * `Asia/Vladivostok` + * * `Asia/Yakutsk` + * * `Asia/Yangon` + * * `Asia/Yekaterinburg` + * * `Asia/Yerevan` + * * `Atlantic/Azores` + * * `Atlantic/Bermuda` + * * `Atlantic/Canary` + * * `Atlantic/Cape_Verde` + * * `Atlantic/Faeroe` + * * `Atlantic/Faroe` + * * `Atlantic/Jan_Mayen` + * * `Atlantic/Madeira` + * * `Atlantic/Reykjavik` + * * `Atlantic/South_Georgia` + * * `Atlantic/St_Helena` + * * `Atlantic/Stanley` + * * `Australia/ACT` + * * `Australia/Adelaide` + * * `Australia/Brisbane` + * * `Australia/Broken_Hill` + * * `Australia/Canberra` + * * `Australia/Currie` + * * `Australia/Darwin` + * * `Australia/Eucla` + * * `Australia/Hobart` + * * `Australia/LHI` + * * `Australia/Lindeman` + * * `Australia/Lord_Howe` + * * `Australia/Melbourne` + * * `Australia/NSW` + * * `Australia/North` + * * `Australia/Perth` + * * `Australia/Queensland` + * * `Australia/South` + * * `Australia/Sydney` + * * `Australia/Tasmania` + * * `Australia/Victoria` + * * `Australia/West` + * * `Australia/Yancowinna` + * * `Brazil/Acre` + * * `Brazil/DeNoronha` + * * `Brazil/East` + * * `Brazil/West` + * * `CET` + * * `CST6CDT` + * * `Canada/Atlantic` + * * `Canada/Central` + * * `Canada/Eastern` + * * `Canada/Mountain` + * * `Canada/Newfoundland` + * * `Canada/Pacific` + * * `Canada/Saskatchewan` + * * `Canada/Yukon` + * * `Chile/Continental` + * * `Chile/EasterIsland` + * * `Cuba` + * * `EET` + * * `EST` + * * `EST5EDT` + * * `Egypt` + * * `Eire` + * * `Etc/GMT` + * * `Etc/GMT+0` + * * `Etc/GMT+1` + * * `Etc/GMT+10` + * * `Etc/GMT+11` + * * `Etc/GMT+12` + * * `Etc/GMT+2` + * * `Etc/GMT+3` + * * `Etc/GMT+4` + * * `Etc/GMT+5` + * * `Etc/GMT+6` + * * `Etc/GMT+7` + * * `Etc/GMT+8` + * * `Etc/GMT+9` + * * `Etc/GMT-0` + * * `Etc/GMT-1` + * * `Etc/GMT-10` + * * `Etc/GMT-11` + * * `Etc/GMT-12` + * * `Etc/GMT-13` + * * `Etc/GMT-14` + * * `Etc/GMT-2` + * * `Etc/GMT-3` + * * `Etc/GMT-4` + * * `Etc/GMT-5` + * * `Etc/GMT-6` + * * `Etc/GMT-7` + * * `Etc/GMT-8` + * * `Etc/GMT-9` + * * `Etc/GMT0` + * * `Etc/Greenwich` + * * `Etc/UCT` + * * `Etc/UTC` + * * `Etc/Universal` + * * `Etc/Zulu` + * * `Europe/Amsterdam` + * * `Europe/Andorra` + * * `Europe/Astrakhan` + * * `Europe/Athens` + * * `Europe/Belfast` + * * `Europe/Belgrade` + * * `Europe/Berlin` + * * `Europe/Bratislava` + * * `Europe/Brussels` + * * `Europe/Bucharest` + * * `Europe/Budapest` + * * `Europe/Busingen` + * * `Europe/Chisinau` + * * `Europe/Copenhagen` + * * `Europe/Dublin` + * * `Europe/Gibraltar` + * * `Europe/Guernsey` + * * `Europe/Helsinki` + * * `Europe/Isle_of_Man` + * * `Europe/Istanbul` + * * `Europe/Jersey` + * * `Europe/Kaliningrad` + * * `Europe/Kiev` + * * `Europe/Kirov` + * * `Europe/Kyiv` + * * `Europe/Lisbon` + * * `Europe/Ljubljana` + * * `Europe/London` + * * `Europe/Luxembourg` + * * `Europe/Madrid` + * * `Europe/Malta` + * * `Europe/Mariehamn` + * * `Europe/Minsk` + * * `Europe/Monaco` + * * `Europe/Moscow` + * * `Europe/Nicosia` + * * `Europe/Oslo` + * * `Europe/Paris` + * * `Europe/Podgorica` + * * `Europe/Prague` + * * `Europe/Riga` + * * `Europe/Rome` + * * `Europe/Samara` + * * `Europe/San_Marino` + * * `Europe/Sarajevo` + * * `Europe/Saratov` + * * `Europe/Simferopol` + * * `Europe/Skopje` + * * `Europe/Sofia` + * * `Europe/Stockholm` + * * `Europe/Tallinn` + * * `Europe/Tirane` + * * `Europe/Tiraspol` + * * `Europe/Ulyanovsk` + * * `Europe/Uzhgorod` + * * `Europe/Vaduz` + * * `Europe/Vatican` + * * `Europe/Vienna` + * * `Europe/Vilnius` + * * `Europe/Volgograd` + * * `Europe/Warsaw` + * * `Europe/Zagreb` + * * `Europe/Zaporozhye` + * * `Europe/Zurich` + * * `GB` + * * `GB-Eire` + * * `GMT` + * * `GMT+0` + * * `GMT-0` + * * `GMT0` + * * `Greenwich` + * * `HST` + * * `Hongkong` + * * `Iceland` + * * `Indian/Antananarivo` + * * `Indian/Chagos` + * * `Indian/Christmas` + * * `Indian/Cocos` + * * `Indian/Comoro` + * * `Indian/Kerguelen` + * * `Indian/Mahe` + * * `Indian/Maldives` + * * `Indian/Mauritius` + * * `Indian/Mayotte` + * * `Indian/Reunion` + * * `Iran` + * * `Israel` + * * `Jamaica` + * * `Japan` + * * `Kwajalein` + * * `Libya` + * * `MET` + * * `MST` + * * `MST7MDT` + * * `Mexico/BajaNorte` + * * `Mexico/BajaSur` + * * `Mexico/General` + * * `NZ` + * * `NZ-CHAT` + * * `Navajo` + * * `PRC` + * * `PST8PDT` + * * `Pacific/Apia` + * * `Pacific/Auckland` + * * `Pacific/Bougainville` + * * `Pacific/Chatham` + * * `Pacific/Chuuk` + * * `Pacific/Easter` + * * `Pacific/Efate` + * * `Pacific/Enderbury` + * * `Pacific/Fakaofo` + * * `Pacific/Fiji` + * * `Pacific/Funafuti` + * * `Pacific/Galapagos` + * * `Pacific/Gambier` + * * `Pacific/Guadalcanal` + * * `Pacific/Guam` + * * `Pacific/Honolulu` + * * `Pacific/Johnston` + * * `Pacific/Kanton` + * * `Pacific/Kiritimati` + * * `Pacific/Kosrae` + * * `Pacific/Kwajalein` + * * `Pacific/Majuro` + * * `Pacific/Marquesas` + * * `Pacific/Midway` + * * `Pacific/Nauru` + * * `Pacific/Niue` + * * `Pacific/Norfolk` + * * `Pacific/Noumea` + * * `Pacific/Pago_Pago` + * * `Pacific/Palau` + * * `Pacific/Pitcairn` + * * `Pacific/Pohnpei` + * * `Pacific/Ponape` + * * `Pacific/Port_Moresby` + * * `Pacific/Rarotonga` + * * `Pacific/Saipan` + * * `Pacific/Samoa` + * * `Pacific/Tahiti` + * * `Pacific/Tarawa` + * * `Pacific/Tongatapu` + * * `Pacific/Truk` + * * `Pacific/Wake` + * * `Pacific/Wallis` + * * `Pacific/Yap` + * * `Poland` + * * `Portugal` + * * `ROC` + * * `ROK` + * * `Singapore` + * * `Turkey` + * * `UCT` + * * `US/Alaska` + * * `US/Aleutian` + * * `US/Arizona` + * * `US/Central` + * * `US/East-Indiana` + * * `US/Eastern` + * * `US/Hawaii` + * * `US/Indiana-Starke` + * * `US/Michigan` + * * `US/Mountain` + * * `US/Pacific` + * * `US/Samoa` + * * `UTC` + * * `Universal` + * * `W-SU` + * * `WET` + * * `Zulu` + * * `localtime` + */ + timezone?: 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Addis_Ababa' | 'Africa/Algiers' | 'Africa/Asmara' | 'Africa/Asmera' | 'Africa/Bamako' | 'Africa/Bangui' | 'Africa/Banjul' | 'Africa/Bissau' | 'Africa/Blantyre' | 'Africa/Brazzaville' | 'Africa/Bujumbura' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/Conakry' | 'Africa/Dakar' | 'Africa/Dar_es_Salaam' | 'Africa/Djibouti' | 'Africa/Douala' | 'Africa/El_Aaiun' | 'Africa/Freetown' | 'Africa/Gaborone' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' | 'Africa/Kinshasa' | 'Africa/Lagos' | 'Africa/Libreville' | 'Africa/Lome' | 'Africa/Luanda' | 'Africa/Lubumbashi' | 'Africa/Lusaka' | 'Africa/Malabo' | 'Africa/Maputo' | 'Africa/Maseru' | 'Africa/Mbabane' | 'Africa/Mogadishu' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'Africa/Ndjamena' | 'Africa/Niamey' | 'Africa/Nouakchott' | 'Africa/Ouagadougou' | 'Africa/Porto-Novo' | 'Africa/Sao_Tome' | 'Africa/Timbuktu' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Anguilla' | 'America/Antigua' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/ComodRivadavia' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Aruba' | 'America/Asuncion' | 'America/Atikokan' | 'America/Atka' | 'America/Bahia' | 'America/Bahia_Banderas' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Buenos_Aires' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Catamarca' | 'America/Cayenne' | 'America/Cayman' | 'America/Chicago' | 'America/Chihuahua' | 'America/Ciudad_Juarez' | 'America/Coral_Harbour' | 'America/Cordoba' | 'America/Costa_Rica' | 'America/Coyhaique' | 'America/Creston' | 'America/Cuiaba' | 'America/Curacao' | 'America/Danmarkshavn' | 'America/Dawson' | 'America/Dawson_Creek' | 'America/Denver' | 'America/Detroit' | 'America/Dominica' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Ensenada' | 'America/Fort_Nelson' | 'America/Fort_Wayne' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Grenada' | 'America/Guadeloupe' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Indianapolis' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Indianapolis' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Jujuy' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/Knox_IN' | 'America/Kralendijk' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Louisville' | 'America/Lower_Princes' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Marigot' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Mendoza' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Montreal' | 'America/Montserrat' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Nuuk' | 'America/Ojinaga' | 'America/Panama' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Port_of_Spain' | 'America/Porto_Acre' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Rio_Branco' | 'America/Rosario' | 'America/Santa_Isabel' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Shiprock' | 'America/Sitka' | 'America/St_Barthelemy' | 'America/St_Johns' | 'America/St_Kitts' | 'America/St_Lucia' | 'America/St_Thomas' | 'America/St_Vincent' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Tijuana' | 'America/Toronto' | 'America/Tortola' | 'America/Vancouver' | 'America/Virgin' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Antarctica/McMurdo' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/South_Pole' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Arctic/Longyearbyen' | 'Asia/Aden' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Ashkhabad' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Bahrain' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Calcutta' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Chongqing' | 'Asia/Chungking' | 'Asia/Colombo' | 'Asia/Dacca' | 'Asia/Damascus' | 'Asia/Dhaka' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Harbin' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Asia/Istanbul' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kashgar' | 'Asia/Kathmandu' | 'Asia/Katmandu' | 'Asia/Khandyga' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Kuwait' | 'Asia/Macao' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Muscat' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Phnom_Penh' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qatar' | 'Asia/Qostanay' | 'Asia/Qyzylorda' | 'Asia/Rangoon' | 'Asia/Riyadh' | 'Asia/Saigon' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tel_Aviv' | 'Asia/Thimbu' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ujung_Pandang' | 'Asia/Ulaanbaatar' | 'Asia/Ulan_Bator' | 'Asia/Urumqi' | 'Asia/Ust-Nera' | 'Asia/Vientiane' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faeroe' | 'Atlantic/Faroe' | 'Atlantic/Jan_Mayen' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/St_Helena' | 'Atlantic/Stanley' | 'Australia/ACT' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Canberra' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/LHI' | 'Australia/Lindeman' | 'Australia/Lord_Howe' | 'Australia/Melbourne' | 'Australia/NSW' | 'Australia/North' | 'Australia/Perth' | 'Australia/Queensland' | 'Australia/South' | 'Australia/Sydney' | 'Australia/Tasmania' | 'Australia/Victoria' | 'Australia/West' | 'Australia/Yancowinna' | 'Brazil/Acre' | 'Brazil/DeNoronha' | 'Brazil/East' | 'Brazil/West' | 'CET' | 'CST6CDT' | 'Canada/Atlantic' | 'Canada/Central' | 'Canada/Eastern' | 'Canada/Mountain' | 'Canada/Newfoundland' | 'Canada/Pacific' | 'Canada/Saskatchewan' | 'Canada/Yukon' | 'Chile/Continental' | 'Chile/EasterIsland' | 'Cuba' | 'EET' | 'EST' | 'EST5EDT' | 'Egypt' | 'Eire' | 'Etc/GMT' | 'Etc/GMT+0' | 'Etc/GMT+1' | 'Etc/GMT+10' | 'Etc/GMT+11' | 'Etc/GMT+12' | 'Etc/GMT+2' | 'Etc/GMT+3' | 'Etc/GMT+4' | 'Etc/GMT+5' | 'Etc/GMT+6' | 'Etc/GMT+7' | 'Etc/GMT+8' | 'Etc/GMT+9' | 'Etc/GMT-0' | 'Etc/GMT-1' | 'Etc/GMT-10' | 'Etc/GMT-11' | 'Etc/GMT-12' | 'Etc/GMT-13' | 'Etc/GMT-14' | 'Etc/GMT-2' | 'Etc/GMT-3' | 'Etc/GMT-4' | 'Etc/GMT-5' | 'Etc/GMT-6' | 'Etc/GMT-7' | 'Etc/GMT-8' | 'Etc/GMT-9' | 'Etc/GMT0' | 'Etc/Greenwich' | 'Etc/UCT' | 'Etc/UTC' | 'Etc/Universal' | 'Etc/Zulu' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/Belfast' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Busingen' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Gibraltar' | 'Europe/Guernsey' | 'Europe/Helsinki' | 'Europe/Isle_of_Man' | 'Europe/Istanbul' | 'Europe/Jersey' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Kyiv' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Mariehamn' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Nicosia' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Podgorica' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/San_Marino' | 'Europe/Sarajevo' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Tiraspol' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vaduz' | 'Europe/Vatican' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zaporozhye' | 'Europe/Zurich' | 'GB' | 'GB-Eire' | 'GMT' | 'GMT+0' | 'GMT-0' | 'GMT0' | 'Greenwich' | 'HST' | 'Hongkong' | 'Iceland' | 'Indian/Antananarivo' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Comoro' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Mayotte' | 'Indian/Reunion' | 'Iran' | 'Israel' | 'Jamaica' | 'Japan' | 'Kwajalein' | 'Libya' | 'MET' | 'MST' | 'MST7MDT' | 'Mexico/BajaNorte' | 'Mexico/BajaSur' | 'Mexico/General' | 'NZ' | 'NZ-CHAT' | 'Navajo' | 'PRC' | 'PST8PDT' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Bougainville' | 'Pacific/Chatham' | 'Pacific/Chuuk' | 'Pacific/Easter' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Johnston' | 'Pacific/Kanton' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Kwajalein' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Midway' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Ponape' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Saipan' | 'Pacific/Samoa' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Truk' | 'Pacific/Wake' | 'Pacific/Wallis' | 'Pacific/Yap' | 'Poland' | 'Portugal' | 'ROC' | 'ROK' | 'Singapore' | 'Turkey' | 'UCT' | 'US/Alaska' | 'US/Aleutian' | 'US/Arizona' | 'US/Central' | 'US/East-Indiana' | 'US/Eastern' | 'US/Hawaii' | 'US/Indiana-Starke' | 'US/Michigan' | 'US/Mountain' | 'US/Pacific' | 'US/Samoa' | 'UTC' | 'Universal' | 'W-SU' | 'WET' | 'Zulu' | 'localtime' | ''; + /** + * How many consecutive missed or failed check-ins in a row before creating a new issue. + */ + failure_issue_threshold?: number | null; + /** + * How many successful check-ins in a row before resolving an issue. + */ + recovery_threshold?: number | null; + }; + /** + * Uniquely identifies your monitor within your organization. Changing this slug will require updates to any instrumented check-in calls. + */ + slug?: string; + /** + * Status of the monitor. Disabled monitors will not accept events and will not count towards the monitor quota. + * + * * `active` + * * `disabled` + */ + status?: 'active' | 'disabled'; + /** + * The ID of the team or user that owns the monitor. (eg. user:51 or team:6) + */ + owner?: string | null; + /** + * Disable creation of monitor incidents + */ + is_muted?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/monitors/'; +}; + +export type CreateAMonitorErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type CreateAMonitorResponses = { + 201: { + alertRule?: { + targets: Array<{ + targetIdentifier: number; + targetType: string; + }>; + environment: string; + }; + id: string; + name: string; + slug: string; + status: string; + isMuted: boolean; + isUpserting: boolean; + config: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + dateCreated: string; + project: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }; + environments: { + name: string; + status: string; + isMuted: boolean; + dateCreated: string; + lastCheckIn: string; + nextCheckIn: string; + nextCheckInLatest: string; + activeIncident: { + startingTimestamp: string; + resolvingTimestamp: string; + brokenNotice: { + userNotifiedTimestamp: string; + environmentMutedTimestamp: string; + } | null; + } | null; + }; + owner: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + }; +}; + +export type CreateAMonitorResponse = CreateAMonitorResponses[keyof CreateAMonitorResponses]; + +export type DeleteAMonitorOrMonitorEnvironmentsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the monitor. + */ + monitor_id_or_slug: string; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/'; +}; + +export type DeleteAMonitorOrMonitorEnvironmentsErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAMonitorOrMonitorEnvironmentsResponses = { + /** + * Accepted + */ + 202: unknown; +}; + +export type RetrieveAMonitorData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the monitor. + */ + monitor_id_or_slug: string; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/'; +}; + +export type RetrieveAMonitorErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAMonitorResponses = { + 200: { + alertRule?: { + targets: Array<{ + targetIdentifier: number; + targetType: string; + }>; + environment: string; + }; + id: string; + name: string; + slug: string; + status: string; + isMuted: boolean; + isUpserting: boolean; + config: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + dateCreated: string; + project: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }; + environments: { + name: string; + status: string; + isMuted: boolean; + dateCreated: string; + lastCheckIn: string; + nextCheckIn: string; + nextCheckInLatest: string; + activeIncident: { + startingTimestamp: string; + resolvingTimestamp: string; + brokenNotice: { + userNotifiedTimestamp: string; + environmentMutedTimestamp: string; + } | null; + } | null; + }; + owner: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + }; +}; + +export type RetrieveAMonitorResponse = RetrieveAMonitorResponses[keyof RetrieveAMonitorResponses]; + +export type UpdateAMonitorData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The project slug to associate the monitor to. + */ + project: string; + /** + * Name of the monitor. Used for notifications. If not set the slug will be derived from your monitor name. + */ + name: string; + /** + * The configuration for the monitor. + */ + config: { + /** + * Currently supports "crontab" or "interval" + * + * * `crontab` + * * `interval` + */ + schedule_type?: 'crontab' | 'interval'; + /** + * Varies depending on the schedule_type. Is either a crontab string, or a 2 element tuple for intervals (e.g. [1, 'day']) + */ + schedule: unknown; + /** + * How long (in minutes) after the expected checkin time will we wait until we consider the checkin to have been missed. + */ + checkin_margin?: number | null; + /** + * How long (in minutes) is the checkin allowed to run for in CheckInStatus.IN_PROGRESS before it is considered failed. + */ + max_runtime?: number | null; + /** + * tz database style timezone string + * + * * `Africa/Abidjan` + * * `Africa/Accra` + * * `Africa/Addis_Ababa` + * * `Africa/Algiers` + * * `Africa/Asmara` + * * `Africa/Asmera` + * * `Africa/Bamako` + * * `Africa/Bangui` + * * `Africa/Banjul` + * * `Africa/Bissau` + * * `Africa/Blantyre` + * * `Africa/Brazzaville` + * * `Africa/Bujumbura` + * * `Africa/Cairo` + * * `Africa/Casablanca` + * * `Africa/Ceuta` + * * `Africa/Conakry` + * * `Africa/Dakar` + * * `Africa/Dar_es_Salaam` + * * `Africa/Djibouti` + * * `Africa/Douala` + * * `Africa/El_Aaiun` + * * `Africa/Freetown` + * * `Africa/Gaborone` + * * `Africa/Harare` + * * `Africa/Johannesburg` + * * `Africa/Juba` + * * `Africa/Kampala` + * * `Africa/Khartoum` + * * `Africa/Kigali` + * * `Africa/Kinshasa` + * * `Africa/Lagos` + * * `Africa/Libreville` + * * `Africa/Lome` + * * `Africa/Luanda` + * * `Africa/Lubumbashi` + * * `Africa/Lusaka` + * * `Africa/Malabo` + * * `Africa/Maputo` + * * `Africa/Maseru` + * * `Africa/Mbabane` + * * `Africa/Mogadishu` + * * `Africa/Monrovia` + * * `Africa/Nairobi` + * * `Africa/Ndjamena` + * * `Africa/Niamey` + * * `Africa/Nouakchott` + * * `Africa/Ouagadougou` + * * `Africa/Porto-Novo` + * * `Africa/Sao_Tome` + * * `Africa/Timbuktu` + * * `Africa/Tripoli` + * * `Africa/Tunis` + * * `Africa/Windhoek` + * * `America/Adak` + * * `America/Anchorage` + * * `America/Anguilla` + * * `America/Antigua` + * * `America/Araguaina` + * * `America/Argentina/Buenos_Aires` + * * `America/Argentina/Catamarca` + * * `America/Argentina/ComodRivadavia` + * * `America/Argentina/Cordoba` + * * `America/Argentina/Jujuy` + * * `America/Argentina/La_Rioja` + * * `America/Argentina/Mendoza` + * * `America/Argentina/Rio_Gallegos` + * * `America/Argentina/Salta` + * * `America/Argentina/San_Juan` + * * `America/Argentina/San_Luis` + * * `America/Argentina/Tucuman` + * * `America/Argentina/Ushuaia` + * * `America/Aruba` + * * `America/Asuncion` + * * `America/Atikokan` + * * `America/Atka` + * * `America/Bahia` + * * `America/Bahia_Banderas` + * * `America/Barbados` + * * `America/Belem` + * * `America/Belize` + * * `America/Blanc-Sablon` + * * `America/Boa_Vista` + * * `America/Bogota` + * * `America/Boise` + * * `America/Buenos_Aires` + * * `America/Cambridge_Bay` + * * `America/Campo_Grande` + * * `America/Cancun` + * * `America/Caracas` + * * `America/Catamarca` + * * `America/Cayenne` + * * `America/Cayman` + * * `America/Chicago` + * * `America/Chihuahua` + * * `America/Ciudad_Juarez` + * * `America/Coral_Harbour` + * * `America/Cordoba` + * * `America/Costa_Rica` + * * `America/Coyhaique` + * * `America/Creston` + * * `America/Cuiaba` + * * `America/Curacao` + * * `America/Danmarkshavn` + * * `America/Dawson` + * * `America/Dawson_Creek` + * * `America/Denver` + * * `America/Detroit` + * * `America/Dominica` + * * `America/Edmonton` + * * `America/Eirunepe` + * * `America/El_Salvador` + * * `America/Ensenada` + * * `America/Fort_Nelson` + * * `America/Fort_Wayne` + * * `America/Fortaleza` + * * `America/Glace_Bay` + * * `America/Godthab` + * * `America/Goose_Bay` + * * `America/Grand_Turk` + * * `America/Grenada` + * * `America/Guadeloupe` + * * `America/Guatemala` + * * `America/Guayaquil` + * * `America/Guyana` + * * `America/Halifax` + * * `America/Havana` + * * `America/Hermosillo` + * * `America/Indiana/Indianapolis` + * * `America/Indiana/Knox` + * * `America/Indiana/Marengo` + * * `America/Indiana/Petersburg` + * * `America/Indiana/Tell_City` + * * `America/Indiana/Vevay` + * * `America/Indiana/Vincennes` + * * `America/Indiana/Winamac` + * * `America/Indianapolis` + * * `America/Inuvik` + * * `America/Iqaluit` + * * `America/Jamaica` + * * `America/Jujuy` + * * `America/Juneau` + * * `America/Kentucky/Louisville` + * * `America/Kentucky/Monticello` + * * `America/Knox_IN` + * * `America/Kralendijk` + * * `America/La_Paz` + * * `America/Lima` + * * `America/Los_Angeles` + * * `America/Louisville` + * * `America/Lower_Princes` + * * `America/Maceio` + * * `America/Managua` + * * `America/Manaus` + * * `America/Marigot` + * * `America/Martinique` + * * `America/Matamoros` + * * `America/Mazatlan` + * * `America/Mendoza` + * * `America/Menominee` + * * `America/Merida` + * * `America/Metlakatla` + * * `America/Mexico_City` + * * `America/Miquelon` + * * `America/Moncton` + * * `America/Monterrey` + * * `America/Montevideo` + * * `America/Montreal` + * * `America/Montserrat` + * * `America/Nassau` + * * `America/New_York` + * * `America/Nipigon` + * * `America/Nome` + * * `America/Noronha` + * * `America/North_Dakota/Beulah` + * * `America/North_Dakota/Center` + * * `America/North_Dakota/New_Salem` + * * `America/Nuuk` + * * `America/Ojinaga` + * * `America/Panama` + * * `America/Pangnirtung` + * * `America/Paramaribo` + * * `America/Phoenix` + * * `America/Port-au-Prince` + * * `America/Port_of_Spain` + * * `America/Porto_Acre` + * * `America/Porto_Velho` + * * `America/Puerto_Rico` + * * `America/Punta_Arenas` + * * `America/Rainy_River` + * * `America/Rankin_Inlet` + * * `America/Recife` + * * `America/Regina` + * * `America/Resolute` + * * `America/Rio_Branco` + * * `America/Rosario` + * * `America/Santa_Isabel` + * * `America/Santarem` + * * `America/Santiago` + * * `America/Santo_Domingo` + * * `America/Sao_Paulo` + * * `America/Scoresbysund` + * * `America/Shiprock` + * * `America/Sitka` + * * `America/St_Barthelemy` + * * `America/St_Johns` + * * `America/St_Kitts` + * * `America/St_Lucia` + * * `America/St_Thomas` + * * `America/St_Vincent` + * * `America/Swift_Current` + * * `America/Tegucigalpa` + * * `America/Thule` + * * `America/Thunder_Bay` + * * `America/Tijuana` + * * `America/Toronto` + * * `America/Tortola` + * * `America/Vancouver` + * * `America/Virgin` + * * `America/Whitehorse` + * * `America/Winnipeg` + * * `America/Yakutat` + * * `America/Yellowknife` + * * `Antarctica/Casey` + * * `Antarctica/Davis` + * * `Antarctica/DumontDUrville` + * * `Antarctica/Macquarie` + * * `Antarctica/Mawson` + * * `Antarctica/McMurdo` + * * `Antarctica/Palmer` + * * `Antarctica/Rothera` + * * `Antarctica/South_Pole` + * * `Antarctica/Syowa` + * * `Antarctica/Troll` + * * `Antarctica/Vostok` + * * `Arctic/Longyearbyen` + * * `Asia/Aden` + * * `Asia/Almaty` + * * `Asia/Amman` + * * `Asia/Anadyr` + * * `Asia/Aqtau` + * * `Asia/Aqtobe` + * * `Asia/Ashgabat` + * * `Asia/Ashkhabad` + * * `Asia/Atyrau` + * * `Asia/Baghdad` + * * `Asia/Bahrain` + * * `Asia/Baku` + * * `Asia/Bangkok` + * * `Asia/Barnaul` + * * `Asia/Beirut` + * * `Asia/Bishkek` + * * `Asia/Brunei` + * * `Asia/Calcutta` + * * `Asia/Chita` + * * `Asia/Choibalsan` + * * `Asia/Chongqing` + * * `Asia/Chungking` + * * `Asia/Colombo` + * * `Asia/Dacca` + * * `Asia/Damascus` + * * `Asia/Dhaka` + * * `Asia/Dili` + * * `Asia/Dubai` + * * `Asia/Dushanbe` + * * `Asia/Famagusta` + * * `Asia/Gaza` + * * `Asia/Harbin` + * * `Asia/Hebron` + * * `Asia/Ho_Chi_Minh` + * * `Asia/Hong_Kong` + * * `Asia/Hovd` + * * `Asia/Irkutsk` + * * `Asia/Istanbul` + * * `Asia/Jakarta` + * * `Asia/Jayapura` + * * `Asia/Jerusalem` + * * `Asia/Kabul` + * * `Asia/Kamchatka` + * * `Asia/Karachi` + * * `Asia/Kashgar` + * * `Asia/Kathmandu` + * * `Asia/Katmandu` + * * `Asia/Khandyga` + * * `Asia/Kolkata` + * * `Asia/Krasnoyarsk` + * * `Asia/Kuala_Lumpur` + * * `Asia/Kuching` + * * `Asia/Kuwait` + * * `Asia/Macao` + * * `Asia/Macau` + * * `Asia/Magadan` + * * `Asia/Makassar` + * * `Asia/Manila` + * * `Asia/Muscat` + * * `Asia/Nicosia` + * * `Asia/Novokuznetsk` + * * `Asia/Novosibirsk` + * * `Asia/Omsk` + * * `Asia/Oral` + * * `Asia/Phnom_Penh` + * * `Asia/Pontianak` + * * `Asia/Pyongyang` + * * `Asia/Qatar` + * * `Asia/Qostanay` + * * `Asia/Qyzylorda` + * * `Asia/Rangoon` + * * `Asia/Riyadh` + * * `Asia/Saigon` + * * `Asia/Sakhalin` + * * `Asia/Samarkand` + * * `Asia/Seoul` + * * `Asia/Shanghai` + * * `Asia/Singapore` + * * `Asia/Srednekolymsk` + * * `Asia/Taipei` + * * `Asia/Tashkent` + * * `Asia/Tbilisi` + * * `Asia/Tehran` + * * `Asia/Tel_Aviv` + * * `Asia/Thimbu` + * * `Asia/Thimphu` + * * `Asia/Tokyo` + * * `Asia/Tomsk` + * * `Asia/Ujung_Pandang` + * * `Asia/Ulaanbaatar` + * * `Asia/Ulan_Bator` + * * `Asia/Urumqi` + * * `Asia/Ust-Nera` + * * `Asia/Vientiane` + * * `Asia/Vladivostok` + * * `Asia/Yakutsk` + * * `Asia/Yangon` + * * `Asia/Yekaterinburg` + * * `Asia/Yerevan` + * * `Atlantic/Azores` + * * `Atlantic/Bermuda` + * * `Atlantic/Canary` + * * `Atlantic/Cape_Verde` + * * `Atlantic/Faeroe` + * * `Atlantic/Faroe` + * * `Atlantic/Jan_Mayen` + * * `Atlantic/Madeira` + * * `Atlantic/Reykjavik` + * * `Atlantic/South_Georgia` + * * `Atlantic/St_Helena` + * * `Atlantic/Stanley` + * * `Australia/ACT` + * * `Australia/Adelaide` + * * `Australia/Brisbane` + * * `Australia/Broken_Hill` + * * `Australia/Canberra` + * * `Australia/Currie` + * * `Australia/Darwin` + * * `Australia/Eucla` + * * `Australia/Hobart` + * * `Australia/LHI` + * * `Australia/Lindeman` + * * `Australia/Lord_Howe` + * * `Australia/Melbourne` + * * `Australia/NSW` + * * `Australia/North` + * * `Australia/Perth` + * * `Australia/Queensland` + * * `Australia/South` + * * `Australia/Sydney` + * * `Australia/Tasmania` + * * `Australia/Victoria` + * * `Australia/West` + * * `Australia/Yancowinna` + * * `Brazil/Acre` + * * `Brazil/DeNoronha` + * * `Brazil/East` + * * `Brazil/West` + * * `CET` + * * `CST6CDT` + * * `Canada/Atlantic` + * * `Canada/Central` + * * `Canada/Eastern` + * * `Canada/Mountain` + * * `Canada/Newfoundland` + * * `Canada/Pacific` + * * `Canada/Saskatchewan` + * * `Canada/Yukon` + * * `Chile/Continental` + * * `Chile/EasterIsland` + * * `Cuba` + * * `EET` + * * `EST` + * * `EST5EDT` + * * `Egypt` + * * `Eire` + * * `Etc/GMT` + * * `Etc/GMT+0` + * * `Etc/GMT+1` + * * `Etc/GMT+10` + * * `Etc/GMT+11` + * * `Etc/GMT+12` + * * `Etc/GMT+2` + * * `Etc/GMT+3` + * * `Etc/GMT+4` + * * `Etc/GMT+5` + * * `Etc/GMT+6` + * * `Etc/GMT+7` + * * `Etc/GMT+8` + * * `Etc/GMT+9` + * * `Etc/GMT-0` + * * `Etc/GMT-1` + * * `Etc/GMT-10` + * * `Etc/GMT-11` + * * `Etc/GMT-12` + * * `Etc/GMT-13` + * * `Etc/GMT-14` + * * `Etc/GMT-2` + * * `Etc/GMT-3` + * * `Etc/GMT-4` + * * `Etc/GMT-5` + * * `Etc/GMT-6` + * * `Etc/GMT-7` + * * `Etc/GMT-8` + * * `Etc/GMT-9` + * * `Etc/GMT0` + * * `Etc/Greenwich` + * * `Etc/UCT` + * * `Etc/UTC` + * * `Etc/Universal` + * * `Etc/Zulu` + * * `Europe/Amsterdam` + * * `Europe/Andorra` + * * `Europe/Astrakhan` + * * `Europe/Athens` + * * `Europe/Belfast` + * * `Europe/Belgrade` + * * `Europe/Berlin` + * * `Europe/Bratislava` + * * `Europe/Brussels` + * * `Europe/Bucharest` + * * `Europe/Budapest` + * * `Europe/Busingen` + * * `Europe/Chisinau` + * * `Europe/Copenhagen` + * * `Europe/Dublin` + * * `Europe/Gibraltar` + * * `Europe/Guernsey` + * * `Europe/Helsinki` + * * `Europe/Isle_of_Man` + * * `Europe/Istanbul` + * * `Europe/Jersey` + * * `Europe/Kaliningrad` + * * `Europe/Kiev` + * * `Europe/Kirov` + * * `Europe/Kyiv` + * * `Europe/Lisbon` + * * `Europe/Ljubljana` + * * `Europe/London` + * * `Europe/Luxembourg` + * * `Europe/Madrid` + * * `Europe/Malta` + * * `Europe/Mariehamn` + * * `Europe/Minsk` + * * `Europe/Monaco` + * * `Europe/Moscow` + * * `Europe/Nicosia` + * * `Europe/Oslo` + * * `Europe/Paris` + * * `Europe/Podgorica` + * * `Europe/Prague` + * * `Europe/Riga` + * * `Europe/Rome` + * * `Europe/Samara` + * * `Europe/San_Marino` + * * `Europe/Sarajevo` + * * `Europe/Saratov` + * * `Europe/Simferopol` + * * `Europe/Skopje` + * * `Europe/Sofia` + * * `Europe/Stockholm` + * * `Europe/Tallinn` + * * `Europe/Tirane` + * * `Europe/Tiraspol` + * * `Europe/Ulyanovsk` + * * `Europe/Uzhgorod` + * * `Europe/Vaduz` + * * `Europe/Vatican` + * * `Europe/Vienna` + * * `Europe/Vilnius` + * * `Europe/Volgograd` + * * `Europe/Warsaw` + * * `Europe/Zagreb` + * * `Europe/Zaporozhye` + * * `Europe/Zurich` + * * `GB` + * * `GB-Eire` + * * `GMT` + * * `GMT+0` + * * `GMT-0` + * * `GMT0` + * * `Greenwich` + * * `HST` + * * `Hongkong` + * * `Iceland` + * * `Indian/Antananarivo` + * * `Indian/Chagos` + * * `Indian/Christmas` + * * `Indian/Cocos` + * * `Indian/Comoro` + * * `Indian/Kerguelen` + * * `Indian/Mahe` + * * `Indian/Maldives` + * * `Indian/Mauritius` + * * `Indian/Mayotte` + * * `Indian/Reunion` + * * `Iran` + * * `Israel` + * * `Jamaica` + * * `Japan` + * * `Kwajalein` + * * `Libya` + * * `MET` + * * `MST` + * * `MST7MDT` + * * `Mexico/BajaNorte` + * * `Mexico/BajaSur` + * * `Mexico/General` + * * `NZ` + * * `NZ-CHAT` + * * `Navajo` + * * `PRC` + * * `PST8PDT` + * * `Pacific/Apia` + * * `Pacific/Auckland` + * * `Pacific/Bougainville` + * * `Pacific/Chatham` + * * `Pacific/Chuuk` + * * `Pacific/Easter` + * * `Pacific/Efate` + * * `Pacific/Enderbury` + * * `Pacific/Fakaofo` + * * `Pacific/Fiji` + * * `Pacific/Funafuti` + * * `Pacific/Galapagos` + * * `Pacific/Gambier` + * * `Pacific/Guadalcanal` + * * `Pacific/Guam` + * * `Pacific/Honolulu` + * * `Pacific/Johnston` + * * `Pacific/Kanton` + * * `Pacific/Kiritimati` + * * `Pacific/Kosrae` + * * `Pacific/Kwajalein` + * * `Pacific/Majuro` + * * `Pacific/Marquesas` + * * `Pacific/Midway` + * * `Pacific/Nauru` + * * `Pacific/Niue` + * * `Pacific/Norfolk` + * * `Pacific/Noumea` + * * `Pacific/Pago_Pago` + * * `Pacific/Palau` + * * `Pacific/Pitcairn` + * * `Pacific/Pohnpei` + * * `Pacific/Ponape` + * * `Pacific/Port_Moresby` + * * `Pacific/Rarotonga` + * * `Pacific/Saipan` + * * `Pacific/Samoa` + * * `Pacific/Tahiti` + * * `Pacific/Tarawa` + * * `Pacific/Tongatapu` + * * `Pacific/Truk` + * * `Pacific/Wake` + * * `Pacific/Wallis` + * * `Pacific/Yap` + * * `Poland` + * * `Portugal` + * * `ROC` + * * `ROK` + * * `Singapore` + * * `Turkey` + * * `UCT` + * * `US/Alaska` + * * `US/Aleutian` + * * `US/Arizona` + * * `US/Central` + * * `US/East-Indiana` + * * `US/Eastern` + * * `US/Hawaii` + * * `US/Indiana-Starke` + * * `US/Michigan` + * * `US/Mountain` + * * `US/Pacific` + * * `US/Samoa` + * * `UTC` + * * `Universal` + * * `W-SU` + * * `WET` + * * `Zulu` + * * `localtime` + */ + timezone?: 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Addis_Ababa' | 'Africa/Algiers' | 'Africa/Asmara' | 'Africa/Asmera' | 'Africa/Bamako' | 'Africa/Bangui' | 'Africa/Banjul' | 'Africa/Bissau' | 'Africa/Blantyre' | 'Africa/Brazzaville' | 'Africa/Bujumbura' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/Conakry' | 'Africa/Dakar' | 'Africa/Dar_es_Salaam' | 'Africa/Djibouti' | 'Africa/Douala' | 'Africa/El_Aaiun' | 'Africa/Freetown' | 'Africa/Gaborone' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' | 'Africa/Kinshasa' | 'Africa/Lagos' | 'Africa/Libreville' | 'Africa/Lome' | 'Africa/Luanda' | 'Africa/Lubumbashi' | 'Africa/Lusaka' | 'Africa/Malabo' | 'Africa/Maputo' | 'Africa/Maseru' | 'Africa/Mbabane' | 'Africa/Mogadishu' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'Africa/Ndjamena' | 'Africa/Niamey' | 'Africa/Nouakchott' | 'Africa/Ouagadougou' | 'Africa/Porto-Novo' | 'Africa/Sao_Tome' | 'Africa/Timbuktu' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Anguilla' | 'America/Antigua' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/ComodRivadavia' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Aruba' | 'America/Asuncion' | 'America/Atikokan' | 'America/Atka' | 'America/Bahia' | 'America/Bahia_Banderas' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Buenos_Aires' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Catamarca' | 'America/Cayenne' | 'America/Cayman' | 'America/Chicago' | 'America/Chihuahua' | 'America/Ciudad_Juarez' | 'America/Coral_Harbour' | 'America/Cordoba' | 'America/Costa_Rica' | 'America/Coyhaique' | 'America/Creston' | 'America/Cuiaba' | 'America/Curacao' | 'America/Danmarkshavn' | 'America/Dawson' | 'America/Dawson_Creek' | 'America/Denver' | 'America/Detroit' | 'America/Dominica' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Ensenada' | 'America/Fort_Nelson' | 'America/Fort_Wayne' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Grenada' | 'America/Guadeloupe' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Indianapolis' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Indianapolis' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Jujuy' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/Knox_IN' | 'America/Kralendijk' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Louisville' | 'America/Lower_Princes' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Marigot' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Mendoza' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Montreal' | 'America/Montserrat' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Nuuk' | 'America/Ojinaga' | 'America/Panama' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Port_of_Spain' | 'America/Porto_Acre' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Rio_Branco' | 'America/Rosario' | 'America/Santa_Isabel' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Shiprock' | 'America/Sitka' | 'America/St_Barthelemy' | 'America/St_Johns' | 'America/St_Kitts' | 'America/St_Lucia' | 'America/St_Thomas' | 'America/St_Vincent' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Tijuana' | 'America/Toronto' | 'America/Tortola' | 'America/Vancouver' | 'America/Virgin' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Antarctica/McMurdo' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/South_Pole' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Arctic/Longyearbyen' | 'Asia/Aden' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Ashkhabad' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Bahrain' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Calcutta' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Chongqing' | 'Asia/Chungking' | 'Asia/Colombo' | 'Asia/Dacca' | 'Asia/Damascus' | 'Asia/Dhaka' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Harbin' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Asia/Istanbul' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kashgar' | 'Asia/Kathmandu' | 'Asia/Katmandu' | 'Asia/Khandyga' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Kuwait' | 'Asia/Macao' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Muscat' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Phnom_Penh' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qatar' | 'Asia/Qostanay' | 'Asia/Qyzylorda' | 'Asia/Rangoon' | 'Asia/Riyadh' | 'Asia/Saigon' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tel_Aviv' | 'Asia/Thimbu' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ujung_Pandang' | 'Asia/Ulaanbaatar' | 'Asia/Ulan_Bator' | 'Asia/Urumqi' | 'Asia/Ust-Nera' | 'Asia/Vientiane' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faeroe' | 'Atlantic/Faroe' | 'Atlantic/Jan_Mayen' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/St_Helena' | 'Atlantic/Stanley' | 'Australia/ACT' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Canberra' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/LHI' | 'Australia/Lindeman' | 'Australia/Lord_Howe' | 'Australia/Melbourne' | 'Australia/NSW' | 'Australia/North' | 'Australia/Perth' | 'Australia/Queensland' | 'Australia/South' | 'Australia/Sydney' | 'Australia/Tasmania' | 'Australia/Victoria' | 'Australia/West' | 'Australia/Yancowinna' | 'Brazil/Acre' | 'Brazil/DeNoronha' | 'Brazil/East' | 'Brazil/West' | 'CET' | 'CST6CDT' | 'Canada/Atlantic' | 'Canada/Central' | 'Canada/Eastern' | 'Canada/Mountain' | 'Canada/Newfoundland' | 'Canada/Pacific' | 'Canada/Saskatchewan' | 'Canada/Yukon' | 'Chile/Continental' | 'Chile/EasterIsland' | 'Cuba' | 'EET' | 'EST' | 'EST5EDT' | 'Egypt' | 'Eire' | 'Etc/GMT' | 'Etc/GMT+0' | 'Etc/GMT+1' | 'Etc/GMT+10' | 'Etc/GMT+11' | 'Etc/GMT+12' | 'Etc/GMT+2' | 'Etc/GMT+3' | 'Etc/GMT+4' | 'Etc/GMT+5' | 'Etc/GMT+6' | 'Etc/GMT+7' | 'Etc/GMT+8' | 'Etc/GMT+9' | 'Etc/GMT-0' | 'Etc/GMT-1' | 'Etc/GMT-10' | 'Etc/GMT-11' | 'Etc/GMT-12' | 'Etc/GMT-13' | 'Etc/GMT-14' | 'Etc/GMT-2' | 'Etc/GMT-3' | 'Etc/GMT-4' | 'Etc/GMT-5' | 'Etc/GMT-6' | 'Etc/GMT-7' | 'Etc/GMT-8' | 'Etc/GMT-9' | 'Etc/GMT0' | 'Etc/Greenwich' | 'Etc/UCT' | 'Etc/UTC' | 'Etc/Universal' | 'Etc/Zulu' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/Belfast' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Busingen' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Gibraltar' | 'Europe/Guernsey' | 'Europe/Helsinki' | 'Europe/Isle_of_Man' | 'Europe/Istanbul' | 'Europe/Jersey' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Kyiv' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Mariehamn' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Nicosia' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Podgorica' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/San_Marino' | 'Europe/Sarajevo' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Tiraspol' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vaduz' | 'Europe/Vatican' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zaporozhye' | 'Europe/Zurich' | 'GB' | 'GB-Eire' | 'GMT' | 'GMT+0' | 'GMT-0' | 'GMT0' | 'Greenwich' | 'HST' | 'Hongkong' | 'Iceland' | 'Indian/Antananarivo' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Comoro' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Mayotte' | 'Indian/Reunion' | 'Iran' | 'Israel' | 'Jamaica' | 'Japan' | 'Kwajalein' | 'Libya' | 'MET' | 'MST' | 'MST7MDT' | 'Mexico/BajaNorte' | 'Mexico/BajaSur' | 'Mexico/General' | 'NZ' | 'NZ-CHAT' | 'Navajo' | 'PRC' | 'PST8PDT' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Bougainville' | 'Pacific/Chatham' | 'Pacific/Chuuk' | 'Pacific/Easter' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Johnston' | 'Pacific/Kanton' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Kwajalein' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Midway' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Ponape' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Saipan' | 'Pacific/Samoa' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Truk' | 'Pacific/Wake' | 'Pacific/Wallis' | 'Pacific/Yap' | 'Poland' | 'Portugal' | 'ROC' | 'ROK' | 'Singapore' | 'Turkey' | 'UCT' | 'US/Alaska' | 'US/Aleutian' | 'US/Arizona' | 'US/Central' | 'US/East-Indiana' | 'US/Eastern' | 'US/Hawaii' | 'US/Indiana-Starke' | 'US/Michigan' | 'US/Mountain' | 'US/Pacific' | 'US/Samoa' | 'UTC' | 'Universal' | 'W-SU' | 'WET' | 'Zulu' | 'localtime' | ''; + /** + * How many consecutive missed or failed check-ins in a row before creating a new issue. + */ + failure_issue_threshold?: number | null; + /** + * How many successful check-ins in a row before resolving an issue. + */ + recovery_threshold?: number | null; + }; + /** + * Uniquely identifies your monitor within your organization. Changing this slug will require updates to any instrumented check-in calls. + */ + slug?: string; + /** + * Status of the monitor. Disabled monitors will not accept events and will not count towards the monitor quota. + * + * * `active` + * * `disabled` + */ + status?: 'active' | 'disabled'; + /** + * The ID of the team or user that owns the monitor. (eg. user:51 or team:6) + */ + owner?: string | null; + /** + * Disable creation of monitor incidents + */ + is_muted?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the monitor. + */ + monitor_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/'; +}; + +export type UpdateAMonitorErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAMonitorResponses = { + 200: { + alertRule?: { + targets: Array<{ + targetIdentifier: number; + targetType: string; + }>; + environment: string; + }; + id: string; + name: string; + slug: string; + status: string; + isMuted: boolean; + isUpserting: boolean; + config: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + dateCreated: string; + project: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }; + environments: { + name: string; + status: string; + isMuted: boolean; + dateCreated: string; + lastCheckIn: string; + nextCheckIn: string; + nextCheckInLatest: string; + activeIncident: { + startingTimestamp: string; + resolvingTimestamp: string; + brokenNotice: { + userNotifiedTimestamp: string; + environmentMutedTimestamp: string; + } | null; + } | null; + }; + owner: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + }; +}; + +export type UpdateAMonitorResponse = UpdateAMonitorResponses[keyof UpdateAMonitorResponses]; + +export type RetrieveCheckInsForAMonitorData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the monitor. + */ + monitor_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/monitors/{monitor_id_or_slug}/checkins/'; +}; + +export type RetrieveCheckInsForAMonitorErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveCheckInsForAMonitorResponses = { + 200: Array<{ + groups?: Array; + id: string; + environment: string; + status: string; + duration: number | null; + dateCreated: string; + dateAdded: string; + dateUpdated: string; + dateInProgress: string | null; + dateClock: string; + expectedTime: string; + monitorConfig: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + }>; +}; + +export type RetrieveCheckInsForAMonitorResponse = RetrieveCheckInsForAMonitorResponses[keyof RetrieveCheckInsForAMonitorResponses]; + +export type ListSpikeProtectionNotificationsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * The project slugs to filter by. Use `$all` to include all available projects. For example, the following are valid parameters: + * - `/?projectSlug=$all` + * - `/?projectSlug=android&projectSlug=javascript-react` + * + */ + project_id_or_slug?: Array; + /** + * Type of the trigger that causes the notification. The only supported value right now is: `spike-protection` + */ + triggerType?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/'; +}; + +export type ListSpikeProtectionNotificationsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListSpikeProtectionNotificationsResponses = { + 201: { + [key: string]: unknown; + }; +}; + +export type ListSpikeProtectionNotificationsResponse = ListSpikeProtectionNotificationsResponses[keyof ListSpikeProtectionNotificationsResponses]; + +export type CreateASpikeProtectionNotificationActionData = { + /** + * Django Rest Framework serializer for incoming NotificationAction API payloads + */ + body: { + /** + * Type of the trigger that causes the notification. The only supported trigger right now is: `spike-protection`. + */ + trigger_type: string; + /** + * Service that is used for sending the notification. + * - `email` + * - `slack` + * - `sentry_notification` + * - `pagerduty` + * - `opsgenie` + * + */ + service_type: string; + /** + * ID of the integration used as the notification service. See + * [List Integrations](https://docs.sentry.io/api/integrations/list-an-organizations-available-integrations/) + * to retrieve a full list of integrations. + * + * Required if **service_type** is `slack`, `pagerduty` or `opsgenie`. + * + */ + integration_id?: number; + /** + * ID of the notification target, like a Slack channel ID. + * + * Required if **service_type** is `slack` or `opsgenie`. + * + */ + target_identifier?: string; + /** + * Name of the notification target, like a Slack channel name. + * + * Required if **service_type** is `slack` or `opsgenie`. + * + */ + target_display?: string; + /** + * List of projects slugs that the Notification Action is created for. + */ + projects?: Array; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/'; +}; + +export type CreateASpikeProtectionNotificationActionErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type CreateASpikeProtectionNotificationActionResponses = { + 201: { + [key: string]: unknown; + }; +}; + +export type CreateASpikeProtectionNotificationActionResponse = CreateASpikeProtectionNotificationActionResponses[keyof CreateASpikeProtectionNotificationActionResponses]; + +export type DeleteASpikeProtectionNotificationActionData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * ID of the notification action to retrieve + */ + action_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/{action_id}/'; +}; + +export type DeleteASpikeProtectionNotificationActionResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteASpikeProtectionNotificationActionResponse = DeleteASpikeProtectionNotificationActionResponses[keyof DeleteASpikeProtectionNotificationActionResponses]; + +export type RetrieveASpikeProtectionNotificationActionData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * ID of the notification action to retrieve + */ + action_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/{action_id}/'; +}; + +export type RetrieveASpikeProtectionNotificationActionResponses = { + 200: { + [key: string]: unknown; + }; +}; + +export type RetrieveASpikeProtectionNotificationActionResponse = RetrieveASpikeProtectionNotificationActionResponses[keyof RetrieveASpikeProtectionNotificationActionResponses]; + +export type UpdateASpikeProtectionNotificationActionData = { + /** + * Django Rest Framework serializer for incoming NotificationAction API payloads + */ + body: { + /** + * Type of the trigger that causes the notification. The only supported trigger right now is: `spike-protection`. + */ + trigger_type: string; + /** + * Service that is used for sending the notification. + * - `email` + * - `slack` + * - `sentry_notification` + * - `pagerduty` + * - `opsgenie` + * + */ + service_type: string; + /** + * ID of the integration used as the notification service. See + * [List Integrations](https://docs.sentry.io/api/integrations/list-an-organizations-available-integrations/) + * to retrieve a full list of integrations. + * + * Required if **service_type** is `slack`, `pagerduty` or `opsgenie`. + * + */ + integration_id?: number; + /** + * ID of the notification target, like a Slack channel ID. + * + * Required if **service_type** is `slack` or `opsgenie`. + * + */ + target_identifier?: string; + /** + * Name of the notification target, like a Slack channel name. + * + * Required if **service_type** is `slack` or `opsgenie`. + * + */ + target_display?: string; + /** + * List of projects slugs that the Notification Action is created for. + */ + projects?: Array; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * ID of the notification action to retrieve + */ + action_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/notifications/actions/{action_id}/'; +}; + +export type UpdateASpikeProtectionNotificationActionErrors = { + /** + * Bad Request + */ + 400: unknown; +}; + +export type UpdateASpikeProtectionNotificationActionResponses = { + 202: { + [key: string]: unknown; + }; +}; + +export type UpdateASpikeProtectionNotificationActionResponse = UpdateASpikeProtectionNotificationActionResponses[keyof UpdateASpikeProtectionNotificationActionResponses]; + +export type RetrievesListOfRepositoriesForAGivenOwnerData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + }; + query?: { + /** + * The number of results to return. If not specified, defaults to 20. + */ + limit?: number; + /** + * Whether to get the previous or next page from paginated results. Use `next` for forward pagination after the cursor or `prev` for backward pagination before the cursor. If not specified, defaults to `next`. If no cursor is provided, the cursor is the beginning of the result set. + */ + navigation?: string; + /** + * The cursor pointing to a specific position in the result set to start the query from. Results after the cursor will be returned if used with `next` or before the cursor if used with `prev` for `navigation`. + */ + cursor?: string; + /** + * The term substring to filter name strings by using the `contains` operator. + */ + term?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repositories/'; +}; + +export type RetrievesListOfRepositoriesForAGivenOwnerErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrievesListOfRepositoriesForAGivenOwnerResponses = { + /** + * Serializer for repositories response + */ + 200: { + results: Array<{ + name: string; + updatedAt: string; + latestCommitAt: string; + defaultBranch: string; + }>; + /** + * Serializer for pagination information + */ + pageInfo: { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; + }; + totalCount: number; + }; +}; + +export type RetrievesListOfRepositoriesForAGivenOwnerResponse = RetrievesListOfRepositoriesForAGivenOwnerResponses[keyof RetrievesListOfRepositoriesForAGivenOwnerResponses]; + +export type GetsSyncingStatusForRepositoriesForAnIntegratedOrgData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repositories/sync/'; +}; + +export type GetsSyncingStatusForRepositoriesForAnIntegratedOrgErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type GetsSyncingStatusForRepositoriesForAnIntegratedOrgResponses = { + /** + * Serializer for a sync repository response + */ + 200: { + isSyncing: boolean; + }; +}; + +export type GetsSyncingStatusForRepositoriesForAnIntegratedOrgResponse = GetsSyncingStatusForRepositoriesForAnIntegratedOrgResponses[keyof GetsSyncingStatusForRepositoriesForAnIntegratedOrgResponses]; + +export type SyncsRepositoriesFromAnIntegratedOrgWithGitHubData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repositories/sync/'; +}; + +export type SyncsRepositoriesFromAnIntegratedOrgWithGitHubErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type SyncsRepositoriesFromAnIntegratedOrgWithGitHubResponses = { + /** + * Serializer for a sync repository response + */ + 200: { + isSyncing: boolean; + }; +}; + +export type SyncsRepositoriesFromAnIntegratedOrgWithGitHubResponse = SyncsRepositoriesFromAnIntegratedOrgWithGitHubResponses[keyof SyncsRepositoriesFromAnIntegratedOrgWithGitHubResponses]; + +export type RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + }; + query?: { + /** + * The number of results to return. If not specified, defaults to 20. + */ + limit?: number; + /** + * Whether to get the previous or next page from paginated results. Use `next` for forward pagination after the cursor or `prev` for backward pagination before the cursor. If not specified, defaults to `next`. If no cursor is provided, the cursor is the beginning of the result set. + */ + navigation?: string; + /** + * The cursor pointing to a specific position in the result set to start the query from. Results after the cursor will be returned if used with `next` or before the cursor if used with `prev` for `navigation`. + */ + cursor?: string; + /** + * The property to sort results by. If not specified, the default is `COMMIT_DATE` in descending order. Use `-` + * for descending order. + * + * Available fields are: + * - `NAME` + * - `COMMIT_DATE` + * + */ + sortBy?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repositories/tokens/'; +}; + +export type RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerResponses = { + /** + * Serializer for repository tokens response + */ + 200: { + results: Array<{ + name: string; + token: string; + }>; + /** + * Serializer for pagination information + */ + pageInfo: { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; + }; + totalCount: number; + }; +}; + +export type RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerResponse = RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerResponses[keyof RetrievesAPaginatedListOfRepositoryTokensForAGivenOwnerResponses]; + +export type RetrievesASingleRepositoryForAGivenOwnerData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + /** + * The name of the repository. + */ + repository: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/'; +}; + +export type RetrievesASingleRepositoryForAGivenOwnerErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrievesASingleRepositoryForAGivenOwnerResponses = { + /** + * Serializer for single repository response + */ + 200: { + uploadToken: string | null; + testAnalyticsEnabled: boolean; + }; +}; + +export type RetrievesASingleRepositoryForAGivenOwnerResponse = RetrievesASingleRepositoryForAGivenOwnerResponses[keyof RetrievesASingleRepositoryForAGivenOwnerResponses]; + +export type RetrievesListOfBranchesForAGivenOwnerAndRepositoryData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + /** + * The name of the repository. + */ + repository: string; + }; + query?: { + /** + * The number of results to return. If not specified, defaults to 20. + */ + limit?: number; + /** + * Whether to get the previous or next page from paginated results. Use `next` for forward pagination after the cursor or `prev` for backward pagination before the cursor. If not specified, defaults to `next`. If no cursor is provided, the cursor is the beginning of the result set. + */ + navigation?: string; + /** + * The cursor pointing to a specific position in the result set to start the query from. Results after the cursor will be returned if used with `next` or before the cursor if used with `prev` for `navigation`. + */ + cursor?: string; + /** + * The term substring to filter name strings by using the `contains` operator. + */ + term?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/branches/'; +}; + +export type RetrievesListOfBranchesForAGivenOwnerAndRepositoryErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrievesListOfBranchesForAGivenOwnerAndRepositoryResponses = { + /** + * Serializer for repository branches response + */ + 200: { + defaultBranch: string; + results: Array<{ + name: string; + }>; + /** + * Serializer for pagination information + */ + pageInfo: { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; + }; + totalCount: number; + }; +}; + +export type RetrievesListOfBranchesForAGivenOwnerAndRepositoryResponse = RetrievesListOfBranchesForAGivenOwnerAndRepositoryResponses[keyof RetrievesListOfBranchesForAGivenOwnerAndRepositoryResponses]; + +export type RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + /** + * The name of the repository. + */ + repository: string; + }; + query?: { + /** + * The property to sort results by. If not specified, the default is `TOTAL_FAIL_COUNT` in descending order. Use `-` + * for descending order. + * + * Available fields are: + * - `AVG_DURATION` + * - `FLAKE_RATE` + * - `FAILURE_RATE` + * - `TOTAL_FAIL_COUNT` + * - `UPDATED_AT` + * + */ + sortBy?: string; + /** + * An optional field to filter by, which will constrain the results to only include tests that match the filter. + * + * Available fields are: + * - `FLAKY_TESTS` + * - `FAILED_TESTS` + * - `SLOWEST_TESTS` + * - `SKIPPED_TESTS` + * + */ + filterBy?: string; + /** + * The time interval to search for results by. + * + * Available fields are: + * - `INTERVAL_30_DAY` + * - `INTERVAL_7_DAY` + * - `INTERVAL_1_DAY` + * + */ + interval?: string; + /** + * The branch to search for results by. If not specified, the default is all branches. + * + */ + branch?: string; + /** + * The number of results to return. If not specified, defaults to 20. + */ + limit?: number; + /** + * Whether to get the previous or next page from paginated results. Use `next` for forward pagination after the cursor or `prev` for backward pagination before the cursor. If not specified, defaults to `next`. If no cursor is provided, the cursor is the beginning of the result set. + */ + navigation?: string; + /** + * The cursor pointing to a specific position in the result set to start the query from. Results after the cursor will be returned if used with `next` or before the cursor if used with `prev` for `navigation`. + */ + cursor?: string; + /** + * The term substring to filter name strings by using the `contains` operator. + */ + term?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/test-results/'; +}; + +export type RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationResponses = { + /** + * Serializer for test results response including pagination metadata + */ + 200: { + defaultBranch: string; + results: Array<{ + updatedAt: string; + avgDuration: number; + totalDuration: number; + name: string; + failureRate: number; + flakeRate: number; + totalFailCount: number; + totalFlakyFailCount: number; + totalSkipCount: number; + totalPassCount: number; + lastDuration: number; + }>; + /** + * Serializer for pagination information + */ + pageInfo: { + endCursor: string | null; + startCursor: string | null; + hasPreviousPage: boolean; + hasNextPage: boolean; + }; + totalCount: number; + }; +}; + +export type RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationResponse = RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationResponses[keyof RetrievePaginatedListOfTestResultsForRepositoryOwnerAndOrganizationResponses]; + +export type RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + /** + * The name of the repository. + */ + repository: string; + }; + query?: { + /** + * The time interval to search for results by. + * + * Available fields are: + * - `INTERVAL_30_DAY` + * - `INTERVAL_7_DAY` + * - `INTERVAL_1_DAY` + * + */ + interval?: string; + /** + * The branch to search for results by. If not specified, the default is all branches. + * + */ + branch?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/test-results-aggregates/'; +}; + +export type RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses = { + /** + * Serializer for test results aggregates response + */ + 200: { + totalDuration: number; + totalDurationPercentChange: number; + slowestTestsDuration: number; + slowestTestsDurationPercentChange: number; + totalSlowTests: number; + totalSlowTestsPercentChange: number; + totalFails: number; + totalFailsPercentChange: number; + totalSkips: number; + totalSkipsPercentChange: number; + flakeCount: number; + flakeCountPercentChange: number; + flakeRate: number; + flakeRatePercentChange: number; + }; +}; + +export type RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponse = RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses[keyof RetrieveAggregatedTestResultMetricsForRepositoryOwnerAndOrganizationResponses]; + +export type RetrieveTestSuitesBelongingToARepositorySTestResultsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + /** + * The name of the repository. + */ + repository: string; + }; + query?: { + /** + * The term substring to filter name strings by using the `contains` operator. + */ + term?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/test-suites/'; +}; + +export type RetrieveTestSuitesBelongingToARepositorySTestResultsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveTestSuitesBelongingToARepositorySTestResultsResponses = { + /** + * Serializer for test suites belonging to a repository's test results + */ + 200: { + testSuites: Array; + }; +}; + +export type RetrieveTestSuitesBelongingToARepositorySTestResultsResponse = RetrieveTestSuitesBelongingToARepositorySTestResultsResponses[keyof RetrieveTestSuitesBelongingToARepositorySTestResultsResponses]; + +export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The owner of the repository. + */ + owner: string; + /** + * The name of the repository. + */ + repository: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/prevent/owner/{owner}/repository/{repository}/token/regenerate/'; +}; + +export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses = { + /** + * Serializer for repositories response + */ + 200: { + token: string; + }; +}; + +export type RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponse = RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses[keyof RegeneratesARepositoryUploadTokenAndReturnsTheNewTokenResponses]; + +export type ListAnOrganizationSClientKeysData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + /** + * Filter keys by team slug or ID. If provided, only keys for projects belonging to this team will be returned. + */ + team?: string; + /** + * Filter keys by status. Options are 'active' or 'inactive'. + * + * * `active` + * * `inactive` + */ + status?: 'active' | 'inactive'; + }; + url: '/api/0/organizations/{organization_id_or_slug}/project-keys/'; +}; + +export type ListAnOrganizationSClientKeysErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSClientKeysResponses = { + 200: Array<{ + id: string; + name: string; + label: string; + public: string | null; + secret: string | null; + projectId: number; + isActive: boolean; + rateLimit: { + window: number; + count: number; + } | null; + dsn: { + secret: string; + public: string; + csp: string; + security: string; + minidump: string; + nel: string; + unreal: string; + crons: string; + cdn: string; + playstation: string; + integration: string; + otlp_traces: string; + otlp_logs: string; + }; + browserSdkVersion: string; + browserSdk: { + choices: Array>; + }; + dateCreated: string | null; + dynamicSdkLoaderOptions: { + hasReplay: boolean; + hasPerformance: boolean; + hasDebug: boolean; + hasFeedback: boolean; + hasLogsAndMetrics: boolean; + }; + useCase?: string; + }>; +}; + +export type ListAnOrganizationSClientKeysResponse = ListAnOrganizationSClientKeysResponses[keyof ListAnOrganizationSClientKeysResponses]; + +export type ListAnOrganizationSProjectsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/projects/'; +}; + +export type ListAnOrganizationSProjectsErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSProjectsResponses = { + 200: Array<{ + latestDeploys?: { + [key: string]: { + [key: string]: string; + }; + } | null; + options?: { + [key: string]: unknown; + }; + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + team: { + id: string; + name: string; + slug: string; + } | null; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + platforms: Array; + hasUserReports: boolean; + environments: Array; + latestRelease: { + version: string; + } | null; + }>; +}; + +export type ListAnOrganizationSProjectsResponse = ListAnOrganizationSProjectsResponses[keyof ListAnOrganizationSProjectsResponses]; + +export type ListAnOrganizationSTrustedRelaysData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/relay_usage/'; +}; + +export type ListAnOrganizationSTrustedRelaysErrors = { + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSTrustedRelaysResponses = { + 200: Array<{ + relayId: string; + version: string; + publicKey: string; + firstSeen: string; + lastSeen: string; + }>; +}; + +export type ListAnOrganizationSTrustedRelaysResponse = ListAnOrganizationSTrustedRelaysResponses[keyof ListAnOrganizationSTrustedRelaysResponses]; + +export type RetrieveStatusesOfReleaseThresholdsAlphaData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query: { + /** + * The start of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds. Use along with `end`. + */ + start: string; + /** + * The inclusive end of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds. Use along with `start`. + */ + end: string; + /** + * A list of environment names to filter your results by. + */ + environment?: Array; + /** + * A list of project slugs to filter your results by. + */ + projectSlug?: Array; + /** + * A list of release versions to filter your results by. + */ + release?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/release-threshold-statuses/'; +}; + +export type RetrieveStatusesOfReleaseThresholdsAlphaErrors = { + /** + * Bad Request + */ + 400: unknown; +}; + +export type RetrieveStatusesOfReleaseThresholdsAlphaResponses = { + 200: { + [key: string]: Array<{ + id?: string; + date?: string; + environment?: { + [key: string]: unknown; + } | null; + project?: { + [key: string]: unknown; + }; + release?: string; + threshold_type?: number; + trigger_type?: string; + value?: number; + window_in_seconds?: number; + end: string; + is_healthy: boolean; + key: string; + project_slug: string; + project_id: number; + start: string; + metric_value: number | number | { + [key: string]: unknown; + } | null; + }>; + }; +}; + +export type RetrieveStatusesOfReleaseThresholdsAlphaResponse = RetrieveStatusesOfReleaseThresholdsAlphaResponses[keyof RetrieveStatusesOfReleaseThresholdsAlphaResponses]; + +export type DeleteAnOrganizationSReleaseData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release + */ + version: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/'; +}; + +export type DeleteAnOrganizationSReleaseErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnOrganizationSReleaseResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAnOrganizationSReleaseResponse = DeleteAnOrganizationSReleaseResponses[keyof DeleteAnOrganizationSReleaseResponses]; + +export type RetrieveAnOrganizationSReleaseData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release + */ + version: string; + }; + query?: { + /** + * The project ID to filter by. + */ + project_id?: string; + /** + * Whether or not to include health data with the release. By default, this is false. + */ + health?: boolean; + /** + * Whether or not to include adoption stages with the release. By default, this is false. + */ + adoptionStages?: boolean; + /** + * The period of time used to query summary stats for the release. By default, this is 14d. + */ + summaryStatsPeriod?: '14d' | '1d' | '1h' | '24h' | '2d' | '30d' | '48h' | '7d' | '90d'; + /** + * The period of time used to query health stats for the release. By default, this is 24h if health is enabled. + */ + healthStatsPeriod?: '14d' | '1d' | '1h' | '24h' | '2d' | '30d' | '48h' | '7d' | '90d'; + /** + * The field used to sort results by. By default, this is `date`. + */ + sort?: 'crash_free_sessions' | 'crash_free_users' | 'date' | 'sessions' | 'users'; + /** + * Release statuses that you can filter by. + */ + status?: 'archived' | 'open'; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + * + * Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)` + * + */ + query?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/'; +}; + +export type RetrieveAnOrganizationSReleaseErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAnOrganizationSReleaseResponses = { + 200: { + ref?: string | null; + url?: string | null; + dateReleased?: string | null; + dateCreated?: string | null; + dateStarted?: string | null; + owner?: { + [key: string]: unknown; + } | null; + lastCommit?: { + [key: string]: unknown; + } | null; + lastDeploy?: { + dateStarted?: string | null; + url?: string | null; + id: string; + environment: string; + dateFinished: string; + name: string; + } | null; + firstEvent?: string | null; + lastEvent?: string | null; + currentProjectMeta?: { + [key: string]: unknown; + } | null; + userAgent?: string | null; + adoptionStages?: { + [key: string]: unknown; + } | null; + id: number; + version: string; + newGroups: number; + status: string; + shortVersion: string; + versionInfo: { + description?: string; + package: string | null; + version: { + [key: string]: unknown; + }; + buildHash: string | null; + } | null; + data: { + [key: string]: unknown; + }; + commitCount: number; + deployCount: number; + authors: Array<{ + lastLogin?: string; + has2fa?: boolean; + lastActive?: string; + isSuperuser?: boolean; + isStaff?: boolean; + experiments?: { + [key: string]: string | number | number | boolean | { + [key: string]: unknown; + } | null; + }; + emails?: Array<{ + [key: string]: number | string | boolean; + }>; + avatar?: { + [key: string]: string | null; + }; + id: number; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + }>; + projects: Array<{ + healthData?: { + durationP50?: number | null; + durationP90?: number | null; + crashFreeUsers?: number | null; + crashFreeSessions?: number | null; + totalUsers?: number | null; + totalUsers24h?: number | null; + totalProjectUsers24h?: number | null; + totalSessions?: number | null; + totalSessions24h?: number | null; + totalProjectSessions24h?: number | null; + adoption?: number | null; + sessionsAdoption?: number | null; + sessionsCrashed: number; + sessionsErrored: number; + hasHealthData: boolean; + stats: { + [key: string]: unknown; + }; + } | null; + dateReleased?: string | null; + dateCreated?: string | null; + dateStarted?: string | null; + id: number; + slug: string; + name: string; + platform: string | null; + platforms: Array | null; + hasHealthData: boolean; + newGroups: number; + }>; + }; +}; + +export type RetrieveAnOrganizationSReleaseResponse = RetrieveAnOrganizationSReleaseResponses[keyof RetrieveAnOrganizationSReleaseResponses]; + +export type UpdateAnOrganizationSReleaseData = { + body?: { + /** + * An optional commit reference. This is useful if a tagged version has been provided. + */ + ref?: string | null; + /** + * A URL that points to the release. For instance, this can be the path to an online interface to the source code, such as a GitHub URL. + */ + url?: string | null; + /** + * An optional date that indicates when the release went live. If not provided the current time is used. + */ + dateReleased?: string | null; + /** + * An optional list of commit data to be associated. + */ + commits?: Array<{ + id: string; + repository?: string | null; + message?: string | null; + author_name?: string | null; + author_email?: string | null; + timestamp?: string | null; + patch_set?: Array<{ + path: string; + type: string; + }> | null; + }>; + /** + * An optional way to indicate the start and end commits for each repository included in a release. Head commits must include parameters ``repository`` and ``commit`` (the HEAD SHA). For GitLab repositories, please use the Group name instead of the slug. They can optionally include ``previousCommit`` (the SHA of the HEAD of the previous release), which should be specified if this is the first time you've sent commit data. + */ + refs?: Array<{ + commit: string; + repository: string; + previousCommit?: string | null; + }>; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release + */ + version: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/'; +}; + +export type UpdateAnOrganizationSReleaseErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAnOrganizationSReleaseResponses = { + 200: { + ref?: string | null; + url?: string | null; + dateReleased?: string | null; + dateCreated?: string | null; + dateStarted?: string | null; + owner?: { + [key: string]: unknown; + } | null; + lastCommit?: { + [key: string]: unknown; + } | null; + lastDeploy?: { + dateStarted?: string | null; + url?: string | null; + id: string; + environment: string; + dateFinished: string; + name: string; + } | null; + firstEvent?: string | null; + lastEvent?: string | null; + currentProjectMeta?: { + [key: string]: unknown; + } | null; + userAgent?: string | null; + adoptionStages?: { + [key: string]: unknown; + } | null; + id: number; + version: string; + newGroups: number; + status: string; + shortVersion: string; + versionInfo: { + description?: string; + package: string | null; + version: { + [key: string]: unknown; + }; + buildHash: string | null; + } | null; + data: { + [key: string]: unknown; + }; + commitCount: number; + deployCount: number; + authors: Array<{ + lastLogin?: string; + has2fa?: boolean; + lastActive?: string; + isSuperuser?: boolean; + isStaff?: boolean; + experiments?: { + [key: string]: string | number | number | boolean | { + [key: string]: unknown; + } | null; + }; + emails?: Array<{ + [key: string]: number | string | boolean; + }>; + avatar?: { + [key: string]: string | null; + }; + id: number; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + }>; + projects: Array<{ + healthData?: { + durationP50?: number | null; + durationP90?: number | null; + crashFreeUsers?: number | null; + crashFreeSessions?: number | null; + totalUsers?: number | null; + totalUsers24h?: number | null; + totalProjectUsers24h?: number | null; + totalSessions?: number | null; + totalSessions24h?: number | null; + totalProjectSessions24h?: number | null; + adoption?: number | null; + sessionsAdoption?: number | null; + sessionsCrashed: number; + sessionsErrored: number; + hasHealthData: boolean; + stats: { + [key: string]: unknown; + }; + } | null; + dateReleased?: string | null; + dateCreated?: string | null; + dateStarted?: string | null; + id: number; + slug: string; + name: string; + platform: string | null; + platforms: Array | null; + hasHealthData: boolean; + newGroups: number; + }>; + }; +}; + +export type UpdateAnOrganizationSReleaseResponse = UpdateAnOrganizationSReleaseResponses[keyof UpdateAnOrganizationSReleaseResponses]; + +export type ListAReleaseSDeploysData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release + */ + version: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/deploys/'; +}; + +export type ListAReleaseSDeploysResponses = { + 200: Array<{ + /** + * The ID of the deploy + */ + id: string; + /** + * The environment name + */ + environment: string; + /** + * An optional date that indicates when the deploy started + */ + dateStarted: string | null; + /** + * An optional date that indicates when the deploy ended + */ + dateFinished: string; + /** + * The optional name of the deploy + */ + name: string | null; + /** + * The optional URL that points to the deploy + */ + url: string | null; + }>; +}; + +export type ListAReleaseSDeploysResponse = ListAReleaseSDeploysResponses[keyof ListAReleaseSDeploysResponses]; + +export type CreateADeployData = { + body: { + /** + * The environment you're deploying to + */ + environment: string; + /** + * The optional name of the deploy + */ + name?: string | null; + /** + * The optional URL that points to the deploy + */ + url?: string | null; + /** + * An optional date that indicates when the deploy started + */ + dateStarted?: string | null; + /** + * An optional date that indicates when the deploy ended. If not provided, the current time is used. + */ + dateFinished?: string | null; + /** + * The optional list of project slugs to create a deploy within. If not provided, deploys are created for all of the release's projects. + */ + projects?: Array; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release + */ + version: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/deploys/'; +}; + +export type CreateADeployErrors = { + /** + * Bad Request + */ + 400: unknown; +}; + +export type CreateADeployResponses = { + /** + * Serializer for Deploy response objects + */ + 201: { + /** + * The ID of the deploy + */ + id: string; + /** + * The environment name + */ + environment: string; + /** + * An optional date that indicates when the deploy started + */ + dateStarted: string | null; + /** + * An optional date that indicates when the deploy ended + */ + dateFinished: string; + /** + * The optional name of the deploy + */ + name: string | null; + /** + * The optional URL that points to the deploy + */ + url: string | null; + }; +}; + +export type CreateADeployResponse = CreateADeployResponses[keyof CreateADeployResponses]; + +export type RetrieveACountOfReplaysForAGivenIssueOrTransactionData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + start?: string; + /** + * The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + end?: string; + /** + * The period of time for the query, will override the start & end parameters, a number followed by one of: + * - `d` for days + * - `h` for hours + * - `m` for minutes + * - `s` for seconds + * - `w` for weeks + * + * For example, `24h`, to mean query data starting from 24 hours ago to now. + */ + statsPeriod?: string; + /** + * The project slugs to filter by. Use `$all` to include all available projects. For example, the following are valid parameters: + * - `/?projectSlug=$all` + * - `/?projectSlug=android&projectSlug=javascript-react` + * + */ + project_id_or_slug?: Array; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + * + * Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)` + * + */ + query?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/replay-count/'; +}; + +export type RetrieveACountOfReplaysForAGivenIssueOrTransactionErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type RetrieveACountOfReplaysForAGivenIssueOrTransactionResponses = { + 200: { + [key: string]: number; + }; +}; + +export type RetrieveACountOfReplaysForAGivenIssueOrTransactionResponse = RetrieveACountOfReplaysForAGivenIssueOrTransactionResponses[keyof RetrieveACountOfReplaysForAGivenIssueOrTransactionResponses]; + +export type ListAnOrganizationSSelectorsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The environment to filter by. + */ + environment?: Array; + /** + * This defines the range of the time series, relative to now. The range is given in a `` format. For example `1d` for a one day range. Possible units are `m` for minutes, `h` for hours, `d` for days and `w` for weeks.You must either provide a `statsPeriod`, or a `start` and `end`. + */ + statsPeriod?: string; + /** + * This defines the start of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds.Use along with `end` instead of `statsPeriod`. + */ + start?: string; + /** + * This defines the inclusive end of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds.Use along with `start` instead of `statsPeriod`. + */ + end?: string; + /** + * The ID of the projects to filter by. + */ + project?: Array; + /** + * A list of project slugs to filter your results by. + */ + projectSlug?: Array; + /** + * The field to sort the output by. + */ + sort?: string; + /** + * The field to sort the output by. + */ + sortBy?: string; + /** + * The field to sort the output by. + */ + orderBy?: string; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + /** + * Limit the number of rows to return in the result. Default and maximum allowed is 100. + */ + per_page?: number; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + * + * Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)` + * + */ + query?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/replay-selectors/'; +}; + +export type ListAnOrganizationSSelectorsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAnOrganizationSSelectorsResponses = { + 200: { + data: Array<{ + count_dead_clicks?: number; + count_rage_clicks?: number; + dom_element?: string; + element?: { + alt: string; + aria_label: string; + class: Array; + component_name: string; + id: string; + role: string; + tag: string; + testid: string; + title: string; + }; + project_id?: string; + }>; + }; +}; + +export type ListAnOrganizationSSelectorsResponse = ListAnOrganizationSSelectorsResponses[keyof ListAnOrganizationSSelectorsResponses]; + +export type ListAnOrganizationSReplaysData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * + * This defines the range of the time series, relative to now. The range is given in a + * `` format. For example `1d` for a one day range. Possible units are `m` for + * minutes, `h` for hours, `d` for days and `w` for weeks. You must either provide a + * `statsPeriod`, or a `start` and `end`. + * + */ + statsPeriod?: string; + /** + * + * This defines the start of the time series range as an explicit datetime, either in UTC + * ISO8601 or epoch seconds. Use along with `end` instead of `statsPeriod`. + * + */ + start?: string; + /** + * + * This defines the inclusive end of the time series range as an explicit datetime, either in + * UTC ISO8601 or epoch seconds. Use along with `start` instead of `statsPeriod`. + * + */ + end?: string; + /** + * Specifies a field that should be marshaled in the output. Invalid fields will be rejected. + */ + field?: Array<'activity' | 'browser' | 'count_dead_clicks' | 'count_errors' | 'count_rage_clicks' | 'count_segments' | 'count_urls' | 'device' | 'dist' | 'duration' | 'environment' | 'error_ids' | 'finished_at' | 'id' | 'is_archived' | 'os' | 'platform' | 'project_id' | 'releases' | 'sdk' | 'started_at' | 'tags' | 'trace_ids' | 'urls' | 'user' | 'clicks' | 'info_ids' | 'warning_ids' | 'count_warnings' | 'count_infos' | 'has_viewed'>; + /** + * The ID of the projects to filter by. + */ + project?: Array; + /** + * A list of project slugs to filter your results by. + */ + projectSlug?: Array; + /** + * The environment to filter by. + */ + environment?: string; + /** + * The field to sort the output by. + */ + sort?: string; + /** + * The field to sort the output by. + */ + sortBy?: string; + /** + * The field to sort the output by. + */ + orderBy?: string; + /** + * A structured query string to filter the output by. + */ + query?: string; + /** + * Limit the number of rows to return in the result. + */ + per_page?: number; + /** + * The cursor parameter is used to paginate results. See [here](https://docs.sentry.io/api/pagination/) for how to use this query parameter + */ + cursor?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/replays/'; +}; + +export type ListAnOrganizationSReplaysErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAnOrganizationSReplaysResponses = { + 200: Array<{ + id?: string; + project_id?: string; + trace_ids?: Array; + error_ids?: Array; + environment?: string | null; + tags?: { + [key: string]: Array; + } | Array; + user?: { + id?: string | null; + username?: string | null; + email?: string | null; + ip?: string | null; + display_name?: string | null; + geo?: { + city?: string | null; + country_code?: string | null; + region?: string | null; + subdivision?: string | null; + }; + }; + sdk?: { + name?: string | null; + version?: string | null; + }; + os?: { + name?: string | null; + version?: string | null; + }; + browser?: { + name?: string | null; + version?: string | null; + }; + device?: { + name?: string | null; + brand?: string | null; + model?: string | null; + family?: string | null; + }; + ota_updates?: { + channel?: string | null; + runtime_version?: string | null; + update_id?: string | null; + }; + is_archived?: boolean | null; + urls?: Array | null; + clicks?: Array<{ + [key: string]: unknown; + }>; + count_dead_clicks?: number | null; + count_rage_clicks?: number | null; + count_errors?: number | null; + duration?: number | null; + finished_at?: string | null; + started_at?: string | null; + activity?: number | null; + count_urls?: number | null; + replay_type?: string; + count_segments?: number | null; + platform?: string | null; + releases?: Array; + dist?: string | null; + count_warnings?: number | null; + count_infos?: number | null; + has_viewed?: boolean; + }>; +}; + +export type ListAnOrganizationSReplaysResponse = ListAnOrganizationSReplaysResponses[keyof ListAnOrganizationSReplaysResponses]; + +export type RetrieveAReplayInstanceData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the replay you'd like to retrieve. + */ + replay_id: string; + }; + query?: { + /** + * + * This defines the range of the time series, relative to now. The range is given in a + * `` format. For example `1d` for a one day range. Possible units are `m` for + * minutes, `h` for hours, `d` for days and `w` for weeks. You must either provide a + * `statsPeriod`, or a `start` and `end`. + * + */ + statsPeriod?: string; + /** + * + * This defines the start of the time series range as an explicit datetime, either in UTC + * ISO8601 or epoch seconds. Use along with `end` instead of `statsPeriod`. + * + */ + start?: string; + /** + * + * This defines the inclusive end of the time series range as an explicit datetime, either in + * UTC ISO8601 or epoch seconds. Use along with `start` instead of `statsPeriod`. + * + */ + end?: string; + /** + * Specifies a field that should be marshaled in the output. Invalid fields will be rejected. + */ + field?: Array<'activity' | 'browser' | 'count_dead_clicks' | 'count_errors' | 'count_rage_clicks' | 'count_segments' | 'count_urls' | 'device' | 'dist' | 'duration' | 'environment' | 'error_ids' | 'finished_at' | 'id' | 'is_archived' | 'os' | 'platform' | 'project_id' | 'releases' | 'sdk' | 'started_at' | 'tags' | 'trace_ids' | 'urls' | 'user' | 'clicks' | 'info_ids' | 'warning_ids' | 'count_warnings' | 'count_infos' | 'has_viewed'>; + /** + * The ID of the projects to filter by. + */ + project?: Array; + /** + * A list of project slugs to filter your results by. + */ + projectSlug?: Array; + /** + * The environment to filter by. + */ + environment?: string; + /** + * The field to sort the output by. + */ + sort?: string; + /** + * The field to sort the output by. + */ + sortBy?: string; + /** + * The field to sort the output by. + */ + orderBy?: string; + /** + * A structured query string to filter the output by. + */ + query?: string; + /** + * Limit the number of rows to return in the result. + */ + per_page?: number; + /** + * The cursor parameter is used to paginate results. See [here](https://docs.sentry.io/api/pagination/) for how to use this query parameter + */ + cursor?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/replays/{replay_id}/'; +}; + +export type RetrieveAReplayInstanceErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAReplayInstanceResponses = { + 200: { + id?: string; + project_id?: string; + trace_ids?: Array; + error_ids?: Array; + environment?: string | null; + tags?: { + [key: string]: Array; + } | Array; + user?: { + id?: string | null; + username?: string | null; + email?: string | null; + ip?: string | null; + display_name?: string | null; + geo?: { + city?: string | null; + country_code?: string | null; + region?: string | null; + subdivision?: string | null; + }; + }; + sdk?: { + name?: string | null; + version?: string | null; + }; + os?: { + name?: string | null; + version?: string | null; + }; + browser?: { + name?: string | null; + version?: string | null; + }; + device?: { + name?: string | null; + brand?: string | null; + model?: string | null; + family?: string | null; + }; + ota_updates?: { + channel?: string | null; + runtime_version?: string | null; + update_id?: string | null; + }; + is_archived?: boolean | null; + urls?: Array | null; + clicks?: Array<{ + [key: string]: unknown; + }>; + count_dead_clicks?: number | null; + count_rage_clicks?: number | null; + count_errors?: number | null; + duration?: number | null; + finished_at?: string | null; + started_at?: string | null; + activity?: number | null; + count_urls?: number | null; + replay_type?: string; + count_segments?: number | null; + platform?: string | null; + releases?: Array; + dist?: string | null; + count_warnings?: number | null; + count_infos?: number | null; + has_viewed?: boolean; + }; +}; + +export type RetrieveAReplayInstanceResponse = RetrieveAReplayInstanceResponses[keyof RetrieveAReplayInstanceResponses]; + +export type ListARepositorySCommitsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The repository ID. + */ + repo_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/repos/{repo_id}/commits/'; +}; + +export type ListARepositorySCommitsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListARepositorySCommitsResponses = { + 200: Array<{ + id: string; + message: string | null; + dateCreated: string; + pullRequest: { + id: string; + title: string | null; + message: string | null; + dateCreated: string; + repository: { + id?: string; + name?: string; + url?: string | null; + provider?: { + [key: string]: string; + }; + status?: string; + dateCreated?: string; + integrationId?: string | null; + externalSlug?: string | null; + externalId?: string | null; + settings?: { + enabledCodeReview: boolean; + codeReviewTriggers: Array; + } | null; + }; + author: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + } | { + name: string | null; + email: string; + }; + externalUrl: string; + } | null; + suspectCommitType: string; + repository?: { + id?: string; + name?: string; + url?: string | null; + provider?: { + [key: string]: string; + }; + status?: string; + dateCreated?: string; + integrationId?: string | null; + externalSlug?: string | null; + externalId?: string | null; + settings?: { + enabledCodeReview: boolean; + codeReviewTriggers: Array; + } | null; + }; + author?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + } | { + name: string | null; + email: string; + }; + }>; +}; + +export type ListARepositorySCommitsResponse = ListARepositorySCommitsResponses[keyof ListARepositorySCommitsResponses]; + +export type ListAnOrganizationSPaginatedTeamsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * SCIM 1-offset based index for pagination. + */ + startIndex?: number; + /** + * The maximum number of results the query should return, maximum of 100. + */ + count?: number; + /** + * A SCIM filter expression. The only operator currently supported is `eq`. + */ + filter?: string; + /** + * Fields that should be left off of return values. Right now the only supported field for this query is members. + */ + excludedAttributes?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups'; +}; + +export type ListAnOrganizationSPaginatedTeamsErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSPaginatedTeamsResponses = { + 200: { + schemas: Array; + totalResults: number; + startIndex: number; + itemsPerPage: number; + Resources: Array<{ + schemas: Array; + id: string; + displayName: string; + meta: { + resourceType: string; + }; + members?: Array<{ + value: string; + display: string; + }>; + }>; + }; +}; + +export type ListAnOrganizationSPaginatedTeamsResponse = ListAnOrganizationSPaginatedTeamsResponses[keyof ListAnOrganizationSPaginatedTeamsResponses]; + +export type ProvisionANewTeamData = { + body: { + /** + * The slug of the team that is shown in the UI. + */ + displayName: string; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups'; +}; + +export type ProvisionANewTeamErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ProvisionANewTeamResponses = { + 201: { + schemas: Array; + id: string; + displayName: string; + meta: { + resourceType: string; + }; + members?: Array<{ + value: string; + display: string; + }>; + }; +}; + +export type ProvisionANewTeamResponse = ProvisionANewTeamResponses[keyof ProvisionANewTeamResponses]; + +export type DeleteAnIndividualTeamData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups/{team_id_or_slug}'; +}; + +export type DeleteAnIndividualTeamErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnIndividualTeamResponses = { + /** + * Success + */ + 204: void; +}; + +export type DeleteAnIndividualTeamResponse = DeleteAnIndividualTeamResponses[keyof DeleteAnIndividualTeamResponses]; + +export type QueryAnIndividualTeamData = { + body?: never; + path: { + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups/{team_id_or_slug}'; +}; + +export type QueryAnIndividualTeamErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type QueryAnIndividualTeamResponses = { + 200: { + schemas: Array; + id: string; + displayName: string; + meta: { + resourceType: string; + }; + members?: Array<{ + value: string; + display: string; + }>; + }; +}; + +export type QueryAnIndividualTeamResponse = QueryAnIndividualTeamResponses[keyof QueryAnIndividualTeamResponses]; + +export type UpdateATeamSAttributesData = { + body: { + /** + * The list of operations to perform. Valid operations are: + * * Renaming a team: + * ```json + * { + * "Operations": [{ + * "op": "replace", + * "value": { + * "id": 23, + * "displayName": "newName" + * } + * }] + * } + * ``` + * * Adding a member to a team: + * ```json + * { + * "Operations": [{ + * "op": "add", + * "path": "members", + * "value": [ + * { + * "value": 23, + * "display": "testexample@example.com" + * } + * ] + * }] + * } + * ``` + * * Removing a member from a team: + * ```json + * { + * "Operations": [{ + * "op": "remove", + * "path": "members[value eq "23"]" + * }] + * } + * ``` + * * Replacing an entire member set of a team: + * ```json + * { + * "Operations": [{ + * "op": "replace", + * "path": "members", + * "value": [ + * { + * "value": 23, + * "display": "testexample2@sentry.io" + * }, + * { + * "value": 24, + * "display": "testexample3@sentry.io" + * } + * ] + * }] + * } + * ``` + * + */ + Operations: Array<{ + op: string; + value?: { + [key: string]: unknown; + }; + path?: string; + }>; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Groups/{team_id_or_slug}'; +}; + +export type UpdateATeamSAttributesErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateATeamSAttributesResponses = { + /** + * Success + */ + 204: void; +}; + +export type UpdateATeamSAttributesResponse = UpdateATeamSAttributesResponses[keyof UpdateATeamSAttributesResponses]; + +export type ListAnOrganizationSScimMembersData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * SCIM 1-offset based index for pagination. + */ + startIndex?: number; + /** + * The maximum number of results the query should return, maximum of 100. + */ + count?: number; + /** + * A SCIM filter expression. The only operator currently supported is `eq`. + */ + filter?: string; + /** + * Fields that should be left off of return values. Right now the only supported field for this query is members. + */ + excludedAttributes?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users'; +}; + +export type ListAnOrganizationSScimMembersErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSScimMembersResponses = { + 200: { + schemas: Array; + totalResults: number; + startIndex: number; + itemsPerPage: number; + Resources: Array<{ + active?: boolean; + schemas: Array; + id: string; + userName: string; + name: { + givenName: string; + familyName: string; + }; + emails: Array<{ + primary: boolean; + value: string; + type: string; + }>; + meta: { + resourceType: string; + }; + sentryOrgRole: string; + }>; + }; +}; + +export type ListAnOrganizationSScimMembersResponse = ListAnOrganizationSScimMembersResponses[keyof ListAnOrganizationSScimMembersResponses]; + +export type ProvisionANewOrganizationMemberData = { + body: { + /** + * The SAML field used for email. + */ + userName: string; + /** + * The organization role of the member. If unspecified, this will be + * set to the organization's default role. The options are: + * + * * `billing` - Can manage payment and compliance details. + * * `member` - Can view and act on events, as well as view most other data within the organization. + * * `manager` - Has full management access to all teams and projects. Can also manage + * the organization's membership. + * * `admin` - Can edit global integrations, manage projects, and add/remove teams. + * They automatically assume the Team Admin role for teams they join. + * Note: This role can no longer be assigned in Business and Enterprise plans. Use `TeamRoles` instead. + * + */ + sentryOrgRole?: 'billing' | 'member' | 'manager' | 'admin'; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users'; +}; + +export type ProvisionANewOrganizationMemberErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ProvisionANewOrganizationMemberResponses = { + /** + * Conforming to the SCIM RFC, this represents a Sentry Org Member + * as a SCIM user object. + */ + 201: { + active?: boolean; + schemas: Array; + id: string; + userName: string; + name: { + givenName: string; + familyName: string; + }; + emails: Array<{ + primary: boolean; + value: string; + type: string; + }>; + meta: { + resourceType: string; + }; + sentryOrgRole: string; + }; +}; + +export type ProvisionANewOrganizationMemberResponse = ProvisionANewOrganizationMemberResponses[keyof ProvisionANewOrganizationMemberResponses]; + +export type DeleteAnOrganizationMemberViaScimData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the member to delete. + */ + member_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users/{member_id}'; +}; + +export type DeleteAnOrganizationMemberViaScimErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnOrganizationMemberViaScimResponses = { + /** + * Success + */ + 204: void; +}; + +export type DeleteAnOrganizationMemberViaScimResponse = DeleteAnOrganizationMemberViaScimResponses[keyof DeleteAnOrganizationMemberViaScimResponses]; + +export type QueryAnIndividualOrganizationMemberData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the member to query. + */ + member_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users/{member_id}'; +}; + +export type QueryAnIndividualOrganizationMemberErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type QueryAnIndividualOrganizationMemberResponses = { + /** + * Conforming to the SCIM RFC, this represents a Sentry Org Member + * as a SCIM user object. + */ + 200: { + active?: boolean; + schemas: Array; + id: string; + userName: string; + name: { + givenName: string; + familyName: string; + }; + emails: Array<{ + primary: boolean; + value: string; + type: string; + }>; + meta: { + resourceType: string; + }; + sentryOrgRole: string; + }; +}; + +export type QueryAnIndividualOrganizationMemberResponse = QueryAnIndividualOrganizationMemberResponses[keyof QueryAnIndividualOrganizationMemberResponses]; + +export type UpdateAnOrganizationMemberSAttributesData = { + body: { + /** + * A list of operations to perform. Currently, the only valid operation is setting + * a member's `active` attribute to false, after which the member will be permanently deleted. + * ```json + * { + * "Operations": [{ + * "op": "replace", + * "path": "active", + * "value": False + * }] + * } + * ``` + * + */ + Operations: Array<{ + op: string; + value: unknown; + path?: string; + }>; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the member to update. + */ + member_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/scim/v2/Users/{member_id}'; +}; + +export type UpdateAnOrganizationMemberSAttributesErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAnOrganizationMemberSAttributesResponses = { + /** + * Success + */ + 204: void; +}; + +export type UpdateAnOrganizationMemberSAttributesResponse = UpdateAnOrganizationMemberSAttributesResponses[keyof UpdateAnOrganizationMemberSAttributesResponses]; + +export type RetrieveTheCustomIntegrationsCreatedByAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/sentry-apps/'; +}; + +export type RetrieveTheCustomIntegrationsCreatedByAnOrganizationResponses = { + 200: Array<{ + allowedOrigins: Array; + avatars: Array<{ + avatarType: string; + avatarUuid: string; + avatarUrl: string; + color: boolean; + photoType: string; + }>; + events: Array; + featureData: Array; + isAlertable: boolean; + metadata: string; + name: string; + schema: string; + scopes: Array; + slug: string; + status: string; + uuid: string; + verifyInstall: boolean; + author?: string | null; + overview?: string | null; + popularity?: number | null; + redirectUrl?: string | null; + webhookUrl?: string | null; + clientSecret?: string | null; + datePublished?: string; + clientId?: string; + owner?: { + id: number; + slug: string; + }; + }>; +}; + +export type RetrieveTheCustomIntegrationsCreatedByAnOrganizationResponse = RetrieveTheCustomIntegrationsCreatedByAnOrganizationResponses[keyof RetrieveTheCustomIntegrationsCreatedByAnOrganizationResponses]; + +export type RetrieveReleaseHealthSessionStatisticsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query: { + /** + * The list of fields to query. + * + * The available fields are + * - `sum(session)` + * - `count_unique(user)` + * - `avg`, `p50`, `p75`, `p90`, `p95`, `p99`, `max` applied to `session.duration`. For example, `p99(session.duration)`. Session duration is [no longer being recorded](https://github.com/getsentry/sentry/discussions/42716) as of on Jan 12, 2023. Returned data may be incomplete. + * - `crash_rate`, `crash_free_rate` applied to `user` or `session`. For example, `crash_free_rate(user)` + * + */ + field: Array; + /** + * The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + start?: string; + /** + * The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + end?: string; + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * The period of time for the query, will override the start & end parameters, a number followed by one of: + * - `d` for days + * - `h` for hours + * - `m` for minutes + * - `s` for seconds + * - `w` for weeks + * + * For example, `24h`, to mean query data starting from 24 hours ago to now. + */ + statsPeriod?: string; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + /** + * The number of groups to return per request. + */ + per_page?: number; + /** + * Resolution of the time series, given in the same format as `statsPeriod`. + * + * The default and + * the minimum interval is `1h`. + */ + interval?: string; + /** + * The list of properties to group by. + * + * The available groupBy conditions are `project`, + * `release`, `environment` and `session.status`. + */ + groupBy?: Array; + /** + * An optional field to order by, which must be one of the fields provided in `field`. Use `-` + * for descending order, for example, `-sum(session)` + */ + orderBy?: string; + /** + * Specify `0` to exclude totals from the response. The default is `1` + */ + includeTotals?: number; + /** + * Specify `0` to exclude series from the response. The default is `1` + */ + includeSeries?: number; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + * + * Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)` + * + */ + query?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/sessions/'; +}; + +export type RetrieveReleaseHealthSessionStatisticsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; +}; + +export type RetrieveReleaseHealthSessionStatisticsResponses = { + 200: { + start: string; + end: string; + intervals: Array; + groups: Array<{ + by: { + project?: number; + release?: string; + environment?: string; + 'session.status'?: string; + }; + series: { + [key: string]: Array; + }; + totals: { + [key: string]: number | null; + }; + }>; + query: string; + }; +}; + +export type RetrieveReleaseHealthSessionStatisticsResponse = RetrieveReleaseHealthSessionStatisticsResponses[keyof RetrieveReleaseHealthSessionStatisticsResponses]; + +export type ResolveAShortIdData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The short ID of the issue to resolve. + */ + issue_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/shortids/{issue_id}/'; +}; + +export type ResolveAShortIdErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ResolveAShortIdResponses = { + 200: { + organizationSlug: string; + projectSlug: string; + groupId: string; + group: { + isUnhandled?: boolean; + count?: string; + userCount?: number; + firstSeen?: string | null; + lastSeen?: string | null; + id: string; + shareId: string; + shortId: string; + title: string; + culprit: string | null; + permalink: string; + logger: string | null; + level: string; + status: string; + statusDetails: { + autoResolved?: boolean; + ignoreCount?: number; + ignoreUntil?: string; + ignoreUserCount?: number; + ignoreUserWindow?: number; + ignoreWindow?: number; + actor?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + inNextRelease?: boolean; + inRelease?: string; + inCommit?: string; + pendingEvents?: number; + info?: unknown; + }; + substatus: string | null; + isPublic: boolean; + platform: string | null; + priority: string | null; + priorityLockedAt: string | null; + seerFixabilityScore: number | null; + seerAutofixLastTriggered: string | null; + project: { + id: string; + name: string; + slug: string; + platform: string | null; + }; + type: string; + issueType: string; + issueCategory: string; + metadata: { + [key: string]: unknown; + }; + numComments: number; + assignedTo: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + isBookmarked: boolean; + isSubscribed: boolean; + subscriptionDetails: { + disabled?: boolean; + reason?: string; + } | null; + hasSeen: boolean; + annotations: Array<{ + displayName: string; + url: string; + }>; + }; + shortId: string; + }; +}; + +export type ResolveAShortIdResponse = ResolveAShortIdResponses[keyof ResolveAShortIdResponses]; + +export type RetrieveAnOrganizationSEventsCountByProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query: { + /** + * the `sum(quantity)` field is bytes for attachments, and all others the 'event' count for those types of events. + * + * `sum(times_seen)` sums the number of times an event has been seen. For 'normal' event types, this will be equal to `sum(quantity)` for now. For sessions, quantity will sum the total number of events seen in a session, while `times_seen` will be the unique number of sessions. and for attachments, `times_seen` will be the total number of attachments, while quantity will be the total sum of attachment bytes. + * + * * `sum(quantity)` + * * `sum(times_seen)` + */ + field: 'sum(quantity)' | 'sum(times_seen)'; + /** + * This defines the range of the time series, relative to now. The range is given in a `` format. For example `1d` for a one day range. Possible units are `m` for minutes, `h` for hours, `d` for days and `w` for weeks.You must either provide a `statsPeriod`, or a `start` and `end`. + */ + statsPeriod?: string; + /** + * This is the resolution of the time series, given in the same format as `statsPeriod`. The default resolution is `1h` and the minimum resolution is currently restricted to `1h` as well. Intervals larger than `1d` are not supported, and the interval has to cleanly divide one day. + */ + interval?: string; + /** + * This defines the start of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds.Use along with `end` instead of `statsPeriod`. + */ + start?: string; + /** + * This defines the inclusive end of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds.Use along with `start` instead of `statsPeriod`. + */ + end?: string; + /** + * The ID of the projects to filter by. + */ + project?: Array; + /** + * If filtering by attachments, you cannot filter by any other category due to quantity values becoming nonsensical (combining bytes and event counts). + * + * If filtering by `error`, it will automatically add `default` and `security` as we currently roll those two categories into `error` for displaying. + * + * * `error` + * * `transaction` + * * `attachment` + * * `replays` + * * `profiles` + */ + category?: 'error' | 'transaction' | 'attachment' | 'replays' | 'profiles'; + /** + * See https://docs.sentry.io/product/stats/ for more information on outcome statuses. + * + * * `accepted` + * * `filtered` + * * `rate_limited` + * * `invalid` + * * `abuse` + * * `client_discard` + * * `cardinality_limited` + */ + outcome?: 'accepted' | 'filtered' | 'rate_limited' | 'invalid' | 'abuse' | 'client_discard' | 'cardinality_limited'; + /** + * The reason field will contain why an event was filtered/dropped. + */ + reason?: string; + /** + * Download the API response in as a csv file + */ + download?: boolean; + }; + url: '/api/0/organizations/{organization_id_or_slug}/stats-summary/'; +}; + +export type RetrieveAnOrganizationSEventsCountByProjectErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAnOrganizationSEventsCountByProjectResponses = { + 200: { + start: string; + end: string; + projects: Array<{ + id: string; + slug: string; + stats: Array<{ + [key: string]: unknown; + }>; + }>; + }; +}; + +export type RetrieveAnOrganizationSEventsCountByProjectResponse = RetrieveAnOrganizationSEventsCountByProjectResponses[keyof RetrieveAnOrganizationSEventsCountByProjectResponses]; + +export type RetrieveEventCountsForAnOrganizationV2Data = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query: { + /** + * can pass multiple groupBy parameters to group by multiple, e.g. `groupBy=project&groupBy=outcome` to group by multiple dimensions. Note that grouping by project can cause missing rows if the number of projects / interval is large. If you have a large number of projects, we recommend filtering and querying by them individually.Also note that grouping by projects does not currently support timeseries interval responses and will instead be a sum of the projectover the entire period specified. + */ + groupBy: Array<'outcome' | 'category' | 'reason' | 'project'>; + /** + * the `sum(quantity)` field is bytes for attachments, and all others the 'event' count for those types of events. + * + * `sum(times_seen)` sums the number of times an event has been seen. For 'normal' event types, this will be equal to `sum(quantity)` for now. For sessions, quantity will sum the total number of events seen in a session, while `times_seen` will be the unique number of sessions. and for attachments, `times_seen` will be the total number of attachments, while quantity will be the total sum of attachment bytes. + * + * * `sum(quantity)` + * * `sum(times_seen)` + */ + field: 'sum(quantity)' | 'sum(times_seen)'; + /** + * This defines the range of the time series, relative to now. The range is given in a `` format. For example `1d` for a one day range. Possible units are `m` for minutes, `h` for hours, `d` for days and `w` for weeks.You must either provide a `statsPeriod`, or a `start` and `end`. + */ + statsPeriod?: string; + /** + * This is the resolution of the time series, given in the same format as `statsPeriod`. The default resolution is `1h` and the minimum resolution is currently restricted to `1h` as well. Intervals larger than `1d` are not supported, and the interval has to cleanly divide one day. + */ + interval?: string; + /** + * This defines the start of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds.Use along with `end` instead of `statsPeriod`. + */ + start?: string; + /** + * This defines the inclusive end of the time series range as an explicit datetime, either in UTC ISO8601 or epoch seconds.Use along with `start` instead of `statsPeriod`. + */ + end?: string; + /** + * The ID of the projects to filter by. + * + * Use `-1` to include all accessible projects. + */ + project?: Array; + /** + * Filter by data category. Each category represents a different type of data: + * + * - `error`: Error events (includes `default` and `security` categories) + * - `transaction`: Transaction events + * - `attachment`: File attachments (note: cannot be combined with other categories since quantity represents bytes) + * - `replay`: Session replay events + * - `profile`: Performance profiles + * - `profile_duration`: Profile duration data (note: cannot be combined with other categories since quantity represents milliseconds) + * - `profile_duration_ui`: Profile duration (UI) data (note: cannot be combined with other categories since quantity represents milliseconds) + * - `profile_chunk`: Profile chunk data + * - `profile_chunk_ui`: Profile chunk (UI) data + * - `monitor`: Cron monitor events + * + * * `error` + * * `transaction` + * * `attachment` + * * `replay` + * * `profile` + * * `profile_duration` + * * `profile_duration_ui` + * * `profile_chunk` + * * `profile_chunk_ui` + * * `monitor` + */ + category?: 'error' | 'transaction' | 'attachment' | 'replay' | 'profile' | 'profile_duration' | 'profile_duration_ui' | 'profile_chunk' | 'profile_chunk_ui' | 'monitor'; + /** + * See https://docs.sentry.io/product/stats/ for more information on outcome statuses. + * + * * `accepted` + * * `filtered` + * * `rate_limited` + * * `invalid` + * * `abuse` + * * `client_discard` + * * `cardinality_limited` + */ + outcome?: 'accepted' | 'filtered' | 'rate_limited' | 'invalid' | 'abuse' | 'client_discard' | 'cardinality_limited'; + /** + * The reason field will contain why an event was filtered/dropped. + */ + reason?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/stats_v2/'; +}; + +export type RetrieveEventCountsForAnOrganizationV2Errors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveEventCountsForAnOrganizationV2Responses = { + 200: { + start: string; + end: string; + intervals: Array; + groups: Array<{ + by: { + [key: string]: unknown; + }; + totals: { + [key: string]: unknown; + }; + series: { + [key: string]: unknown; + }; + }>; + }; +}; + +export type RetrieveEventCountsForAnOrganizationV2Response = RetrieveEventCountsForAnOrganizationV2Responses[keyof RetrieveEventCountsForAnOrganizationV2Responses]; + +export type ListAnOrganizationSTeamsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * + * Specify `"0"` to return team details that do not include projects. + * + */ + detailed?: string; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/teams/'; +}; + +export type ListAnOrganizationSTeamsErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSTeamsResponses = { + 200: Array<{ + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; + }>; +}; + +export type ListAnOrganizationSTeamsResponse = ListAnOrganizationSTeamsResponses[keyof ListAnOrganizationSTeamsResponses]; + +export type CreateANewTeamData = { + body?: { + /** + * Uniquely identifies a team and is used for the interface. If not + * provided, it is automatically generated from the name. + */ + slug?: string | null; + /** + * **`[DEPRECATED]`** The name for the team. If not provided, it is + * automatically generated from the slug + * + * @deprecated + */ + name?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/teams/'; +}; + +export type CreateANewTeamErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * A team with this slug already exists. + */ + 404: unknown; +}; + +export type CreateANewTeamResponses = { + 201: { + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; + }; +}; + +export type CreateANewTeamResponse = CreateANewTeamResponses[keyof CreateANewTeamResponses]; + +export type ListAuserSTeamsForAnOrganizationData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/user-teams/'; +}; + +export type ListAuserSTeamsForAnOrganizationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAuserSTeamsForAnOrganizationResponses = { + 200: Array<{ + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; + }>; +}; + +export type ListAuserSTeamsForAnOrganizationResponse = ListAuserSTeamsForAnOrganizationResponses[keyof ListAuserSTeamsForAnOrganizationResponses]; + +export type BulkDeleteAlertsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * An optional search query for filtering alerts. + */ + query?: string; + /** + * The ID of the alert you'd like to query. + */ + id?: Array; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/workflows/'; +}; + +export type BulkDeleteAlertsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type BulkDeleteAlertsResponses = { + /** + * Success + */ + 200: unknown; + /** + * No Content + */ + 204: void; +}; + +export type BulkDeleteAlertsResponse = BulkDeleteAlertsResponses[keyof BulkDeleteAlertsResponses]; + +export type FetchAlertsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * The field to sort results by. If not specified, the results are sorted by id. + * + * Available fields are: + * - `name` + * - `id` + * - `dateCreated` + * - `dateUpdated` + * - `connectedDetectors` + * - `actions` + * - `priorityDetector` + * + * Prefix with `-` to sort in descending order. + * + */ + sortBy?: string; + /** + * An optional search query for filtering alerts. + */ + query?: string; + /** + * The ID of the alert you'd like to query. + */ + id?: Array; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/workflows/'; +}; + +export type FetchAlertsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type FetchAlertsResponses = { + 200: Array<{ + id: string; + name: string; + organizationId: string; + createdBy: string | null; + dateCreated: string; + dateUpdated: string; + triggers: { + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + } | null; + actionFilters: Array<{ + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + }> | null; + environment: string | null; + config: { + [key: string]: unknown; + }; + detectorIds: Array | null; + enabled: boolean; + lastTriggered: string | null; + }>; +}; + +export type FetchAlertsResponse = FetchAlertsResponses[keyof FetchAlertsResponses]; + +export type CreateAnAlertForAnOrganizationData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The name of the alert + */ + name: string; + /** + * The ID of the existing alert + */ + id?: string; + /** + * Whether the alert is enabled or disabled + */ + enabled?: boolean; + /** + * + * Typically the frequency at which the alert will fire, in minutes. + * + * - `0`: 0 minutes + * - `5`: 5 minutes + * - `10`: 10 minutes + * - `30`: 30 minutes + * - `60`: 1 hour + * - `180`: 3 hours + * - `720`: 12 hours + * - `1440`: 24 hours + * + * ```json + * { + * "frequency":3600 + * } + * ``` + * + */ + config?: { + [key: string]: unknown; + }; + /** + * The name of the environment for the alert to evaluate in + */ + environment?: string | null; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + triggers?: { + id?: string; + /** + * * `any` + * * `any-short` + * * `all` + * * `none` + */ + logic_type: 'any' | 'any-short' | 'all' | 'none'; + conditions?: Array; + }; + /** + * The filters to run before the action will fire and the action(s) to fire. + * + * `logicType` can be one of `any-short`, `all`, or `none`. + * + * Below is a basic example. See below for all other options. + * + * ```json + * "actionFilters": [ + * { + * "logicType": "any", + * "conditions": [ + * { + * "type": "level", + * "comparison": { + * "level": 50, + * "match": "eq" + * }, + * "conditionResult": true + * } + * ], + * "actions": [ + * { + * "id": "123", + * "type": "email", + * "integrationId": null, + * "data": {}, + * "config": { + * "targetType": "user", + * "targetDisplay": null, + * "targetIdentifier": "56789" + * }, + * "status": "active" + * } + * ] + * } + * ] + * ``` + * + * ## Conditions + * + * **Issue Age** + * - `time`: One of `minute`, `hour`, `day`, or `week`. + * - `value`: A positive integer. + * - `comparisonType`: One of `older` or `newer`. + * ```json + * { + * "type": "age_comparison", + * "comparison": { + * "time": "minute", + * "value": 10, + * "comparisonType": "older" + * }, + * "conditionResult": true + * } + * + * ``` + * + * **Issue Assignment** + * - `targetType`: Who the issue is assigned to + * - `NoOne`: Unassigned + * - `Member`: Assigned to a user + * - `Team`: Assigned to a team + * - `targetIdentifier`: The ID of the user or team from the `targetType`. Enter "" if `targetType` is `NoOne`. + * ```json + * { + * "type": "assigned_to", + * "comparison": { + * "targetType": "Member", + * "targetIdentifier": 123456 + * }, + * "conditionResult": true + * } + * ``` + * + * **Issue Category** + * - `value`: The issue category to filter to. + * - `1`: Error issues + * - `6`: Feedback issues + * - `10`: Outage issues + * - `11`: Metric issues + * - `12`: DB Query issues + * - `13`: HTTP Client issues + * - `14`: Front end issues + * - `15`: Mobile issues + * ```json + * { + * "type": "issue_category", + * "comparison": { + * "value": 1 + * }, + * "conditionResult": true + * } + * ``` + * + * **Issue Frequency** + * - `value`: A positive integer representing how many times the issue has to happen before the alert will fire. + * ```json + * { + * "type": "issue_occurrences", + * "comparison": { + * "value": 10 + * }, + * "conditionResult": true + * } + * ``` + * + * **De-escalation** + * ```json + * { + * "type": "issue_priority_deescalating", + * "comparison": true, + * "conditionResult": true + * } + * ``` + * + * **Issue Priority** + * - `comparison`: The priority the issue must be for the alert to fire. + * - `75`: High priority + * - `50`: Medium priority + * - `25`: Low priority + * ```json + * { + * "type": "issue_priority_greater_or_equal", + * "comparison": 75, + * "conditionResult": true + * } + * ``` + * + * **Number of Users Affected** + * - `value`: A positive integer representing the number of users that must be affected before the alert will fire. + * - `filters`: A list of additional sub-filters to evaluate before the alert will fire. + * - `interval`: The time period in which to evaluate the value. e.g. Number of users affected by an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "event_unique_user_frequency_count", + * "comparison": { + * "value": 100, + * "filters": [{"key": "foo", "match": "eq", "value": "bar"}], + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Number of Events** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Number of events in an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "event_frequency_count", + * "comparison": { + * "value": 100, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Percent of Events** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Number of events in an issue is `comparisonInterval` percent higher `value` compared to `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * - `comparisonInterval`: The time period to compare against. See `interval` for options. + * ```json + * { + * "type": "event_frequency_percent", + * "comparison": { + * "value": 100, + * "interval": "1h", + * "comparisonInterval": "1w" + * }, + * "conditionResult": true + * } + * + * ``` + * + * **Percentage of Sessions Affected Count** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Percentage of sessions affected by an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "percent_sessions_count", + * "comparison": { + * "value": 10, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Percentage of Sessions Affected Percent** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Percentage of sessions affected by an issue is `comparisonInterval` percent higher `value` compared to `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * - `comparisonInterval`: The time period to compare against. See `interval` for options. + * ```json + * { + * "type": "percent_sessions_percent", + * "comparison": { + * "value": 10, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Event Attribute** + * The event's `attribute` value `match` `value` + * + * - `attribute`: The event attribute to match on. Valid values are: `message`, `platform`, `environment`, `type`, `error.handled`, `error.unhandled`, `error.main_thread`, `exception.type`, `exception.value`, `user.id`, `user.email`, `user.username`, `user.ip_address`, `http.method`, `http.url`, `http.status_code`, `sdk.name`, `stacktrace.code`, `stacktrace.module`, `stacktrace.filename`, `stacktrace.abs_path`, `stacktrace.package`, `unreal.crash_type`, `app.in_foreground`. + * - `match`: The comparison operator + * - `co`: Contains + * - `nc`: Does not contain + * - `eq`: Equals + * - `ne`: Does not equal + * - `sw`: Starts with + * - `ew`: Ends with + * - `is`: Is set + * - `ns`: Is not set + * - `value`: A string. Not required when match is `is` or `ns`. + * + * ```json + * { + * "type": "event_attribute", + * "comparison": { + * "match": "co", + * "value": "bar", + * "attribute": "message" + * }, + * "conditionResult": true + * } + * ``` + * + * **Tagged Event** + * The event's tags `key` match `value` + * - `key`: The tag value + * - `match`: The comparison operator + * - `co`: Contains + * - `nc`: Does not contain + * - `eq`: Equals + * - `ne`: Does not equal + * - `sw`: Starts with + * - `ew`: Ends with + * - `is`: Is set + * - `ns`: Is not set + * - `value`: A string. Not required when match is `is` or `ns`. + * + * ```json + * { + * "type": "tagged_event", + * "comparison": { + * "key": "level", + * "match": "eq", + * "value": "error" + * }, + * "conditionResult": true + * } + * ``` + * + * **Latest Release** + * The event is from the latest release + * + * ```json + * { + * "type": "latest_release", + * "comparison": true, + * "conditionResult": true + * } + * ``` + * + * **Release Age** + * ```json + * { + * "type": "latest_adopted_release", + * "comparison": { + * "environment": "12345", + * "ageComparison": "older", + * "releaseAgeType": "oldest" + * }, + * "conditionResult": true + * } + * ``` + * + * **Event Level** + * The event's level is `match` `level` + * - `match`: The comparison operator + * - `eq`: Equal + * - `gte`: Greater than or equal + * - `lte`: Less than or equal + * - `level`: The event level + * - `50`: Fatal + * - `40`: Error + * - `30`: Warning + * - `20`: Info + * - `10`: Debug + * - `0`: Sample + * + * ```json + * { + * "type": "level", + * "comparison": { + * "level": 50, + * "match": "eq" + * }, + * "conditionResult": true + * } + * ``` + * + * ## Actions + * A list of actions that take place when all required conditions and filters for the alert are met. See below for a list of possible actions. + * + * + * **Notify on Preferred Channel** + * - `data`: A dictionary with the fallthrough type option when choosing to notify Suggested Assignees. Leave empty if notifying a user or team. + * - `fallthroughType` + * - `ActiveMembers` + * - `AllMembers` + * - `NoOne` + * - `config`: A dictionary with the configuration options for notification. + * - `targetType`: The type of recipient to notify + * - `user`: User + * - `team`: Team + * - `issue_owners`: Suggested Assignees + * - `targetDisplay`: null + * - `targetIdentifier`: The id of the user or team to notify. Leave null for Suggested Assignees. + * + * ```json + * { + * "type":"email", + * "integrationId":null, + * "data":{}, + * "config":{ + * "targetType":"user", + * "targetDisplay":null, + * "targetIdentifier":"232692" + * }, + * "status":"active" + * }, + * { + * "type":"email", + * "integrationId":null, + * "data":{ + * "fallthroughType":"ActiveMembers" + * }, + * "config":{ + * "targetType":"issue_owners", + * "targetDisplay":null, + * "targetIdentifier":""} + * , + * "status":"active" + * } + * ``` + * **Notify on Slack** + * - `targetDisplay`: The name of the channel to notify in. + * `integrationId`: The stringified ID of the integration. + * + * ```json + * { + * "type":"slack", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"", + * "targetDisplay":"notify-errors" + * }, + * "integrationId":"1", + * "data":{}, + * "status":"active" + * } + * ``` + * + * **Notify on PagerDuty** + * - `targetDisplay`: The name of the service to create the ticket in. + * - `integrationId`: The stringified ID of the integration. + * - `data["priority"]`: The severity level for the notification. + * + * ```json + * { + * "type":"pagerduty", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"123456", + * "targetDisplay":"Error Service" + * }, + * "integrationId":"2345", + * "data":{ + * "priority":"default" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on Discord** + * - `targetDisplay`: The name of the service to create the ticket in. + * - `integrationId`: The stringified ID of the integration. + * - `data["tags"]`: Comma separated list of tags to add to the notification. + * + * ```json + * { + * "type":"discord", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"12345", + * "targetDisplay":"", + * }, + * "integrationId":"1234", + * "data":{ + * "tags":"transaction,environment" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on MSTeams** + * - `targetIdentifier` - The integration ID associated with the Microsoft Teams team. + * - `targetDisplay` - The name of the channel to send the notification to. + * - `integrationId`: The stringified ID of the integration. + * ```json + * { + * "type":"msteams", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"19:a4b3kghaghgkjah357y6847@thread.skype", + * "targetDisplay":"notify-errors" + * }, + * "integrationId":"1", + * "data":{}, + * "status":"active" + * } + * ``` + * + * **Notify on OpsGenie** + * - `targetDisplay`: The name of the Opsgenie team. + * - `targetIdentifier`: The ID of the Opsgenie team to send the notification to. + * - `integrationId`: The stringified ID of the integration. + * - `data["priority"]`: The priority level for the notification. + * + * ```json + * { + * "type":"opsgenie", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"123456-Error-Service", + * "targetDisplay":"Error Service" + * }, + * "integrationId":"2345", + * "data":{ + * "priority":"P3" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on Azure DevOps** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"vsts", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a Jira ticket** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"jira", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a Jira Server ticket** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"jira_server", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a GitHub issue** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"github", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + */ + action_filters?: Array; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/workflows/'; +}; + +export type CreateAnAlertForAnOrganizationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type CreateAnAlertForAnOrganizationResponses = { + 201: { + id: string; + name: string; + organizationId: string; + createdBy: string | null; + dateCreated: string; + dateUpdated: string; + triggers: { + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + } | null; + actionFilters: Array<{ + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + }> | null; + environment: string | null; + config: { + [key: string]: unknown; + }; + detectorIds: Array | null; + enabled: boolean; + lastTriggered: string | null; + }; +}; + +export type CreateAnAlertForAnOrganizationResponse = CreateAnAlertForAnOrganizationResponses[keyof CreateAnAlertForAnOrganizationResponses]; + +export type MutateAnOrganizationSAlertsData = { + body: { + /** + * Whether to enable or disable the alerts + */ + enabled: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * An optional search query for filtering alerts. + */ + query?: string; + /** + * The ID of the alert you'd like to query. + */ + id?: Array; + /** + * The IDs of projects to filter by. `-1` means all available projects. + * For example, the following are valid parameters: + * - `/?project=1234&project=56789` + * - `/?project=-1` + * + */ + project?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/workflows/'; +}; + +export type MutateAnOrganizationSAlertsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type MutateAnOrganizationSAlertsResponses = { + 200: Array<{ + id: string; + name: string; + organizationId: string; + createdBy: string | null; + dateCreated: string; + dateUpdated: string; + triggers: { + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + } | null; + actionFilters: Array<{ + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + }> | null; + environment: string | null; + config: { + [key: string]: unknown; + }; + detectorIds: Array | null; + enabled: boolean; + lastTriggered: string | null; + }>; +}; + +export type MutateAnOrganizationSAlertsResponse = MutateAnOrganizationSAlertsResponses[keyof MutateAnOrganizationSAlertsResponses]; + +export type DeleteAnAlertData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the alert you'd like to query. + */ + workflow_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/workflows/{workflow_id}/'; +}; + +export type DeleteAnAlertErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnAlertResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAnAlertResponse = DeleteAnAlertResponses[keyof DeleteAnAlertResponses]; + +export type FetchAnAlertData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the alert you'd like to query. + */ + workflow_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/workflows/{workflow_id}/'; +}; + +export type FetchAnAlertErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type FetchAnAlertResponses = { + 200: { + id: string; + name: string; + organizationId: string; + createdBy: string | null; + dateCreated: string; + dateUpdated: string; + triggers: { + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + } | null; + actionFilters: Array<{ + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + }> | null; + environment: string | null; + config: { + [key: string]: unknown; + }; + detectorIds: Array | null; + enabled: boolean; + lastTriggered: string | null; + }; +}; + +export type FetchAnAlertResponse = FetchAnAlertResponses[keyof FetchAnAlertResponses]; + +export type UpdateAnAlertByIdData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The name of the alert + */ + name: string; + /** + * The ID of the existing alert + */ + id?: string; + /** + * Whether the alert is enabled or disabled + */ + enabled?: boolean; + /** + * + * Typically the frequency at which the alert will fire, in minutes. + * + * - `0`: 0 minutes + * - `5`: 5 minutes + * - `10`: 10 minutes + * - `30`: 30 minutes + * - `60`: 1 hour + * - `180`: 3 hours + * - `720`: 12 hours + * - `1440`: 24 hours + * + * ```json + * { + * "frequency":3600 + * } + * ``` + * + */ + config?: { + [key: string]: unknown; + }; + /** + * The name of the environment for the alert to evaluate in + */ + environment?: string | null; + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + triggers?: { + id?: string; + /** + * * `any` + * * `any-short` + * * `all` + * * `none` + */ + logic_type: 'any' | 'any-short' | 'all' | 'none'; + conditions?: Array; + }; + /** + * The filters to run before the action will fire and the action(s) to fire. + * + * `logicType` can be one of `any-short`, `all`, or `none`. + * + * Below is a basic example. See below for all other options. + * + * ```json + * "actionFilters": [ + * { + * "logicType": "any", + * "conditions": [ + * { + * "type": "level", + * "comparison": { + * "level": 50, + * "match": "eq" + * }, + * "conditionResult": true + * } + * ], + * "actions": [ + * { + * "id": "123", + * "type": "email", + * "integrationId": null, + * "data": {}, + * "config": { + * "targetType": "user", + * "targetDisplay": null, + * "targetIdentifier": "56789" + * }, + * "status": "active" + * } + * ] + * } + * ] + * ``` + * + * ## Conditions + * + * **Issue Age** + * - `time`: One of `minute`, `hour`, `day`, or `week`. + * - `value`: A positive integer. + * - `comparisonType`: One of `older` or `newer`. + * ```json + * { + * "type": "age_comparison", + * "comparison": { + * "time": "minute", + * "value": 10, + * "comparisonType": "older" + * }, + * "conditionResult": true + * } + * + * ``` + * + * **Issue Assignment** + * - `targetType`: Who the issue is assigned to + * - `NoOne`: Unassigned + * - `Member`: Assigned to a user + * - `Team`: Assigned to a team + * - `targetIdentifier`: The ID of the user or team from the `targetType`. Enter "" if `targetType` is `NoOne`. + * ```json + * { + * "type": "assigned_to", + * "comparison": { + * "targetType": "Member", + * "targetIdentifier": 123456 + * }, + * "conditionResult": true + * } + * ``` + * + * **Issue Category** + * - `value`: The issue category to filter to. + * - `1`: Error issues + * - `6`: Feedback issues + * - `10`: Outage issues + * - `11`: Metric issues + * - `12`: DB Query issues + * - `13`: HTTP Client issues + * - `14`: Front end issues + * - `15`: Mobile issues + * ```json + * { + * "type": "issue_category", + * "comparison": { + * "value": 1 + * }, + * "conditionResult": true + * } + * ``` + * + * **Issue Frequency** + * - `value`: A positive integer representing how many times the issue has to happen before the alert will fire. + * ```json + * { + * "type": "issue_occurrences", + * "comparison": { + * "value": 10 + * }, + * "conditionResult": true + * } + * ``` + * + * **De-escalation** + * ```json + * { + * "type": "issue_priority_deescalating", + * "comparison": true, + * "conditionResult": true + * } + * ``` + * + * **Issue Priority** + * - `comparison`: The priority the issue must be for the alert to fire. + * - `75`: High priority + * - `50`: Medium priority + * - `25`: Low priority + * ```json + * { + * "type": "issue_priority_greater_or_equal", + * "comparison": 75, + * "conditionResult": true + * } + * ``` + * + * **Number of Users Affected** + * - `value`: A positive integer representing the number of users that must be affected before the alert will fire. + * - `filters`: A list of additional sub-filters to evaluate before the alert will fire. + * - `interval`: The time period in which to evaluate the value. e.g. Number of users affected by an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "event_unique_user_frequency_count", + * "comparison": { + * "value": 100, + * "filters": [{"key": "foo", "match": "eq", "value": "bar"}], + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Number of Events** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Number of events in an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "event_frequency_count", + * "comparison": { + * "value": 100, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Percent of Events** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Number of events in an issue is `comparisonInterval` percent higher `value` compared to `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * - `comparisonInterval`: The time period to compare against. See `interval` for options. + * ```json + * { + * "type": "event_frequency_percent", + * "comparison": { + * "value": 100, + * "interval": "1h", + * "comparisonInterval": "1w" + * }, + * "conditionResult": true + * } + * + * ``` + * + * **Percentage of Sessions Affected Count** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Percentage of sessions affected by an issue is more than `value` in `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * ```json + * { + * "type": "percent_sessions_count", + * "comparison": { + * "value": 10, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Percentage of Sessions Affected Percent** + * - `value`: A positive integer representing the number of events in an issue that must come in before the alert will fire + * - `interval`: The time period in which to evaluate the value. e.g. Percentage of sessions affected by an issue is `comparisonInterval` percent higher `value` compared to `interval`. + * - `1min`: 1 minute + * - `5min`: 5 minutes + * - `15min`: 15 minutes + * - `1hr`: 1 hour + * - `1d`: 1 day + * - `1w`: 1 week + * - `30d`: 30 days + * - `comparisonInterval`: The time period to compare against. See `interval` for options. + * ```json + * { + * "type": "percent_sessions_percent", + * "comparison": { + * "value": 10, + * "interval": "1h" + * }, + * "conditionResult": true + * } + * ``` + * + * **Event Attribute** + * The event's `attribute` value `match` `value` + * + * - `attribute`: The event attribute to match on. Valid values are: `message`, `platform`, `environment`, `type`, `error.handled`, `error.unhandled`, `error.main_thread`, `exception.type`, `exception.value`, `user.id`, `user.email`, `user.username`, `user.ip_address`, `http.method`, `http.url`, `http.status_code`, `sdk.name`, `stacktrace.code`, `stacktrace.module`, `stacktrace.filename`, `stacktrace.abs_path`, `stacktrace.package`, `unreal.crash_type`, `app.in_foreground`. + * - `match`: The comparison operator + * - `co`: Contains + * - `nc`: Does not contain + * - `eq`: Equals + * - `ne`: Does not equal + * - `sw`: Starts with + * - `ew`: Ends with + * - `is`: Is set + * - `ns`: Is not set + * - `value`: A string. Not required when match is `is` or `ns`. + * + * ```json + * { + * "type": "event_attribute", + * "comparison": { + * "match": "co", + * "value": "bar", + * "attribute": "message" + * }, + * "conditionResult": true + * } + * ``` + * + * **Tagged Event** + * The event's tags `key` match `value` + * - `key`: The tag value + * - `match`: The comparison operator + * - `co`: Contains + * - `nc`: Does not contain + * - `eq`: Equals + * - `ne`: Does not equal + * - `sw`: Starts with + * - `ew`: Ends with + * - `is`: Is set + * - `ns`: Is not set + * - `value`: A string. Not required when match is `is` or `ns`. + * + * ```json + * { + * "type": "tagged_event", + * "comparison": { + * "key": "level", + * "match": "eq", + * "value": "error" + * }, + * "conditionResult": true + * } + * ``` + * + * **Latest Release** + * The event is from the latest release + * + * ```json + * { + * "type": "latest_release", + * "comparison": true, + * "conditionResult": true + * } + * ``` + * + * **Release Age** + * ```json + * { + * "type": "latest_adopted_release", + * "comparison": { + * "environment": "12345", + * "ageComparison": "older", + * "releaseAgeType": "oldest" + * }, + * "conditionResult": true + * } + * ``` + * + * **Event Level** + * The event's level is `match` `level` + * - `match`: The comparison operator + * - `eq`: Equal + * - `gte`: Greater than or equal + * - `lte`: Less than or equal + * - `level`: The event level + * - `50`: Fatal + * - `40`: Error + * - `30`: Warning + * - `20`: Info + * - `10`: Debug + * - `0`: Sample + * + * ```json + * { + * "type": "level", + * "comparison": { + * "level": 50, + * "match": "eq" + * }, + * "conditionResult": true + * } + * ``` + * + * ## Actions + * A list of actions that take place when all required conditions and filters for the alert are met. See below for a list of possible actions. + * + * + * **Notify on Preferred Channel** + * - `data`: A dictionary with the fallthrough type option when choosing to notify Suggested Assignees. Leave empty if notifying a user or team. + * - `fallthroughType` + * - `ActiveMembers` + * - `AllMembers` + * - `NoOne` + * - `config`: A dictionary with the configuration options for notification. + * - `targetType`: The type of recipient to notify + * - `user`: User + * - `team`: Team + * - `issue_owners`: Suggested Assignees + * - `targetDisplay`: null + * - `targetIdentifier`: The id of the user or team to notify. Leave null for Suggested Assignees. + * + * ```json + * { + * "type":"email", + * "integrationId":null, + * "data":{}, + * "config":{ + * "targetType":"user", + * "targetDisplay":null, + * "targetIdentifier":"232692" + * }, + * "status":"active" + * }, + * { + * "type":"email", + * "integrationId":null, + * "data":{ + * "fallthroughType":"ActiveMembers" + * }, + * "config":{ + * "targetType":"issue_owners", + * "targetDisplay":null, + * "targetIdentifier":""} + * , + * "status":"active" + * } + * ``` + * **Notify on Slack** + * - `targetDisplay`: The name of the channel to notify in. + * `integrationId`: The stringified ID of the integration. + * + * ```json + * { + * "type":"slack", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"", + * "targetDisplay":"notify-errors" + * }, + * "integrationId":"1", + * "data":{}, + * "status":"active" + * } + * ``` + * + * **Notify on PagerDuty** + * - `targetDisplay`: The name of the service to create the ticket in. + * - `integrationId`: The stringified ID of the integration. + * - `data["priority"]`: The severity level for the notification. + * + * ```json + * { + * "type":"pagerduty", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"123456", + * "targetDisplay":"Error Service" + * }, + * "integrationId":"2345", + * "data":{ + * "priority":"default" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on Discord** + * - `targetDisplay`: The name of the service to create the ticket in. + * - `integrationId`: The stringified ID of the integration. + * - `data["tags"]`: Comma separated list of tags to add to the notification. + * + * ```json + * { + * "type":"discord", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"12345", + * "targetDisplay":"", + * }, + * "integrationId":"1234", + * "data":{ + * "tags":"transaction,environment" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on MSTeams** + * - `targetIdentifier` - The integration ID associated with the Microsoft Teams team. + * - `targetDisplay` - The name of the channel to send the notification to. + * - `integrationId`: The stringified ID of the integration. + * ```json + * { + * "type":"msteams", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"19:a4b3kghaghgkjah357y6847@thread.skype", + * "targetDisplay":"notify-errors" + * }, + * "integrationId":"1", + * "data":{}, + * "status":"active" + * } + * ``` + * + * **Notify on OpsGenie** + * - `targetDisplay`: The name of the Opsgenie team. + * - `targetIdentifier`: The ID of the Opsgenie team to send the notification to. + * - `integrationId`: The stringified ID of the integration. + * - `data["priority"]`: The priority level for the notification. + * + * ```json + * { + * "type":"opsgenie", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":"123456-Error-Service", + * "targetDisplay":"Error Service" + * }, + * "integrationId":"2345", + * "data":{ + * "priority":"P3" + * }, + * "status":"active" + * } + * ``` + * + * **Notify on Azure DevOps** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"vsts", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a Jira ticket** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"jira", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a Jira Server ticket** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"jira_server", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + * **Create a GitHub issue** + * - `integrationId`: The stringified ID of the integration. + * - `data` - A list of any fields you want to include in the ticket as objects. + * + * ```json + * { + * "type":"github", + * "config":{ + * "targetType":"specific", + * "targetIdentifier":", + * "targetDisplay":"" + * }, + * "integrationId":"2345", + * "data":{...}, + * "status":"active" + * } + * ``` + * + */ + action_filters?: Array; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the alert you'd like to query. + */ + workflow_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/workflows/{workflow_id}/'; +}; + +export type UpdateAnAlertByIdErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAnAlertByIdResponses = { + 200: { + id: string; + name: string; + organizationId: string; + createdBy: string | null; + dateCreated: string; + dateUpdated: string; + triggers: { + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + } | null; + actionFilters: Array<{ + id?: string; + organizationId?: string; + logicType?: string; + conditions?: Array<{ + id: string; + type: string; + comparison: boolean | number; + conditionResult: boolean; + }> | Array; + actions?: Array<{ + id?: string; + type?: string; + integrationId?: string | null; + data?: { + [key: string]: string; + }; + config?: { + [key: string]: unknown; + }; + status?: string; + }> | Array; + }> | null; + environment: string | null; + config: { + [key: string]: unknown; + }; + detectorIds: Array | null; + enabled: boolean; + lastTriggered: string | null; + }; +}; + +export type UpdateAnAlertByIdResponse = UpdateAnAlertByIdResponses[keyof UpdateAnAlertByIdResponses]; + +export type DeleteAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/'; +}; + +export type DeleteAProjectErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAProjectResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAProjectResponse = DeleteAProjectResponses[keyof DeleteAProjectResponses]; + +export type RetrieveAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/'; +}; + +export type RetrieveAProjectErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAProjectResponses = { + 200: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + team?: { + id: string; + name: string; + slug: string; + }; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + latestRelease: { + version: string; + } | null; + options: { + [key: string]: unknown; + }; + digestsMinDelay: number; + digestsMaxDelay: number; + subjectPrefix: string; + allowedDomains: Array; + resolveAge: number; + dataScrubber: boolean; + dataScrubberDefaults: boolean; + safeFields: Array; + storeCrashReports: number | null; + sensitiveFields: Array; + subjectTemplate: string; + securityToken: string; + securityTokenHeader: string | null; + verifySSL: boolean; + scrubIPAddresses: boolean; + scrapeJavaScript: boolean; + highlightTags: Array; + highlightContext: { + [key: string]: unknown; + }; + highlightPreset: { + tags: Array; + context: { + [key: string]: Array; + }; + }; + groupingConfig: string; + derivedGroupingEnhancements: string; + groupingEnhancements: string; + secondaryGroupingExpiry: number; + secondaryGroupingConfig: string | null; + fingerprintingRules: string; + organization: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + plugins: Array<{ + id: string; + name: string; + slug: string; + shortName: string; + type: string; + canDisable: boolean; + isTestable: boolean; + hasConfiguration: boolean; + metadata: { + [key: string]: unknown; + }; + contexts: Array; + status: string; + assets: Array; + doc: string; + firstPartyAlternative: unknown; + deprecationDate: unknown; + altIsSentryApp: unknown; + enabled: boolean; + version: string; + author: { + [key: string]: string; + }; + isDeprecated: boolean; + isHidden: boolean; + description: string; + features: Array; + featureDescriptions: Array<{ + [key: string]: string; + }>; + resourceLinks: Array<{ + [key: string]: string; + }>; + }>; + platforms: Array; + processingIssues: number; + defaultEnvironment: string | null; + relayPiiConfig: string | null; + builtinSymbolSources: Array; + dynamicSamplingBiases: Array<{ + [key: string]: string | boolean; + }>; + symbolSources: string; + isDynamicallySampled: boolean; + tempestFetchScreenshots: boolean; + autofixAutomationTuning: string; + seerScannerAutomation: boolean; + debugFilesRole: string | null; + }; +}; + +export type RetrieveAProjectResponse = RetrieveAProjectResponses[keyof RetrieveAProjectResponses]; + +export type UpdateAProjectData = { + body?: { + /** + * Enables starring the project within the projects tab. Can be updated with **`project:read`** permission. + */ + isBookmarked?: boolean; + /** + * The name for the project + */ + name?: string; + /** + * Uniquely identifies a project and is used for the interface. + */ + slug?: string; + /** + * The platform for the project + */ + platform?: string | null; + /** + * Custom prefix for emails from this project. + */ + subjectPrefix?: string; + /** + * The email subject to use (excluding the prefix) for individual alerts. Here are the list of variables you can use: + * - `$title` + * - `$shortID` + * - `$projectID` + * - `$orgID` + * - `${tag:key}` - such as `${tag:environment}` or `${tag:release}`. + */ + subjectTemplate?: string; + /** + * Automatically resolve an issue if it hasn't been seen for this many hours. Set to `0` to disable auto-resolve. + */ + resolveAge?: number | null; + /** + * A JSON mapping of context types to lists of strings for their keys. + * E.g. `{'user': ['id', 'email']}` + */ + highlightContext?: { + [key: string]: unknown; + }; + /** + * A list of strings with tag keys to highlight on this project's issues. + * E.g. `['release', 'environment']` + */ + highlightTags?: Array; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/'; +}; + +export type UpdateAProjectErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAProjectResponses = { + 200: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + team?: { + id: string; + name: string; + slug: string; + }; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + latestRelease: { + version: string; + } | null; + options: { + [key: string]: unknown; + }; + digestsMinDelay: number; + digestsMaxDelay: number; + subjectPrefix: string; + allowedDomains: Array; + resolveAge: number; + dataScrubber: boolean; + dataScrubberDefaults: boolean; + safeFields: Array; + storeCrashReports: number | null; + sensitiveFields: Array; + subjectTemplate: string; + securityToken: string; + securityTokenHeader: string | null; + verifySSL: boolean; + scrubIPAddresses: boolean; + scrapeJavaScript: boolean; + highlightTags: Array; + highlightContext: { + [key: string]: unknown; + }; + highlightPreset: { + tags: Array; + context: { + [key: string]: Array; + }; + }; + groupingConfig: string; + derivedGroupingEnhancements: string; + groupingEnhancements: string; + secondaryGroupingExpiry: number; + secondaryGroupingConfig: string | null; + fingerprintingRules: string; + organization: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + plugins: Array<{ + id: string; + name: string; + slug: string; + shortName: string; + type: string; + canDisable: boolean; + isTestable: boolean; + hasConfiguration: boolean; + metadata: { + [key: string]: unknown; + }; + contexts: Array; + status: string; + assets: Array; + doc: string; + firstPartyAlternative: unknown; + deprecationDate: unknown; + altIsSentryApp: unknown; + enabled: boolean; + version: string; + author: { + [key: string]: string; + }; + isDeprecated: boolean; + isHidden: boolean; + description: string; + features: Array; + featureDescriptions: Array<{ + [key: string]: string; + }>; + resourceLinks: Array<{ + [key: string]: string; + }>; + }>; + platforms: Array; + processingIssues: number; + defaultEnvironment: string | null; + relayPiiConfig: string | null; + builtinSymbolSources: Array; + dynamicSamplingBiases: Array<{ + [key: string]: string | boolean; + }>; + symbolSources: string; + isDynamicallySampled: boolean; + tempestFetchScreenshots: boolean; + autofixAutomationTuning: string; + seerScannerAutomation: boolean; + debugFilesRole: string | null; + }; +}; + +export type UpdateAProjectResponse = UpdateAProjectResponses[keyof UpdateAProjectResponses]; + +export type ListAProjectSEnvironmentsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: { + /** + * The visibility of the environments to filter by. Defaults to `visible`. + */ + visibility?: 'all' | 'hidden' | 'visible'; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/'; +}; + +export type ListAProjectSEnvironmentsErrors = { + /** + * Invalid value for 'visibility'. + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAProjectSEnvironmentsResponses = { + 200: Array<{ + id: string; + name: string; + isHidden: boolean; + }>; +}; + +export type ListAProjectSEnvironmentsResponse = ListAProjectSEnvironmentsResponses[keyof ListAProjectSEnvironmentsResponses]; + +export type RetrieveAProjectEnvironmentData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The name of the environment. + */ + environment: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/{environment}/'; +}; + +export type RetrieveAProjectEnvironmentErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAProjectEnvironmentResponses = { + 200: { + id: string; + name: string; + isHidden: boolean; + }; +}; + +export type RetrieveAProjectEnvironmentResponse = RetrieveAProjectEnvironmentResponses[keyof RetrieveAProjectEnvironmentResponses]; + +export type UpdateAProjectEnvironmentData = { + body: { + /** + * Specify `true` to make the environment visible or `false` to make the environment hidden. + */ + isHidden: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The name of the environment. + */ + environment: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/environments/{environment}/'; +}; + +export type UpdateAProjectEnvironmentErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAProjectEnvironmentResponses = { + 200: { + id: string; + name: string; + isHidden: boolean; + }; +}; + +export type UpdateAProjectEnvironmentResponse = UpdateAProjectEnvironmentResponses[keyof UpdateAProjectEnvironmentResponses]; + +export type ListAProjectSErrorEventsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: { + /** + * The period of time for the query, will override the start & end parameters, a number followed by one of: + * - `d` for days + * - `h` for hours + * - `m` for minutes + * - `s` for seconds + * - `w` for weeks + * + * For example, `24h`, to mean query data starting from 24 hours ago to now. + */ + statsPeriod?: string; + /** + * The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + start?: string; + /** + * The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + end?: string; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + /** + * Specify true to include the full event body, including the stacktrace, in the event payload. + */ + full?: boolean; + /** + * Return events in pseudo-random order. This is deterministic so an identical query will always return the same events in the same order. + */ + sample?: boolean; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/'; +}; + +export type ListAProjectSErrorEventsErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAProjectSErrorEventsResponses = { + 200: Array<{ + id: string; + 'event.type': string; + groupID: string | null; + eventID: string; + projectID: string; + message: string; + title: string; + location: string | null; + culprit: string | null; + user: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: { + [key: string]: string; + } | null; + data?: { + [key: string]: unknown; + } | null; + } | null; + tags: Array<{ + query?: string; + key: string; + value: string; + }>; + platform: string | null; + dateCreated: string; + crashFile: string | null; + metadata: { + [key: string]: unknown; + } | null; + }>; +}; + +export type ListAProjectSErrorEventsResponse = ListAProjectSErrorEventsResponses[keyof ListAProjectSErrorEventsResponses]; + +export type DebugIssuesRelatedToSourceMapsForAGivenEventData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the event. + */ + event_id: string; + }; + query: { + /** + * Index of the frame that should be used for source map resolution. + */ + frame_idx: number; + /** + * Index of the exception that should be used for source map resolution. + */ + exception_idx: number; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/{event_id}/source-map-debug/'; +}; + +export type DebugIssuesRelatedToSourceMapsForAGivenEventErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DebugIssuesRelatedToSourceMapsForAGivenEventResponses = { + 200: { + errors: Array<{ + type: string; + message: string; + data: { + [key: string]: unknown; + } | null; + }>; + }; +}; + +export type DebugIssuesRelatedToSourceMapsForAGivenEventResponse = DebugIssuesRelatedToSourceMapsForAGivenEventResponses[keyof DebugIssuesRelatedToSourceMapsForAGivenEventResponses]; + +export type ListAProjectSDataFiltersData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/filters/'; +}; + +export type ListAProjectSDataFiltersErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAProjectSDataFiltersResponses = { + 200: Array<{ + id: string; + active: boolean | Array; + }>; +}; + +export type ListAProjectSDataFiltersResponse = ListAProjectSDataFiltersResponses[keyof ListAProjectSDataFiltersResponses]; + +export type UpdateAnInboundDataFilterData = { + body?: { + /** + * Toggle the browser-extensions, localhost, filtered-transaction, or web-crawlers filter on or off. + */ + active?: boolean; + /** + * + * Specifies which legacy browser filters should be active. Anything excluded from the list will be + * disabled. The options are: + * - `ie` - Internet Explorer Version 11 and lower + * - `edge` - Edge Version 110 and lower + * - `safari` - Safari Version 15 and lower + * - `firefox` - Firefox Version 110 and lower + * - `chrome` - Chrome Version 110 and lower + * - `opera` - Opera Version 99 and lower + * - `android` - Android Version 3 and lower + * - `opera_mini` - Opera Mini Version 34 and lower + * + * Deprecated options: + * - `ie_pre_9` - Internet Explorer Version 8 and lower + * - `ie9` - Internet Explorer Version 9 + * - `ie10` - Internet Explorer Version 10 + * - `ie11` - Internet Explorer Version 11 + * - `safari_pre_6` - Safari Version 5 and lower + * - `opera_pre_15` - Opera Version 14 and lower + * - `opera_mini_pre_8` - Opera Mini Version 8 and lower + * - `android_pre_4` - Android Version 3 and lower + * - `edge_pre_79` - Edge Version 18 and lower (non Chromium based) + * + */ + subfilters?: Array<'ie' | 'edge' | 'safari' | 'firefox' | 'chrome' | 'opera' | 'android' | 'opera_mini' | 'ie_pre_9' | 'ie9' | 'ie10' | 'ie11' | 'opera_pre_15' | 'android_pre_4' | 'safari_pre_6' | 'opera_mini_pre_8' | 'edge_pre_79'>; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The type of filter toggle to update. The options are: + * - `browser-extensions` - Filter out errors known to be caused by browser extensions. + * - `localhost` - Filter out events coming from localhost. This applies to both IPv4 (``127.0.0.1``) + * and IPv6 (``::1``) addresses. + * - `filtered-transaction` - Filter out transactions for healthcheck and ping endpoints. + * - `web-crawlers` - Filter out known web crawlers. Some crawlers may execute pages in incompatible + * ways which cause errors that are unlikely to be seen by a normal user. + * - `legacy-browser` - Filter out known errors from legacy browsers. Older browsers often give less + * accurate information, and while they may report valid issues, the context to understand them is + * incorrect or missing. + * + */ + filter_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/filters/{filter_id}/'; +}; + +export type UpdateAnInboundDataFilterErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAnInboundDataFilterResponses = { + /** + * No Content + */ + 204: void; +}; + +export type UpdateAnInboundDataFilterResponse = UpdateAnInboundDataFilterResponses[keyof UpdateAnInboundDataFilterResponses]; + +export type ListAProjectSClientKeysData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: { + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + /** + * + * Filter client keys by `active` or `inactive`. Defaults to returning all + * keys if not specified. + * + */ + status?: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/'; +}; + +export type ListAProjectSClientKeysErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAProjectSClientKeysResponses = { + 200: Array<{ + id: string; + name: string; + label: string; + public: string | null; + secret: string | null; + projectId: number; + isActive: boolean; + rateLimit: { + window: number; + count: number; + } | null; + dsn: { + secret: string; + public: string; + csp: string; + security: string; + minidump: string; + nel: string; + unreal: string; + crons: string; + cdn: string; + playstation: string; + integration: string; + otlp_traces: string; + otlp_logs: string; + }; + browserSdkVersion: string; + browserSdk: { + choices: Array>; + }; + dateCreated: string | null; + dynamicSdkLoaderOptions: { + hasReplay: boolean; + hasPerformance: boolean; + hasDebug: boolean; + hasFeedback: boolean; + hasLogsAndMetrics: boolean; + }; + useCase?: string; + }>; +}; + +export type ListAProjectSClientKeysResponse = ListAProjectSClientKeysResponses[keyof ListAProjectSClientKeysResponses]; + +export type CreateANewClientKeyData = { + body?: { + /** + * The optional name of the key. If not provided it will be automatically generated. + */ + name?: string | null; + /** + * Applies a rate limit to cap the number of errors accepted during a given time window. To + * disable entirely set `rateLimit` to null. + * ```json + * { + * "rateLimit": { + * "window": 7200, // time in seconds + * "count": 1000 // error cap + * } + * } + * ``` + */ + rateLimit?: { + count?: number | null; + window?: number | null; + }; + /** + * * `user` + * * `profiling` + * * `escalating_issues` + * * `tempest` + * * `demo` + */ + useCase?: 'user' | 'profiling' | 'escalating_issues' | 'tempest' | 'demo'; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/'; +}; + +export type CreateANewClientKeyErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type CreateANewClientKeyResponses = { + /** + * This represents a Sentry Project Client Key. + */ + 201: { + id: string; + name: string; + label: string; + public: string | null; + secret: string | null; + projectId: number; + isActive: boolean; + rateLimit: { + window: number; + count: number; + } | null; + dsn: { + secret: string; + public: string; + csp: string; + security: string; + minidump: string; + nel: string; + unreal: string; + crons: string; + cdn: string; + playstation: string; + integration: string; + otlp_traces: string; + otlp_logs: string; + }; + browserSdkVersion: string; + browserSdk: { + choices: Array>; + }; + dateCreated: string | null; + dynamicSdkLoaderOptions: { + hasReplay: boolean; + hasPerformance: boolean; + hasDebug: boolean; + hasFeedback: boolean; + hasLogsAndMetrics: boolean; + }; + useCase?: string; + }; +}; + +export type CreateANewClientKeyResponse = CreateANewClientKeyResponses[keyof CreateANewClientKeyResponses]; + +export type DeleteAClientKeyData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the key to delete. + */ + key_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/'; +}; + +export type DeleteAClientKeyErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAClientKeyResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAClientKeyResponse = DeleteAClientKeyResponses[keyof DeleteAClientKeyResponses]; + +export type RetrieveAClientKeyData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the client key + */ + key_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/'; +}; + +export type RetrieveAClientKeyErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAClientKeyResponses = { + /** + * This represents a Sentry Project Client Key. + */ + 200: { + id: string; + name: string; + label: string; + public: string | null; + secret: string | null; + projectId: number; + isActive: boolean; + rateLimit: { + window: number; + count: number; + } | null; + dsn: { + secret: string; + public: string; + csp: string; + security: string; + minidump: string; + nel: string; + unreal: string; + crons: string; + cdn: string; + playstation: string; + integration: string; + otlp_traces: string; + otlp_logs: string; + }; + browserSdkVersion: string; + browserSdk: { + choices: Array>; + }; + dateCreated: string | null; + dynamicSdkLoaderOptions: { + hasReplay: boolean; + hasPerformance: boolean; + hasDebug: boolean; + hasFeedback: boolean; + hasLogsAndMetrics: boolean; + }; + useCase?: string; + }; +}; + +export type RetrieveAClientKeyResponse = RetrieveAClientKeyResponses[keyof RetrieveAClientKeyResponses]; + +export type UpdateAClientKeyData = { + body?: { + /** + * The name for the client key + */ + name?: string; + /** + * Activate or deactivate the client key. + */ + isActive?: boolean; + /** + * Applies a rate limit to cap the number of errors accepted during a given time window. To + * disable entirely set `rateLimit` to null. + * ```json + * { + * "rateLimit": { + * "window": 7200, // time in seconds + * "count": 1000 // error cap + * } + * } + * ``` + */ + rateLimit?: { + count?: number | null; + window?: number | null; + }; + /** + * The Sentry Javascript SDK version to use. The currently supported options are: + * + * * `latest` - Most recent version + * * `7.x` - Version 7 releases + */ + browserSdkVersion?: 'latest' | '7.x'; + /** + * Configures multiple options for the Javascript Loader Script. + * - `Performance Monitoring` + * - `Debug Bundles & Logging` + * - `Session Replay` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. + * - `User Feedback` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. + * - `Logs and Metrics` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. Requires SDK >= 10.0.0. + * ```json + * { + * "dynamicSdkLoaderOptions": { + * "hasReplay": true, + * "hasPerformance": true, + * "hasDebug": true, + * "hasFeedback": true, + * "hasLogsAndMetrics": true + * } + * } + * ``` + */ + dynamicSdkLoaderOptions?: { + hasReplay?: boolean; + hasPerformance?: boolean; + hasDebug?: boolean; + hasFeedback?: boolean; + hasLogsAndMetrics?: boolean; + }; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the key to update. + */ + key_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/'; +}; + +export type UpdateAClientKeyErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAClientKeyResponses = { + /** + * This represents a Sentry Project Client Key. + */ + 200: { + id: string; + name: string; + label: string; + public: string | null; + secret: string | null; + projectId: number; + isActive: boolean; + rateLimit: { + window: number; + count: number; + } | null; + dsn: { + secret: string; + public: string; + csp: string; + security: string; + minidump: string; + nel: string; + unreal: string; + crons: string; + cdn: string; + playstation: string; + integration: string; + otlp_traces: string; + otlp_logs: string; + }; + browserSdkVersion: string; + browserSdk: { + choices: Array>; + }; + dateCreated: string | null; + dynamicSdkLoaderOptions: { + hasReplay: boolean; + hasPerformance: boolean; + hasDebug: boolean; + hasFeedback: boolean; + hasLogsAndMetrics: boolean; + }; + useCase?: string; + }; +}; + +export type UpdateAClientKeyResponse = UpdateAClientKeyResponses[keyof UpdateAClientKeyResponses]; + +export type ListAProjectSOrganizationMembersData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/members/'; +}; + +export type ListAProjectSOrganizationMembersErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAProjectSOrganizationMembersResponses = { + 200: Array<{ + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + id: string; + email: string; + name: string; + user?: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; + }>; +}; + +export type ListAProjectSOrganizationMembersResponse = ListAProjectSOrganizationMembersResponses[keyof ListAProjectSOrganizationMembersResponses]; + +export type DeleteAMonitorOrMonitorEnvironmentsForAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID or slug of the monitor. + */ + monitor_id_or_slug: string; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/'; +}; + +export type DeleteAMonitorOrMonitorEnvironmentsForAProjectErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAMonitorOrMonitorEnvironmentsForAProjectResponses = { + /** + * Accepted + */ + 202: unknown; +}; + +export type RetrieveAMonitorForAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID or slug of the monitor. + */ + monitor_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/'; +}; + +export type RetrieveAMonitorForAProjectErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAMonitorForAProjectResponses = { + 200: { + alertRule?: { + targets: Array<{ + targetIdentifier: number; + targetType: string; + }>; + environment: string; + }; + id: string; + name: string; + slug: string; + status: string; + isMuted: boolean; + isUpserting: boolean; + config: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + dateCreated: string; + project: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }; + environments: { + name: string; + status: string; + isMuted: boolean; + dateCreated: string; + lastCheckIn: string; + nextCheckIn: string; + nextCheckInLatest: string; + activeIncident: { + startingTimestamp: string; + resolvingTimestamp: string; + brokenNotice: { + userNotifiedTimestamp: string; + environmentMutedTimestamp: string; + } | null; + } | null; + }; + owner: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + }; +}; + +export type RetrieveAMonitorForAProjectResponse = RetrieveAMonitorForAProjectResponses[keyof RetrieveAMonitorForAProjectResponses]; + +export type UpdateAMonitorForAProjectData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The project slug to associate the monitor to. + */ + project: string; + /** + * Name of the monitor. Used for notifications. If not set the slug will be derived from your monitor name. + */ + name: string; + /** + * The configuration for the monitor. + */ + config: { + /** + * Currently supports "crontab" or "interval" + * + * * `crontab` + * * `interval` + */ + schedule_type?: 'crontab' | 'interval'; + /** + * Varies depending on the schedule_type. Is either a crontab string, or a 2 element tuple for intervals (e.g. [1, 'day']) + */ + schedule: unknown; + /** + * How long (in minutes) after the expected checkin time will we wait until we consider the checkin to have been missed. + */ + checkin_margin?: number | null; + /** + * How long (in minutes) is the checkin allowed to run for in CheckInStatus.IN_PROGRESS before it is considered failed. + */ + max_runtime?: number | null; + /** + * tz database style timezone string + * + * * `Africa/Abidjan` + * * `Africa/Accra` + * * `Africa/Addis_Ababa` + * * `Africa/Algiers` + * * `Africa/Asmara` + * * `Africa/Asmera` + * * `Africa/Bamako` + * * `Africa/Bangui` + * * `Africa/Banjul` + * * `Africa/Bissau` + * * `Africa/Blantyre` + * * `Africa/Brazzaville` + * * `Africa/Bujumbura` + * * `Africa/Cairo` + * * `Africa/Casablanca` + * * `Africa/Ceuta` + * * `Africa/Conakry` + * * `Africa/Dakar` + * * `Africa/Dar_es_Salaam` + * * `Africa/Djibouti` + * * `Africa/Douala` + * * `Africa/El_Aaiun` + * * `Africa/Freetown` + * * `Africa/Gaborone` + * * `Africa/Harare` + * * `Africa/Johannesburg` + * * `Africa/Juba` + * * `Africa/Kampala` + * * `Africa/Khartoum` + * * `Africa/Kigali` + * * `Africa/Kinshasa` + * * `Africa/Lagos` + * * `Africa/Libreville` + * * `Africa/Lome` + * * `Africa/Luanda` + * * `Africa/Lubumbashi` + * * `Africa/Lusaka` + * * `Africa/Malabo` + * * `Africa/Maputo` + * * `Africa/Maseru` + * * `Africa/Mbabane` + * * `Africa/Mogadishu` + * * `Africa/Monrovia` + * * `Africa/Nairobi` + * * `Africa/Ndjamena` + * * `Africa/Niamey` + * * `Africa/Nouakchott` + * * `Africa/Ouagadougou` + * * `Africa/Porto-Novo` + * * `Africa/Sao_Tome` + * * `Africa/Timbuktu` + * * `Africa/Tripoli` + * * `Africa/Tunis` + * * `Africa/Windhoek` + * * `America/Adak` + * * `America/Anchorage` + * * `America/Anguilla` + * * `America/Antigua` + * * `America/Araguaina` + * * `America/Argentina/Buenos_Aires` + * * `America/Argentina/Catamarca` + * * `America/Argentina/ComodRivadavia` + * * `America/Argentina/Cordoba` + * * `America/Argentina/Jujuy` + * * `America/Argentina/La_Rioja` + * * `America/Argentina/Mendoza` + * * `America/Argentina/Rio_Gallegos` + * * `America/Argentina/Salta` + * * `America/Argentina/San_Juan` + * * `America/Argentina/San_Luis` + * * `America/Argentina/Tucuman` + * * `America/Argentina/Ushuaia` + * * `America/Aruba` + * * `America/Asuncion` + * * `America/Atikokan` + * * `America/Atka` + * * `America/Bahia` + * * `America/Bahia_Banderas` + * * `America/Barbados` + * * `America/Belem` + * * `America/Belize` + * * `America/Blanc-Sablon` + * * `America/Boa_Vista` + * * `America/Bogota` + * * `America/Boise` + * * `America/Buenos_Aires` + * * `America/Cambridge_Bay` + * * `America/Campo_Grande` + * * `America/Cancun` + * * `America/Caracas` + * * `America/Catamarca` + * * `America/Cayenne` + * * `America/Cayman` + * * `America/Chicago` + * * `America/Chihuahua` + * * `America/Ciudad_Juarez` + * * `America/Coral_Harbour` + * * `America/Cordoba` + * * `America/Costa_Rica` + * * `America/Coyhaique` + * * `America/Creston` + * * `America/Cuiaba` + * * `America/Curacao` + * * `America/Danmarkshavn` + * * `America/Dawson` + * * `America/Dawson_Creek` + * * `America/Denver` + * * `America/Detroit` + * * `America/Dominica` + * * `America/Edmonton` + * * `America/Eirunepe` + * * `America/El_Salvador` + * * `America/Ensenada` + * * `America/Fort_Nelson` + * * `America/Fort_Wayne` + * * `America/Fortaleza` + * * `America/Glace_Bay` + * * `America/Godthab` + * * `America/Goose_Bay` + * * `America/Grand_Turk` + * * `America/Grenada` + * * `America/Guadeloupe` + * * `America/Guatemala` + * * `America/Guayaquil` + * * `America/Guyana` + * * `America/Halifax` + * * `America/Havana` + * * `America/Hermosillo` + * * `America/Indiana/Indianapolis` + * * `America/Indiana/Knox` + * * `America/Indiana/Marengo` + * * `America/Indiana/Petersburg` + * * `America/Indiana/Tell_City` + * * `America/Indiana/Vevay` + * * `America/Indiana/Vincennes` + * * `America/Indiana/Winamac` + * * `America/Indianapolis` + * * `America/Inuvik` + * * `America/Iqaluit` + * * `America/Jamaica` + * * `America/Jujuy` + * * `America/Juneau` + * * `America/Kentucky/Louisville` + * * `America/Kentucky/Monticello` + * * `America/Knox_IN` + * * `America/Kralendijk` + * * `America/La_Paz` + * * `America/Lima` + * * `America/Los_Angeles` + * * `America/Louisville` + * * `America/Lower_Princes` + * * `America/Maceio` + * * `America/Managua` + * * `America/Manaus` + * * `America/Marigot` + * * `America/Martinique` + * * `America/Matamoros` + * * `America/Mazatlan` + * * `America/Mendoza` + * * `America/Menominee` + * * `America/Merida` + * * `America/Metlakatla` + * * `America/Mexico_City` + * * `America/Miquelon` + * * `America/Moncton` + * * `America/Monterrey` + * * `America/Montevideo` + * * `America/Montreal` + * * `America/Montserrat` + * * `America/Nassau` + * * `America/New_York` + * * `America/Nipigon` + * * `America/Nome` + * * `America/Noronha` + * * `America/North_Dakota/Beulah` + * * `America/North_Dakota/Center` + * * `America/North_Dakota/New_Salem` + * * `America/Nuuk` + * * `America/Ojinaga` + * * `America/Panama` + * * `America/Pangnirtung` + * * `America/Paramaribo` + * * `America/Phoenix` + * * `America/Port-au-Prince` + * * `America/Port_of_Spain` + * * `America/Porto_Acre` + * * `America/Porto_Velho` + * * `America/Puerto_Rico` + * * `America/Punta_Arenas` + * * `America/Rainy_River` + * * `America/Rankin_Inlet` + * * `America/Recife` + * * `America/Regina` + * * `America/Resolute` + * * `America/Rio_Branco` + * * `America/Rosario` + * * `America/Santa_Isabel` + * * `America/Santarem` + * * `America/Santiago` + * * `America/Santo_Domingo` + * * `America/Sao_Paulo` + * * `America/Scoresbysund` + * * `America/Shiprock` + * * `America/Sitka` + * * `America/St_Barthelemy` + * * `America/St_Johns` + * * `America/St_Kitts` + * * `America/St_Lucia` + * * `America/St_Thomas` + * * `America/St_Vincent` + * * `America/Swift_Current` + * * `America/Tegucigalpa` + * * `America/Thule` + * * `America/Thunder_Bay` + * * `America/Tijuana` + * * `America/Toronto` + * * `America/Tortola` + * * `America/Vancouver` + * * `America/Virgin` + * * `America/Whitehorse` + * * `America/Winnipeg` + * * `America/Yakutat` + * * `America/Yellowknife` + * * `Antarctica/Casey` + * * `Antarctica/Davis` + * * `Antarctica/DumontDUrville` + * * `Antarctica/Macquarie` + * * `Antarctica/Mawson` + * * `Antarctica/McMurdo` + * * `Antarctica/Palmer` + * * `Antarctica/Rothera` + * * `Antarctica/South_Pole` + * * `Antarctica/Syowa` + * * `Antarctica/Troll` + * * `Antarctica/Vostok` + * * `Arctic/Longyearbyen` + * * `Asia/Aden` + * * `Asia/Almaty` + * * `Asia/Amman` + * * `Asia/Anadyr` + * * `Asia/Aqtau` + * * `Asia/Aqtobe` + * * `Asia/Ashgabat` + * * `Asia/Ashkhabad` + * * `Asia/Atyrau` + * * `Asia/Baghdad` + * * `Asia/Bahrain` + * * `Asia/Baku` + * * `Asia/Bangkok` + * * `Asia/Barnaul` + * * `Asia/Beirut` + * * `Asia/Bishkek` + * * `Asia/Brunei` + * * `Asia/Calcutta` + * * `Asia/Chita` + * * `Asia/Choibalsan` + * * `Asia/Chongqing` + * * `Asia/Chungking` + * * `Asia/Colombo` + * * `Asia/Dacca` + * * `Asia/Damascus` + * * `Asia/Dhaka` + * * `Asia/Dili` + * * `Asia/Dubai` + * * `Asia/Dushanbe` + * * `Asia/Famagusta` + * * `Asia/Gaza` + * * `Asia/Harbin` + * * `Asia/Hebron` + * * `Asia/Ho_Chi_Minh` + * * `Asia/Hong_Kong` + * * `Asia/Hovd` + * * `Asia/Irkutsk` + * * `Asia/Istanbul` + * * `Asia/Jakarta` + * * `Asia/Jayapura` + * * `Asia/Jerusalem` + * * `Asia/Kabul` + * * `Asia/Kamchatka` + * * `Asia/Karachi` + * * `Asia/Kashgar` + * * `Asia/Kathmandu` + * * `Asia/Katmandu` + * * `Asia/Khandyga` + * * `Asia/Kolkata` + * * `Asia/Krasnoyarsk` + * * `Asia/Kuala_Lumpur` + * * `Asia/Kuching` + * * `Asia/Kuwait` + * * `Asia/Macao` + * * `Asia/Macau` + * * `Asia/Magadan` + * * `Asia/Makassar` + * * `Asia/Manila` + * * `Asia/Muscat` + * * `Asia/Nicosia` + * * `Asia/Novokuznetsk` + * * `Asia/Novosibirsk` + * * `Asia/Omsk` + * * `Asia/Oral` + * * `Asia/Phnom_Penh` + * * `Asia/Pontianak` + * * `Asia/Pyongyang` + * * `Asia/Qatar` + * * `Asia/Qostanay` + * * `Asia/Qyzylorda` + * * `Asia/Rangoon` + * * `Asia/Riyadh` + * * `Asia/Saigon` + * * `Asia/Sakhalin` + * * `Asia/Samarkand` + * * `Asia/Seoul` + * * `Asia/Shanghai` + * * `Asia/Singapore` + * * `Asia/Srednekolymsk` + * * `Asia/Taipei` + * * `Asia/Tashkent` + * * `Asia/Tbilisi` + * * `Asia/Tehran` + * * `Asia/Tel_Aviv` + * * `Asia/Thimbu` + * * `Asia/Thimphu` + * * `Asia/Tokyo` + * * `Asia/Tomsk` + * * `Asia/Ujung_Pandang` + * * `Asia/Ulaanbaatar` + * * `Asia/Ulan_Bator` + * * `Asia/Urumqi` + * * `Asia/Ust-Nera` + * * `Asia/Vientiane` + * * `Asia/Vladivostok` + * * `Asia/Yakutsk` + * * `Asia/Yangon` + * * `Asia/Yekaterinburg` + * * `Asia/Yerevan` + * * `Atlantic/Azores` + * * `Atlantic/Bermuda` + * * `Atlantic/Canary` + * * `Atlantic/Cape_Verde` + * * `Atlantic/Faeroe` + * * `Atlantic/Faroe` + * * `Atlantic/Jan_Mayen` + * * `Atlantic/Madeira` + * * `Atlantic/Reykjavik` + * * `Atlantic/South_Georgia` + * * `Atlantic/St_Helena` + * * `Atlantic/Stanley` + * * `Australia/ACT` + * * `Australia/Adelaide` + * * `Australia/Brisbane` + * * `Australia/Broken_Hill` + * * `Australia/Canberra` + * * `Australia/Currie` + * * `Australia/Darwin` + * * `Australia/Eucla` + * * `Australia/Hobart` + * * `Australia/LHI` + * * `Australia/Lindeman` + * * `Australia/Lord_Howe` + * * `Australia/Melbourne` + * * `Australia/NSW` + * * `Australia/North` + * * `Australia/Perth` + * * `Australia/Queensland` + * * `Australia/South` + * * `Australia/Sydney` + * * `Australia/Tasmania` + * * `Australia/Victoria` + * * `Australia/West` + * * `Australia/Yancowinna` + * * `Brazil/Acre` + * * `Brazil/DeNoronha` + * * `Brazil/East` + * * `Brazil/West` + * * `CET` + * * `CST6CDT` + * * `Canada/Atlantic` + * * `Canada/Central` + * * `Canada/Eastern` + * * `Canada/Mountain` + * * `Canada/Newfoundland` + * * `Canada/Pacific` + * * `Canada/Saskatchewan` + * * `Canada/Yukon` + * * `Chile/Continental` + * * `Chile/EasterIsland` + * * `Cuba` + * * `EET` + * * `EST` + * * `EST5EDT` + * * `Egypt` + * * `Eire` + * * `Etc/GMT` + * * `Etc/GMT+0` + * * `Etc/GMT+1` + * * `Etc/GMT+10` + * * `Etc/GMT+11` + * * `Etc/GMT+12` + * * `Etc/GMT+2` + * * `Etc/GMT+3` + * * `Etc/GMT+4` + * * `Etc/GMT+5` + * * `Etc/GMT+6` + * * `Etc/GMT+7` + * * `Etc/GMT+8` + * * `Etc/GMT+9` + * * `Etc/GMT-0` + * * `Etc/GMT-1` + * * `Etc/GMT-10` + * * `Etc/GMT-11` + * * `Etc/GMT-12` + * * `Etc/GMT-13` + * * `Etc/GMT-14` + * * `Etc/GMT-2` + * * `Etc/GMT-3` + * * `Etc/GMT-4` + * * `Etc/GMT-5` + * * `Etc/GMT-6` + * * `Etc/GMT-7` + * * `Etc/GMT-8` + * * `Etc/GMT-9` + * * `Etc/GMT0` + * * `Etc/Greenwich` + * * `Etc/UCT` + * * `Etc/UTC` + * * `Etc/Universal` + * * `Etc/Zulu` + * * `Europe/Amsterdam` + * * `Europe/Andorra` + * * `Europe/Astrakhan` + * * `Europe/Athens` + * * `Europe/Belfast` + * * `Europe/Belgrade` + * * `Europe/Berlin` + * * `Europe/Bratislava` + * * `Europe/Brussels` + * * `Europe/Bucharest` + * * `Europe/Budapest` + * * `Europe/Busingen` + * * `Europe/Chisinau` + * * `Europe/Copenhagen` + * * `Europe/Dublin` + * * `Europe/Gibraltar` + * * `Europe/Guernsey` + * * `Europe/Helsinki` + * * `Europe/Isle_of_Man` + * * `Europe/Istanbul` + * * `Europe/Jersey` + * * `Europe/Kaliningrad` + * * `Europe/Kiev` + * * `Europe/Kirov` + * * `Europe/Kyiv` + * * `Europe/Lisbon` + * * `Europe/Ljubljana` + * * `Europe/London` + * * `Europe/Luxembourg` + * * `Europe/Madrid` + * * `Europe/Malta` + * * `Europe/Mariehamn` + * * `Europe/Minsk` + * * `Europe/Monaco` + * * `Europe/Moscow` + * * `Europe/Nicosia` + * * `Europe/Oslo` + * * `Europe/Paris` + * * `Europe/Podgorica` + * * `Europe/Prague` + * * `Europe/Riga` + * * `Europe/Rome` + * * `Europe/Samara` + * * `Europe/San_Marino` + * * `Europe/Sarajevo` + * * `Europe/Saratov` + * * `Europe/Simferopol` + * * `Europe/Skopje` + * * `Europe/Sofia` + * * `Europe/Stockholm` + * * `Europe/Tallinn` + * * `Europe/Tirane` + * * `Europe/Tiraspol` + * * `Europe/Ulyanovsk` + * * `Europe/Uzhgorod` + * * `Europe/Vaduz` + * * `Europe/Vatican` + * * `Europe/Vienna` + * * `Europe/Vilnius` + * * `Europe/Volgograd` + * * `Europe/Warsaw` + * * `Europe/Zagreb` + * * `Europe/Zaporozhye` + * * `Europe/Zurich` + * * `GB` + * * `GB-Eire` + * * `GMT` + * * `GMT+0` + * * `GMT-0` + * * `GMT0` + * * `Greenwich` + * * `HST` + * * `Hongkong` + * * `Iceland` + * * `Indian/Antananarivo` + * * `Indian/Chagos` + * * `Indian/Christmas` + * * `Indian/Cocos` + * * `Indian/Comoro` + * * `Indian/Kerguelen` + * * `Indian/Mahe` + * * `Indian/Maldives` + * * `Indian/Mauritius` + * * `Indian/Mayotte` + * * `Indian/Reunion` + * * `Iran` + * * `Israel` + * * `Jamaica` + * * `Japan` + * * `Kwajalein` + * * `Libya` + * * `MET` + * * `MST` + * * `MST7MDT` + * * `Mexico/BajaNorte` + * * `Mexico/BajaSur` + * * `Mexico/General` + * * `NZ` + * * `NZ-CHAT` + * * `Navajo` + * * `PRC` + * * `PST8PDT` + * * `Pacific/Apia` + * * `Pacific/Auckland` + * * `Pacific/Bougainville` + * * `Pacific/Chatham` + * * `Pacific/Chuuk` + * * `Pacific/Easter` + * * `Pacific/Efate` + * * `Pacific/Enderbury` + * * `Pacific/Fakaofo` + * * `Pacific/Fiji` + * * `Pacific/Funafuti` + * * `Pacific/Galapagos` + * * `Pacific/Gambier` + * * `Pacific/Guadalcanal` + * * `Pacific/Guam` + * * `Pacific/Honolulu` + * * `Pacific/Johnston` + * * `Pacific/Kanton` + * * `Pacific/Kiritimati` + * * `Pacific/Kosrae` + * * `Pacific/Kwajalein` + * * `Pacific/Majuro` + * * `Pacific/Marquesas` + * * `Pacific/Midway` + * * `Pacific/Nauru` + * * `Pacific/Niue` + * * `Pacific/Norfolk` + * * `Pacific/Noumea` + * * `Pacific/Pago_Pago` + * * `Pacific/Palau` + * * `Pacific/Pitcairn` + * * `Pacific/Pohnpei` + * * `Pacific/Ponape` + * * `Pacific/Port_Moresby` + * * `Pacific/Rarotonga` + * * `Pacific/Saipan` + * * `Pacific/Samoa` + * * `Pacific/Tahiti` + * * `Pacific/Tarawa` + * * `Pacific/Tongatapu` + * * `Pacific/Truk` + * * `Pacific/Wake` + * * `Pacific/Wallis` + * * `Pacific/Yap` + * * `Poland` + * * `Portugal` + * * `ROC` + * * `ROK` + * * `Singapore` + * * `Turkey` + * * `UCT` + * * `US/Alaska` + * * `US/Aleutian` + * * `US/Arizona` + * * `US/Central` + * * `US/East-Indiana` + * * `US/Eastern` + * * `US/Hawaii` + * * `US/Indiana-Starke` + * * `US/Michigan` + * * `US/Mountain` + * * `US/Pacific` + * * `US/Samoa` + * * `UTC` + * * `Universal` + * * `W-SU` + * * `WET` + * * `Zulu` + * * `localtime` + */ + timezone?: 'Africa/Abidjan' | 'Africa/Accra' | 'Africa/Addis_Ababa' | 'Africa/Algiers' | 'Africa/Asmara' | 'Africa/Asmera' | 'Africa/Bamako' | 'Africa/Bangui' | 'Africa/Banjul' | 'Africa/Bissau' | 'Africa/Blantyre' | 'Africa/Brazzaville' | 'Africa/Bujumbura' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/Conakry' | 'Africa/Dakar' | 'Africa/Dar_es_Salaam' | 'Africa/Djibouti' | 'Africa/Douala' | 'Africa/El_Aaiun' | 'Africa/Freetown' | 'Africa/Gaborone' | 'Africa/Harare' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' | 'Africa/Kinshasa' | 'Africa/Lagos' | 'Africa/Libreville' | 'Africa/Lome' | 'Africa/Luanda' | 'Africa/Lubumbashi' | 'Africa/Lusaka' | 'Africa/Malabo' | 'Africa/Maputo' | 'Africa/Maseru' | 'Africa/Mbabane' | 'Africa/Mogadishu' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'Africa/Ndjamena' | 'Africa/Niamey' | 'Africa/Nouakchott' | 'Africa/Ouagadougou' | 'Africa/Porto-Novo' | 'Africa/Sao_Tome' | 'Africa/Timbuktu' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Anguilla' | 'America/Antigua' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/ComodRivadavia' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Aruba' | 'America/Asuncion' | 'America/Atikokan' | 'America/Atka' | 'America/Bahia' | 'America/Bahia_Banderas' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Blanc-Sablon' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Buenos_Aires' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Catamarca' | 'America/Cayenne' | 'America/Cayman' | 'America/Chicago' | 'America/Chihuahua' | 'America/Ciudad_Juarez' | 'America/Coral_Harbour' | 'America/Cordoba' | 'America/Costa_Rica' | 'America/Coyhaique' | 'America/Creston' | 'America/Cuiaba' | 'America/Curacao' | 'America/Danmarkshavn' | 'America/Dawson' | 'America/Dawson_Creek' | 'America/Denver' | 'America/Detroit' | 'America/Dominica' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Ensenada' | 'America/Fort_Nelson' | 'America/Fort_Wayne' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Godthab' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Grenada' | 'America/Guadeloupe' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Indianapolis' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Indianapolis' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Jujuy' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/Knox_IN' | 'America/Kralendijk' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Louisville' | 'America/Lower_Princes' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Marigot' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Mendoza' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/Montreal' | 'America/Montserrat' | 'America/Nassau' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Nuuk' | 'America/Ojinaga' | 'America/Panama' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Port_of_Spain' | 'America/Porto_Acre' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Rio_Branco' | 'America/Rosario' | 'America/Santa_Isabel' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Shiprock' | 'America/Sitka' | 'America/St_Barthelemy' | 'America/St_Johns' | 'America/St_Kitts' | 'America/St_Lucia' | 'America/St_Thomas' | 'America/St_Vincent' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Tijuana' | 'America/Toronto' | 'America/Tortola' | 'America/Vancouver' | 'America/Virgin' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/DumontDUrville' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Antarctica/McMurdo' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/South_Pole' | 'Antarctica/Syowa' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Arctic/Longyearbyen' | 'Asia/Aden' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Ashkhabad' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Bahrain' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Calcutta' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Chongqing' | 'Asia/Chungking' | 'Asia/Colombo' | 'Asia/Dacca' | 'Asia/Damascus' | 'Asia/Dhaka' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Harbin' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Asia/Istanbul' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kashgar' | 'Asia/Kathmandu' | 'Asia/Katmandu' | 'Asia/Khandyga' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Kuwait' | 'Asia/Macao' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Muscat' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Phnom_Penh' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qatar' | 'Asia/Qostanay' | 'Asia/Qyzylorda' | 'Asia/Rangoon' | 'Asia/Riyadh' | 'Asia/Saigon' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Tel_Aviv' | 'Asia/Thimbu' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ujung_Pandang' | 'Asia/Ulaanbaatar' | 'Asia/Ulan_Bator' | 'Asia/Urumqi' | 'Asia/Ust-Nera' | 'Asia/Vientiane' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faeroe' | 'Atlantic/Faroe' | 'Atlantic/Jan_Mayen' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/St_Helena' | 'Atlantic/Stanley' | 'Australia/ACT' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Canberra' | 'Australia/Currie' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/LHI' | 'Australia/Lindeman' | 'Australia/Lord_Howe' | 'Australia/Melbourne' | 'Australia/NSW' | 'Australia/North' | 'Australia/Perth' | 'Australia/Queensland' | 'Australia/South' | 'Australia/Sydney' | 'Australia/Tasmania' | 'Australia/Victoria' | 'Australia/West' | 'Australia/Yancowinna' | 'Brazil/Acre' | 'Brazil/DeNoronha' | 'Brazil/East' | 'Brazil/West' | 'CET' | 'CST6CDT' | 'Canada/Atlantic' | 'Canada/Central' | 'Canada/Eastern' | 'Canada/Mountain' | 'Canada/Newfoundland' | 'Canada/Pacific' | 'Canada/Saskatchewan' | 'Canada/Yukon' | 'Chile/Continental' | 'Chile/EasterIsland' | 'Cuba' | 'EET' | 'EST' | 'EST5EDT' | 'Egypt' | 'Eire' | 'Etc/GMT' | 'Etc/GMT+0' | 'Etc/GMT+1' | 'Etc/GMT+10' | 'Etc/GMT+11' | 'Etc/GMT+12' | 'Etc/GMT+2' | 'Etc/GMT+3' | 'Etc/GMT+4' | 'Etc/GMT+5' | 'Etc/GMT+6' | 'Etc/GMT+7' | 'Etc/GMT+8' | 'Etc/GMT+9' | 'Etc/GMT-0' | 'Etc/GMT-1' | 'Etc/GMT-10' | 'Etc/GMT-11' | 'Etc/GMT-12' | 'Etc/GMT-13' | 'Etc/GMT-14' | 'Etc/GMT-2' | 'Etc/GMT-3' | 'Etc/GMT-4' | 'Etc/GMT-5' | 'Etc/GMT-6' | 'Etc/GMT-7' | 'Etc/GMT-8' | 'Etc/GMT-9' | 'Etc/GMT0' | 'Etc/Greenwich' | 'Etc/UCT' | 'Etc/UTC' | 'Etc/Universal' | 'Etc/Zulu' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/Belfast' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Bratislava' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Busingen' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Gibraltar' | 'Europe/Guernsey' | 'Europe/Helsinki' | 'Europe/Isle_of_Man' | 'Europe/Istanbul' | 'Europe/Jersey' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Kyiv' | 'Europe/Lisbon' | 'Europe/Ljubljana' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Mariehamn' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Nicosia' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Podgorica' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/San_Marino' | 'Europe/Sarajevo' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Skopje' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Tiraspol' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vaduz' | 'Europe/Vatican' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zagreb' | 'Europe/Zaporozhye' | 'Europe/Zurich' | 'GB' | 'GB-Eire' | 'GMT' | 'GMT+0' | 'GMT-0' | 'GMT0' | 'Greenwich' | 'HST' | 'Hongkong' | 'Iceland' | 'Indian/Antananarivo' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Comoro' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Mayotte' | 'Indian/Reunion' | 'Iran' | 'Israel' | 'Jamaica' | 'Japan' | 'Kwajalein' | 'Libya' | 'MET' | 'MST' | 'MST7MDT' | 'Mexico/BajaNorte' | 'Mexico/BajaSur' | 'Mexico/General' | 'NZ' | 'NZ-CHAT' | 'Navajo' | 'PRC' | 'PST8PDT' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Bougainville' | 'Pacific/Chatham' | 'Pacific/Chuuk' | 'Pacific/Easter' | 'Pacific/Efate' | 'Pacific/Enderbury' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Johnston' | 'Pacific/Kanton' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Kwajalein' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Midway' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Ponape' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Saipan' | 'Pacific/Samoa' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Truk' | 'Pacific/Wake' | 'Pacific/Wallis' | 'Pacific/Yap' | 'Poland' | 'Portugal' | 'ROC' | 'ROK' | 'Singapore' | 'Turkey' | 'UCT' | 'US/Alaska' | 'US/Aleutian' | 'US/Arizona' | 'US/Central' | 'US/East-Indiana' | 'US/Eastern' | 'US/Hawaii' | 'US/Indiana-Starke' | 'US/Michigan' | 'US/Mountain' | 'US/Pacific' | 'US/Samoa' | 'UTC' | 'Universal' | 'W-SU' | 'WET' | 'Zulu' | 'localtime' | ''; + /** + * How many consecutive missed or failed check-ins in a row before creating a new issue. + */ + failure_issue_threshold?: number | null; + /** + * How many successful check-ins in a row before resolving an issue. + */ + recovery_threshold?: number | null; + }; + /** + * Uniquely identifies your monitor within your organization. Changing this slug will require updates to any instrumented check-in calls. + */ + slug?: string; + /** + * Status of the monitor. Disabled monitors will not accept events and will not count towards the monitor quota. + * + * * `active` + * * `disabled` + */ + status?: 'active' | 'disabled'; + /** + * The ID of the team or user that owns the monitor. (eg. user:51 or team:6) + */ + owner?: string | null; + /** + * Disable creation of monitor incidents + */ + is_muted?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID or slug of the monitor. + */ + monitor_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/'; +}; + +export type UpdateAMonitorForAProjectErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAMonitorForAProjectResponses = { + 200: { + alertRule?: { + targets: Array<{ + targetIdentifier: number; + targetType: string; + }>; + environment: string; + }; + id: string; + name: string; + slug: string; + status: string; + isMuted: boolean; + isUpserting: boolean; + config: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + dateCreated: string; + project: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }; + environments: { + name: string; + status: string; + isMuted: boolean; + dateCreated: string; + lastCheckIn: string; + nextCheckIn: string; + nextCheckInLatest: string; + activeIncident: { + startingTimestamp: string; + resolvingTimestamp: string; + brokenNotice: { + userNotifiedTimestamp: string; + environmentMutedTimestamp: string; + } | null; + } | null; + }; + owner: { + type: 'user' | 'team'; + id: string; + name: string; + email?: string; + }; + }; +}; + +export type UpdateAMonitorForAProjectResponse = UpdateAMonitorForAProjectResponses[keyof UpdateAMonitorForAProjectResponses]; + +export type RetrieveCheckInsForAMonitorByProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID or slug of the monitor. + */ + monitor_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/monitors/{monitor_id_or_slug}/checkins/'; +}; + +export type RetrieveCheckInsForAMonitorByProjectErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveCheckInsForAMonitorByProjectResponses = { + 200: Array<{ + groups?: Array; + id: string; + environment: string; + status: string; + duration: number | null; + dateCreated: string; + dateAdded: string; + dateUpdated: string; + dateInProgress: string | null; + dateClock: string; + expectedTime: string; + monitorConfig: { + schedule_type: 'crontab' | 'interval'; + schedule: string | Array; + checkin_margin: number | null; + max_runtime: number | null; + timezone: string | null; + failure_issue_threshold: number | null; + recovery_threshold: number | null; + alert_rule_id: number | null; + }; + }>; +}; + +export type RetrieveCheckInsForAMonitorByProjectResponse = RetrieveCheckInsForAMonitorByProjectResponses[keyof RetrieveCheckInsForAMonitorByProjectResponses]; + +export type RetrieveOwnershipConfigurationForAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/ownership/'; +}; + +export type RetrieveOwnershipConfigurationForAProjectResponses = { + 200: { + schema?: { + [key: string]: unknown; + }; + raw: string; + fallthrough: boolean; + dateCreated: string; + lastUpdated: string; + isActive: boolean; + autoAssignment: string; + codeownersAutoSync: boolean; + }; +}; + +export type RetrieveOwnershipConfigurationForAProjectResponse = RetrieveOwnershipConfigurationForAProjectResponses[keyof RetrieveOwnershipConfigurationForAProjectResponses]; + +export type UpdateOwnershipConfigurationForAProjectData = { + body?: { + /** + * Raw input for ownership configuration. See the [Ownership Rules Documentation](/product/issues/ownership-rules/) to learn more. + */ + raw?: string; + /** + * A boolean determining who to assign ownership to when an ownership rule has no match. If set to `True`, all project members are made owners. Otherwise, no owners are set. + */ + fallthrough?: boolean; + /** + * Auto-assignment settings. The available options are: + * - Auto Assign to Issue Owner + * - Auto Assign to Suspect Commits + * - Turn off Auto-Assignment + */ + autoAssignment?: string; + /** + * Set to `True` to sync issue owners with CODEOWNERS updates in a release. + */ + codeownersAutoSync?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/ownership/'; +}; + +export type UpdateOwnershipConfigurationForAProjectErrors = { + /** + * Bad Request + */ + 400: unknown; +}; + +export type UpdateOwnershipConfigurationForAProjectResponses = { + 202: { + schema?: { + [key: string]: unknown; + }; + raw: string; + fallthrough: boolean; + dateCreated: string; + lastUpdated: string; + isActive: boolean; + autoAssignment: string; + codeownersAutoSync: boolean; + }; +}; + +export type UpdateOwnershipConfigurationForAProjectResponse = UpdateOwnershipConfigurationForAProjectResponses[keyof UpdateOwnershipConfigurationForAProjectResponses]; + +export type DeleteAReplayInstanceData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the replay you'd like to retrieve. + */ + replay_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/'; +}; + +export type DeleteAReplayInstanceErrors = { + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAReplayInstanceResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAReplayInstanceResponse = DeleteAReplayInstanceResponses[keyof DeleteAReplayInstanceResponses]; + +export type ListClickedNodesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the replay you'd like to retrieve. + */ + replay_id: string; + }; + query?: { + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * Limit the number of rows to return in the result. Default and maximum allowed is 100. + */ + per_page?: number; + /** + * Filters results by using [query syntax](/product/sentry-basics/search/). + * + * Example: `query=(transaction:foo AND release:abc) OR (transaction:[bar,baz] AND release:def)` + * + */ + query?: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/clicks/'; +}; + +export type ListClickedNodesErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListClickedNodesResponses = { + 200: { + data: Array<{ + node_id: number; + timestamp: string; + }>; + }; +}; + +export type ListClickedNodesResponse = ListClickedNodesResponses[keyof ListClickedNodesResponses]; + +export type ListRecordingSegmentsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the replay you'd like to retrieve. + */ + replay_id: string; + }; + query?: { + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + /** + * Limit the number of rows to return in the result. Default and maximum allowed is 100. + */ + per_page?: number; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/recording-segments/'; +}; + +export type ListRecordingSegmentsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListRecordingSegmentsResponses = { + 200: Array>; +}; + +export type ListRecordingSegmentsResponse = ListRecordingSegmentsResponses[keyof ListRecordingSegmentsResponses]; + +export type RetrieveARecordingSegmentData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the replay you'd like to retrieve. + */ + replay_id: string; + /** + * The ID of the segment you'd like to retrieve. + */ + segment_id: number; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/recording-segments/{segment_id}/'; +}; + +export type RetrieveARecordingSegmentErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveARecordingSegmentResponses = { + 200: Array<{ + [key: string]: unknown; + }>; +}; + +export type RetrieveARecordingSegmentResponse = RetrieveARecordingSegmentResponses[keyof RetrieveARecordingSegmentResponses]; + +export type ListUsersWhoHaveViewedAReplayData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the replay you'd like to retrieve. + */ + replay_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/replays/{replay_id}/viewed-by/'; +}; + +export type ListUsersWhoHaveViewedAReplayErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListUsersWhoHaveViewedAReplayResponses = { + 200: { + data: { + viewed_by: Array<{ + [key: string]: unknown; + }>; + }; + }; +}; + +export type ListUsersWhoHaveViewedAReplayResponse = ListUsersWhoHaveViewedAReplayResponses[keyof ListUsersWhoHaveViewedAReplayResponses]; + +export type DeprecatedListAProjectSissueAlertRulesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/'; +}; + +export type DeprecatedListAProjectSissueAlertRulesErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedListAProjectSissueAlertRulesResponses = { + 200: Array<{ + owner?: string | null; + createdBy?: { + id: number; + name: string; + email: string; + } | null; + environment?: string | null; + lastTriggered?: string | null; + snoozeCreatedBy?: string | null; + snoozeForEveryone?: boolean | null; + disableReason?: string; + disableDate?: string; + errors?: Array<{ + detail: string; + }>; + id: string | null; + conditions: Array<{ + [key: string]: unknown; + }>; + filters: Array<{ + [key: string]: unknown; + }>; + actions: Array<{ + [key: string]: unknown; + }>; + actionMatch: string; + filterMatch: string; + frequency: number; + name: string; + dateCreated: string; + projects: Array; + status: string; + snooze: boolean; + }>; +}; + +export type DeprecatedListAProjectSissueAlertRulesResponse = DeprecatedListAProjectSissueAlertRulesResponses[keyof DeprecatedListAProjectSissueAlertRulesResponses]; + +export type DeprecatedCreateAnIssueAlertRuleForAProjectData = { + body: { + /** + * The name for the rule. + */ + name: string; + /** + * How often to perform the actions once for an issue, in minutes. The valid range is `5` to `43200`. + */ + frequency: number; + /** + * A string determining which of the conditions need to be true before any filters are evaluated. + * + * * `all` - All conditions must evaluate to true. + * * `any` - At least one of the conditions must evaluate to true. + * * `none` - All conditions must evaluate to false. + */ + actionMatch: 'all' | 'any' | 'none'; + /** + * + * A list of triggers that determine when the rule fires. See below for a list of possible conditions. + * + * **A new issue is created** + * ```json + * { + * "id": "sentry.rules.conditions.first_seen_event.FirstSeenEventCondition" + * } + * ``` + * + * **The issue changes state from resolved to unresolved** + * ```json + * { + * "id": "sentry.rules.conditions.regression_event.RegressionEventCondition" + * } + * ``` + * + * **The issue is seen more than `value` times in `interval`** + * - `value` - An integer + * - `interval` - Valid values are `1m`, `5m`, `15m`, `1h`, `1d`, `1w` and `30d` (`m` for minutes, `h` for hours, `d` for days, and `w` for weeks). + * ```json + * { + * "id": "sentry.rules.conditions.event_frequency.EventFrequencyCondition", + * "value": 500, + * "interval": "1h" + * } + * ``` + * + * **The issue is seen by more than `value` users in `interval`** + * - `value` - An integer + * - `interval` - Valid values are `1m`, `5m`, `15m`, `1h`, `1d`, `1w` and `30d` (`m` for minutes, `h` for hours, `d` for days, and `w` for weeks). + * ```json + * { + * "id": "sentry.rules.conditions.event_frequency.EventUniqueUserFrequencyCondition", + * "value": 1000, + * "interval": "15m" + * } + * ``` + * + * **The issue affects more than `value` percent of sessions in `interval`** + * - `value` - A float + * - `interval` - Valid values are `5m`, `10m`, `30m`, and `1h` (`m` for minutes, `h` for hours). + * ```json + * { + * "id": "sentry.rules.conditions.event_frequency.EventFrequencyPercentCondition", + * "value": 50.0, + * "interval": "10m" + * } + * ``` + * + */ + conditions: Array<{ + [key: string]: unknown; + }>; + /** + * + * A list of actions that take place when all required conditions and filters for the rule are met. See below for a list of possible actions. + * + * **Send a notification to Suggested Assignees** + * - `fallthroughType` - Who the notification should be sent to if there are no suggested assignees. Valid values are `ActiveMembers`, `AllMembers`, and `NoOne`. + * ```json + * { + * "id" - "sentry.mail.actions.NotifyEmailAction", + * "targetType" - "IssueOwners", + * "fallthroughType" - "ActiveMembers" + * } + * ``` + * + * **Send a notification to a Member or a Team** + * - `targetType` - One of `Member` or `Team`. + * - `fallthroughType` - Who the notification should be sent to if it cannot be sent to the original target. Valid values are `ActiveMembers`, `AllMembers`, and `NoOne`. + * - `targetIdentifier` - The ID of the Member or Team the notification should be sent to. + * ```json + * { + * "id": "sentry.mail.actions.NotifyEmailAction", + * "targetType": "Team" + * "fallthroughType": "AllMembers" + * "targetIdentifier": 4524986223 + * } + * ``` + * + * **Send a Slack notification** + * - `workspace` - The integration ID associated with the Slack workspace. + * - `channel` - The name of the channel to send the notification to (e.g., #critical, Jane Schmidt). + * - `channel_id` (optional) - The ID of the channel to send the notification to. + * - `tags` (optional) - A string of tags to show in the notification, separated by commas (e.g., "environment, user, my_tag"). + * - `notes` (optional) - Text to show alongside the notification. To @ a user, include their user id like `@`. To include a clickable link, format the link and title like ``. + * ```json + * { + * "id": "sentry.integrations.slack.notify_action.SlackNotifyServiceAction", + * "workspace": 293854098, + * "channel": "#warning", + * "tags": "environment,level" + * "notes": "Please for triage information" + * } + * ``` + * + * **Send a Microsoft Teams notification** + * - `team` - The integration ID associated with the Microsoft Teams team. + * - `channel` - The name of the channel to send the notification to. + * ```json + * { + * "id": "sentry.integrations.msteams.notify_action.MsTeamsNotifyServiceAction", + * "team": 23465424, + * "channel": "General" + * } + * ``` + * + * **Send a Discord notification** + * - `server` - The integration ID associated with the Discord server. + * - `channel_id` - The ID of the channel to send the notification to. + * - `tags` (optional) - A string of tags to show in the notification, separated by commas (e.g., "environment, user, my_tag"). + * ```json + * { + * "id": "sentry.integrations.discord.notify_action.DiscordNotifyServiceAction", + * "server": 63408298, + * "channel_id": 94732897, + * "tags": "browser,user" + * } + * ``` + * + * **Create a Jira Ticket** + * - `integration` - The integration ID associated with Jira. + * - `project` - The ID of the Jira project. + * - `issuetype` - The ID of the type of issue that the ticket should be created as. + * - `dynamic_form_fields` - A list of any custom fields you want to include in the ticket as objects. + * ```json + * { + * "id": "sentry.integrations.jira.notify_action.JiraCreateTicketAction", + * "integration": 321424, + * "project": "349719" + * "issueType": "1" + * } + * ``` + * + * **Create a Jira Server Ticket** + * - `integration` - The integration ID associated with Jira Server. + * - `project` - The ID of the Jira Server project. + * - `issuetype` - The ID of the type of issue that the ticket should be created as. + * - `dynamic_form_fields` - A list of any custom fields you want to include in the ticket as objects. + * ```json + * { + * "id": "sentry.integrations.jira_server.notify_action.JiraServerCreateTicketAction", + * "integration": 321424, + * "project": "349719" + * "issueType": "1" + * } + * ``` + * + * **Create a GitHub Issue** + * - `integration` - The integration ID associated with GitHub. + * - `repo` - The name of the repository to create the issue in. + * - `title` - The title of the issue. + * - `body` (optional) - The contents of the issue. + * - `assignee` (optional) - The GitHub user to assign the issue to. + * - `labels` (optional) - A list of labels to assign to the issue. + * ```json + * { + * "id": "sentry.integrations.github.notify_action.GitHubCreateTicketAction", + * "integration": 93749, + * "repo": default, + * "title": "My Test Issue", + * "assignee": "Baxter the Hacker", + * "labels": ["bug", "p1"] + * "" + * } + * ``` + * + * **Create a GitHub Enterprise Issue** + * - `integration` - The integration ID associated with GitHub Enterprise. + * - `repo` - The name of the repository to create the issue in. + * - `title` - The title of the issue. + * - `body` (optional) - The contents of the issue. + * - `assignee` (optional) - The GitHub user to assign the issue to. + * - `labels` (optional) - A list of labels to assign to the issue. + * ```json + * { + * "id": "sentry.integrations.github_enterprise.notify_action.GitHubEnterpriseCreateTicketAction", + * "integration": 93749, + * "repo": default, + * "title": "My Test Issue", + * "assignee": "Baxter the Hacker", + * "labels": ["bug", "p1"] + * "" + * } + * ``` + * + * **Create an Azure DevOps work item** + * - `integration` - The integration ID. + * - `project` - The ID of the Azure DevOps project. + * - `work_item_type` - The type of work item to create. + * - `dynamic_form_fields` - A list of any custom fields you want to include in the work item as objects. + * ```json + * { + * "id": "sentry.integrations.vsts.notify_action.AzureDevopsCreateTicketAction", + * "integration": 294838, + * "project": "0389485", + * "work_item_type": "Microsoft.VSTS.WorkItemTypes.Task", + * } + * ``` + * + * **Send a PagerDuty notification** + * - `account` - The integration ID associated with the PagerDuty account. + * - `service` - The ID of the service to send the notification to. + * - `severity` - The severity of the Pagerduty alert. This is optional, the default is `critical` for fatal issues, `error` for error issues, `warning` for warning issues, and `info` for info and debug issues. + * ```json + * { + * "id": "sentry.integrations.pagerduty.notify_action.PagerDutyNotifyServiceAction", + * "account": 92385907, + * "service": 9823924, + * "severity": "critical" + * } + * ``` + * + * **Send an Opsgenie notification** + * - `account` - The integration ID associated with the Opsgenie account. + * - `team` - The ID of the Opsgenie team to send the notification to. + * - `priority` - The priority of the Opsgenie alert. This is optional, the default is `P3`. + * ```json + * { + * "id": "sentry.integrations.opsgenie.notify_action.OpsgenieNotifyTeamAction", + * "account": 8723897589, + * "team": "9438930258-fairy", + * "priority": "P1" + * } + * ``` + * + * **Send a notification to a service** + * - `service` - The plugin slug. + * ```json + * { + * "id": "sentry.rules.actions.notify_event_service.NotifyEventServiceAction", + * "service": "mail" + * } + * ``` + * + * **Send a notification to a Sentry app with a custom webhook payload** + * - `settings` - A list of objects denoting the settings each action will be created with. All required fields must be included. + * - `sentryAppInstallationUuid` - The ID for the Sentry app + * ```json + * { + * "id": "sentry.rules.actions.notify_event_sentry_app.NotifyEventSentryAppAction", + * "settings": [ + * {"name": "title", "value": "Team Rocket"}, + * {"name": "summary", "value": "We're blasting off again."}, + * ], + * "sentryAppInstallationUuid": 643522 + * "hasSchemaFormConfig": true + * } + * ``` + * + * **Send a notification (for all legacy integrations)** + * ```json + * { + * "id": "sentry.rules.actions.notify_event.NotifyEventAction" + * } + * ``` + * + */ + actions: Array<{ + [key: string]: unknown; + }>; + /** + * The name of the environment to filter by. + */ + environment?: string | null; + /** + * The ID of the team or user that owns the rule. + */ + owner?: string | null; + /** + * A string determining which filters need to be true before any actions take place. Required when a value is provided for `filters`. + * + * * `all` - All filters must evaluate to true. + * * `any` - At least one of the filters must evaluate to true. + * * `none` - All filters must evaluate to false. + */ + filterMatch?: 'all' | 'any' | 'none'; + /** + * + * A list of filters that determine if a rule fires after the necessary conditions have been met. See below for a list of possible filters. + * + * **The issue is `comparison_type` than `value` `time`** + * - `comparison_type` - One of `older` or `newer` + * - `value` - An integer + * - `time` - The unit of time. Valid values are `minute`, `hour`, `day`, and `week`. + * ```json + * { + * "id": "sentry.rules.filters.age_comparison.AgeComparisonFilter", + * "comparison_type": "older", + * "value": 3, + * "time": "week" + * } + * ``` + * + * **The issue has happened at least `value` times** + * - `value` - An integer + * ```json + * { + * "id": "sentry.rules.filters.issue_occurrences.IssueOccurrencesFilter", + * "value": 120 + * } + * ``` + * + * **The issue is assigned to No One** + * ```json + * { + * "id": "sentry.rules.filters.assigned_to.AssignedToFilter", + * "targetType": "Unassigned" + * } + * ``` + * + * **The issue is assigned to `targetType`** + * - `targetType` - One of `Team` or `Member` + * - `targetIdentifier` - The target's ID + * ```json + * { + * "id": "sentry.rules.filters.assigned_to.AssignedToFilter", + * "targetType": "Member", + * "targetIdentifier": 895329789 + * } + * ``` + * + * **The event is from the latest release** + * ```json + * { + * "id": "sentry.rules.filters.latest_release.LatestReleaseFilter" + * } + * ``` + * + * **The issue's category is equal to `value`** + * - `value` - An integer correlated with a category. Valid values are `1` (Error), `2` (Performance), `3` (Profile), `4` (Cron), and `5` (Replay). + * ```json + * { + * "id": "sentry.rules.filters.issue_category.IssueCategoryFilter", + * "value": 2 + * } + * ``` + * + * **The event's `attribute` value `match` `value`** + * - `attribute` - Valid values are `message`, `platform`, `environment`, `type`, `error.handled`, `error.unhandled`, `error.main_thread`, `exception.type`, `exception.value`, `user.id`, `user.email`, `user.username`, `user.ip_address`, `http.method`, `http.url`, `http.status_code`, `sdk.name`, `stacktrace.code`, `stacktrace.module`, `stacktrace.filename`, `stacktrace.abs_path`, `stacktrace.package`, `unreal.crash_type`, `app.in_foreground`. + * - `match` - The comparison operator. Valid values are `eq` (equals), `ne` (does not equal), `sw` (starts with), `ew` (ends with), `co` (contains), `nc` (does not contain), `is` (is set), and `ns` (is not set). + * - `value` - A string. Not required when `match` is `is` or `ns`. + * ```json + * { + * "id": "sentry.rules.conditions.event_attribute.EventAttributeCondition", + * "attribute": "http.url", + * "match": "nc", + * "value": "localhost" + * } + * ``` + * + * **The event's tags match `key` `match` `value`** + * - `key` - The tag + * - `match` - The comparison operator. Valid values are `eq` (equals), `ne` (does not equal), `sw` (starts with), `ew` (ends with), `co` (contains), `nc` (does not contain), `is` (is set), and `ns` (is not set). + * - `value` - A string. Not required when `match` is `is` or `ns`. + * ```json + * { + * "id": "sentry.rules.filters.tagged_event.TaggedEventFilter", + * "key": "level", + * "match": "eq" + * "value": "error" + * } + * ``` + * + * **The event's level is `match` `level`** + * - `match` - Valid values are `eq`, `gte`, and `lte`. + * - `level` - Valid values are `50` (fatal), `40` (error), `30` (warning), `20` (info), `10` (debug), `0` (sample). + * ```json + * { + * "id": "sentry.rules.filters.level.LevelFilter", + * "match": "gte" + * "level": "50" + * } + * ``` + * + */ + filters?: Array<{ + [key: string]: unknown; + }>; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/'; +}; + +export type DeprecatedCreateAnIssueAlertRuleForAProjectErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedCreateAnIssueAlertRuleForAProjectResponses = { + /** + * This represents a Sentry Rule. + */ + 201: { + owner?: string | null; + createdBy?: { + id: number; + name: string; + email: string; + } | null; + environment?: string | null; + lastTriggered?: string | null; + snoozeCreatedBy?: string | null; + snoozeForEveryone?: boolean | null; + disableReason?: string; + disableDate?: string; + errors?: Array<{ + detail: string; + }>; + id: string | null; + conditions: Array<{ + [key: string]: unknown; + }>; + filters: Array<{ + [key: string]: unknown; + }>; + actions: Array<{ + [key: string]: unknown; + }>; + actionMatch: string; + filterMatch: string; + frequency: number; + name: string; + dateCreated: string; + projects: Array; + status: string; + snooze: boolean; + }; +}; + +export type DeprecatedCreateAnIssueAlertRuleForAProjectResponse = DeprecatedCreateAnIssueAlertRuleForAProjectResponses[keyof DeprecatedCreateAnIssueAlertRuleForAProjectResponses]; + +export type DeprecatedDeleteAnIssueAlertRuleData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the rule you'd like to query. + */ + rule_id: number; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/{rule_id}/'; +}; + +export type DeprecatedDeleteAnIssueAlertRuleErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedDeleteAnIssueAlertRuleResponses = { + /** + * Accepted + */ + 202: unknown; +}; + +export type DeprecatedRetrieveAnIssueAlertRuleForAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the rule you'd like to query. + */ + rule_id: number; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/{rule_id}/'; +}; + +export type DeprecatedRetrieveAnIssueAlertRuleForAProjectErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedRetrieveAnIssueAlertRuleForAProjectResponses = { + /** + * This represents a Sentry Rule. + */ + 200: { + owner?: string | null; + createdBy?: { + id: number; + name: string; + email: string; + } | null; + environment?: string | null; + lastTriggered?: string | null; + snoozeCreatedBy?: string | null; + snoozeForEveryone?: boolean | null; + disableReason?: string; + disableDate?: string; + errors?: Array<{ + detail: string; + }>; + id: string | null; + conditions: Array<{ + [key: string]: unknown; + }>; + filters: Array<{ + [key: string]: unknown; + }>; + actions: Array<{ + [key: string]: unknown; + }>; + actionMatch: string; + filterMatch: string; + frequency: number; + name: string; + dateCreated: string; + projects: Array; + status: string; + snooze: boolean; + }; +}; + +export type DeprecatedRetrieveAnIssueAlertRuleForAProjectResponse = DeprecatedRetrieveAnIssueAlertRuleForAProjectResponses[keyof DeprecatedRetrieveAnIssueAlertRuleForAProjectResponses]; + +export type DeprecatedUpdateAnIssueAlertRuleData = { + body: { + /** + * The name for the rule. + */ + name: string; + /** + * A string determining which of the conditions need to be true before any filters are evaluated. + * + * * `all` - All conditions must evaluate to true. + * * `any` - At least one of the conditions must evaluate to true. + * * `none` - All conditions must evaluate to false. + */ + actionMatch: 'all' | 'any' | 'none'; + /** + * A list of triggers that determine when the rule fires. See [Create an Issue Alert Rule](/api/alerts/create-an-issue-alert-rule-for-a-project) for valid conditions. + */ + conditions: Array<{ + [key: string]: unknown; + }>; + /** + * A list of actions that take place when all required conditions and filters for the rule are met. See [Create an Issue Alert Rule](/api/alerts/create-an-issue-alert-rule-for-a-project) for valid actions. + */ + actions: Array<{ + [key: string]: unknown; + }>; + /** + * How often to perform the actions once for an issue, in minutes. The valid range is `5` to `43200`. + */ + frequency: number; + /** + * The name of the environment to filter by. + */ + environment?: string | null; + /** + * A string determining which filters need to be true before any actions take place. + * + * * `all` - All filters must evaluate to true. + * * `any` - At least one of the filters must evaluate to true. + * * `none` - All filters must evaluate to false. + */ + filterMatch?: 'all' | 'any' | 'none'; + /** + * A list of filters that determine if a rule fires after the necessary conditions have been met. See [Create an Issue Alert Rule](/api/alerts/create-an-issue-alert-rule-for-a-project) for valid filters. + */ + filters?: Array<{ + [key: string]: unknown; + }>; + /** + * The ID of the team or user that owns the rule. + */ + owner?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the rule you'd like to query. + */ + rule_id: number; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/rules/{rule_id}/'; +}; + +export type DeprecatedUpdateAnIssueAlertRuleErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeprecatedUpdateAnIssueAlertRuleResponses = { + /** + * This represents a Sentry Rule. + */ + 200: { + owner?: string | null; + createdBy?: { + id: number; + name: string; + email: string; + } | null; + environment?: string | null; + lastTriggered?: string | null; + snoozeCreatedBy?: string | null; + snoozeForEveryone?: boolean | null; + disableReason?: string; + disableDate?: string; + errors?: Array<{ + detail: string; + }>; + id: string | null; + conditions: Array<{ + [key: string]: unknown; + }>; + filters: Array<{ + [key: string]: unknown; + }>; + actions: Array<{ + [key: string]: unknown; + }>; + actionMatch: string; + filterMatch: string; + frequency: number; + name: string; + dateCreated: string; + projects: Array; + status: string; + snooze: boolean; + }; +}; + +export type DeprecatedUpdateAnIssueAlertRuleResponse = DeprecatedUpdateAnIssueAlertRuleResponses[keyof DeprecatedUpdateAnIssueAlertRuleResponses]; + +export type DeleteASymbolSourceFromAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query: { + /** + * The ID of the source to delete. + */ + id: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/'; +}; + +export type DeleteASymbolSourceFromAProjectErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteASymbolSourceFromAProjectResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteASymbolSourceFromAProjectResponse = DeleteASymbolSourceFromAProjectResponses[keyof DeleteASymbolSourceFromAProjectResponses]; + +export type RetrieveAProjectSSymbolSourcesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: { + /** + * The ID of the source to look up. If this is not provided, all sources are returned. + */ + id?: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/'; +}; + +export type RetrieveAProjectSSymbolSourcesErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAProjectSSymbolSourcesResponses = { + 200: Array<{ + type: 'http'; + url: string; + username?: string; + password?: { + 'hidden-secret'?: true; + }; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 's3'; + bucket: string; + region: string; + access_key: string; + secret_key: { + 'hidden-secret'?: true; + }; + prefix?: string; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 'gcs'; + bucket: string; + client_email: string; + private_key: { + 'hidden-secret'?: true; + }; + prefix?: string; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 'appStoreConnect'; + id: string; + name: string; + appconnectIssuer: string; + appconnectKey: string; + appconnectPrivateKey: string; + appName: string; + appId: string; + bundleId: string; + }>; +}; + +export type RetrieveAProjectSSymbolSourcesResponse = RetrieveAProjectSSymbolSourcesResponses[keyof RetrieveAProjectSSymbolSourcesResponses]; + +export type AddASymbolSourceToAProjectData = { + body: { + /** + * The type of the source. + * + * * `http` - SymbolServer (HTTP) + * * `gcs` - Google Cloud Storage + * * `s3` - Amazon S3 + */ + type: 'http' | 'gcs' | 's3'; + /** + * The human-readable name of the source. + */ + name: string; + /** + * The internal ID of the source. Must be distinct from all other source IDs and cannot start with '`sentry:`'. If this is not provided, a new UUID will be generated. + */ + id?: string; + /** + * Layout settings for the source. This is required for HTTP, GCS, and S3 sources. + * + * **`type`** ***(string)*** - The layout of the folder structure. The options are: + * - `native` - Platform-Specific (SymStore / GDB / LLVM) + * - `symstore` - Microsoft SymStore + * - `symstore_index2` - Microsoft SymStore (with index2.txt) + * - `ssqp` - Microsoft SSQP + * - `unified` - Unified Symbol Server Layout + * - `debuginfod` - debuginfod + * + * **`casing`** ***(string)*** - The layout of the folder structure. The options are: + * - `default` - Default (mixed case) + * - `uppercase` - Uppercase + * - `lowercase` - Lowercase + * + * ```json + * { + * "layout": { + * "type": "native" + * "casing": "default" + * } + * } + * ``` + */ + layout?: { + /** + * The source's layout type. + * + * * `native` + * * `symstore` + * * `symstore_index2` + * * `ssqp` + * * `unified` + * * `debuginfod` + * * `slashsymbols` + */ + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + /** + * The source's casing rules. + * + * * `lowercase` + * * `uppercase` + * * `default` + */ + casing: 'lowercase' | 'uppercase' | 'default'; + }; + /** + * Filter settings for the source. This is optional for all sources. + * + * **`filetypes`** ***(list)*** - A list of file types that can be found on this source. If this is left empty, all file types will be enabled. The options are: + * - `pe` - Windows executable files + * - `pdb` - Windows debug files + * - `portablepdb` - .NET portable debug files + * - `mach_code` - MacOS executable files + * - `mach_debug` - MacOS debug files + * - `elf_code` - ELF executable files + * - `elf_debug` - ELF debug files + * - `wasm_code` - WASM executable files + * - `wasm_debug` - WASM debug files + * - `breakpad` - Breakpad symbol files + * - `sourcebundle` - Source code bundles + * - `uuidmap` - Apple UUID mapping files + * - `bcsymbolmap` - Apple bitcode symbol maps + * - `il2cpp` - Unity IL2CPP mapping files + * - `proguard` - ProGuard mapping files + * + * **`path_patterns`** ***(list)*** - A list of glob patterns to check against the debug and code file paths of debug files. Only files that match one of these patterns will be requested from the source. If this is left empty, no path-based filtering takes place. + * + * **`requires_checksum`** ***(boolean)*** - Whether this source requires a debug checksum to be sent with each request. Defaults to `false`. + * + * ```json + * { + * "filters": { + * "filetypes": ["pe", "pdb", "portablepdb"], + * "path_patterns": ["*ffmpeg*"] + * } + * } + * ``` + */ + filters?: { + /** + * The file types enabled for the source. + */ + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + /** + * The debug and code file paths enabled for the source. + */ + path_patterns?: Array; + /** + * Whether the source requires debug checksums. + */ + requires_checksum?: boolean; + }; + /** + * The source's URL. Optional for HTTP sources, invalid for all others. + */ + url?: string; + /** + * The user name for accessing the source. Optional for HTTP sources, invalid for all others. + */ + username?: string; + /** + * The password for accessing the source. Optional for HTTP sources, invalid for all others. + */ + password?: string; + /** + * The GCS or S3 bucket where the source resides. Required for GCS and S3 source, invalid for HTTP sources. + */ + bucket?: string; + /** + * The source's [S3 region](https://docs.aws.amazon.com/general/latest/gr/s3.html). Required for S3 sources, invalid for all others. + * + * * `us-east-2` - US East (Ohio) + * * `us-east-1` - US East (N. Virginia) + * * `us-west-1` - US West (N. California) + * * `us-west-2` - US West (Oregon) + * * `ap-east-1` - Asia Pacific (Hong Kong) + * * `ap-south-1` - Asia Pacific (Mumbai) + * * `ap-northeast-2` - Asia Pacific (Seoul) + * * `ap-southeast-1` - Asia Pacific (Singapore) + * * `ap-southeast-2` - Asia Pacific (Sydney) + * * `ap-northeast-1` - Asia Pacific (Tokyo) + * * `ca-central-1` - Canada (Central) + * * `cn-north-1` - China (Beijing) + * * `cn-northwest-1` - China (Ningxia) + * * `eu-central-1` - EU (Frankfurt) + * * `eu-west-1` - EU (Ireland) + * * `eu-west-2` - EU (London) + * * `eu-west-3` - EU (Paris) + * * `eu-north-1` - EU (Stockholm) + * * `sa-east-1` - South America (São Paulo) + * * `us-gov-east-1` - AWS GovCloud (US-East) + * * `us-gov-west-1` - AWS GovCloud (US) + */ + region?: 'us-east-2' | 'us-east-1' | 'us-west-1' | 'us-west-2' | 'ap-east-1' | 'ap-south-1' | 'ap-northeast-2' | 'ap-southeast-1' | 'ap-southeast-2' | 'ap-northeast-1' | 'ca-central-1' | 'cn-north-1' | 'cn-northwest-1' | 'eu-central-1' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'eu-north-1' | 'sa-east-1' | 'us-gov-east-1' | 'us-gov-west-1'; + /** + * The [AWS Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#access-keys-and-secret-access-keys).Required for S3 sources, invalid for all others. + */ + access_key?: string; + /** + * The [AWS Secret Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#access-keys-and-secret-access-keys).Required for S3 sources, invalid for all others. + */ + secret_key?: string; + /** + * The GCS or [S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) prefix. Optional for GCS and S3 sourcse, invalid for HTTP. + */ + prefix?: string; + /** + * The GCS email address for authentication. Required for GCS sources, invalid for all others. + */ + client_email?: string; + /** + * The GCS private key. Required for GCS sources if not using impersonated tokens. Invalid for all others. + */ + private_key?: string; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/'; +}; + +export type AddASymbolSourceToAProjectErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type AddASymbolSourceToAProjectResponses = { + 201: { + type: 'http'; + url: string; + username?: string; + password?: { + 'hidden-secret'?: true; + }; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 's3'; + bucket: string; + region: string; + access_key: string; + secret_key: { + 'hidden-secret'?: true; + }; + prefix?: string; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 'gcs'; + bucket: string; + client_email: string; + private_key: { + 'hidden-secret'?: true; + }; + prefix?: string; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 'appStoreConnect'; + id: string; + name: string; + appconnectIssuer: string; + appconnectKey: string; + appconnectPrivateKey: string; + appName: string; + appId: string; + bundleId: string; + }; +}; + +export type AddASymbolSourceToAProjectResponse = AddASymbolSourceToAProjectResponses[keyof AddASymbolSourceToAProjectResponses]; + +export type UpdateAProjectSSymbolSourceData = { + body: { + /** + * The type of the source. + * + * * `http` - SymbolServer (HTTP) + * * `gcs` - Google Cloud Storage + * * `s3` - Amazon S3 + */ + type: 'http' | 'gcs' | 's3'; + /** + * The human-readable name of the source. + */ + name: string; + /** + * The internal ID of the source. Must be distinct from all other source IDs and cannot start with '`sentry:`'. If this is not provided, a new UUID will be generated. + */ + id?: string; + /** + * Layout settings for the source. This is required for HTTP, GCS, and S3 sources. + * + * **`type`** ***(string)*** - The layout of the folder structure. The options are: + * - `native` - Platform-Specific (SymStore / GDB / LLVM) + * - `symstore` - Microsoft SymStore + * - `symstore_index2` - Microsoft SymStore (with index2.txt) + * - `ssqp` - Microsoft SSQP + * - `unified` - Unified Symbol Server Layout + * - `debuginfod` - debuginfod + * + * **`casing`** ***(string)*** - The layout of the folder structure. The options are: + * - `default` - Default (mixed case) + * - `uppercase` - Uppercase + * - `lowercase` - Lowercase + * + * ```json + * { + * "layout": { + * "type": "native" + * "casing": "default" + * } + * } + * ``` + */ + layout?: { + /** + * The source's layout type. + * + * * `native` + * * `symstore` + * * `symstore_index2` + * * `ssqp` + * * `unified` + * * `debuginfod` + * * `slashsymbols` + */ + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + /** + * The source's casing rules. + * + * * `lowercase` + * * `uppercase` + * * `default` + */ + casing: 'lowercase' | 'uppercase' | 'default'; + }; + /** + * Filter settings for the source. This is optional for all sources. + * + * **`filetypes`** ***(list)*** - A list of file types that can be found on this source. If this is left empty, all file types will be enabled. The options are: + * - `pe` - Windows executable files + * - `pdb` - Windows debug files + * - `portablepdb` - .NET portable debug files + * - `mach_code` - MacOS executable files + * - `mach_debug` - MacOS debug files + * - `elf_code` - ELF executable files + * - `elf_debug` - ELF debug files + * - `wasm_code` - WASM executable files + * - `wasm_debug` - WASM debug files + * - `breakpad` - Breakpad symbol files + * - `sourcebundle` - Source code bundles + * - `uuidmap` - Apple UUID mapping files + * - `bcsymbolmap` - Apple bitcode symbol maps + * - `il2cpp` - Unity IL2CPP mapping files + * - `proguard` - ProGuard mapping files + * + * **`path_patterns`** ***(list)*** - A list of glob patterns to check against the debug and code file paths of debug files. Only files that match one of these patterns will be requested from the source. If this is left empty, no path-based filtering takes place. + * + * **`requires_checksum`** ***(boolean)*** - Whether this source requires a debug checksum to be sent with each request. Defaults to `false`. + * + * ```json + * { + * "filters": { + * "filetypes": ["pe", "pdb", "portablepdb"], + * "path_patterns": ["*ffmpeg*"] + * } + * } + * ``` + */ + filters?: { + /** + * The file types enabled for the source. + */ + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + /** + * The debug and code file paths enabled for the source. + */ + path_patterns?: Array; + /** + * Whether the source requires debug checksums. + */ + requires_checksum?: boolean; + }; + /** + * The source's URL. Optional for HTTP sources, invalid for all others. + */ + url?: string; + /** + * The user name for accessing the source. Optional for HTTP sources, invalid for all others. + */ + username?: string; + /** + * The password for accessing the source. Optional for HTTP sources, invalid for all others. + */ + password?: string; + /** + * The GCS or S3 bucket where the source resides. Required for GCS and S3 source, invalid for HTTP sources. + */ + bucket?: string; + /** + * The source's [S3 region](https://docs.aws.amazon.com/general/latest/gr/s3.html). Required for S3 sources, invalid for all others. + * + * * `us-east-2` - US East (Ohio) + * * `us-east-1` - US East (N. Virginia) + * * `us-west-1` - US West (N. California) + * * `us-west-2` - US West (Oregon) + * * `ap-east-1` - Asia Pacific (Hong Kong) + * * `ap-south-1` - Asia Pacific (Mumbai) + * * `ap-northeast-2` - Asia Pacific (Seoul) + * * `ap-southeast-1` - Asia Pacific (Singapore) + * * `ap-southeast-2` - Asia Pacific (Sydney) + * * `ap-northeast-1` - Asia Pacific (Tokyo) + * * `ca-central-1` - Canada (Central) + * * `cn-north-1` - China (Beijing) + * * `cn-northwest-1` - China (Ningxia) + * * `eu-central-1` - EU (Frankfurt) + * * `eu-west-1` - EU (Ireland) + * * `eu-west-2` - EU (London) + * * `eu-west-3` - EU (Paris) + * * `eu-north-1` - EU (Stockholm) + * * `sa-east-1` - South America (São Paulo) + * * `us-gov-east-1` - AWS GovCloud (US-East) + * * `us-gov-west-1` - AWS GovCloud (US) + */ + region?: 'us-east-2' | 'us-east-1' | 'us-west-1' | 'us-west-2' | 'ap-east-1' | 'ap-south-1' | 'ap-northeast-2' | 'ap-southeast-1' | 'ap-southeast-2' | 'ap-northeast-1' | 'ca-central-1' | 'cn-north-1' | 'cn-northwest-1' | 'eu-central-1' | 'eu-west-1' | 'eu-west-2' | 'eu-west-3' | 'eu-north-1' | 'sa-east-1' | 'us-gov-east-1' | 'us-gov-west-1'; + /** + * The [AWS Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#access-keys-and-secret-access-keys).Required for S3 sources, invalid for all others. + */ + access_key?: string; + /** + * The [AWS Secret Access Key](https://docs.aws.amazon.com/IAM/latest/UserGuide/security-creds.html#access-keys-and-secret-access-keys).Required for S3 sources, invalid for all others. + */ + secret_key?: string; + /** + * The GCS or [S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) prefix. Optional for GCS and S3 sourcse, invalid for HTTP. + */ + prefix?: string; + /** + * The GCS email address for authentication. Required for GCS sources, invalid for all others. + */ + client_email?: string; + /** + * The GCS private key. Required for GCS sources if not using impersonated tokens. Invalid for all others. + */ + private_key?: string; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query: { + /** + * The ID of the source to update. + */ + id: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/symbol-sources/'; +}; + +export type UpdateAProjectSSymbolSourceErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAProjectSSymbolSourceResponses = { + 200: { + type: 'http'; + url: string; + username?: string; + password?: { + 'hidden-secret'?: true; + }; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 's3'; + bucket: string; + region: string; + access_key: string; + secret_key: { + 'hidden-secret'?: true; + }; + prefix?: string; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 'gcs'; + bucket: string; + client_email: string; + private_key: { + 'hidden-secret'?: true; + }; + prefix?: string; + id: string; + name?: string; + layout: { + type: 'native' | 'symstore' | 'symstore_index2' | 'ssqp' | 'unified' | 'debuginfod' | 'slashsymbols'; + casing?: 'lowercase' | 'uppercase' | 'default'; + }; + filters?: { + filetypes?: Array<'pe' | 'pdb' | 'portablepdb' | 'mach_debug' | 'mach_code' | 'elf_debug' | 'elf_code' | 'wasm_debug' | 'wasm_code' | 'breakpad' | 'sourcebundle' | 'uuidmap' | 'bcsymbolmap' | 'il2cpp' | 'proguard' | 'dartsymbolmap'>; + path_patterns?: Array; + requires_checksum?: boolean; + }; + is_public?: boolean; + has_index?: boolean; + platforms?: Array; + } | { + type: 'appStoreConnect'; + id: string; + name: string; + appconnectIssuer: string; + appconnectKey: string; + appconnectPrivateKey: string; + appName: string; + appId: string; + bundleId: string; + }; +}; + +export type UpdateAProjectSSymbolSourceResponse = UpdateAProjectSSymbolSourceResponses[keyof UpdateAProjectSSymbolSourceResponses]; + +export type ListAProjectSTeamsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/teams/'; +}; + +export type ListAProjectSTeamsErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAProjectSTeamsResponses = { + 200: Array<{ + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + }>; +}; + +export type ListAProjectSTeamsResponse = ListAProjectSTeamsResponses[keyof ListAProjectSTeamsResponses]; + +export type DeleteATeamFromAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/teams/{team_id_or_slug}/'; +}; + +export type DeleteATeamFromAProjectErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteATeamFromAProjectResponses = { + 200: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + team?: { + id: string; + name: string; + slug: string; + }; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + }; +}; + +export type DeleteATeamFromAProjectResponse = DeleteATeamFromAProjectResponses[keyof DeleteATeamFromAProjectResponses]; + +export type AddATeamToAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the resource belongs to. + */ + project_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/teams/{team_id_or_slug}/'; +}; + +export type AddATeamToAProjectErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type AddATeamToAProjectResponses = { + 201: { + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + team?: { + id: string; + name: string; + slug: string; + }; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + }; +}; + +export type AddATeamToAProjectResponse = AddATeamToAProjectResponses[keyof AddATeamToAProjectResponses]; + +export type ListSeerAiModelsData = { + body?: never; + path?: never; + query?: never; + url: '/api/0/seer/models/'; +}; + +export type ListSeerAiModelsResponses = { + /** + * Response containing list of actively used LLM model names from Seer. + */ + 200: { + models: Array; + }; +}; + +export type ListSeerAiModelsResponse = ListSeerAiModelsResponses[keyof ListSeerAiModelsResponses]; + +export type DeleteACustomIntegrationData = { + body?: never; + path: { + /** + * The ID or slug of the custom integration. + */ + sentry_app_id_or_slug: string; + }; + query?: never; + url: '/api/0/sentry-apps/{sentry_app_id_or_slug}/'; +}; + +export type DeleteACustomIntegrationErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type DeleteACustomIntegrationResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteACustomIntegrationResponse = DeleteACustomIntegrationResponses[keyof DeleteACustomIntegrationResponses]; + +export type RetrieveACustomIntegrationByIdOrSlugData = { + body?: never; + path: { + /** + * The ID or slug of the custom integration. + */ + sentry_app_id_or_slug: string; + }; + query?: never; + url: '/api/0/sentry-apps/{sentry_app_id_or_slug}/'; +}; + +export type RetrieveACustomIntegrationByIdOrSlugResponses = { + 200: { + allowedOrigins: Array; + avatars: Array<{ + avatarType: string; + avatarUuid: string; + avatarUrl: string; + color: boolean; + photoType: string; + }>; + events: Array; + featureData: Array; + isAlertable: boolean; + metadata: string; + name: string; + schema: string; + scopes: Array; + slug: string; + status: string; + uuid: string; + verifyInstall: boolean; + author?: string | null; + overview?: string | null; + popularity?: number | null; + redirectUrl?: string | null; + webhookUrl?: string | null; + clientSecret?: string | null; + datePublished?: string; + clientId?: string; + owner?: { + id: number; + slug: string; + }; + }; +}; + +export type RetrieveACustomIntegrationByIdOrSlugResponse = RetrieveACustomIntegrationByIdOrSlugResponses[keyof RetrieveACustomIntegrationByIdOrSlugResponses]; + +export type UpdateAnExistingCustomIntegrationData = { + body: { + /** + * The name of the custom integration. + */ + name: string; + /** + * The custom integration's permission scopes for API access. + */ + scopes: Array | null; + /** + * The custom integration's author. + */ + author?: string | null; + /** + * Webhook events the custom integration is subscribed to. + */ + events?: Array | null; + /** + * The UI components schema, used to render the custom integration's configuration UI elements. See our [schema docs](https://docs.sentry.io/organization/integrations/integration-platform/ui-components/) for more information. + */ + schema?: { + [key: string]: unknown; + } | null; + /** + * The webhook destination URL. + */ + webhookUrl?: string | null; + /** + * The post-installation redirect URL. + */ + redirectUrl?: string | null; + /** + * Whether or not the integration is internal only. False means the integration is public. + */ + isInternal?: boolean; + /** + * Marks whether or not the custom integration can be used in an alert rule. + */ + isAlertable?: boolean; + /** + * The custom integration's description. + */ + overview?: string | null; + /** + * Whether or not an installation of the custom integration should be verified. + */ + verifyInstall?: boolean; + /** + * The list of allowed origins for CORS. + */ + allowedOrigins?: Array; + }; + path: { + /** + * The ID or slug of the custom integration. + */ + sentry_app_id_or_slug: string; + }; + query?: never; + url: '/api/0/sentry-apps/{sentry_app_id_or_slug}/'; +}; + +export type UpdateAnExistingCustomIntegrationErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type UpdateAnExistingCustomIntegrationResponses = { + 200: { + allowedOrigins: Array; + avatars: Array<{ + avatarType: string; + avatarUuid: string; + avatarUrl: string; + color: boolean; + photoType: string; + }>; + events: Array; + featureData: Array; + isAlertable: boolean; + metadata: string; + name: string; + schema: string; + scopes: Array; + slug: string; + status: string; + uuid: string; + verifyInstall: boolean; + author?: string | null; + overview?: string | null; + popularity?: number | null; + redirectUrl?: string | null; + webhookUrl?: string | null; + clientSecret?: string | null; + datePublished?: string; + clientId?: string; + owner?: { + id: number; + slug: string; + }; + }; +}; + +export type UpdateAnExistingCustomIntegrationResponse = UpdateAnExistingCustomIntegrationResponses[keyof UpdateAnExistingCustomIntegrationResponses]; + +export type DeleteATeamData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/'; +}; + +export type DeleteATeamErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteATeamResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteATeamResponse = DeleteATeamResponses[keyof DeleteATeamResponses]; + +export type RetrieveATeamData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: { + /** + * + * List of strings to opt in to additional data. Supports `projects`, `externalTeams`. + * + */ + expand?: string; + /** + * + * List of strings to opt out of certain pieces of data. Supports `organization`. + * + */ + collapse?: string; + }; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/'; +}; + +export type RetrieveATeamErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveATeamResponses = { + 200: { + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; + }; +}; + +export type RetrieveATeamResponse = RetrieveATeamResponses[keyof RetrieveATeamResponses]; + +export type UpdateATeamData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * Uniquely identifies a team. This is must be available. + */ + slug: string; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/'; +}; + +export type UpdateATeamErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateATeamResponses = { + 200: { + id: string; + slug: string; + name: string; + dateCreated: string | null; + isMember: boolean; + teamRole: string | null; + flags: { + [key: string]: unknown; + }; + access: Array; + hasAccess: boolean; + isPending: boolean; + memberCount: number; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + externalTeams?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + organization?: { + features?: Array; + extraOptions?: { + [key: string]: { + [key: string]: unknown; + }; + }; + access?: Array; + onboardingTasks?: Array<{ + task: string | null; + status: string; + completionSeen: string | null; + dateCompleted: string; + data: unknown; + }>; + id: string; + slug: string; + status: { + id: string; + name: string; + }; + name: string; + dateCreated: string; + isEarlyAdopter: boolean; + require2FA: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + links: { + organizationUrl: string; + regionUrl: string; + }; + hasAuthProvider: boolean; + allowMemberInvite: boolean; + allowMemberProjectCreation: boolean; + allowSuperuserAccess: boolean; + }; + projects?: Array<{ + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + isInternal: boolean; + isPublic: boolean; + avatar: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + color: string; + status: string; + }>; + }; +}; + +export type UpdateATeamResponse = UpdateATeamResponses[keyof UpdateATeamResponses]; + +export type CreateAnExternalTeamData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The associated name for the provider. + */ + external_name: string; + /** + * The provider of the external actor. + * + * * `github` + * * `github_enterprise` + * * `jira_server` + * * `slack` + * * `perforce` + * * `gitlab` + * * `msteams` + * * `custom_scm` + */ + provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm'; + /** + * The Integration ID. + */ + integration_id: number; + /** + * The associated user ID for provider. + */ + external_id?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/external-teams/'; +}; + +export type CreateAnExternalTeamErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type CreateAnExternalTeamResponses = { + 200: { + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }; + 201: { + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }; +}; + +export type CreateAnExternalTeamResponse = CreateAnExternalTeamResponses[keyof CreateAnExternalTeamResponses]; + +export type DeleteAnExternalTeamData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + /** + * The ID of the external team object. This is returned when creating an external team. + */ + external_team_id: number; + }; + query?: never; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/external-teams/{external_team_id}/'; +}; + +export type DeleteAnExternalTeamErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type DeleteAnExternalTeamResponses = { + /** + * No Content + */ + 204: void; +}; + +export type DeleteAnExternalTeamResponse = DeleteAnExternalTeamResponses[keyof DeleteAnExternalTeamResponses]; + +export type UpdateAnExternalTeamData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body: { + /** + * The associated name for the provider. + */ + external_name: string; + /** + * The provider of the external actor. + * + * * `github` + * * `github_enterprise` + * * `jira_server` + * * `slack` + * * `perforce` + * * `gitlab` + * * `msteams` + * * `custom_scm` + */ + provider: 'github' | 'github_enterprise' | 'jira_server' | 'slack' | 'perforce' | 'gitlab' | 'msteams' | 'custom_scm'; + /** + * The Integration ID. + */ + integration_id: number; + /** + * The associated user ID for provider. + */ + external_id?: string | null; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + /** + * The ID of the external team object. This is returned when creating an external team. + */ + external_team_id: number; + }; + query?: never; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/external-teams/{external_team_id}/'; +}; + +export type UpdateAnExternalTeamErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type UpdateAnExternalTeamResponses = { + 200: { + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }; +}; + +export type UpdateAnExternalTeamResponse = UpdateAnExternalTeamResponses[keyof UpdateAnExternalTeamResponses]; + +export type ListATeamSMembersData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: { + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/members/'; +}; + +export type ListATeamSMembersErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListATeamSMembersResponses = { + 200: Array<{ + externalUsers?: Array<{ + externalId?: string; + userId?: string; + teamId?: string; + id: string; + provider: string; + externalName: string; + integrationId: string; + }>; + role?: string; + roleName?: string; + id: string; + email: string; + name: string; + user: { + identities?: Array<{ + id: string; + name: string; + organization: { + slug: string; + name: string; + }; + provider: { + id: string; + name: string; + }; + dateVerified: string; + dateSynced: string; + }>; + avatar?: { + avatarType?: string; + avatarUuid?: string | null; + avatarUrl?: string | null; + }; + authenticators?: Array; + canReset2fa?: boolean; + id: string; + name: string; + username: string; + email: string; + avatarUrl: string; + isActive: boolean; + hasPasswordAuth: boolean; + isManaged: boolean; + dateJoined: string; + lastLogin: string | null; + has2fa: boolean; + lastActive: string | null; + isSuperuser: boolean; + isStaff: boolean; + experiments: { + [key: string]: unknown; + }; + emails: Array<{ + id: string; + email: string; + is_verified: boolean; + }>; + }; + orgRole: string; + pending: boolean; + expired: boolean; + flags: { + 'idp:provisioned': boolean; + 'idp:role-restricted': boolean; + 'sso:linked': boolean; + 'sso:invalid': boolean; + 'member-limit:restricted': boolean; + 'partnership:restricted': boolean; + }; + dateCreated: string; + inviteStatus: string; + inviterName: string | null; + teamRole: string | null; + teamSlug: string; + }>; +}; + +export type ListATeamSMembersResponse = ListATeamSMembersResponses[keyof ListATeamSMembersResponses]; + +export type ListATeamSProjectsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: { + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/projects/'; +}; + +export type ListATeamSProjectsErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Team not found. + */ + 404: unknown; +}; + +export type ListATeamSProjectsResponses = { + 200: Array<{ + latestDeploys?: { + [key: string]: { + [key: string]: string; + }; + } | null; + options?: { + [key: string]: unknown; + }; + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + team: { + id: string; + name: string; + slug: string; + } | null; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + platforms: Array; + hasUserReports: boolean; + environments: Array; + latestRelease: { + version: string; + } | null; + }>; +}; + +export type ListATeamSProjectsResponse = ListATeamSProjectsResponses[keyof ListATeamSProjectsResponses]; + +export type CreateANewProjectData = { + body: { + /** + * The name for the project. + */ + name: string; + /** + * Uniquely identifies a project and is used for the interface. + * If not provided, it is automatically generated from the name. + */ + slug?: string | null; + /** + * The platform for the project. + */ + platform?: string | null; + /** + * + * Defaults to true where the behavior is to alert the user on every new + * issue. Setting this to false will turn this off and the user must create + * their own alerts to be notified of new issues. + * + */ + default_rules?: boolean; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the team the resource belongs to. + */ + team_id_or_slug: string; + }; + query?: never; + url: '/api/0/teams/{organization_id_or_slug}/{team_id_or_slug}/projects/'; +}; + +export type CreateANewProjectErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Team not found. + */ + 404: unknown; + /** + * A project with this slug already exists. + */ + 409: unknown; +}; + +export type CreateANewProjectResponses = { + 201: { + latestDeploys?: { + [key: string]: { + [key: string]: string; + }; + } | null; + options?: { + [key: string]: unknown; + }; + stats?: unknown; + transactionStats?: unknown; + sessionStats?: unknown; + id: string; + slug: string; + name: string; + platform: string | null; + dateCreated: string; + isBookmarked: boolean; + isMember: boolean; + features: Array; + firstEvent: string | null; + firstTransactionEvent: boolean; + access: Array; + hasAccess: boolean; + hasFeedbacks: boolean; + hasFlags: boolean; + hasMinifiedStackTrace: boolean; + hasMonitors: boolean; + hasNewFeedbacks: boolean; + hasProfiles: boolean; + hasReplays: boolean; + hasSessions: boolean; + hasInsightsHttp: boolean; + hasInsightsDb: boolean; + hasInsightsAssets: boolean; + hasInsightsAppStart: boolean; + hasInsightsScreenLoad: boolean; + hasInsightsVitals: boolean; + hasInsightsCaches: boolean; + hasInsightsQueues: boolean; + hasInsightsAgentMonitoring: boolean; + hasInsightsMCP: boolean; + hasLogs: boolean; + hasTraceMetrics: boolean; + team: { + id: string; + name: string; + slug: string; + } | null; + teams: Array<{ + id: string; + name: string; + slug: string; + }>; + platforms: Array; + hasUserReports: boolean; + environments: Array; + latestRelease: { + version: string; + } | null; + }; +}; + +export type CreateANewProjectResponse = CreateANewProjectResponses[keyof CreateANewProjectResponses]; + +export type ListAnOrganizationSRepositoriesData = { + body?: never; + path: { + /** + * The organization short name. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/repos/'; +}; + +export type ListAnOrganizationSRepositoriesErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSRepositoriesResponses = { + /** + * Success + */ + 200: Array<{ + dateCreated: string; + id: string; + name: string; + }>; +}; + +export type ListAnOrganizationSRepositoriesResponse = ListAnOrganizationSRepositoriesResponses[keyof ListAnOrganizationSRepositoriesResponses]; + +export type DeleteASpecificProjectSDebugInformationFileData = { + body?: never; + path: { + /** + * The ID or slug of the organization the file belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project to delete the DIF. + */ + project_id_or_slug: string; + }; + query: { + /** + * The ID of the DIF to delete. + */ + id: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/dsyms/'; +}; + +export type DeleteASpecificProjectSDebugInformationFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type DeleteASpecificProjectSDebugInformationFileResponses = { + /** + * Success + */ + 204: void; +}; + +export type DeleteASpecificProjectSDebugInformationFileResponse = DeleteASpecificProjectSDebugInformationFileResponses[keyof DeleteASpecificProjectSDebugInformationFileResponses]; + +export type ListAProjectSDebugInformationFilesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the file belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project to list the DIFs of. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/dsyms/'; +}; + +export type ListAProjectSDebugInformationFilesErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type ListAProjectSDebugInformationFilesResponses = { + /** + * Success + */ + 200: unknown; +}; + +export type UploadANewFileData = { + body: { + /** + * The multipart encoded file. + */ + file: Blob | File; + }; + path: { + /** + * The ID or slug of the organization the project belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project to upload a file to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/files/dsyms/'; +}; + +export type UploadANewFileErrors = { + /** + * Bad Input + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type UploadANewFileResponses = { + /** + * Success + */ + 201: unknown; +}; + +export type ListAProjectSusersData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + }; + query?: { + /** + * Limit results to users matching the given query. Prefixes should be used to suggest the field to match on: `id`, `email`, `username`, `ip`. For example, `query=email:foo@example.com` + */ + query?: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/users/'; +}; + +export type ListAProjectSusersErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAProjectSusersResponses = { + /** + * Success + */ + 200: Array<{ + username: string | null; + email: string | null; + }>; +}; + +export type ListAProjectSusersResponse = ListAProjectSusersResponses[keyof ListAProjectSusersResponses]; + +export type ListATagSValuesData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + /** + * The tag key to look up. + */ + key: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/tags/{key}/values/'; +}; + +export type ListATagSValuesErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListATagSValuesResponses = { + /** + * Success + */ + 200: Array<{ + name: string; + }>; +}; + +export type ListATagSValuesResponse = ListATagSValuesResponses[keyof ListATagSValuesResponses]; + +export type RetrieveEventCountsForAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + }; + query?: { + /** + * The name of the stat to query `("received", "rejected", "blacklisted", "generated")`. + */ + stat?: 'received' | 'rejected' | 'blacklisted' | 'generated'; + /** + * A timestamp to set the start of the query in seconds since UNIX epoch. + */ + since?: string; + /** + * A timestamp to set the end of the query in seconds since UNIX epoch. + */ + until?: string; + /** + * An explicit resolution to search for (one of `10s`, `1h`, and `1d`). + */ + resolution?: '10s' | '1h' | '1d'; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/stats/'; +}; + +export type RetrieveEventCountsForAProjectErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type RetrieveEventCountsForAProjectResponses = { + /** + * Success + */ + 200: Array>; +}; + +export type RetrieveEventCountsForAProjectResponse = RetrieveEventCountsForAProjectResponses[keyof RetrieveEventCountsForAProjectResponses]; + +export type ListAProjectSuserFeedbackData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/'; +}; + +export type ListAProjectSuserFeedbackErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAProjectSuserFeedbackResponses = { + /** + * Success + */ + 200: Array<{ + comments: string; + dateCreated: string; + email: string; + event: { + eventID?: string; + id?: string | null; + }; + eventID: string; + id: string; + issue: { + [key: string]: unknown; + } | null; + name: string; + user: { + [key: string]: unknown; + } | null; + }>; +}; + +export type ListAProjectSuserFeedbackResponse = ListAProjectSuserFeedbackResponses[keyof ListAProjectSuserFeedbackResponses]; + +export type SubmitUserFeedbackData = { + body?: { + /** + * The event ID. This can be retrieved from the [beforeSend callback](https://docs.sentry.io/platforms/javascript/configuration/filtering/#using-beforesend). + */ + event_id: string; + /** + * User's name. + */ + name: string; + /** + * User's email address. + */ + email: string; + /** + * Comments supplied by user. + */ + comments: string; + }; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/'; +}; + +export type SubmitUserFeedbackErrors = { + /** + * Bad Input + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; + /** + * Conflict + */ + 409: unknown; +}; + +export type SubmitUserFeedbackResponses = { + /** + * Success + */ + 200: { + comments: string; + dateCreated: string; + email: string; + event: { + eventID?: string; + id?: string | null; + }; + eventID: string; + id: string; + issue: { + [key: string]: unknown; + } | null; + name: string; + user: { + [key: string]: unknown; + } | null; + }; +}; + +export type SubmitUserFeedbackResponse = SubmitUserFeedbackResponses[keyof SubmitUserFeedbackResponses]; + +export type ListAProjectSServiceHooksData = { + body?: never; + path: { + /** + * The ID or slug of the organization the client keys belong to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the client keys belong to. + */ + project_id_or_slug: string; + }; + query?: { + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/'; +}; + +export type ListAProjectSServiceHooksErrors = { + /** + * You do not have that feature enabled + */ + 403: unknown; +}; + +export type ListAProjectSServiceHooksResponses = { + /** + * Success + */ + 200: Array<{ + dateCreated: string; + events: Array; + id: string; + secret: string; + status: string; + url: string; + }>; +}; + +export type ListAProjectSServiceHooksResponse = ListAProjectSServiceHooksResponses[keyof ListAProjectSServiceHooksResponses]; + +export type RegisterANewServiceHookData = { + body: { + /** + * The URL for the webhook. + */ + url: string; + /** + * The events to subscribe to. + */ + events: Array; + }; + path: { + /** + * The ID or slug of the organization the client keys belong to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the client keys belong to. + */ + project_id_or_slug: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/'; +}; + +export type RegisterANewServiceHookErrors = { + /** + * You do not have that feature enabled + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type RegisterANewServiceHookResponses = { + /** + * Success + */ + 201: { + dateCreated: string; + events: Array; + id: string; + secret: string; + status: string; + url: string; + }; +}; + +export type RegisterANewServiceHookResponse = RegisterANewServiceHookResponses[keyof RegisterANewServiceHookResponses]; + +export type RemoveAServiceHookData = { + body?: never; + path: { + /** + * The ID or slug of the organization the client keys belong to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the client keys belong to. + */ + project_id_or_slug: string; + /** + * The GUID of the service hook. + */ + hook_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/{hook_id}/'; +}; + +export type RemoveAServiceHookErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type RemoveAServiceHookResponses = { + /** + * Success + */ + 204: void; +}; + +export type RemoveAServiceHookResponse = RemoveAServiceHookResponses[keyof RemoveAServiceHookResponses]; + +export type RetrieveAServiceHookData = { + body?: never; + path: { + /** + * The ID or slug of the organization the client keys belong to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the client keys belong to. + */ + project_id_or_slug: string; + /** + * The GUID of the service hook. + */ + hook_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/{hook_id}/'; +}; + +export type RetrieveAServiceHookErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type RetrieveAServiceHookResponses = { + /** + * Success + */ + 200: { + dateCreated: string; + events: Array; + id: string; + secret: string; + status: string; + url: string; + }; +}; + +export type RetrieveAServiceHookResponse = RetrieveAServiceHookResponses[keyof RetrieveAServiceHookResponses]; + +export type UpdateAServiceHookData = { + body?: { + /** + * The URL for the webhook. + */ + url: string; + /** + * The events to subscribe to. + */ + events: Array; + }; + path: { + /** + * The ID or slug of the organization the client keys belong to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the client keys belong to. + */ + project_id_or_slug: string; + /** + * The GUID of the service hook. + */ + hook_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/hooks/{hook_id}/'; +}; + +export type UpdateAServiceHookErrors = { + /** + * Bad Input + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type UpdateAServiceHookResponses = { + /** + * Success + */ + 200: { + dateCreated: string; + events: Array; + id: string; + secret: string; + status: string; + url: string; + }; +}; + +export type UpdateAServiceHookResponse = UpdateAServiceHookResponses[keyof UpdateAServiceHookResponses]; + +export type RetrieveAnEventForAProjectData = { + body?: never; + path: { + /** + * The ID or slug of the organization the event belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the event belongs to. + */ + project_id_or_slug: string; + /** + * The ID of the event to retrieve. It is the hexadecimal ID as reported by the client. + */ + event_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/events/{event_id}/'; +}; + +export type RetrieveAnEventForAProjectErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type RetrieveAnEventForAProjectResponses = { + /** + * Success + */ + 200: { + eventID: string; + dist: string | null; + userReport: { + [key: string]: unknown; + } | null; + previousEventID: string | null; + message: string; + id: string; + size: number; + errors: Array<{ + message?: string; + type?: string; + data?: { + column?: number; + source?: string; + row?: number; + }; + }>; + platform: string; + nextEventID: string | null; + type: string; + metadata: { + type: string; + value: string; + } | { + title: string; + }; + tags: Array<{ + value?: string; + key?: string; + _meta?: string | null; + }>; + dateCreated: string; + dateReceived: string; + user: { + username: string | null; + name: string | null; + ip_address: string | null; + email: string | null; + data: { + isStaff?: boolean; + } | null; + id: string; + } | null; + entries: Array<{ + type: string; + data: { + values: Array<{ + category: string; + level: string; + event_id: string | null; + timestamp: string; + data: { + [key: string]: unknown; + } | null; + message: string | null; + type: string; + }>; + }; + } | { + type: string; + data: { + fragment: string | null; + cookies: Array> | null; + inferredContentType: string | null; + env: { + ENV?: string; + } | null; + headers: Array>; + url: string; + query: Array>; + data: { + [key: string]: unknown; + } | null; + method: string | null; + }; + } | { + type: string; + data: { + formatted: string; + }; + } | { + type: string; + data: { + excOmitted: Array | null; + hasSystemFrames: boolean; + values: Array<{ + stacktrace: { + frames: Array<{ + function: string; + errors: string | null; + colNo: number | null; + vars: { + [key: string]: unknown; + } | null; + package: string | null; + absPath: string | null; + inApp: boolean; + lineNo: number; + module: string; + filename: string; + platform: string | null; + instructionAddr: string | null; + context: Array>; + symbolAddr: string | null; + trust: string | null; + symbol: string | null; + }>; + framesOmitted: string | null; + registers: string | null; + hasSystemFrames: boolean; + } | null; + module: string | null; + rawStacktrace: { + [key: string]: unknown; + } | null; + mechanism: { + type?: string; + handled?: boolean; + } | null; + threadId: string | null; + value: string; + type: string; + }>; + }; + }>; + packages: { + [key: string]: unknown; + }; + sdk: { + version?: string; + name?: string; + }; + _meta: { + user?: string | null; + context?: string | null; + entries?: { + [key: string]: unknown; + }; + contexts?: string | null; + message?: string | null; + packages?: string | null; + tags?: { + [key: string]: unknown; + }; + sdk?: string | null; + }; + contexts: { + ForbiddenError?: { + status?: number; + statusText?: string; + responseJSON?: { + detail?: string; + }; + type?: string; + }; + browser?: { + version?: string; + type?: string; + name?: string; + }; + os?: { + version?: string; + type?: string; + name?: string; + }; + trace?: { + span_id?: string; + type?: string; + trace_id?: string; + op?: string; + }; + organization?: { + type?: string; + id?: string; + slug?: string; + }; + }; + fingerprints: Array; + context: { + resp?: { + status?: number; + responseJSON?: { + detail?: string; + }; + name?: string; + statusText?: string; + message?: string; + stack?: string; + }; + session?: { + foo?: string; + }; + unauthorized?: boolean; + url?: string; + }; + release: { + id?: number; + authors: Array<{ + [key: string]: unknown; + }>; + commitCount: number; + data: { + [key: string]: unknown; + }; + dateCreated: string; + dateReleased: string | null; + deployCount: number; + firstEvent: string | null; + lastCommit: { + [key: string]: unknown; + } | null; + lastDeploy: { + environment: string; + name: string | null; + dateStarted: string | null; + dateFinished: string; + url: string | null; + id: string; + } | string | null; + lastEvent: string | null; + newGroups: number; + owner: { + [key: string]: unknown; + } | null; + projects: Array<{ + name?: string; + slug?: string; + }>; + ref: string | null; + shortVersion: string; + version: string; + url: string | null; + } | null; + groupID: string; + title: string; + }; +}; + +export type RetrieveAnEventForAProjectResponse = RetrieveAnEventForAProjectResponses[keyof RetrieveAnEventForAProjectResponses]; + +export type BulkRemoveAListOfIssuesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the issues belong to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the issues belong to. + */ + project_id_or_slug: string; + }; + query?: { + /** + * A list of IDs of the issues to be removed. This parameter shall be repeated for each issue, e.g. `?id=1&id=2&id=3`. If this parameter is not provided, it will attempt to remove the first 1000 issues. + */ + id?: number; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/'; +}; + +export type BulkRemoveAListOfIssuesErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Project not found + */ + 404: unknown; +}; + +export type BulkRemoveAListOfIssuesResponses = { + /** + * Success + */ + 204: void; +}; + +export type BulkRemoveAListOfIssuesResponse = BulkRemoveAListOfIssuesResponses[keyof BulkRemoveAListOfIssuesResponses]; + +export type ListAProjectSissuesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the issues belong to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the issues belong to. + */ + project_id_or_slug: string; + }; + query?: { + /** + * An optional stat period (can be one of `"24h"`, `"14d"`, and `""`), defaults to "24h" if not provided. + */ + statsPeriod?: string; + /** + * If this is set to true then short IDs are looked up by this function as well. This can cause the return value of the function to return an event issue of a different project which is why this is an opt-in. Set to 1 to enable. + */ + shortIdLookup?: boolean; + /** + * An optional Sentry structured search query. If not provided an implied `"is:unresolved"` is assumed. + */ + query?: string; + /** + * A list of hashes of groups to return. Is not compatible with 'query' parameter. The maximum number of hashes that can be sent is 100. If more are sent, only the first 100 will be used. + */ + hashes?: string; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/'; +}; + +export type ListAProjectSissuesErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAProjectSissuesResponses = { + /** + * Success + */ + 200: Array<{ + annotations: Array; + assignedTo: { + [key: string]: unknown; + } | null; + count: string; + culprit: string; + firstSeen: string; + hasSeen: boolean; + id: string; + isBookmarked: boolean; + isPublic: boolean; + isSubscribed: boolean; + lastSeen: string; + level: string; + logger: string | null; + metadata: { + filename: string; + type: string; + value: string; + } | { + title: string; + }; + numComments: number; + permalink: string; + project: { + id?: string; + name?: string; + slug?: string; + }; + shareId: string | null; + shortId: string; + stats: { + '24h'?: Array>; + }; + status: 'resolved' | 'unresolved' | 'ignored'; + statusDetails: { + [key: string]: unknown; + }; + subscriptionDetails: { + [key: string]: unknown; + } | null; + title: string; + type: string; + userCount: number; + }>; +}; + +export type ListAProjectSissuesResponse = ListAProjectSissuesResponses[keyof ListAProjectSissuesResponses]; + +export type BulkMutateAListOfIssuesData = { + body: { + /** + * The new status for the issues. Valid values are `"resolved"`, `"resolvedInNextRelease"`, `"unresolved"`, and `"ignored"`. + */ + status?: string; + /** + * Additional details about the resolution. Valid values are `"inRelease"`, `"inNextRelease"`, `"inCommit"`, `"ignoreDuration"`, `"ignoreCount"`, `"ignoreWindow"`, `"ignoreUserCount"`, and `"ignoreUserWindow"`. + */ + statusDetails?: { + inRelease?: string; + inNextRelease?: boolean; + inCommit?: string; + ignoreDuration?: number; + ignoreCount?: number; + ignoreWindow?: number; + ignoreUserCount?: number; + ignoreUserWindow?: number; + }; + /** + * The number of minutes to ignore this issue. + */ + ignoreDuration?: number; + /** + * Sets the issue to public or private. + */ + isPublic?: boolean; + /** + * Allows to merge or unmerge different issues. + */ + merge?: boolean; + /** + * The actor ID (or username) of the user or team that should be assigned to this issue. + */ + assignedTo?: string; + /** + * In case this API call is invoked with a user context this allows changing of the flag that indicates if the user has seen the event. + */ + hasSeen?: boolean; + /** + * In case this API call is invoked with a user context this allows changing of the bookmark flag. + */ + isBookmarked?: boolean; + }; + path: { + /** + * The ID or slug of the organization the issues belong to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the issues belong to. + */ + project_id_or_slug: string; + }; + query?: { + /** + * A list of IDs of the issues to be mutated. This parameter shall be repeated for each issue. It is optional only if a status is mutated in which case an implicit update all is assumed. + */ + id?: number; + /** + * Optionally limits the query to issues of the specified status. Valid values are `"resolved"`, `"reprocessing"`, `"unresolved"`, and `"ignored"`. + */ + status?: string; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/issues/'; +}; + +export type BulkMutateAListOfIssuesErrors = { + /** + * Bad Input + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type BulkMutateAListOfIssuesResponses = { + /** + * Success + */ + 200: { + isPublic: boolean; + status: 'resolved' | 'unresolved' | 'ignored'; + statusDetails: { + [key: string]: unknown; + }; + }; +}; + +export type BulkMutateAListOfIssuesResponse = BulkMutateAListOfIssuesResponses[keyof BulkMutateAListOfIssuesResponses]; + +export type ListATagSValuesForAnIssueData = { + body?: never; + path: { + /** + * The ID of the issue you'd like to query. + */ + issue_id: number; + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The tag key to look the values up for. + */ + key: string; + }; + query?: { + /** + * Sort order of the resulting tag values. Prefix with '-' for descending order. Default is '-id'. + */ + sort?: 'age' | 'count' | 'date' | 'id'; + /** + * The name of environments to filter by. + */ + environment?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/values/'; +}; + +export type ListATagSValuesForAnIssueErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListATagSValuesForAnIssueResponses = { + 200: Array<{ + query?: string | null; + key: string; + name: string; + value: string; + count: number; + lastSeen: string | null; + firstSeen: string | null; + }>; +}; + +export type ListATagSValuesForAnIssueResponse = ListATagSValuesForAnIssueResponses[keyof ListATagSValuesForAnIssueResponses]; + +export type ListAnIssueSHashesData = { + body?: never; + path: { + /** + * The ID or slug of the organization the event belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the issue to retrieve. + */ + issue_id: string; + }; + query?: { + /** + * If this is set to true, the event payload will include the full event body, including the stacktrace. Set to 1 to enable. + */ + full?: boolean; + /** + * A pointer to the last object fetched and its sort order; used to retrieve the next or previous results. + */ + cursor?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/hashes/'; +}; + +export type ListAnIssueSHashesErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type ListAnIssueSHashesResponses = { + /** + * Success + */ + 200: Array<{ + latestEvent?: { + eventID: string; + dist: string | null; + message: string; + id: string; + size: number; + errors: Array<{ + message?: string; + type?: string; + data?: { + column?: number; + source?: string; + row?: number; + }; + }>; + platform: string; + type: string; + metadata: { + type: string; + value: string; + } | { + title: string; + }; + tags: Array<{ + value?: string; + key?: string; + _meta?: string | null; + }>; + dateCreated: string; + dateReceived: string; + user: { + username: string | null; + name: string | null; + ip_address: string | null; + email: string | null; + data: { + isStaff?: boolean; + } | null; + id: string; + } | null; + entries: Array<{ + type: string; + data: { + values: Array<{ + category: string; + level: string; + event_id: string | null; + timestamp: string; + data: { + [key: string]: unknown; + } | null; + message: string | null; + type: string; + }>; + }; + } | { + type: string; + data: { + fragment: string | null; + cookies: Array> | null; + inferredContentType: string | null; + env: { + ENV?: string; + } | null; + headers: Array>; + url: string; + query: Array>; + data: { + [key: string]: unknown; + } | null; + method: string | null; + }; + } | { + type: string; + data: { + formatted: string; + }; + } | { + type: string; + data: { + excOmitted: Array | null; + hasSystemFrames: boolean; + values: Array<{ + stacktrace: { + frames: Array<{ + function: string; + errors: string | null; + colNo: number | null; + vars: { + [key: string]: unknown; + } | null; + package: string | null; + absPath: string | null; + inApp: boolean; + lineNo: number; + module: string; + filename: string; + platform: string | null; + instructionAddr: string | null; + context: Array>; + symbolAddr: string | null; + trust: string | null; + symbol: string | null; + }>; + framesOmitted: string | null; + registers: string | null; + hasSystemFrames: boolean; + } | null; + module: string | null; + rawStacktrace: { + [key: string]: unknown; + } | null; + mechanism: { + type?: string; + handled?: boolean; + } | null; + threadId: string | null; + value: string; + type: string; + }>; + }; + }>; + packages: { + [key: string]: unknown; + }; + sdk: { + version?: string; + name?: string; + }; + _meta: { + user?: string | null; + context?: string | null; + entries?: { + [key: string]: unknown; + }; + contexts?: string | null; + message?: string | null; + packages?: string | null; + tags?: { + [key: string]: unknown; + }; + sdk?: string | null; + }; + contexts: { + ForbiddenError?: { + status?: number; + statusText?: string; + responseJSON?: { + detail?: string; + }; + type?: string; + }; + browser?: { + version?: string; + type?: string; + name?: string; + }; + os?: { + version?: string; + type?: string; + name?: string; + }; + trace?: { + span_id?: string; + type?: string; + trace_id?: string; + op?: string; + }; + organization?: { + type?: string; + id?: string; + slug?: string; + }; + }; + fingerprints: Array; + context: { + resp?: { + status?: number; + responseJSON?: { + detail?: string; + }; + name?: string; + statusText?: string; + message?: string; + stack?: string; + }; + session?: { + foo?: string; + }; + unauthorized?: boolean; + url?: string; + }; + groupID: string; + title: string; + }; + id?: string; + }>; +}; + +export type ListAnIssueSHashesResponse = ListAnIssueSHashesResponses[keyof ListAnIssueSHashesResponses]; + +export type RemoveAnIssueData = { + body?: never; + path: { + /** + * The ID or slug of the organization the issue belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the issue to delete. + */ + issue_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/'; +}; + +export type RemoveAnIssueErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type RemoveAnIssueResponses = { + /** + * Success + */ + 202: unknown; +}; + +export type RetrieveAnIssueData = { + body?: never; + path: { + /** + * The ID or slug of the organization the issue belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the issue to retrieve. + */ + issue_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/'; +}; + +export type RetrieveAnIssueErrors = { + /** + * Forbidden + */ + 403: unknown; +}; + +export type RetrieveAnIssueResponses = { + /** + * Success + */ + 200: { + activity: Array<{ + data?: { + [key: string]: unknown; + }; + dateCreated?: string; + id?: string; + type?: string; + user?: { + [key: string]: unknown; + } | null; + }>; + annotations: Array<{ + displayName?: string; + url?: string; + }>; + assignedTo: { + [key: string]: unknown; + } | null; + count: string; + culprit: string; + firstRelease: { + authors?: Array; + commitCount?: number; + data?: { + [key: string]: unknown; + } | null; + dateCreated?: string; + dateReleased?: string | null; + deployCount?: number; + firstEvent?: string; + lastCommit?: string | null; + lastDeploy?: string | null; + lastEvent?: string; + newGroups?: number; + owner?: string | null; + projects?: Array<{ + name?: string; + slug?: string; + }>; + ref?: string | null; + shortVersion?: string; + url?: string | null; + version?: string; + } | null; + firstSeen: string; + hasSeen: boolean; + id: string; + isBookmarked: boolean; + isPublic: boolean; + isSubscribed: boolean; + lastRelease: { + [key: string]: unknown; + } | null; + lastSeen: string; + level: string; + logger: string | null; + metadata: { + filename: string; + type: string; + value: string; + } | { + title: string; + }; + numComments: number; + participants: Array<{ + [key: string]: unknown; + }>; + permalink: string; + pluginActions: Array>; + pluginContexts: Array; + pluginIssues: Array<{ + [key: string]: unknown; + }>; + project: { + id?: string; + name?: string; + slug?: string; + }; + seenBy: Array<{ + [key: string]: unknown; + }>; + shareId: string | null; + shortId: string; + stats: { + '24h'?: Array>; + '30d'?: Array>; + }; + status: 'resolved' | 'unresolved' | 'ignored'; + statusDetails: { + [key: string]: unknown; + }; + subscriptionDetails: { + [key: string]: unknown; + } | null; + tags: Array<{ + [key: string]: unknown; + }>; + title: string; + type: string; + userCount: number; + userReportCount: number; + }; +}; + +export type RetrieveAnIssueResponse = RetrieveAnIssueResponses[keyof RetrieveAnIssueResponses]; + +export type UpdateAnIssueData = { + body: { + /** + * The new status for the issues. Valid values are `"resolved"`, `"resolvedInNextRelease"`, `"unresolved"`, and `"ignored"`. + */ + status?: string; + /** + * Additional details about the resolution. Supported values are `"inRelease"`, `"inNextRelease"`, `"inCommit"`, `"ignoreDuration"`, `"ignoreCount"`, `"ignoreWindow"`, `"ignoreUserCount"`, and `"ignoreUserWindow"`. + */ + statusDetails?: { + /** + * Indicates if the issue is resolved in the next release based on the last seen release of that issue. + */ + inNextRelease?: boolean; + /** + * The version of the release in which the issue is resolved. + */ + inRelease?: string; + /** + * The commit hash in which the issue is resolved. + */ + inCommit?: string; + }; + /** + * The actor id (or username) of the user or team that should be assigned to this issue. + */ + assignedTo?: string; + /** + * In case this API call is invoked with a user context this allows changing of the flag that indicates if the user has seen the event. + */ + hasSeen?: boolean; + /** + * In case this API call is invoked with a user context this allows changing of the bookmark flag. + */ + isBookmarked?: boolean; + /** + * In case this API call is invoked with a user context this allows the user to subscribe to workflow notications for this issue. + */ + isSubscribed?: boolean; + /** + * Sets the issue to public or private. + */ + isPublic?: boolean; + }; + path: { + /** + * The ID or slug of the organization the issue belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the group to retrieve. + */ + issue_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/'; +}; + +export type UpdateAnIssueErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * The requested resource does not exist + */ + 404: unknown; +}; + +export type UpdateAnIssueResponses = { + /** + * Success + */ + 200: { + annotations: Array; + assignedTo: { + [key: string]: unknown; + } | null; + count: string; + culprit: string; + firstSeen: string; + hasSeen: boolean; + id: string; + isBookmarked: boolean; + isPublic: boolean; + isSubscribed: boolean; + lastSeen: string; + level: string; + logger: string | null; + metadata: { + filename: string; + type: string; + value: string; + } | { + title: string; + }; + numComments: number; + permalink: string; + project: { + id?: string; + name?: string; + slug?: string; + }; + shareId: string | null; + shortId: string; + status: 'resolved' | 'unresolved' | 'ignored'; + statusDetails: { + [key: string]: unknown; + }; + subscriptionDetails: { + [key: string]: unknown; + } | null; + title: string; + type: string; + userCount: number; + }; +}; + +export type UpdateAnIssueResponse = UpdateAnIssueResponses[keyof UpdateAnIssueResponses]; + +export type ListAnOrganizationSReleasesData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + }; + query?: { + /** + * This parameter can be used to create a "starts with" filter for the version. + */ + query?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/releases/'; +}; + +export type ListAnOrganizationSReleasesErrors = { + /** + * Permission Denied + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSReleasesResponses = { + /** + * Success + */ + 200: Array<{ + id?: number; + authors: Array<{ + [key: string]: unknown; + }>; + commitCount: number; + data: { + [key: string]: unknown; + }; + dateCreated: string; + dateReleased: string | null; + deployCount: number; + firstEvent: string | null; + lastCommit: { + [key: string]: unknown; + } | null; + lastDeploy: { + environment: string; + name: string | null; + dateStarted: string | null; + dateFinished: string; + url: string | null; + id: string; + } | string | null; + lastEvent: string | null; + newGroups: number; + owner: { + [key: string]: unknown; + } | null; + projects: Array<{ + name?: string; + slug?: string; + }>; + ref: string | null; + shortVersion: string; + version: string; + url: string | null; + }>; +}; + +export type ListAnOrganizationSReleasesResponse = ListAnOrganizationSReleasesResponses[keyof ListAnOrganizationSReleasesResponses]; + +export type CreateANewReleaseForAnOrganizationData = { + body?: { + /** + * A version identifier for this release. Can be a version number, a commit hash, etc. + */ + version: string; + /** + * A list of project slugs that are involved in this release. + */ + projects: Array; + /** + * An optional commit reference. This is useful if a tagged version has been provided. + */ + ref?: string; + /** + * A URL that points to the release. This can be the path to an online interface to the source code for instance + */ + url?: string; + /** + * An optional date that indicates when the release went live. If not provided the current time is assumed. + */ + dateReleased?: string; + /** + * An optional list of commit data to be associated with the release. Commits must include parameters `id` (the SHA of the commit), and can optionally include `repository`, `message`, `patch_set`, `author_name`, `author_email`, and `timestamp`. + */ + commits?: Array<{ + /** + * A list of the files that have been changed in the commit. Specifying the patch_set is necessary to power suspect commits and suggested assignees. + */ + patch_set?: Array<{ + /** + * The path to the file. Both forward and backward slashes are supported. + */ + path: string; + /** + * The type of change that happened in the commit. + */ + type: 'A' | 'M' | 'D'; + }>; + /** + * The full name of the repository the commit belongs to. If this field is not given Sentry will generate a name in the form: u'organization-' (i.e. if the organization id is 123, then the generated repository name will be u'organization-123). + */ + repository?: string; + /** + * The name of the commit author. + */ + author_name?: string; + /** + * The email of the commit author. The commit author's email is required to enable the suggested assignee feature. + */ + author_email?: string; + /** + * The commit timestamp is used to sort the commits given. If a timestamp is not included, the commits will remain sorted in the order given. + */ + timestamp?: string; + /** + * The commit message. + */ + message?: string; + /** + * The commit ID (the commit SHA). + */ + id?: string; + }>; + /** + * An optional way to indicate the start and end commits for each repository included in a release. Head commits must include parameters `repository` and `commit` (the HEAD sha). They can optionally include `previousCommit` (the sha of the HEAD of the previous release), which should be specified if this is the first time you've sent commit data. `commit` may contain a range in the form of `previousCommit..commit`. + */ + refs?: Array<{ + /** + * The full name of the repository the commit belongs to. + */ + repository?: string; + /** + * The current release's commit. + */ + commit?: string; + /** + * The previous release's commit. + */ + previousCommit?: string; + }>; + }; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/'; +}; + +export type CreateANewReleaseForAnOrganizationErrors = { + /** + * Bad Input + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type CreateANewReleaseForAnOrganizationResponses = { + /** + * Success + */ + 201: { + id?: number; + authors: Array<{ + [key: string]: unknown; + }>; + commitCount: number; + data: { + [key: string]: unknown; + }; + dateCreated: string; + dateReleased: string | null; + deployCount: number; + firstEvent: string | null; + lastCommit: { + [key: string]: unknown; + } | null; + lastDeploy: { + environment: string; + name: string | null; + dateStarted: string | null; + dateFinished: string; + url: string | null; + id: string; + } | string | null; + lastEvent: string | null; + newGroups: number; + owner: { + [key: string]: unknown; + } | null; + projects: Array<{ + name?: string; + slug?: string; + }>; + ref: string | null; + shortVersion: string; + version: string; + url: string | null; + }; +}; + +export type CreateANewReleaseForAnOrganizationResponse = CreateANewReleaseForAnOrganizationResponses[keyof CreateANewReleaseForAnOrganizationResponses]; + +export type ListAnOrganizationSReleaseFilesData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/'; +}; + +export type ListAnOrganizationSReleaseFilesErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSReleaseFilesResponses = { + /** + * Success + */ + 200: Array<{ + sha1: string; + dist: string | null; + name: string; + dateCreated: string; + headers: { + 'Content-Type'?: string; + }; + id: string; + size: number; + }>; +}; + +export type ListAnOrganizationSReleaseFilesResponse = ListAnOrganizationSReleaseFilesResponses[keyof ListAnOrganizationSReleaseFilesResponses]; + +export type UploadANewOrganizationReleaseFileData = { + body?: { + /** + * The multipart encoded file. + */ + file: Blob | File; + /** + * The name (full path) of the file. + */ + name?: string; + /** + * The name of the dist. + */ + dist?: string; + /** + * This parameter can be supplied multiple times to attach headers to the file. Each header is a string in the format `key:value`. For instance it can be used to define a content type. + */ + header?: string; + }; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/'; +}; + +export type UploadANewOrganizationReleaseFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UploadANewOrganizationReleaseFileResponses = { + /** + * Success + */ + 201: unknown; +}; + +export type ListAProjectSReleaseFilesData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/'; +}; + +export type ListAProjectSReleaseFilesErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAProjectSReleaseFilesResponses = { + /** + * Success + */ + 200: Array<{ + sha1: string; + dist: string | null; + name: string; + dateCreated: string; + headers: { + 'Content-Type'?: string; + }; + id: string; + size: number; + }>; +}; + +export type ListAProjectSReleaseFilesResponse = ListAProjectSReleaseFilesResponses[keyof ListAProjectSReleaseFilesResponses]; + +export type UploadANewProjectReleaseFileData = { + body?: { + /** + * The multipart encoded file. + */ + file: Blob | File; + /** + * The name (full path) of the file. + */ + name?: string; + /** + * The name of the dist. + */ + dist?: string; + /** + * This parameter can be supplied multiple times to attach headers to the file. Each header is a string in the format `key:value`. For instance it can be used to define a content type. + */ + header?: string; + }; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/'; +}; + +export type UploadANewProjectReleaseFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UploadANewProjectReleaseFileResponses = { + /** + * Success + */ + 201: { + sha1: string; + dist: string | null; + name: string; + dateCreated: string; + headers: { + 'Content-Type'?: string; + }; + id: string; + size: number; + }; +}; + +export type UploadANewProjectReleaseFileResponse = UploadANewProjectReleaseFileResponses[keyof UploadANewProjectReleaseFileResponses]; + +export type DeleteAnOrganizationReleaseSFileData = { + body?: never; + path: { + /** + * The ID or slug of the organization the release belongs to. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + /** + * The ID of the file to delete. + */ + file_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/{file_id}/'; +}; + +export type DeleteAnOrganizationReleaseSFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAnOrganizationReleaseSFileResponses = { + /** + * Success + */ + 204: void; +}; + +export type DeleteAnOrganizationReleaseSFileResponse = DeleteAnOrganizationReleaseSFileResponses[keyof DeleteAnOrganizationReleaseSFileResponses]; + +export type RetrieveAnOrganizationReleaseSFileData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + /** + * The ID of the file to retrieve. + */ + file_id: string; + }; + query?: { + /** + * If this is set to true, then the response payload will be the raw file contents. Otherwise, the response will be the file metadata as JSON. + */ + download?: boolean; + }; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/{file_id}/'; +}; + +export type RetrieveAnOrganizationReleaseSFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAnOrganizationReleaseSFileResponses = { + /** + * Success + */ + 200: { + sha1: string; + dist: string | null; + name: string; + dateCreated: string; + headers: { + 'Content-Type'?: string; + }; + id: string; + size: number; + }; +}; + +export type RetrieveAnOrganizationReleaseSFileResponse = RetrieveAnOrganizationReleaseSFileResponses[keyof RetrieveAnOrganizationReleaseSFileResponses]; + +export type UpdateAnOrganizationReleaseFileData = { + body?: { + /** + * The new name (full path) of the file. + */ + name?: string; + /** + * The new name of the dist. + */ + dist?: string; + }; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + /** + * The ID of the file to retrieve. + */ + file_id: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/files/{file_id}/'; +}; + +export type UpdateAnOrganizationReleaseFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAnOrganizationReleaseFileResponses = { + /** + * Success + */ + 200: { + sha1: string; + dist: string | null; + name: string; + dateCreated: string; + headers: { + 'Content-Type'?: string; + }; + id: string; + size: number; + }; +}; + +export type UpdateAnOrganizationReleaseFileResponse = UpdateAnOrganizationReleaseFileResponses[keyof UpdateAnOrganizationReleaseFileResponses]; + +export type DeleteAProjectReleaseSFileData = { + body?: never; + path: { + /** + * The ID or slug of the organization the release belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + /** + * The ID of the file to delete. + */ + file_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/{file_id}/'; +}; + +export type DeleteAProjectReleaseSFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type DeleteAProjectReleaseSFileResponses = { + /** + * Success + */ + 204: void; +}; + +export type DeleteAProjectReleaseSFileResponse = DeleteAProjectReleaseSFileResponses[keyof DeleteAProjectReleaseSFileResponses]; + +export type RetrieveAProjectReleaseSFileData = { + body?: never; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + /** + * The ID of the file to retrieve. + */ + file_id: string; + }; + query?: { + /** + * If this is set to true, then the response payload will be the raw file contents. Otherwise, the response will be the file metadata as JSON. + */ + download?: boolean; + }; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/{file_id}/'; +}; + +export type RetrieveAProjectReleaseSFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAProjectReleaseSFileResponses = { + /** + * Success + */ + 200: { + sha1: string; + dist: string | null; + name: string; + dateCreated: string; + headers: { + 'Content-Type'?: string; + }; + id: string; + size: number; + }; +}; + +export type RetrieveAProjectReleaseSFileResponse = RetrieveAProjectReleaseSFileResponses[keyof RetrieveAProjectReleaseSFileResponses]; + +export type UpdateAProjectReleaseFileData = { + body?: { + /** + * The new name (full path) of the file. + */ + name?: string; + /** + * The new name of the dist. + */ + dist?: string; + }; + path: { + /** + * The ID or slug of the organization. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project. + */ + project_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + /** + * The ID of the file to retrieve. + */ + file_id: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/files/{file_id}/'; +}; + +export type UpdateAProjectReleaseFileErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type UpdateAProjectReleaseFileResponses = { + /** + * Success + */ + 200: { + sha1: string; + dist: string | null; + name: string; + dateCreated: string; + headers: { + 'Content-Type'?: string; + }; + id: string; + size: number; + }; +}; + +export type UpdateAProjectReleaseFileResponse = UpdateAProjectReleaseFileResponses[keyof UpdateAProjectReleaseFileResponses]; + +export type ListAnOrganizationReleaseSCommitsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the release belongs to. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/commits/'; +}; + +export type ListAnOrganizationReleaseSCommitsErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationReleaseSCommitsResponses = { + /** + * Success + */ + 200: Array<{ + dateCreated: string; + id: string; + message: string | null; + }>; +}; + +export type ListAnOrganizationReleaseSCommitsResponse = ListAnOrganizationReleaseSCommitsResponses[keyof ListAnOrganizationReleaseSCommitsResponses]; + +export type ListAProjectReleaseSCommitsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the release belongs to. + */ + organization_id_or_slug: string; + /** + * The ID or slug of the project the release belongs to. + */ + project_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + }; + query?: never; + url: '/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/releases/{version}/commits/'; +}; + +export type ListAProjectReleaseSCommitsErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAProjectReleaseSCommitsResponses = { + /** + * Success + */ + 200: Array<{ + dateCreated: string; + id: string; + message: string | null; + }>; +}; + +export type ListAProjectReleaseSCommitsResponse = ListAProjectReleaseSCommitsResponses[keyof ListAProjectReleaseSCommitsResponses]; + +export type RetrieveFilesChangedInAReleaseSCommitsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the release belongs to. + */ + organization_id_or_slug: string; + /** + * The version identifier of the release. + */ + version: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/releases/{version}/commitfiles/'; +}; + +export type RetrieveFilesChangedInAReleaseSCommitsErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveFilesChangedInAReleaseSCommitsResponses = { + /** + * Success + */ + 200: unknown; +}; + +export type ListAnOrganizationSIntegrationPlatformInstallationsData = { + body?: never; + path: { + /** + * The organization short name. + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/sentry-app-installations/'; +}; + +export type ListAnOrganizationSIntegrationPlatformInstallationsErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnOrganizationSIntegrationPlatformInstallationsResponses = { + /** + * Success + */ + 200: Array<{ + app: { + uuid: string; + slug: string; + }; + organization: { + slug: string; + }; + uuid: string; + status: string; + }>; +}; + +export type ListAnOrganizationSIntegrationPlatformInstallationsResponse = ListAnOrganizationSIntegrationPlatformInstallationsResponses[keyof ListAnOrganizationSIntegrationPlatformInstallationsResponses]; + +export type CreateOrUpdateAnExternalIssueData = { + body: { + /** + * The ID of the Sentry issue to link the external issue to. + */ + issueId: number; + /** + * The URL of the external service to link the issue to. + */ + webUrl: string; + /** + * The external service's project. + */ + project: string; + /** + * A unique identifier of the external issue. + */ + identifier: string; + }; + path: { + /** + * The uuid of the integration platform integration. + */ + uuid: string; + }; + query?: never; + url: '/api/0/sentry-app-installations/{uuid}/external-issues/'; +}; + +export type CreateOrUpdateAnExternalIssueErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type CreateOrUpdateAnExternalIssueResponses = { + /** + * Success + */ + 200: { + id: string; + issueId: string; + serviceType: string; + displayName: string; + webUrl: string; + }; +}; + +export type CreateOrUpdateAnExternalIssueResponse = CreateOrUpdateAnExternalIssueResponses[keyof CreateOrUpdateAnExternalIssueResponses]; + +export type DeleteAnExternalIssueData = { + body?: never; + path: { + /** + * The uuid of the integration platform integration. + */ + uuid: string; + /** + * The ID of the external issue. + */ + external_issue_id: string; + }; + query?: never; + url: '/api/0/sentry-app-installations/{uuid}/external-issues/{external_issue_id}/'; +}; + +export type DeleteAnExternalIssueErrors = { + /** + * Forbidden + */ + 403: unknown; + /** + * External issue not found + */ + 404: unknown; +}; + +export type DeleteAnExternalIssueResponses = { + /** + * Success + */ + 204: void; +}; + +export type DeleteAnExternalIssueResponse = DeleteAnExternalIssueResponses[keyof DeleteAnExternalIssueResponses]; + +export type DisableSpikeProtectionData = { + /** + * Django Rest Framework serializer for incoming Spike Protection API payloads + */ + body: { + /** + * Slugs of projects to disable Spike Protection for. Set to `$all` to disable Spike Protection for all the projects in the organization. + */ + projects: Array; + }; + path: { + /** + * The ID or slug of the organization the projects belong to + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/spike-protections/'; +}; + +export type DisableSpikeProtectionErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type DisableSpikeProtectionResponses = { + /** + * Success + */ + 200: unknown; +}; + +export type EnableSpikeProtectionData = { + /** + * Django Rest Framework serializer for incoming Spike Protection API payloads + */ + body: { + /** + * Slugs of projects to enable Spike Protection for. Set to `$all` to enable Spike Protection for all the projects in the organization. + */ + projects: Array; + }; + path: { + /** + * The ID or slug of the organization the projects belong to + */ + organization_id_or_slug: string; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/spike-protections/'; +}; + +export type EnableSpikeProtectionErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Forbidden + */ + 403: unknown; +}; + +export type EnableSpikeProtectionResponses = { + /** + * Success + */ + 201: unknown; +}; + +export type RetrieveSeerIssueFixStateData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the issue you'd like to query. + */ + issue_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/autofix/'; +}; + +export type RetrieveSeerIssueFixStateErrors = { + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveSeerIssueFixStateResponses = { + /** + * Response type for the GET endpoint + */ + 200: { + autofix: { + [key: string]: unknown; + } | null; + }; +}; + +export type RetrieveSeerIssueFixStateResponse = RetrieveSeerIssueFixStateResponses[keyof RetrieveSeerIssueFixStateResponses]; + +export type StartSeerIssueFixData = { + /** + * Allows parameters to be defined in snake case, but passed as camel case. + * + * Errors are output in camel case. + */ + body?: { + /** + * Run issue fix on a specific event. If not provided, the recommended event for the issue will be used. + */ + event_id?: string; + /** + * Optional custom instruction to guide the issue fix process. + */ + instruction?: string; + /** + * URL of a pull request where the issue fix should add comments. + */ + pr_to_comment_on_url?: string; + /** + * Where the issue fix process should stop. If not provided, will run to root cause. + * + * * `root_cause` + * * `solution` + * * `code_changes` + * * `open_pr` + */ + stopping_point?: 'root_cause' | 'solution' | 'code_changes' | 'open_pr'; + }; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the issue you'd like to query. + */ + issue_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/autofix/'; +}; + +export type StartSeerIssueFixErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type StartSeerIssueFixResponses = { + /** + * Response type for the POST endpoint + */ + 202: { + run_id: number; + }; +}; + +export type StartSeerIssueFixResponse = StartSeerIssueFixResponses[keyof StartSeerIssueFixResponses]; + +export type ListAnIssueSEventsData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the issue you'd like to query. + */ + issue_id: number; + }; + query?: { + /** + * The start of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + start?: string; + /** + * The end of the period of time for the query, expected in ISO-8601 format. For example, `2001-12-14T12:34:56.7890`. + */ + end?: string; + /** + * The period of time for the query, will override the start & end parameters, a number followed by one of: + * - `d` for days + * - `h` for hours + * - `m` for minutes + * - `s` for seconds + * - `w` for weeks + * + * For example, `24h`, to mean query data starting from 24 hours ago to now. + */ + statsPeriod?: string; + /** + * The name of environments to filter by. + */ + environment?: Array; + /** + * Specify true to include the full event body, including the stacktrace, in the event payload. + */ + full?: boolean; + /** + * Return events in pseudo-random order. This is deterministic so an identical query will always return the same events in the same order. + */ + sample?: boolean; + /** + * An optional search query for filtering events. See [search syntax](https://docs.sentry.io/concepts/search/) and queryable event properties at [Sentry Search Documentation](https://docs.sentry.io/concepts/search/searchable-properties/events/) for more information. An example query might be `query=transaction:foo AND release:abc` + */ + query?: string; + }; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/'; +}; + +export type ListAnIssueSEventsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type ListAnIssueSEventsResponses = { + 200: Array<{ + id: string; + 'event.type': string; + groupID: string | null; + eventID: string; + projectID: string; + message: string; + title: string; + location: string | null; + culprit: string | null; + user: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: { + [key: string]: string; + } | null; + data?: { + [key: string]: unknown; + } | null; + } | null; + tags: Array<{ + query?: string; + key: string; + value: string; + }>; + platform: string | null; + dateCreated: string; + crashFile: string | null; + metadata: { + [key: string]: unknown; + } | null; + }>; +}; + +export type ListAnIssueSEventsResponse = ListAnIssueSEventsResponses[keyof ListAnIssueSEventsResponses]; + +export type RetrieveAnIssueEventData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the issue you'd like to query. + */ + issue_id: number; + /** + * The ID of the event to retrieve, or 'latest', 'oldest', or 'recommended'. + */ + event_id: 'latest' | 'oldest' | 'recommended'; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/events/{event_id}/'; +}; + +export type RetrieveAnIssueEventErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveAnIssueEventResponses = { + 200: { + id: string; + groupID: string | null; + eventID: string; + projectID: string; + message: string | null; + title: string; + location: string | null; + user: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: { + [key: string]: string; + } | null; + data?: { + [key: string]: unknown; + } | null; + } | null; + tags: Array<{ + query?: string; + key: string; + value: string; + }>; + platform: string; + dateReceived: string | null; + contexts: { + [key: string]: unknown; + } | null; + size: number | null; + entries: Array; + dist: string | null; + sdk: { + [key: string]: string; + }; + context: { + [key: string]: unknown; + } | null; + packages: { + [key: string]: unknown; + }; + type: string; + metadata: unknown; + errors: Array; + occurrence: unknown; + _meta: { + [key: string]: unknown; + }; + crashFile?: string | null; + culprit?: string | null; + dateCreated?: string; + fingerprints?: Array; + groupingConfig?: unknown; + startTimestamp?: string; + endTimestamp?: string; + measurements?: unknown; + breakdowns?: unknown; + release: { + id?: number; + commitCount?: number; + data?: { + [key: string]: unknown; + }; + dateCreated?: string; + dateReleased?: string | null; + deployCount?: number; + ref?: string | null; + lastCommit?: { + [key: string]: unknown; + } | null; + lastDeploy?: { + dateStarted?: string | null; + url?: string | null; + id: string; + environment: string; + dateFinished: string; + name: string; + } | null; + status?: string; + url?: string | null; + userAgent?: string | null; + version?: string | null; + versionInfo?: { + description?: string; + package: string | null; + version: { + [key: string]: unknown; + }; + buildHash: string | null; + } | null; + } | null; + userReport: { + id: string; + eventID: string; + name: string | null; + email: string | null; + comments: string; + dateCreated: string; + user: { + id: string; + username: string | null; + email: string | null; + name: string | null; + ipAddress: string | null; + avatarUrl: string | null; + } | null; + event: { + id: string; + eventID: string; + }; + } | null; + sdkUpdates: Array<{ + [key: string]: unknown; + }>; + resolvedWith: Array; + nextEventID: string | null; + previousEventID: string | null; + }; +}; + +export type RetrieveAnIssueEventResponse = RetrieveAnIssueEventResponses[keyof RetrieveAnIssueEventResponses]; + +export type RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueData = { + body?: never; + path: { + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The ID of the issue you'd like to query. + */ + issue_id: number; + }; + query?: never; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/external-issues/'; +}; + +export type RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueResponses = { + 200: Array<{ + id: string; + issueId: string; + serviceType: string; + displayName: string; + webUrl: string; + }>; +}; + +export type RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueResponse = RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueResponses[keyof RetrieveCustomIntegrationIssueLinksForTheGivenSentryIssueResponses]; + +export type RetrieveTagDetailsData = { + body?: never; + path: { + /** + * The ID of the issue you'd like to query. + */ + issue_id: number; + /** + * The ID or slug of the organization the resource belongs to. + */ + organization_id_or_slug: string; + /** + * The tag key to look the values up for. + */ + key: string; + }; + query?: { + /** + * The name of environments to filter by. + */ + environment?: Array; + }; + url: '/api/0/organizations/{organization_id_or_slug}/issues/{issue_id}/tags/{key}/'; +}; + +export type RetrieveTagDetailsErrors = { + /** + * Bad Request + */ + 400: unknown; + /** + * Unauthorized + */ + 401: unknown; + /** + * Forbidden + */ + 403: unknown; + /** + * Not Found + */ + 404: unknown; +}; + +export type RetrieveTagDetailsResponses = { + 200: { + uniqueValues?: number | null; + totalValues?: number | null; + topValues?: Array<{ + query?: string | null; + key: string; + name: string; + value: string; + count: number; + lastSeen: string | null; + firstSeen: string | null; + }> | null; + key: string; + name: string; + }; +}; + +export type RetrieveTagDetailsResponse = RetrieveTagDetailsResponses[keyof RetrieveTagDetailsResponses]; From 48348c44c86dcdc1fae674fbc150ccb4ce640c8f Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Wed, 4 Feb 2026 16:38:46 +0530 Subject: [PATCH 3/4] feat: updated the api handlers --- src/lib/api-client.ts | 1118 +++++++++++++++++++++------------------ src/lib/client-setup.ts | 278 ++++++++++ src/types/index.ts | 34 +- src/types/seer.ts | 216 ++++---- src/types/sentry.ts | 864 +++++++++++++----------------- 5 files changed, 1327 insertions(+), 1183 deletions(-) create mode 100644 src/lib/client-setup.ts diff --git a/src/lib/api-client.ts b/src/lib/api-client.ts index a0fc0fb0..1962655a 100644 --- a/src/lib/api-client.ts +++ b/src/lib/api-client.ts @@ -1,36 +1,43 @@ /** * Sentry API Client * - * Handles authenticated requests to the Sentry API. - * Uses ky for retry logic, timeouts, and better error handling. + * Handles authenticated requests to the Sentry API using hey-api generated client. + * Provides multi-region support, token refresh, and error handling. */ -import kyHttpClient, { type KyInstance } from "ky"; -import { z } from "zod"; +// hey-api SDK functions import { - type ProjectKey, - ProjectKeySchema, - type Region, - type SentryEvent, - SentryEventSchema, - type SentryIssue, - SentryIssueSchema, - type SentryOrganization, - SentryOrganizationSchema, - type SentryProject, - SentryProjectSchema, - type SentryUser, - SentryUserSchema, - type TraceResponse, - type TraceSpan, - type UserRegionsResponse, - UserRegionsResponseSchema, + listAnOrganization_sProjects, + listAProject_sClientKeys, + listAProject_sIssues, + listYourOrganizations, + resolveAShortId, + retrieveAnEventForAProject, + retrieveAnOrganization, + retrieveAProject, + retrieveSeerIssueFixState, +} from "../client/sdk.gen.js"; +import type { + ProjectKey, + Region, + SentryEvent, + SentryIssue, + SentryOrganization, + SentryProject, + SentryUser, + TraceResponse, + TraceSpan, + UserRegionsResponse, } from "../types/index.js"; import type { AutofixResponse, AutofixState } from "../types/seer.js"; -import { DEFAULT_SENTRY_URL, getUserAgent } from "./constants.js"; -import { refreshToken } from "./db/auth.js"; -import { ApiError, AuthError } from "./errors.js"; -import { withHttpSpan } from "./telemetry.js"; +import { + createRegionClient, + extractData, + getDefaultBaseUrl, + withApiSpan, +} from "./client-setup.js"; +import { DEFAULT_SENTRY_URL } from "./constants.js"; +import { AuthError } from "./errors.js"; /** * Control silo URL - handles OAuth, user accounts, and region routing. @@ -38,114 +45,9 @@ import { withHttpSpan } from "./telemetry.js"; */ const CONTROL_SILO_URL = process.env.SENTRY_URL || DEFAULT_SENTRY_URL; -/** Request timeout in milliseconds */ -const REQUEST_TIMEOUT_MS = 30_000; - -/** Maximum retry attempts for failed requests */ -const MAX_RETRIES = 2; - -/** Maximum backoff delay between retries in milliseconds */ -const MAX_BACKOFF_MS = 10_000; - -/** HTTP status codes that trigger automatic retry */ -const RETRYABLE_STATUS_CODES = [408, 429, 500, 502, 503, 504]; - -/** Regex to extract org slug from /organizations/{slug}/... endpoints */ -const ORG_ENDPOINT_REGEX = /^\/?organizations\/([^/]+)/; - -/** Regex to extract org slug from /projects/{org}/{project}/... endpoints */ -const PROJECT_ENDPOINT_REGEX = /^\/?projects\/([^/]+)\/[^/]+/; - -/** - * Get the Sentry API base URL. - * Supports self-hosted instances via SENTRY_URL env var. - */ -function getApiBaseUrl(): string { - const baseUrl = process.env.SENTRY_URL || DEFAULT_SENTRY_URL; - return `${baseUrl}/api/0/`; -} - -/** - * Normalize endpoint path for use with ky's prefixUrl. - * Removes leading slash since ky handles URL joining. - */ -function normalizePath(endpoint: string): string { - return endpoint.startsWith("/") ? endpoint.slice(1) : endpoint; -} - -type ApiRequestOptions = { - method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; - body?: unknown; - /** Query parameters. String arrays create repeated keys (e.g., tags=1&tags=2) */ - params?: Record; - /** Optional Zod schema for runtime validation of response data */ - schema?: z.ZodType; -}; - -/** Header to mark requests as retries, preventing infinite retry loops */ -const RETRY_MARKER_HEADER = "x-sentry-cli-retry"; - -/** - * Create a configured ky instance with retry, timeout, and authentication. - * - * @throws {AuthError} When not authenticated - * @throws {ApiError} When API request fails - */ -async function createApiClient(): Promise { - const { token } = await refreshToken(); - - return kyHttpClient.create({ - prefixUrl: getApiBaseUrl(), - timeout: REQUEST_TIMEOUT_MS, - retry: { - limit: MAX_RETRIES, - methods: ["get", "put", "delete", "patch"], - statusCodes: RETRYABLE_STATUS_CODES, - backoffLimit: MAX_BACKOFF_MS, - }, - headers: { - Authorization: `Bearer ${token}`, - "Content-Type": "application/json", - "User-Agent": getUserAgent(), - }, - hooks: { - afterResponse: [ - async (request, options, response) => { - // On 401, force token refresh and retry once - const isRetry = request.headers.get(RETRY_MARKER_HEADER) === "1"; - if (response.status === 401 && !isRetry) { - try { - const { token: newToken, refreshed } = await refreshToken({ - force: true, - }); - - // Don't retry if token wasn't refreshed (e.g., manual API token) - if (!refreshed) { - return response; - } - - const retryHeaders = new Headers(options.headers); - retryHeaders.set("Authorization", `Bearer ${newToken}`); - retryHeaders.set(RETRY_MARKER_HEADER, "1"); - - // Spread options but remove prefixUrl since request.url is already absolute - const { prefixUrl: _, ...retryOptions } = options; - return kyHttpClient(request.url, { - ...retryOptions, - headers: retryHeaders, - retry: 0, - }); - } catch { - // Token refresh failed, return original 401 response - return response; - } - } - return response; - }, - ], - }, - }); -} +// ───────────────────────────────────────────────────────────────────────────── +// Legacy API Request Support (for rawApiRequest and non-hey-api endpoints) +// ───────────────────────────────────────────────────────────────────────────── /** * Build URLSearchParams from an options object, filtering out undefined values. @@ -180,239 +82,9 @@ export function buildSearchParams( return searchParams.toString() ? searchParams : undefined; } -/** - * Make an authenticated request to the Sentry API. - * - * @param endpoint - API endpoint path (e.g., "/organizations/") - * @param options - Request options including method, body, query params, and validation schema - * @returns Parsed JSON response (validated if schema provided) - * @throws {AuthError} When not authenticated - * @throws {ApiError} On API errors - * @throws {z.ZodError} When response fails schema validation - */ -export function apiRequest( - endpoint: string, - options: ApiRequestOptions = {} -): Promise { - const { method = "GET", body, params, schema } = options; - - return withHttpSpan(method, endpoint, async () => { - const client = await createApiClient(); - - let response: Response; - try { - response = await client(normalizePath(endpoint), { - method, - json: body, - searchParams: buildSearchParams(params), - }); - } catch (error) { - // Transform ky HTTPError into ApiError - if (error && typeof error === "object" && "response" in error) { - const kyError = error as { response: Response }; - const text = await kyError.response.text(); - let detail: string | undefined; - try { - const parsed = JSON.parse(text) as { detail?: string }; - detail = parsed.detail ?? JSON.stringify(parsed); - } catch { - detail = text; - } - throw new ApiError( - `API request failed: ${kyError.response.status} ${kyError.response.statusText}`, - kyError.response.status, - detail - ); - } - throw error; - } - - const data = await response.json(); - - // Validate response if schema provided - if (schema) { - return schema.parse(data); - } - - return data as T; - }); -} - -/** - * Make a raw API request that returns full response details. - * Unlike apiRequest, this does not throw on non-2xx responses. - * Used by the 'sentry api' command for direct API access. - * - * @param endpoint - API endpoint path (e.g., "/organizations/") - * @param options - Request options including method, body, params, and custom headers - * @returns Response status, headers, and parsed body - * @throws {AuthError} Only on authentication failure (not on API errors) - */ -export function rawApiRequest( - endpoint: string, - options: ApiRequestOptions & { headers?: Record } = {} -): Promise<{ status: number; headers: Headers; body: unknown }> { - const { method = "GET", body, params, headers: customHeaders = {} } = options; - - return withHttpSpan(method, endpoint, async () => { - const client = await createApiClient(); - - // Handle body based on type: - // - Objects: use ky's json option (auto-stringifies and sets Content-Type) - // - Strings: send as raw body (user can set Content-Type via custom headers if needed) - // - undefined: no body - const isStringBody = typeof body === "string"; - - // For string bodies, remove the default Content-Type: application/json from createApiClient - // unless the user explicitly provides one. This allows sending non-JSON content. - // Check is case-insensitive since HTTP headers are case-insensitive. - const hasContentType = Object.keys(customHeaders).some( - (k) => k.toLowerCase() === "content-type" - ); - const headers = - isStringBody && !hasContentType - ? { ...customHeaders, "Content-Type": undefined } - : customHeaders; - - const requestOptions: Parameters[1] = { - method, - searchParams: buildSearchParams(params), - headers, - throwHttpErrors: false, - }; - - if (body !== undefined) { - if (isStringBody) { - requestOptions.body = body; - } else { - requestOptions.json = body; - } - } - - const response = await client(normalizePath(endpoint), requestOptions); - - const text = await response.text(); - let responseBody: unknown; - try { - responseBody = JSON.parse(text); - } catch { - responseBody = text; - } - - return { - status: response.status, - headers: response.headers, - body: responseBody, - }; - }); -} - -/** - * Create a ky client configured for a specific region URL. - * Used for making requests to region-specific endpoints. - * - * @param regionUrl - The region's base URL (e.g., https://us.sentry.io) - */ -async function createRegionApiClient(regionUrl: string): Promise { - const { token } = await refreshToken(); - const baseUrl = regionUrl.endsWith("/") ? regionUrl : `${regionUrl}/`; - - return kyHttpClient.create({ - prefixUrl: `${baseUrl}api/0/`, - timeout: REQUEST_TIMEOUT_MS, - retry: { - limit: MAX_RETRIES, - methods: ["get", "put", "delete", "patch"], - statusCodes: RETRYABLE_STATUS_CODES, - backoffLimit: MAX_BACKOFF_MS, - }, - headers: { - Authorization: `Bearer ${token}`, - "Content-Type": "application/json", - "User-Agent": getUserAgent(), - }, - hooks: { - afterResponse: [ - async (request, options, response) => { - const isRetry = request.headers.get(RETRY_MARKER_HEADER) === "1"; - if (response.status === 401 && !isRetry) { - try { - const { token: newToken, refreshed } = await refreshToken({ - force: true, - }); - if (!refreshed) { - return response; - } - const retryHeaders = new Headers(options.headers); - retryHeaders.set("Authorization", `Bearer ${newToken}`); - retryHeaders.set(RETRY_MARKER_HEADER, "1"); - const { prefixUrl: _, ...retryOptions } = options; - return kyHttpClient(request.url, { - ...retryOptions, - headers: retryHeaders, - retry: 0, - }); - } catch { - return response; - } - } - return response; - }, - ], - }, - }); -} - -/** - * Make an authenticated request to a specific Sentry region. - * - * @param regionUrl - The region's base URL (e.g., https://us.sentry.io) - * @param endpoint - API endpoint path (e.g., "/organizations/") - * @param options - Request options - */ -export async function apiRequestToRegion( - regionUrl: string, - endpoint: string, - options: ApiRequestOptions = {} -): Promise { - const { method = "GET", body, params, schema } = options; - const client = await createRegionApiClient(regionUrl); - - let response: Response; - try { - response = await client(normalizePath(endpoint), { - method, - json: body, - searchParams: buildSearchParams(params), - }); - } catch (error) { - if (error && typeof error === "object" && "response" in error) { - const kyError = error as { response: Response }; - const text = await kyError.response.text(); - let detail: string | undefined; - try { - const parsed = JSON.parse(text) as { detail?: string }; - detail = parsed.detail ?? JSON.stringify(parsed); - } catch { - detail = text; - } - throw new ApiError( - `API request failed: ${kyError.response.status} ${kyError.response.statusText}`, - kyError.response.status, - detail - ); - } - throw error; - } - - const data = await response.json(); - - if (schema) { - return schema.parse(data); - } - - return data as T; -} +// ───────────────────────────────────────────────────────────────────────────── +// Region Management +// ───────────────────────────────────────────────────────────────────────────── /** * Get the list of regions the user has organization membership in. @@ -420,14 +92,16 @@ export async function apiRequestToRegion( * * @returns Array of regions with name and URL */ -export async function getUserRegions(): Promise { - // Always use control silo for this endpoint - const response = await apiRequestToRegion( - CONTROL_SILO_URL, - "/users/me/regions/", - { schema: UserRegionsResponseSchema } - ); - return response.regions; +export function getUserRegions(): Promise { + const client = createRegionClient(CONTROL_SILO_URL); + + return withApiSpan("GET", "/users/me/regions/", async () => { + const response = await client.get<{ 200: UserRegionsResponse }>({ + url: "/api/0/users/me/regions/", + }); + const data = extractData(response); + return data.regions; + }); } /** @@ -439,61 +113,12 @@ export async function getUserRegions(): Promise { export function listOrganizationsInRegion( regionUrl: string ): Promise { - return apiRequestToRegion( - regionUrl, - "/organizations/", - { - schema: z.array(SentryOrganizationSchema), - } - ); -} + const client = createRegionClient(regionUrl); -/** - * Extract organization slug from an endpoint path. - * Supports: - * - `/organizations/{slug}/...` - standard organization endpoints - * - `/projects/{org}/{project}/...` - project-scoped endpoints - */ -function extractOrgSlugFromEndpoint(endpoint: string): string | null { - // Try organization path first: /organizations/{slug}/... - const orgMatch = endpoint.match(ORG_ENDPOINT_REGEX); - if (orgMatch?.[1]) { - return orgMatch[1]; - } - - // Try project path: /projects/{org}/{project}/... - const projectMatch = endpoint.match(PROJECT_ENDPOINT_REGEX); - if (projectMatch?.[1]) { - return projectMatch[1]; - } - - return null; -} - -/** - * Make an org-scoped API request, automatically resolving the correct region. - * This is the preferred way to make org-scoped requests. - * - * The endpoint must contain the org slug in the path (e.g., `/organizations/{slug}/...`). - * The org slug is extracted to look up the correct region URL. - * - * @param endpoint - API endpoint path containing the org slug - * @param options - Request options - */ -async function orgScopedRequest( - endpoint: string, - options: ApiRequestOptions = {} -): Promise { - const orgSlug = extractOrgSlugFromEndpoint(endpoint); - if (!orgSlug) { - throw new Error( - `Cannot extract org slug from endpoint: ${endpoint}. ` + - "Endpoint must match /organizations/{slug}/..." - ); - } - const { resolveOrgRegion } = await import("./region.js"); - const regionUrl = await resolveOrgRegion(orgSlug); - return apiRequestToRegion(regionUrl, endpoint, options); + return withApiSpan("GET", "/organizations/", async () => { + const response = await listYourOrganizations({ client }); + return extractData(response) as SentryOrganization[]; + }); } /** @@ -518,9 +143,9 @@ export async function listOrganizations(): Promise { if (regions.length === 0) { // Fall back to default API for self-hosted instances - return apiRequest("/organizations/", { - schema: z.array(SentryOrganizationSchema), - }); + const client = createRegionClient(getDefaultBaseUrl()); + const response = await listYourOrganizations({ client }); + return extractData(response) as SentryOrganization[]; } const results = await Promise.all( @@ -553,23 +178,42 @@ export async function listOrganizations(): Promise { * Get a specific organization. * Uses region-aware routing for multi-region support. */ -export function getOrganization(orgSlug: string): Promise { - return orgScopedRequest(`/organizations/${orgSlug}/`, { - schema: SentryOrganizationSchema, +export async function getOrganization( + orgSlug: string +): Promise { + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan("GET", `/organizations/${orgSlug}/`, async () => { + const response = await retrieveAnOrganization({ + client, + path: { organization_id_or_slug: orgSlug }, + }); + return extractData(response) as SentryOrganization; }); } +// ───────────────────────────────────────────────────────────────────────────── +// Projects +// ───────────────────────────────────────────────────────────────────────────── + /** * List projects in an organization. * Uses region-aware routing for multi-region support. */ -export function listProjects(orgSlug: string): Promise { - return orgScopedRequest( - `/organizations/${orgSlug}/projects/`, - { - schema: z.array(SentryProjectSchema), - } - ); +export async function listProjects(orgSlug: string): Promise { + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan("GET", `/organizations/${orgSlug}/projects/`, async () => { + const response = await listAnOrganization_sProjects({ + client, + path: { organization_id_or_slug: orgSlug }, + }); + return extractData(response) as SentryProject[]; + }); } /** Project with its organization context */ @@ -641,35 +285,38 @@ export async function findProjectByDsnKey( regions = []; } - if (regions.length === 0) { - // Fall back to default region for self-hosted - const projects = await apiRequest("/projects/", { - params: { query: `dsn:${publicKey}` }, - schema: z.array(SentryProjectSchema), + // Search function for a single region + const searchInRegion = async ( + regionUrl: string + ): Promise => { + const client = createRegionClient(regionUrl); + // Use raw client request since this endpoint isn't in hey-api SDK + const response = await client.get<{ 200: SentryProject[] }>({ + url: "/api/0/projects/", + query: { query: `dsn:${publicKey}` }, }); + const projects = extractData(response); return projects[0] ?? null; + }; + + if (regions.length === 0) { + // Fall back to default region for self-hosted + return searchInRegion(getDefaultBaseUrl()); } const results = await Promise.all( regions.map(async (region) => { try { - return await apiRequestToRegion( - region.url, - "/projects/", - { - params: { query: `dsn:${publicKey}` }, - schema: z.array(SentryProjectSchema), - } - ); + return await searchInRegion(region.url); } catch { - return []; + return null; } }) ); - for (const projects of results) { - if (projects.length > 0) { - return projects[0] ?? null; + for (const project of results) { + if (project) { + return project; } } @@ -680,14 +327,26 @@ export async function findProjectByDsnKey( * Get a specific project. * Uses region-aware routing for multi-region support. */ -export function getProject( +export async function getProject( orgSlug: string, projectSlug: string ): Promise { - return orgScopedRequest( + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "GET", `/projects/${orgSlug}/${projectSlug}/`, - { - schema: SentryProjectSchema, + async () => { + const response = await retrieveAProject({ + client, + path: { + organization_id_or_slug: orgSlug, + project_id_or_slug: projectSlug, + }, + }); + return extractData(response) as SentryProject; } ); } @@ -696,23 +355,39 @@ export function getProject( * Get project keys (DSNs) for a project. * Uses region-aware routing for multi-region support. */ -export function getProjectKeys( +export async function getProjectKeys( orgSlug: string, projectSlug: string ): Promise { - return orgScopedRequest( + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "GET", `/projects/${orgSlug}/${projectSlug}/keys/`, - { - schema: z.array(ProjectKeySchema), + async () => { + const response = await listAProject_sClientKeys({ + client, + path: { + organization_id_or_slug: orgSlug, + project_id_or_slug: projectSlug, + }, + }); + return extractData(response) as ProjectKey[]; } ); } +// ───────────────────────────────────────────────────────────────────────────── +// Issues +// ───────────────────────────────────────────────────────────────────────────── + /** * List issues for a project. * Uses region-aware routing for multi-region support. */ -export function listIssues( +export async function listIssues( orgSlug: string, projectSlug: string, options: { @@ -723,17 +398,28 @@ export function listIssues( statsPeriod?: string; } = {} ): Promise { - return orgScopedRequest( + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "GET", `/projects/${orgSlug}/${projectSlug}/issues/`, - { - params: { - query: options.query, - cursor: options.cursor, - limit: options.limit, - sort: options.sort, - statsPeriod: options.statsPeriod, - }, - schema: z.array(SentryIssueSchema), + async () => { + const response = await listAProject_sIssues({ + client, + path: { + organization_id_or_slug: orgSlug, + project_id_or_slug: projectSlug, + }, + query: { + query: options.query, + cursor: options.cursor, + statsPeriod: options.statsPeriod, + // The SDK uses different parameter names, so we may need adjustments + }, + }); + return extractData(response) as SentryIssue[]; } ); } @@ -742,8 +428,14 @@ export function listIssues( * Get a specific issue by numeric ID */ export function getIssue(issueId: string): Promise { - return apiRequest(`/issues/${issueId}/`, { - schema: SentryIssueSchema, + const client = createRegionClient(getDefaultBaseUrl()); + + return withApiSpan("GET", `/issues/${issueId}/`, async () => { + // Use raw client since hey-api requires org slug which we don't have + const response = await client.get<{ 200: SentryIssue }>({ + url: `/api/0/issues/${issueId}/`, + }); + return extractData(response); }); } @@ -755,16 +447,32 @@ export function getIssue(issueId: string): Promise { * * @see https://docs.sentry.io/api/events/retrieve-an-issue/ */ -export function getIssueByShortId( +export async function getIssueByShortId( orgSlug: string, shortId: string ): Promise { + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + // Normalize to uppercase for case-insensitive matching const normalizedShortId = shortId.toUpperCase(); - return orgScopedRequest( - `/organizations/${orgSlug}/issues/${normalizedShortId}/`, - { - schema: SentryIssueSchema, + + return withApiSpan( + "GET", + `/organizations/${orgSlug}/shortids/${normalizedShortId}/`, + async () => { + // The hey-api SDK uses issue_id for the path parameter + const response = await resolveAShortId({ + client, + path: { + organization_id_or_slug: orgSlug, + issue_id: normalizedShortId, + }, + }); + const data = extractData(response) as unknown; + // resolveAShortId returns { group: Issue, ... } + return (data as { group: SentryIssue }).group; } ); } @@ -776,12 +484,24 @@ export function getIssueByShortId( * @param orgSlug - Organization slug (required for multi-region routing) * @param issueId - Issue ID (numeric) */ -export function getLatestEvent( +export async function getLatestEvent( orgSlug: string, issueId: string ): Promise { - return orgScopedRequest( - `/organizations/${orgSlug}/issues/${issueId}/events/latest/` + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "GET", + `/organizations/${orgSlug}/issues/${issueId}/events/latest/`, + async () => { + // This endpoint isn't directly in hey-api, use raw client + const response = await client.get<{ 200: SentryEvent }>({ + url: `/api/0/organizations/${orgSlug}/issues/${issueId}/events/latest/`, + }); + return extractData(response); + } ); } @@ -791,15 +511,28 @@ export function getLatestEvent( * * @see https://docs.sentry.io/api/events/retrieve-an-event-for-a-project/ */ -export function getEvent( +export async function getEvent( orgSlug: string, projectSlug: string, eventId: string ): Promise { - return orgScopedRequest( + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "GET", `/projects/${orgSlug}/${projectSlug}/events/${eventId}/`, - { - schema: SentryEventSchema, + async () => { + const response = await retrieveAnEventForAProject({ + client, + path: { + organization_id_or_slug: orgSlug, + project_id_or_slug: projectSlug, + event_id: eventId, + }, + }); + return extractData(response) as SentryEvent; } ); } @@ -813,12 +546,24 @@ export function getEvent( * @param traceId - The trace ID (from event.contexts.trace.trace_id) * @returns Trace response with transactions array and orphan_errors */ -export function getTrace( +export async function getTrace( orgSlug: string, traceId: string ): Promise { - return orgScopedRequest( - `/organizations/${orgSlug}/events-trace/${traceId}/` + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "GET", + `/organizations/${orgSlug}/events-trace/${traceId}/`, + async () => { + // This endpoint isn't in hey-api, use raw client + const response = await client.get<{ 200: TraceResponse }>({ + url: `/api/0/organizations/${orgSlug}/events-trace/${traceId}/`, + }); + return extractData(response); + } ); } @@ -832,22 +577,32 @@ export function getTrace( * @param timestamp - Unix timestamp (seconds) from the event's dateCreated * @returns Array of root spans with nested children */ -export function getDetailedTrace( +export async function getDetailedTrace( orgSlug: string, traceId: string, timestamp: number ): Promise { - return orgScopedRequest( + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "GET", `/organizations/${orgSlug}/trace/${traceId}/`, - { - params: { - timestamp, - // Maximum spans to fetch - 10k is sufficient for most traces while - // preventing excessive response sizes for very large traces - limit: 10_000, - // -1 means "all projects" - required since trace can span multiple projects - project: -1, - }, + async () => { + // This endpoint isn't in hey-api, use raw client + const response = await client.get<{ 200: TraceSpan[] }>({ + url: `/api/0/organizations/${orgSlug}/trace/${traceId}/`, + query: { + timestamp, + // Maximum spans to fetch - 10k is sufficient for most traces while + // preventing excessive response sizes for very large traces + limit: 10_000, + // -1 means "all projects" - required since trace can span multiple projects + project: -1, + }, + }); + return extractData(response); } ); } @@ -859,13 +614,22 @@ export function updateIssueStatus( issueId: string, status: "resolved" | "unresolved" | "ignored" ): Promise { - return apiRequest(`/issues/${issueId}/`, { - method: "PUT", - body: { status }, - schema: SentryIssueSchema, + const client = createRegionClient(getDefaultBaseUrl()); + + return withApiSpan("PUT", `/issues/${issueId}/`, async () => { + // Use raw client since hey-api requires org slug which we don't have + const response = await client.put<{ 200: SentryIssue }>({ + url: `/api/0/issues/${issueId}/`, + body: { status }, + }); + return extractData(response); }); } +// ───────────────────────────────────────────────────────────────────────────── +// Seer AI +// ───────────────────────────────────────────────────────────────────────────── + /** * Trigger root cause analysis for an issue using Seer AI. * Uses region-aware routing for multi-region support. @@ -875,15 +639,26 @@ export function updateIssueStatus( * @returns The trigger response with run_id * @throws {ApiError} On API errors (402 = no budget, 403 = not enabled) */ -export function triggerRootCauseAnalysis( +export async function triggerRootCauseAnalysis( orgSlug: string, issueId: string ): Promise<{ run_id: number }> { - return orgScopedRequest<{ run_id: number }>( + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "POST", `/organizations/${orgSlug}/issues/${issueId}/autofix/`, - { - method: "POST", - body: { step: "root_cause" }, + async () => { + // Use raw client for backward compatibility with existing body format + const response = await client.post<{ 200: { run_id: number } }>({ + url: `/api/0/organizations/${orgSlug}/issues/${issueId}/autofix/`, + body: { + step: "root_cause", + }, + }); + return extractData(response); } ); } @@ -900,11 +675,25 @@ export async function getAutofixState( orgSlug: string, issueId: string ): Promise { - const response = await orgScopedRequest( - `/organizations/${orgSlug}/issues/${issueId}/autofix/` - ); + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); - return response.autofix; + return withApiSpan( + "GET", + `/organizations/${orgSlug}/issues/${issueId}/autofix/`, + async () => { + const response = await retrieveSeerIssueFixState({ + client, + path: { + organization_id_or_slug: orgSlug, + issue_id: Number(issueId), + }, + }); + const data = extractData(response) as AutofixResponse; + return data.autofix; + } + ); } /** @@ -917,29 +706,302 @@ export async function getAutofixState( * @param runId - The autofix run ID * @returns The response from the API */ -export function triggerSolutionPlanning( +export async function triggerSolutionPlanning( orgSlug: string, issueId: string, runId: number ): Promise { - return orgScopedRequest( + const { resolveOrgRegion } = await import("./region.js"); + const regionUrl = await resolveOrgRegion(orgSlug); + const client = createRegionClient(regionUrl); + + return withApiSpan( + "POST", `/organizations/${orgSlug}/issues/${issueId}/autofix/`, - { - method: "POST", - body: { - run_id: runId, - step: "solution", - }, + async () => { + // The hey-api SDK doesn't support the run_id parameter directly, + // so we use a raw request + const response = await client.post<{ 200: unknown }>({ + url: `/api/0/organizations/${orgSlug}/issues/${issueId}/autofix/`, + body: { + run_id: runId, + step: "solution", + }, + }); + return extractData(response); } ); } +// ───────────────────────────────────────────────────────────────────────────── +// User +// ───────────────────────────────────────────────────────────────────────────── + /** * Get the currently authenticated user's information. * Used for setting user context in telemetry. */ export function getCurrentUser(): Promise { - return apiRequest("/users/me/", { - schema: SentryUserSchema, + const client = createRegionClient(CONTROL_SILO_URL); + + return withApiSpan("GET", "/users/me/", async () => { + // This endpoint isn't in hey-api, use raw client + const response = await client.get<{ 200: SentryUser }>({ + url: "/api/0/users/me/", + }); + return extractData(response); + }); +} + +// ───────────────────────────────────────────────────────────────────────────── +// Raw API Request (for sentry api command) +// ───────────────────────────────────────────────────────────────────────────── + +type RawApiRequestOptions = { + method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; + body?: unknown; + params?: Record; + headers?: Record; +}; + +/** Header to mark requests as retries, preventing infinite retry loops */ +const RETRY_MARKER_HEADER = "x-sentry-cli-retry"; + +/** + * Execute a request with 401 retry using token refresh. + */ +async function executeWithRetry( + initialRequest: () => Promise, + retryRequest: () => Promise +): Promise { + const response = await initialRequest(); + if (response.status !== 401) { + return response; + } + try { + const retryResponse = await retryRequest(); + return retryResponse ?? response; + } catch { + return response; + } +} + +/** + * Build the full URL for a raw API request. + */ +function buildRawRequestUrl( + endpoint: string, + params?: Record +): string { + const normalizedEndpoint = endpoint.startsWith("/") + ? endpoint + : `/${endpoint}`; + const searchParams = buildSearchParams(params); + const baseUrl = getDefaultBaseUrl(); + const url = `${baseUrl}/api/0${normalizedEndpoint}`; + return searchParams ? `${url}?${searchParams.toString()}` : url; +} + +/** + * Check if custom headers include Content-Type (case-insensitive). + */ +function hasCustomContentType(headers: Record): boolean { + return Object.keys(headers).some((k) => k.toLowerCase() === "content-type"); +} + +/** + * Make a raw API request that returns full response details. + * Unlike other functions, this does not throw on non-2xx responses. + * Used by the 'sentry api' command for direct API access. + * + * @param endpoint - API endpoint path (e.g., "/organizations/") + * @param options - Request options including method, body, params, and custom headers + * @returns Response status, headers, and parsed body + * @throws {AuthError} Only on authentication failure (not on API errors) + */ +export function rawApiRequest( + endpoint: string, + options: RawApiRequestOptions = {} +): Promise<{ status: number; headers: Headers; body: unknown }> { + const { method = "GET", body, params, headers: customHeaders = {} } = options; + + return withApiSpan(method, endpoint, async () => { + const fullUrl = buildRawRequestUrl(endpoint, params); + const isStringBody = typeof body === "string"; + + // Build headers - only add Content-Type: application/json if user didn't + // provide one and body is not a string + const headers: Record = { ...customHeaders }; + if (!(hasCustomContentType(customHeaders) || isStringBody)) { + headers["Content-Type"] = "application/json"; + } + + // Serialize body + let requestBody: string | undefined; + if (body !== undefined) { + requestBody = isStringBody ? (body as string) : JSON.stringify(body); + } + + // Get auth token + const { refreshToken } = await import("./db/auth.js"); + const { token } = await refreshToken(); + + const makeRequest = (authToken: string, isRetry: boolean) => + fetch(fullUrl, { + method, + headers: { + ...headers, + Authorization: `Bearer ${authToken}`, + ...(isRetry ? { [RETRY_MARKER_HEADER]: "1" } : {}), + }, + body: requestBody, + }); + + // Initial request with 401 retry + const response = await executeWithRetry( + () => makeRequest(token, false), + async () => { + const { token: newToken, refreshed } = await refreshToken({ + force: true, + }); + return refreshed ? makeRequest(newToken, true) : null; + } + ); + + return parseRawResponse(response); + }); +} + +/** + * Parse response into raw API response format. + */ +async function parseRawResponse( + response: Response +): Promise<{ status: number; headers: Headers; body: unknown }> { + const text = await response.text(); + let body: unknown; + try { + body = JSON.parse(text); + } catch { + body = text; + } + return { status: response.status, headers: response.headers, body }; +} + +// ───────────────────────────────────────────────────────────────────────────── +// Legacy apiRequest and apiRequestToRegion (for backward compatibility) +// ───────────────────────────────────────────────────────────────────────────── + +type ApiRequestOptions = { + method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; + body?: unknown; + params?: Record; + schema?: import("zod").ZodType; +}; + +/** + * Make an authenticated request to the Sentry API. + * This is a legacy function - prefer using specific functions like listOrganizations(). + * + * @deprecated Use specific API functions instead + */ +export function apiRequest( + endpoint: string, + options: ApiRequestOptions = {} +): Promise { + const { method = "GET", body, params, schema } = options; + const client = createRegionClient(getDefaultBaseUrl()); + + return withApiSpan(method, endpoint, async () => { + const normalizedEndpoint = endpoint.startsWith("/") + ? endpoint + : `/${endpoint}`; + const url = `/api/0${normalizedEndpoint}`; + + const searchParams = buildSearchParams(params); + const fullUrl = searchParams ? `${url}?${searchParams.toString()}` : url; + + let response: unknown; + switch (method) { + case "GET": + response = await client.get({ url: fullUrl }); + break; + case "POST": + response = await client.post({ url: fullUrl, body }); + break; + case "PUT": + response = await client.put({ url: fullUrl, body }); + break; + case "DELETE": + response = await client.delete({ url: fullUrl }); + break; + case "PATCH": + response = await client.patch({ url: fullUrl, body }); + break; + default: + response = await client.get({ url: fullUrl }); + } + + const data = extractData(response as { data?: T }) as T; + + if (schema) { + return schema.parse(data); + } + + return data; + }); +} + +/** + * Make an authenticated request to a specific Sentry region. + * This is a legacy function - prefer using specific functions. + * + * @deprecated Use specific API functions instead + */ +export function apiRequestToRegion( + regionUrl: string, + endpoint: string, + options: ApiRequestOptions = {} +): Promise { + const { method = "GET", body, params, schema } = options; + const client = createRegionClient(regionUrl); + + return withApiSpan(method, endpoint, async () => { + const normalizedEndpoint = endpoint.startsWith("/") + ? endpoint + : `/${endpoint}`; + const url = `/api/0${normalizedEndpoint}`; + + const searchParams = buildSearchParams(params); + const fullUrl = searchParams ? `${url}?${searchParams.toString()}` : url; + + let response: unknown; + switch (method) { + case "GET": + response = await client.get({ url: fullUrl }); + break; + case "POST": + response = await client.post({ url: fullUrl, body }); + break; + case "PUT": + response = await client.put({ url: fullUrl, body }); + break; + case "DELETE": + response = await client.delete({ url: fullUrl }); + break; + case "PATCH": + response = await client.patch({ url: fullUrl, body }); + break; + default: + response = await client.get({ url: fullUrl }); + } + + const data = extractData(response as { data?: T }) as T; + + if (schema) { + return schema.parse(data); + } + + return data; }); } diff --git a/src/lib/client-setup.ts b/src/lib/client-setup.ts new file mode 100644 index 00000000..cbba5567 --- /dev/null +++ b/src/lib/client-setup.ts @@ -0,0 +1,278 @@ +/** + * hey-api Client Setup + * + * Configures the hey-api generated client with: + * - Multi-region support (dynamic baseUrl per region) + * - Token refresh on 401 responses + * - Error transformation to CLI error classes + * - Telemetry spans for HTTP requests + */ + +import { + type Client, + createClient, + type ResolvedRequestOptions, +} from "../client/client/index.js"; +import { DEFAULT_SENTRY_URL, getUserAgent } from "./constants.js"; +import { refreshToken } from "./db/auth.js"; +import { ApiError, AuthError } from "./errors.js"; +import { withHttpSpan } from "./telemetry.js"; + +/** Header to mark requests as retries, preventing infinite retry loops */ +const RETRY_MARKER_HEADER = "x-sentry-cli-retry"; + +/** + * Token provider for hey-api auth. + * Called on each request to get the current bearer token. + */ +export async function getToken(): Promise { + const { token } = await refreshToken(); + return token; +} + +/** + * Get the default Sentry API base URL. + * Supports self-hosted instances via SENTRY_URL env var. + */ +export function getDefaultBaseUrl(): string { + return process.env.SENTRY_URL || DEFAULT_SENTRY_URL; +} + +/** + * Create a hey-api client configured for a specific region. + * + * The hey-api SDK functions include `/api/0/` in their URL paths, + * so baseUrl should just be the region URL without `/api/0`. + * + * @param regionUrl - The region's base URL (e.g., https://us.sentry.io) + * @returns Configured Client instance with interceptors + */ +export function createRegionClient(regionUrl: string): Client { + // Remove trailing slash if present + const baseUrl = regionUrl.endsWith("/") ? regionUrl.slice(0, -1) : regionUrl; + + const client = createClient({ + baseUrl, + // Always parse as JSON - Sentry API always returns JSON + // This ensures compatibility with responses that don't set Content-Type + parseAs: "json", + headers: { + "User-Agent": getUserAgent(), + "Content-Type": "application/json", + }, + }); + + setupInterceptors(client); + return client; +} + +/** + * Create a hey-api client for the default region. + * Used for endpoints that don't require region-specific routing. + */ +export function createDefaultClient(): Client { + return createRegionClient(getDefaultBaseUrl()); +} + +/** + * Setup interceptors for the client. + * + * Adds: + * - Request interceptor: Adds auth token, telemetry + * - Response interceptor: Handles 401 token refresh + * - Error interceptor: Transforms errors to CLI error classes + */ +function setupInterceptors(client: Client): void { + // Request interceptor - add auth token + client.interceptors.request.use(async (request, _options) => { + // getToken() throws AuthError if not authenticated + // We let this propagate to fail early with a clear error message + const token = await getToken(); + request.headers.set("Authorization", `Bearer ${token}`); + return request; + }); + + // Response interceptor - handle 401 token refresh + client.interceptors.response.use( + async (response, request, options: ResolvedRequestOptions) => { + // On 401, try to refresh the token and retry + const isRetry = request.headers.get(RETRY_MARKER_HEADER) === "1"; + if (response.status === 401 && !isRetry) { + try { + const { token: newToken, refreshed } = await refreshToken({ + force: true, + }); + + // Only retry if token was actually refreshed (not for manual API tokens) + if (refreshed) { + // Create a new request with the refreshed token + const newHeaders = new Headers(request.headers); + newHeaders.set("Authorization", `Bearer ${newToken}`); + newHeaders.set(RETRY_MARKER_HEADER, "1"); + + const retryResponse = await fetch( + new Request(request.url, { + method: request.method, + headers: newHeaders, + body: options.serializedBody, + }) + ); + + return retryResponse; + } + } catch { + // Token refresh failed, return original 401 response + return response; + } + } + return response; + } + ); + + // Error interceptor - transform to CLI error classes + client.interceptors.error.use( + async ( + error: unknown, + response: Response | undefined, + request: Request, + _options + ) => transformError(error, response, request) + ); +} + +/** + * Extract error detail from response body. + */ +async function extractErrorDetail(response: Response): Promise { + try { + const text = await response.clone().text(); + try { + const json = JSON.parse(text) as { detail?: string }; + return json.detail ?? text; + } catch { + return text; + } + } catch { + return response.statusText; + } +} + +/** + * Transform HTTP response errors into CLI error classes. + */ +async function transformHttpError( + response: Response, + request: Request +): Promise { + const status = response.status; + const detail = await extractErrorDetail(response); + + // Transform 401 to AuthError + if (status === 401) { + return new AuthError("invalid", detail); + } + + // Transform 403 to AuthError if it's an auth issue + if (status === 403 && detail.toLowerCase().includes("auth")) { + return new AuthError("invalid", detail); + } + + return new ApiError( + `API request failed: ${status} ${response.statusText}`, + status, + detail, + request.url + ); +} + +/** + * Transform raw errors into CLI error classes. + */ +async function transformError( + error: unknown, + response: Response | undefined, + request: Request +): Promise { + // Already a CLI error, pass through + if (error instanceof ApiError || error instanceof AuthError) { + return error; + } + + // Network errors (fetch failures, timeouts) + if (error instanceof TypeError) { + return new ApiError(`Network error: ${error.message}`, 0, error.message); + } + + // HTTP errors from response + if (response) { + return await transformHttpError(response, request); + } + + // Unknown error type + const message = error instanceof Error ? error.message : String(error); + return new ApiError(`Request failed: ${message}`, 0, message); +} + +/** + * Execute an API call with telemetry span wrapping. + * + * @param method - HTTP method + * @param url - Request URL or path + * @param fn - The async function that performs the request + * @returns The result of the function + */ +export function withApiSpan( + method: string, + url: string, + fn: () => Promise +): Promise { + return withHttpSpan(method, url, fn); +} + +/** + * Throw the appropriate error for an API error response. + */ +function throwApiError(error: unknown): never { + if (error instanceof Error) { + throw error; + } + const detail = typeof error === "string" ? error : JSON.stringify(error); + throw new ApiError("API returned error", 0, detail); +} + +/** + * Helper to extract data from hey-api response. + * Handles both throwOnError modes and response styles. + * + * hey-api returns: + * - Success: { data, request, response } + * - Error: { error, request, response } (no data property) + */ +export function extractData( + response: { data?: T; error?: unknown } | T | undefined +): T { + if (response === undefined) { + throw new ApiError("Empty response from API", 0); + } + + // Check if response is an object (could be hey-api response structure) + if (typeof response === "object" && response !== null) { + const r = response as { data?: T; error?: unknown }; + + // Check for error first (error responses don't have data property) + if ("error" in r && r.error !== undefined) { + throwApiError(r.error); + } + + // Check for data property (successful responses) + if ("data" in r) { + if (r.data === undefined) { + throw new ApiError("Empty data in API response", 0); + } + return r.data; + } + } + + // Direct data response (arrays, objects without data/error structure) + return response as T; +} diff --git a/src/types/index.ts b/src/types/index.ts index 5ff197f0..768efb09 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -7,6 +7,7 @@ // DSN types export type { DetectedDsn, DsnSource, ParsedDsn } from "../lib/dsn/types.js"; + // Configuration types export type { CachedProject, @@ -19,25 +20,26 @@ export { ProjectAliasesSchema, SentryConfigSchema, } from "./config.js"; + // OAuth types and schemas export type { DeviceCodeResponse, TokenErrorResponse, TokenResponse, } from "./oauth.js"; -// OAuth types and schemas export { DeviceCodeResponseSchema, TokenErrorResponseSchema, TokenResponseSchema, } from "./oauth.js"; + +// Seer types and helpers export type { AutofixResponse, AutofixState, RootCause, SolutionArtifact, } from "./seer.js"; -// Seer types export { extractRootCauses, extractSolution, @@ -45,6 +47,8 @@ export { SolutionArtifactSchema, TERMINAL_STATUSES, } from "./seer.js"; + +// Sentry API types export type { Breadcrumb, BreadcrumbsEntry, @@ -79,36 +83,12 @@ export type { UserRegionsResponse, } from "./sentry.js"; +// Sentry API constants and schemas (only those used for validation) export { - BreadcrumbSchema, - BreadcrumbsEntrySchema, - BrowserContextSchema, - DeviceContextSchema, - ExceptionEntrySchema, - ExceptionValueSchema, ISSUE_LEVELS, ISSUE_PRIORITIES, ISSUE_STATUSES, - MechanismSchema, - OrganizationLinksSchema, - OsContextSchema, - ProjectKeySchema, - RegionSchema, - ReleaseSchema, - RequestEntrySchema, - SentryEventSchema, - SentryIssueSchema, SentryOrganizationSchema, - SentryProjectSchema, - SentryUserSchema, - SpanSchema, - StackFrameSchema, - StacktraceSchema, - TraceContextSchema, - TraceEventSchema, - TraceResponseSchema, - UserGeoSchema, - UserRegionsResponseSchema, } from "./sentry.js"; // I/O types diff --git a/src/types/seer.ts b/src/types/seer.ts index 776513bc..c3891ec8 100644 --- a/src/types/seer.ts +++ b/src/types/seer.ts @@ -1,7 +1,8 @@ /** * Seer API Types * - * Zod schemas and TypeScript types for Sentry's Seer Autofix API. + * Types for Sentry's Seer Autofix API. + * Only SolutionArtifactSchema is used for runtime validation (in extractSolution). */ import { z } from "zod"; @@ -43,126 +44,108 @@ export type StoppingPoint = (typeof STOPPING_POINTS)[number]; // Progress Message // ───────────────────────────────────────────────────────────────────────────── -export const ProgressMessageSchema = z.object({ - message: z.string(), - timestamp: z.string(), - type: z.string().optional(), -}); - -export type ProgressMessage = z.infer; +export type ProgressMessage = { + message: string; + timestamp: string; + type?: string; +}; // ───────────────────────────────────────────────────────────────────────────── // Relevant Code File // ───────────────────────────────────────────────────────────────────────────── -export const RelevantCodeFileSchema = z.object({ - file_path: z.string(), - repo_name: z.string(), -}); - -export type RelevantCodeFile = z.infer; +export type RelevantCodeFile = { + file_path: string; + repo_name: string; +}; // ───────────────────────────────────────────────────────────────────────────── // Reproduction Step // ───────────────────────────────────────────────────────────────────────────── -export const ReproductionStepSchema = z.object({ - title: z.string(), - code_snippet_and_analysis: z.string(), - is_most_important_event: z.boolean().optional(), - relevant_code_file: RelevantCodeFileSchema.optional(), - timeline_item_type: z.string().optional(), -}); - -export type ReproductionStep = z.infer; +export type ReproductionStep = { + title: string; + code_snippet_and_analysis: string; + is_most_important_event?: boolean; + relevant_code_file?: RelevantCodeFile; + timeline_item_type?: string; +}; // ───────────────────────────────────────────────────────────────────────────── // Root Cause // ───────────────────────────────────────────────────────────────────────────── -export const RootCauseSchema = z.object({ - id: z.number(), - description: z.string(), - relevant_repos: z.array(z.string()).optional(), - reproduction_urls: z.array(z.string()).optional(), - root_cause_reproduction: z.array(ReproductionStepSchema).optional(), -}); - -export type RootCause = z.infer; +export type RootCause = { + id: number; + description: string; + relevant_repos?: string[]; + reproduction_urls?: string[]; + root_cause_reproduction?: ReproductionStep[]; +}; // ───────────────────────────────────────────────────────────────────────────── // Root Cause Selection // ───────────────────────────────────────────────────────────────────────────── -export const RootCauseSelectionSchema = z.object({ - cause_id: z.number(), - instruction: z.string().nullable().optional(), -}); - -export type RootCauseSelection = z.infer; +export type RootCauseSelection = { + cause_id: number; + instruction?: string | null; +}; // ───────────────────────────────────────────────────────────────────────────── // Autofix Step // ───────────────────────────────────────────────────────────────────────────── -export const AutofixStepSchema = z - .object({ - id: z.string(), - key: z.string(), - status: z.string(), - title: z.string(), - progress: z.array(ProgressMessageSchema).optional(), - causes: z.array(RootCauseSchema).optional(), - selection: RootCauseSelectionSchema.optional(), - }) - .passthrough(); // Allow additional fields like artifacts - -export type AutofixStep = z.infer; +export type AutofixStep = { + id: string; + key: string; + status: string; + title: string; + progress?: ProgressMessage[]; + causes?: RootCause[]; + selection?: RootCauseSelection; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Repository Info // ───────────────────────────────────────────────────────────────────────────── -export const RepositoryInfoSchema = z.object({ - integration_id: z.number().optional(), - url: z.string().optional(), - external_id: z.string(), - name: z.string(), - provider: z.string().optional(), - default_branch: z.string().optional(), - is_readable: z.boolean().optional(), - is_writeable: z.boolean().optional(), -}); - -export type RepositoryInfo = z.infer; +export type RepositoryInfo = { + integration_id?: number; + url?: string; + external_id: string; + name: string; + provider?: string; + default_branch?: string; + is_readable?: boolean; + is_writeable?: boolean; +}; // ───────────────────────────────────────────────────────────────────────────── // Codebase Info // ───────────────────────────────────────────────────────────────────────────── -export const CodebaseInfoSchema = z.object({ - repo_external_id: z.string(), - file_changes: z.array(z.unknown()).optional(), - is_readable: z.boolean().optional(), - is_writeable: z.boolean().optional(), -}); - -export type CodebaseInfo = z.infer; +export type CodebaseInfo = { + repo_external_id: string; + file_changes?: unknown[]; + is_readable?: boolean; + is_writeable?: boolean; +}; // ───────────────────────────────────────────────────────────────────────────── // PR Info (from completed fix) // ───────────────────────────────────────────────────────────────────────────── -export const PullRequestInfoSchema = z.object({ - pr_number: z.number().optional(), - pr_url: z.string().optional(), - repo_name: z.string().optional(), -}); - -export type PullRequestInfo = z.infer; +export type PullRequestInfo = { + pr_number?: number; + pr_url?: string; + repo_name?: string; +}; // ───────────────────────────────────────────────────────────────────────────── // Solution Artifact (from plan command) +// Used for runtime validation in extractSolution() // ───────────────────────────────────────────────────────────────────────────── /** A single step in the solution plan */ @@ -194,64 +177,49 @@ export type SolutionArtifact = z.infer; // Autofix State // ───────────────────────────────────────────────────────────────────────────── -export const AutofixStateSchema = z - .object({ - run_id: z.number(), - status: z.string(), - updated_at: z.string().optional(), - request: z - .object({ - organization_id: z.number().optional(), - project_id: z.number().optional(), - repos: z.array(z.unknown()).optional(), - }) - .optional(), - codebases: z.record(z.string(), CodebaseInfoSchema).optional(), - steps: z.array(AutofixStepSchema).optional(), - repositories: z.array(RepositoryInfoSchema).optional(), - coding_agents: z.record(z.string(), z.unknown()).optional(), - created_at: z.string().optional(), - completed_at: z.string().optional(), - }) - .passthrough(); // Allow additional fields like blocks - -export type AutofixState = z.infer; +export type AutofixState = { + run_id: number; + status: string; + updated_at?: string; + request?: { + organization_id?: number; + project_id?: number; + repos?: unknown[]; + }; + codebases?: Record; + steps?: AutofixStep[]; + repositories?: RepositoryInfo[]; + coding_agents?: Record; + created_at?: string; + completed_at?: string; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Autofix Response (GET /issues/{id}/autofix/) // ───────────────────────────────────────────────────────────────────────────── -export const AutofixResponseSchema = z.object({ - autofix: AutofixStateSchema.nullable(), -}); - -export type AutofixResponse = z.infer; +export type AutofixResponse = { + autofix: AutofixState | null; +}; // ───────────────────────────────────────────────────────────────────────────── // Update Payloads // ───────────────────────────────────────────────────────────────────────────── -export const SelectRootCausePayloadSchema = z.object({ - type: z.literal("select_root_cause"), - cause_id: z.number(), - stopping_point: z.enum(["solution", "code_changes", "open_pr"]).optional(), -}); - -export type SelectRootCausePayload = z.infer< - typeof SelectRootCausePayloadSchema ->; +export type SelectRootCausePayload = { + type: "select_root_cause"; + cause_id: number; + stopping_point?: "solution" | "code_changes" | "open_pr"; +}; -export const SelectSolutionPayloadSchema = z.object({ - type: z.literal("select_solution"), -}); - -export type SelectSolutionPayload = z.infer; - -export const CreatePrPayloadSchema = z.object({ - type: z.literal("create_pr"), -}); +export type SelectSolutionPayload = { + type: "select_solution"; +}; -export type CreatePrPayload = z.infer; +export type CreatePrPayload = { + type: "create_pr"; +}; export type AutofixUpdatePayload = | SelectRootCausePayload diff --git a/src/types/sentry.ts b/src/types/sentry.ts index 523ef84c..43540563 100644 --- a/src/types/sentry.ts +++ b/src/types/sentry.ts @@ -2,50 +2,46 @@ * Sentry API Types * * Types representing Sentry API resources. - * Zod schemas provide runtime validation, types are inferred from schemas. - * Schemas are lenient to handle API variations - only core identifiers are required. + * Most types are plain TypeScript interfaces; Zod schemas are only used + * where runtime validation is actually needed. */ import { z } from "zod"; // ───────────────────────────────────────────────────────────────────────────── -// Region +// Region (undocumented API: /users/me/regions/) // ───────────────────────────────────────────────────────────────────────────── /** A Sentry region (e.g., US, EU) */ -export const RegionSchema = z.object({ - name: z.string(), - url: z.string().url(), -}); - -export type Region = z.infer; +export type Region = { + name: string; + url: string; +}; /** Response from /api/0/users/me/regions/ endpoint */ -export const UserRegionsResponseSchema = z.object({ - regions: z.array(RegionSchema), -}); - -export type UserRegionsResponse = z.infer; +export type UserRegionsResponse = { + regions: Region[]; +}; // ───────────────────────────────────────────────────────────────────────────── // Organization // ───────────────────────────────────────────────────────────────────────────── /** Organization links with region URL for multi-region support */ -export const OrganizationLinksSchema = z.object({ - organizationUrl: z.string(), - regionUrl: z.string(), -}); - -export type OrganizationLinks = z.infer; +export type OrganizationLinks = { + organizationUrl: string; + regionUrl: string; +}; +/** + * Zod schema for SentryOrganization. + * Used for runtime validation in region.ts via apiRequestToRegion({ schema }). + */ export const SentryOrganizationSchema = z .object({ - // Core identifiers (required) id: z.string(), slug: z.string(), name: z.string(), - // Optional metadata dateCreated: z.string().optional(), isEarlyAdopter: z.boolean().optional(), require2FA: z.boolean().optional(), @@ -57,78 +53,66 @@ export const SentryOrganizationSchema = z .passthrough() .optional(), features: z.array(z.string()).optional(), - // Multi-region support: links contain the region URL for this org - links: OrganizationLinksSchema.optional(), + links: z + .object({ + organizationUrl: z.string(), + regionUrl: z.string(), + }) + .optional(), }) .passthrough(); export type SentryOrganization = z.infer; // ───────────────────────────────────────────────────────────────────────────── -// User +// User (undocumented API: /users/me/) // ───────────────────────────────────────────────────────────────────────────── -export const SentryUserSchema = z - .object({ - // Core identifiers (required) - id: z.string(), - // Optional user info - email: z.string().optional(), - username: z.string().optional(), - name: z.string().optional(), - }) - .passthrough(); - -export type SentryUser = z.infer; +export type SentryUser = { + id: string; + email?: string; + username?: string; + name?: string; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Project // ───────────────────────────────────────────────────────────────────────────── -export const SentryProjectSchema = z - .object({ - // Core identifiers (required) - id: z.string(), - slug: z.string(), - name: z.string(), - // Optional metadata - platform: z.string().nullable().optional(), - dateCreated: z.string().optional(), - isBookmarked: z.boolean().optional(), - isMember: z.boolean().optional(), - features: z.array(z.string()).optional(), - firstEvent: z.string().nullable().optional(), - firstTransactionEvent: z.boolean().optional(), - access: z.array(z.string()).optional(), - hasAccess: z.boolean().optional(), - hasMinifiedStackTrace: z.boolean().optional(), - hasMonitors: z.boolean().optional(), - hasProfiles: z.boolean().optional(), - hasReplays: z.boolean().optional(), - hasSessions: z.boolean().optional(), - isInternal: z.boolean().optional(), - isPublic: z.boolean().optional(), - avatar: z - .object({ - avatarType: z.string(), - avatarUuid: z.string().nullable(), - }) - .passthrough() - .optional(), - color: z.string().optional(), - status: z.string().optional(), - organization: z - .object({ - id: z.string(), - slug: z.string(), - name: z.string(), - }) - .passthrough() - .optional(), - }) - .passthrough(); - -export type SentryProject = z.infer; +export type SentryProject = { + id: string; + slug: string; + name: string; + platform?: string | null; + dateCreated?: string; + isBookmarked?: boolean; + isMember?: boolean; + features?: string[]; + firstEvent?: string | null; + firstTransactionEvent?: boolean; + access?: string[]; + hasAccess?: boolean; + hasMinifiedStackTrace?: boolean; + hasMonitors?: boolean; + hasProfiles?: boolean; + hasReplays?: boolean; + hasSessions?: boolean; + isInternal?: boolean; + isPublic?: boolean; + avatar?: { + avatarType: string; + avatarUuid: string | null; + }; + color?: string; + status?: string; + organization?: { + id: string; + slug: string; + name: string; + }; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Issue Status & Level Constants @@ -164,185 +148,145 @@ export type IssueSubstatus = (typeof ISSUE_SUBSTATUSES)[number]; // Release (embedded in Issue) // ───────────────────────────────────────────────────────────────────────────── -export const ReleaseSchema = z - .object({ - id: z.number().optional(), - version: z.string(), - shortVersion: z.string().optional(), - status: z.string().optional(), - dateCreated: z.string().optional(), - dateReleased: z.string().nullable().optional(), - ref: z.string().nullable().optional(), - url: z.string().nullable().optional(), - commitCount: z.number().optional(), - deployCount: z.number().optional(), - authors: z.array(z.unknown()).optional(), - projects: z - .array( - z - .object({ - id: z.union([z.string(), z.number()]), - slug: z.string(), - name: z.string(), - }) - .passthrough() - ) - .optional(), - }) - .passthrough(); - -export type Release = z.infer; +export type Release = { + id?: number; + version: string; + shortVersion?: string; + status?: string; + dateCreated?: string; + dateReleased?: string | null; + ref?: string | null; + url?: string | null; + commitCount?: number; + deployCount?: number; + authors?: unknown[]; + projects?: Array<{ + id: string | number; + slug: string; + name: string; + }>; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Issue // ───────────────────────────────────────────────────────────────────────────── -export const SentryIssueSchema = z - .object({ - // Core identifiers (required) - id: z.string(), - shortId: z.string(), - title: z.string(), - // Optional metadata - culprit: z.string().optional(), - permalink: z.string().optional(), - logger: z.string().nullable().optional(), - level: z.string().optional(), - status: z.enum(ISSUE_STATUSES).optional(), - statusDetails: z.record(z.unknown()).optional(), - substatus: z.string().optional().nullable(), - priority: z.string().optional(), - isPublic: z.boolean().optional(), - platform: z.string().optional(), - project: z - .object({ - id: z.string(), - name: z.string(), - slug: z.string(), - platform: z.string().nullable().optional(), - }) - .passthrough() - .optional(), - type: z.string().optional(), - metadata: z - .object({ - value: z.string().optional(), - type: z.string().optional(), - filename: z.string().optional(), - function: z.string().optional(), - display_title_with_tree_label: z.boolean().optional(), - }) - .passthrough() - .optional(), - numComments: z.number().optional(), - assignedTo: z - .object({ - id: z.string(), - name: z.string(), - type: z.string(), - }) - .passthrough() - .nullable() - .optional(), - isBookmarked: z.boolean().optional(), - isSubscribed: z.boolean().optional(), - subscriptionDetails: z - .object({ - reason: z.string().optional(), - }) - .passthrough() - .nullable() - .optional(), - hasSeen: z.boolean().optional(), - annotations: z.array(z.string()).optional(), - isUnhandled: z.boolean().optional(), - count: z.string().optional(), - userCount: z.number().optional(), - firstSeen: z.string().datetime({ offset: true }).optional(), - lastSeen: z.string().datetime({ offset: true }).optional(), - // Release information - firstRelease: ReleaseSchema.nullable().optional(), - lastRelease: ReleaseSchema.nullable().optional(), - }) - .passthrough(); - -export type SentryIssue = z.infer; +export type SentryIssue = { + id: string; + shortId: string; + title: string; + culprit?: string; + permalink?: string; + logger?: string | null; + level?: string; + status?: IssueStatus; + statusDetails?: Record; + substatus?: string | null; + priority?: string; + isPublic?: boolean; + platform?: string; + project?: { + id: string; + name: string; + slug: string; + platform?: string | null; + }; + type?: string; + metadata?: { + value?: string; + type?: string; + filename?: string; + function?: string; + display_title_with_tree_label?: boolean; + }; + numComments?: number; + assignedTo?: { + id: string; + name: string; + type: string; + } | null; + isBookmarked?: boolean; + isSubscribed?: boolean; + subscriptionDetails?: { + reason?: string; + } | null; + hasSeen?: boolean; + annotations?: string[]; + isUnhandled?: boolean; + count?: string; + userCount?: number; + firstSeen?: string; + lastSeen?: string; + firstRelease?: Release | null; + lastRelease?: Release | null; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Trace Context // ───────────────────────────────────────────────────────────────────────────── -export const TraceContextSchema = z - .object({ - trace_id: z.string().optional(), - span_id: z.string().optional(), - parent_span_id: z.string().nullable().optional(), - op: z.string().optional(), - status: z.string().optional(), - description: z.string().nullable().optional(), - }) - .passthrough(); - -export type TraceContext = z.infer; +export type TraceContext = { + trace_id?: string; + span_id?: string; + parent_span_id?: string | null; + op?: string; + status?: string; + description?: string | null; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Span (for trace tree display) // ───────────────────────────────────────────────────────────────────────────── /** A single span in a trace */ -export const SpanSchema = z - .object({ - span_id: z.string(), - parent_span_id: z.string().nullable().optional(), - trace_id: z.string().optional(), - op: z.string().optional(), - description: z.string().nullable().optional(), - /** Start time as Unix timestamp (seconds with fractional ms) */ - start_timestamp: z.number(), - /** End time as Unix timestamp (seconds with fractional ms) */ - timestamp: z.number(), - status: z.string().optional(), - data: z.record(z.unknown()).optional(), - tags: z.record(z.string()).optional(), - }) - .passthrough(); - -export type Span = z.infer; +export type Span = { + span_id: string; + parent_span_id?: string | null; + trace_id?: string; + op?: string; + description?: string | null; + /** Start time as Unix timestamp (seconds with fractional ms) */ + start_timestamp: number; + /** End time as Unix timestamp (seconds with fractional ms) */ + timestamp: number; + status?: string; + data?: Record; + tags?: Record; + [key: string]: unknown; +}; /** A transaction/event in a trace (from events-trace endpoint) */ -export const TraceEventSchema = z - .object({ - event_id: z.string(), - span_id: z.string().optional(), - transaction: z.string().optional(), - "transaction.duration": z.number().optional(), - "transaction.op": z.string().optional(), - project_slug: z.string().optional(), - project_id: z.union([z.string(), z.number()]).optional(), - /** Child spans within this transaction */ - spans: z.array(SpanSchema).optional(), - /** Start time */ - start_timestamp: z.number().optional(), - /** End time */ - timestamp: z.number().optional(), - /** Errors associated with this transaction */ - errors: z.array(z.unknown()).optional(), - /** Performance issues */ - performance_issues: z.array(z.unknown()).optional(), - }) - .passthrough(); - -export type TraceEvent = z.infer; +export type TraceEvent = { + event_id: string; + span_id?: string; + transaction?: string; + "transaction.duration"?: number; + "transaction.op"?: string; + project_slug?: string; + project_id?: string | number; + /** Child spans within this transaction */ + spans?: Span[]; + /** Start time */ + start_timestamp?: number; + /** End time */ + timestamp?: number; + /** Errors associated with this transaction */ + errors?: unknown[]; + /** Performance issues */ + performance_issues?: unknown[]; + [key: string]: unknown; +}; /** Response from /events-trace/{traceId}/ endpoint */ -export const TraceResponseSchema = z.object({ +export type TraceResponse = { /** Transactions with their nested children (span trees) */ - transactions: z.array(TraceEventSchema), + transactions: TraceEvent[]; /** Errors not associated with any transaction */ - orphan_errors: z.array(z.unknown()).optional(), -}); - -export type TraceResponse = z.infer; + orphan_errors?: unknown[]; +}; /** * Span from /trace/{traceId}/ endpoint with nested children. @@ -368,313 +312,225 @@ export type TraceSpan = { // ───────────────────────────────────────────────────────────────────────────── /** A single frame in a stack trace */ -export const StackFrameSchema = z - .object({ - filename: z.string().nullable().optional(), - absPath: z.string().nullable().optional(), - module: z.string().nullable().optional(), - package: z.string().nullable().optional(), - platform: z.string().nullable().optional(), - function: z.string().nullable().optional(), - rawFunction: z.string().nullable().optional(), - symbol: z.string().nullable().optional(), - lineNo: z.number().nullable().optional(), - colNo: z.number().nullable().optional(), - /** Whether this frame is in the user's application code */ - inApp: z.boolean().nullable().optional(), - /** Surrounding code lines: [[lineNo, code], ...] */ - context: z - .array(z.tuple([z.number(), z.string()])) - .nullable() - .optional(), - vars: z.record(z.unknown()).nullable().optional(), - instructionAddr: z.string().nullable().optional(), - symbolAddr: z.string().nullable().optional(), - trust: z.string().nullable().optional(), - errors: z.array(z.unknown()).nullable().optional(), - }) - .passthrough(); - -export type StackFrame = z.infer; +export type StackFrame = { + filename?: string | null; + absPath?: string | null; + module?: string | null; + package?: string | null; + platform?: string | null; + function?: string | null; + rawFunction?: string | null; + symbol?: string | null; + lineNo?: number | null; + colNo?: number | null; + /** Whether this frame is in the user's application code */ + inApp?: boolean | null; + /** Surrounding code lines: [[lineNo, code], ...] */ + context?: [number, string][] | null; + vars?: Record | null; + instructionAddr?: string | null; + symbolAddr?: string | null; + trust?: string | null; + errors?: unknown[] | null; + [key: string]: unknown; +}; /** Stack trace containing frames */ -export const StacktraceSchema = z - .object({ - frames: z.array(StackFrameSchema).optional(), - framesOmitted: z.array(z.number()).nullable().optional(), - registers: z.record(z.string()).nullable().optional(), - hasSystemFrames: z.boolean().optional(), - }) - .passthrough(); - -export type Stacktrace = z.infer; +export type Stacktrace = { + frames?: StackFrame[]; + framesOmitted?: number[] | null; + registers?: Record | null; + hasSystemFrames?: boolean; + [key: string]: unknown; +}; /** Exception mechanism (how the error was captured) */ -export const MechanismSchema = z - .object({ - type: z.string().optional(), - handled: z.boolean().optional(), - synthetic: z.boolean().optional(), - description: z.string().nullable().optional(), - data: z.record(z.unknown()).optional(), - }) - .passthrough(); - -export type Mechanism = z.infer; +export type Mechanism = { + type?: string; + handled?: boolean; + synthetic?: boolean; + description?: string | null; + data?: Record; + [key: string]: unknown; +}; /** A single exception value in the exception entry */ -export const ExceptionValueSchema = z - .object({ - type: z.string().nullable().optional(), - value: z.string().nullable().optional(), - module: z.string().nullable().optional(), - threadId: z.union([z.string(), z.number()]).nullable().optional(), - mechanism: MechanismSchema.nullable().optional(), - stacktrace: StacktraceSchema.nullable().optional(), - rawStacktrace: StacktraceSchema.nullable().optional(), - }) - .passthrough(); - -export type ExceptionValue = z.infer; +export type ExceptionValue = { + type?: string | null; + value?: string | null; + module?: string | null; + threadId?: string | number | null; + mechanism?: Mechanism | null; + stacktrace?: Stacktrace | null; + rawStacktrace?: Stacktrace | null; + [key: string]: unknown; +}; /** Exception entry in event.entries */ -export const ExceptionEntrySchema = z.object({ - type: z.literal("exception"), - data: z - .object({ - values: z.array(ExceptionValueSchema).optional(), - excOmitted: z.array(z.number()).nullable().optional(), - hasSystemFrames: z.boolean().optional(), - }) - .passthrough(), -}); - -export type ExceptionEntry = z.infer; +export type ExceptionEntry = { + type: "exception"; + data: { + values?: ExceptionValue[]; + excOmitted?: number[] | null; + hasSystemFrames?: boolean; + }; +}; // ───────────────────────────────────────────────────────────────────────────── // Breadcrumbs Entry // ───────────────────────────────────────────────────────────────────────────── /** A single breadcrumb */ -export const BreadcrumbSchema = z - .object({ - type: z.string().optional(), - category: z.string().nullable().optional(), - level: z.string().optional(), - message: z.string().nullable().optional(), - timestamp: z.string().optional(), - event_id: z.string().nullable().optional(), - data: z.record(z.unknown()).nullable().optional(), - }) - .passthrough(); - -export type Breadcrumb = z.infer; +export type Breadcrumb = { + type?: string; + category?: string | null; + level?: string; + message?: string | null; + timestamp?: string; + event_id?: string | null; + data?: Record | null; + [key: string]: unknown; +}; /** Breadcrumbs entry in event.entries */ -export const BreadcrumbsEntrySchema = z.object({ - type: z.literal("breadcrumbs"), - data: z - .object({ - values: z.array(BreadcrumbSchema).optional(), - }) - .passthrough(), -}); - -export type BreadcrumbsEntry = z.infer; +export type BreadcrumbsEntry = { + type: "breadcrumbs"; + data: { + values?: Breadcrumb[]; + }; +}; // ───────────────────────────────────────────────────────────────────────────── // Request Entry // ───────────────────────────────────────────────────────────────────────────── /** HTTP request entry in event.entries */ -export const RequestEntrySchema = z.object({ - type: z.literal("request"), - data: z - .object({ - url: z.string().nullable().optional(), - method: z.string().nullable().optional(), - fragment: z.string().nullable().optional(), - query: z - .union([ - z.array(z.tuple([z.string(), z.string()])), - z.string(), - z.record(z.string()), - ]) - .nullable() - .optional(), - data: z.unknown().nullable().optional(), - headers: z - .array(z.tuple([z.string(), z.string()])) - .nullable() - .optional(), - cookies: z - .union([ - z.array(z.tuple([z.string(), z.string()])), - z.record(z.string()), - ]) - .nullable() - .optional(), - env: z.record(z.string()).nullable().optional(), - inferredContentType: z.string().nullable().optional(), - apiTarget: z.string().nullable().optional(), - }) - .passthrough(), -}); - -export type RequestEntry = z.infer; +export type RequestEntry = { + type: "request"; + data: { + url?: string | null; + method?: string | null; + fragment?: string | null; + query?: [string, string][] | string | Record | null; + data?: unknown | null; + headers?: [string, string][] | null; + cookies?: [string, string][] | Record | null; + env?: Record | null; + inferredContentType?: string | null; + apiTarget?: string | null; + }; +}; // ───────────────────────────────────────────────────────────────────────────── // Event Contexts // ───────────────────────────────────────────────────────────────────────────── /** Browser context */ -export const BrowserContextSchema = z - .object({ - name: z.string().optional(), - version: z.string().optional(), - type: z.literal("browser").optional(), - }) - .passthrough(); - -export type BrowserContext = z.infer; +export type BrowserContext = { + name?: string; + version?: string; + type?: "browser"; + [key: string]: unknown; +}; /** Operating system context */ -export const OsContextSchema = z - .object({ - name: z.string().optional(), - version: z.string().optional(), - type: z.literal("os").optional(), - }) - .passthrough(); - -export type OsContext = z.infer; +export type OsContext = { + name?: string; + version?: string; + type?: "os"; + [key: string]: unknown; +}; /** Device context */ -export const DeviceContextSchema = z - .object({ - family: z.string().optional(), - model: z.string().optional(), - brand: z.string().optional(), - type: z.literal("device").optional(), - }) - .passthrough(); - -export type DeviceContext = z.infer; +export type DeviceContext = { + family?: string; + model?: string; + brand?: string; + type?: "device"; + [key: string]: unknown; +}; /** User geo information */ -export const UserGeoSchema = z - .object({ - country_code: z.string().optional(), - city: z.string().optional(), - region: z.string().optional(), - }) - .passthrough(); - -export type UserGeo = z.infer; +export type UserGeo = { + country_code?: string; + city?: string; + region?: string; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Event // ───────────────────────────────────────────────────────────────────────────── -export const SentryEventSchema = z - .object({ - // Core identifier (required) - eventID: z.string(), - // Optional metadata - id: z.string().optional(), - projectID: z.string().optional(), - context: z.record(z.unknown()).optional(), - contexts: z - .object({ - trace: TraceContextSchema.optional(), - browser: BrowserContextSchema.optional(), - os: OsContextSchema.optional(), - device: DeviceContextSchema.optional(), - }) - .passthrough() - .optional(), - dateCreated: z.string().optional(), - dateReceived: z.string().optional(), - /** Event entries: exception, breadcrumbs, request, spans, etc. */ - entries: z.array(z.unknown()).optional(), - errors: z.array(z.unknown()).optional(), - fingerprints: z.array(z.string()).optional(), - groupID: z.string().optional(), - message: z.string().optional(), - metadata: z.record(z.unknown()).optional(), - platform: z.string().optional(), - /** File location where the error occurred */ - location: z.string().nullable().optional(), - /** URL where the event occurred */ - culprit: z.string().nullable().optional(), - sdk: z - .object({ - name: z.string(), - version: z.string(), - }) - .passthrough() - .nullable() - .optional(), - tags: z - .array( - z.object({ - key: z.string(), - value: z.string(), - }) - ) - .optional(), - title: z.string().optional(), - type: z.string().optional(), - user: z - .object({ - id: z.string().nullable().optional(), - email: z.string().nullable().optional(), - username: z.string().nullable().optional(), - ip_address: z.string().nullable().optional(), - name: z.string().nullable().optional(), - geo: UserGeoSchema.nullable().optional(), - data: z.record(z.unknown()).nullable().optional(), - }) - .passthrough() - .nullable() - .optional(), - /** Release information for this event */ - release: ReleaseSchema.nullable().optional(), - /** SDK update suggestions */ - sdkUpdates: z - .array( - z - .object({ - type: z.string().optional(), - sdkName: z.string().optional(), - newSdkVersion: z.string().optional(), - sdkUrl: z.string().optional(), - }) - .passthrough() - ) - .optional(), - }) - .passthrough(); - -export type SentryEvent = z.infer; +export type SentryEvent = { + eventID: string; + id?: string; + projectID?: string; + context?: Record; + contexts?: { + trace?: TraceContext; + browser?: BrowserContext; + os?: OsContext; + device?: DeviceContext; + [key: string]: unknown; + }; + dateCreated?: string; + dateReceived?: string; + /** Event entries: exception, breadcrumbs, request, spans, etc. */ + entries?: unknown[]; + errors?: unknown[]; + fingerprints?: string[]; + groupID?: string; + message?: string; + metadata?: Record; + platform?: string; + /** File location where the error occurred */ + location?: string | null; + /** URL where the event occurred */ + culprit?: string | null; + sdk?: { + name: string; + version: string; + } | null; + tags?: Array<{ + key: string; + value: string; + }>; + title?: string; + type?: string; + user?: { + id?: string | null; + email?: string | null; + username?: string | null; + ip_address?: string | null; + name?: string | null; + geo?: UserGeo | null; + data?: Record | null; + } | null; + /** Release information for this event */ + release?: Release | null; + /** SDK update suggestions */ + sdkUpdates?: Array<{ + type?: string; + sdkName?: string; + newSdkVersion?: string; + sdkUrl?: string; + }>; + [key: string]: unknown; +}; // ───────────────────────────────────────────────────────────────────────────── // Project Keys (DSN) // ───────────────────────────────────────────────────────────────────────────── -export const ProjectKeyDsnSchema = z.object({ - public: z.string(), - secret: z.string().optional(), -}); - -export const ProjectKeySchema = z - .object({ - id: z.string(), - name: z.string(), - dsn: ProjectKeyDsnSchema, - isActive: z.boolean(), - dateCreated: z.string().optional(), - }) - .passthrough(); - -export type ProjectKey = z.infer; +export type ProjectKey = { + id: string; + name: string; + dsn: { + public: string; + secret?: string; + }; + isActive: boolean; + dateCreated?: string; + [key: string]: unknown; +}; From 3e784ec24f9207861e8c0b8d3d46e5a2554a1c84 Mon Sep 17 00:00:00 2001 From: mathuraditya724 Date: Wed, 4 Feb 2026 17:45:05 +0530 Subject: [PATCH 4/4] chore: minor changes --- src/lib/api-client.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/lib/api-client.ts b/src/lib/api-client.ts index 1962655a..a42da20c 100644 --- a/src/lib/api-client.ts +++ b/src/lib/api-client.ts @@ -11,7 +11,6 @@ import { listAProject_sClientKeys, listAProject_sIssues, listYourOrganizations, - resolveAShortId, retrieveAnEventForAProject, retrieveAnOrganization, retrieveAProject, @@ -460,19 +459,13 @@ export async function getIssueByShortId( return withApiSpan( "GET", - `/organizations/${orgSlug}/shortids/${normalizedShortId}/`, + `/organizations/${orgSlug}/issues/${normalizedShortId}/`, async () => { - // The hey-api SDK uses issue_id for the path parameter - const response = await resolveAShortId({ - client, - path: { - organization_id_or_slug: orgSlug, - issue_id: normalizedShortId, - }, + // Use raw client call to maintain original endpoint behavior + const response = await client.get({ + url: `/api/0/organizations/${orgSlug}/issues/${normalizedShortId}/`, }); - const data = extractData(response) as unknown; - // resolveAShortId returns { group: Issue, ... } - return (data as { group: SentryIssue }).group; + return extractData(response) as SentryIssue; } ); }